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

The error in implementation of mini element

+1 vote

Hi everyone, I use mini element for stokes equation, and the error is:
terminate called after throwing an instance of 'std::runtime_error'
what(): evaluate_dof(s) for enriched element not implemented.

My ufl code is:

P1 = VectorElement("Lagrange", triangle, 1)
B = VectorElement("Bubble", triangle, 3)
Q = FiniteElement("Lagrange", triangle, 1)
MixElement = (P1 + B) * Q   
f=Coefficient (P1)
(u, p) = TrialFunctions(MixElement)
(v, q) = TestFunctions(MixElement)
a=inner (grad(u), grad(v))*dx - p*div(v)*dx + q*div(u)*dx  
L=inner(f,v)*dx

Has anyone encountered this problem? Any comment is appreciated.

asked Dec 30, 2015 by Guodong Zhang FEniCS Novice (420 points)

Well, did you call evaluate_dofs in your code somewhere? What is the context in which you use the generated code?

1 Answer

+2 votes

The code for evaluation of dual basis (nodes) is not working for enriched element and thus raises error when used. See https://bitbucket.org/fenics-project/ffc/issues/69 . The fix does not seem to come soon because some infrastructure work is needed in FIAT which is now blocked by a big pull request which is difficult to handle.

Here are described features which are not working. As Christian says, if you show us the line of your DOLFIN code which raises we can propose a workaround.

answered Jan 1, 2016 by Jan Blechta FEniCS Expert (51,420 points)
...