Wiki

Clone wiki

FEniCS Developer Tools / dofmap construction behind the scene

The problem:

P2 = VectorFunctionSpace(mesh, 'Lagrange', 2) # its dofmap not needed anywhere
P1 = FunctionSpace(mesh, 'Lagrange', 1) # its dofmap not needed anywhere
TH = P2 * P1

Proper way to do it:

P2 = VectorElement('Lagrange', mesh.ufl_cell(), 2)
P1 = FiniteElement('Lagrange', mesh.ufl_cell(), 1)
TH = FunctionSpaceBase(mesh, P2 * P1)

Possible solutions:

Updated