Hi Community,
I am going to use bubble functions to stabilized simple RT finite elements. (Increase DOFs)
Here is my MWE:
from fenics import *
mesh = UnitSquareMesh(10,10)
QE = FiniteElement(‘RT’,mesh.ufl_cell(),2)
BE = VectorElement(‘B’,mesh.ufl_cell(),3)
M = FunctionSpace(mesh,QE+BE)
Q = FunctionSpace(mesh,QE)
Gdof = M.dim()
GGdof = Q.dim()
print(‘Global DOF with BF =’, Gdof)
print((‘Global DOF without BF =’, GGdof))
But I’ve got this error:
ValueError: Elements must have same mapping
.
*** Where: This error was encountered inside jit.py.
*** Process: 0
*** DOLFIN version: 2017.2.0
*** Git changeset: 4c59bbdb45b95db2f07f4e3fd8985c098615527f
So based on the error, I think the source of error is the way I’ve imposed bubble function on my vector element (M = FunctionSpace(mesh,QE+BE)) but I don’t know how can I resolve this issue.
Thank you in advance.