Wiki
Clone wikiFEniCS 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:
- deprecate current interface, see also https://bitbucket.org/fenics-project/dolfin/issues/576/function-space-model-in-python-layer-of
- or lazy construction of dofmap
Updated