hamed
(hamed)
July 27, 2020, 5:49pm
1
Dear all
I like to limit my integration over a portion of whole.
To do this I changed int2d(Th)
to int2d(Th,Coil)
varf vPoi(u,v)
=int2d(Th,Coil) (sig * Grad(u)' * Grad(v))
+on(CoilTerminalIn, u=0)
+on(CoilTerminalOut, u=1);
matrix Poi = vPoi(Ph,Ph);
cout << "sizePoi " << Poi.n << endl;
The problem is that the size of matrix Poi
does not vary at all.
How can i remove extra variables?
prj
July 27, 2020, 6:53pm
2
mesh ThCoil = trunc(Th, region == Coil);
varf vPoi(u,v)
=int2d(ThCoil) (sig * Grad(u)' * Grad(v))//'
+on(CoilTerminalIn, u=0)
+on(CoilTerminalOut, u=1);
fespace PhCoil(ThCoil, P1);
matrix Poi = vPoi(PhCoil,PhCoil);
cout << "sizePoi " << Poi.n << endl;
1 Like
hamed
(hamed)
July 27, 2020, 10:19pm
3
It seems I had a misunderstanding about int2d
suppose that I have a mixed fespace
like
fespace -> [RT0Orth,P1]
I like to have RT0Orth
to be defined all over the domain and P1
only inside the coil
.
In fact I like to make a matrix like K=[A B; B' C]
which
A=(RT0Orth,RT0Orth);
B=(RT0Orth,P1);
C=(P1,P1);
just defined VRT and VP1 fespae
difined you matrix A, B and C with varf, va, vb,vc;
varf va([u1,u2],[v1,v2]) = … ;
varf vb(p,[v1,v2]) = …;
varf vc(p,q) = …;
matrix A = va(VRT,VRT);
matrix B = vb(VP1,VRT);// warning test function corresponding to row index.
matrix C = vb(VP1,VP1);
matrix K = [[A,B],[B’,C]];
1 Like