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

How to use FEniCS FEM table?

0 votes

Hello,

I'm trying to use finite elements described in "femtable.org", but I'm getting errors.

In FunctionSpace documentation there is a overloaded constructor:

FunctionSpace(mesh, element, constrained_domain=None)

But when I do the following, I get the error below:

P_2 = FiniteElement("P", triangle, 2)
F = FunctionSpace(mesh, P_2)

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at


*** fenics@fenicsproject.org


*** Remember to include the error message listed below and, if possible,
*** include a minimal running example to reproduce the error.


*** -------------------------------------------------------------------------
*** Error: Unable to create function space.
*** Reason: Illegal argument for finite element family, not a string: with label None>>.
*** Where: This error was encountered inside functionspace.py.
*** Process: 0


*** DOLFIN version: 1.6.0
*** Git changeset: unknown
*** -------------------------------------------------------------------------

Could anyone explain me how to use FEM table properly?

Thank you in advance!

asked Mar 12, 2016 by EduardoMS FEniCS Novice (270 points)
edited Mar 13, 2016 by EduardoMS

Which error do you see in which version of FEniCS? Can you please provide the complete example?

Christian, I edited the post with the error. The code is just the described above. Thank you!

...