Dear Mikael,
In the MixedPoisson.py, I have two questions:
1 . How to modify it to periodic boundary conditions in both x- and y-directions. I tried to change SD = FunctionSpace(N, family, bc =(0, 0)) to SD = FunctionSpace(N, family), but an error occurred.
2 . For the mixed formulation
$$
g - \nabla(u) &= 0 \
\nabla \cdot g &= f \
$$
g is a vector denoted by g=(g0, g1), g and u are trial functions, let p=(p0, p1) and q are test functions.
If I don't want to use the VT = VectorSpace(TT) to get the space g belongs to, and then M = BlockMatrix(A00+A01+A10) to generate the final matrix, I want to get the final matrix (by myself) like this:
[ A0 O B0' ]
[ O A1 B1' ]
[ B0 B1 O ]
where A0=(p0, g0), A1=(p1, g1), O is zero matrix, B0=(q, g1_x), B1=(q, g2_y).
Is this possible, and if so, can a complete code or demo be provided?
Thank you very much!
Dear Mikael,
In the MixedPoisson.py, I have two questions:
1 . How to modify it to periodic boundary conditions in both x- and y-directions. I tried to change
SD = FunctionSpace(N, family, bc =(0, 0))toSD = FunctionSpace(N, family), but an error occurred.2 . For the mixed formulation
$$
g - \nabla(u) &= 0 \
\nabla \cdot g &= f \
$$
gis a vector denoted byg=(g0, g1),ganduare trial functions, letp=(p0, p1)andqare test functions.If I don't want to use the
VT = VectorSpace(TT)to get the spacegbelongs to, and thenM = BlockMatrix(A00+A01+A10)to generate the final matrix, I want to get the final matrix (by myself) like this:where
A0=(p0, g0),A1=(p1, g1),Ois zero matrix,B0=(q, g1_x),B1=(q, g2_y).Is this possible, and if so, can a complete code or demo be provided?
Thank you very much!