Get degree of a FunctionSpace


273
views
0
10 months ago by
How can I obtain the degree of a function space, say
V = FunctionSpace(mesh, 'CG', 2)​

For FiniteElement('P', mesh.ufl_cell(), 2) there exists the degree attribute. The FiniteElement returned by V.element() does not have it.

Thanks,
David

PS: no inline code possible here?
Community: FEniCS Project

2 Answers


4
10 months ago by
V.ufl_element().degree()


In general, I'd recommend you to inspect methods of an object and usually the solution appears.

Thanks. I know, "forgot" about ufl_element apparently.. checked .element() and .dolfin_element() only ;)
written 10 months ago by David Nolte  
3
10 months ago by
You can find 'degree' in V.ufl_element().
Please login to add an answer/comment or follow this question.

Similar posts:
Search »