Difference between locate_dofs_topological and locate_dofs_geometrically

Good morning,

I was wondering about what is the difference between locate_dofs_topological and locate_dofs_geometrically. I found this post Extra dofs selected when adjacent faces are combined in boundary conditions with 3D BDM (N2F) elements and I wonder if this is the only difference between the two and what are the implication then with respect to the boundary condition.

Thanks for the help

Certain dofs do not have dof-coordinates in the traditional sense.
Cases like this are elements with integral moments;

and therefore there is no way doing so by using locate_dofs_geometrical, that would compare the coordinate of the degree of freedom with whatever input requirements you have.

For such function spaces, each degree of freedom is associated with an entity (that being a cell, facet or edge), which one can use locate_entities on to find an entity whose vertices satisfies the requirement function. You can then use locate_dofs_topological to get the entities associated with that entity.

1 Like