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

identify vertex dofs for higher order spaces

+4 votes

I need to determine the vertex dofs with a higher order conforming space like this

mesh = UnitSquareMesh(3, 3)
V = FunctionSpace(mesh, 'CG', 2)
vertex_to_dof_map(V)
*bam*
Error:   Unable to tabulate dof to vertex map.
Reason:  Can only tabulate dofs on vertices.
Where:   This error was encountered inside DofMap.cpp.

So, yes, "tabulate dofs (just) on vertices" is exactly what I want and vertex_to_dof_map does this nicely for P1. What is the problem with P2?
Is there another way to get this information?

asked Jan 13, 2014 by meigel FEniCS User (1,520 points)

1 Answer

+2 votes

The error message is confusing. It should say something like: "Can only tabulate dofs for spaces with dofs only on vertices."

That said it should be pretty straight forward (I think) to expand the functionality of vertex_to_dof_map to apply for spaces with dofs not only on vertices too. Please add an issue on bitbucket together with some minimal code of what you want to accomplish with your map.

answered Jan 14, 2014 by johanhake FEniCS Expert (22,480 points)
dof_to_vertex_map for higher order
...