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

combining function spaces

+4 votes

I'd like to create a FunctionSpace that is composed of $P_2$ (with degrees of freedom associated with the nodes and edge midpoints) and $B$ (bubble elements, degrees of freedom associated with the cell center of gravity).

Is this currently possible in FEniCS?

asked Jul 25, 2013 by nschloe FEniCS User (7,120 points)

1 Answer

+2 votes
 
Best answer

Yes, it it possible:

P2 = VectorFunctionSpace(mesh, "Lagrange", 2)
B  = VectorFunctionSpace(mesh, "Bubble", 3)
V = P1 + B

Take look at the demo in dolfin/demo/undocumented/stokes-mini.

answered Jul 25, 2013 by Garth N. Wells FEniCS Expert (35,930 points)
selected Jul 25, 2013 by Jan Blechta
...