This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Function space definition for the 2D stokes problem

+2 votes

Hello,
In the DG flux formulation of a 2D Stokes problem there are 3 unknows:
(u,p,m) where u is a 2D vector, p is a scalar and m a 2x2 matrix.
How should I define the function space here ?

Thanks.

asked Jul 1, 2013 by micdup FEniCS User (1,120 points)

1 Answer

+4 votes
 
Best answer
U = VectorFunctionSpace(mesh, Ufamily, Udegree)
P = FunctionSpace(mesh, Pfamily, Pdegree)
M = TensorFunctionSpace(mesh, Mfamily, Mdegree, symmetry=False)
W = MixedFunctionSpace([U, P, M])
answered Jul 1, 2013 by Jan Blechta FEniCS Expert (51,420 points)
selected Jul 1, 2013 by Garth N. Wells

Many thanks !

...