On 11/17/24 08:56, yijun chen wrote:

may I know how to find the vertex index and its coordinate with the information of its local or global Dofs index within one element?

I have the local/global dofs index , I need to determine if this dof stays at the prescribed boundary.

Yijun:
a key issue is that, in general, not ever DoF is associated with a vertex. For example, with Q2 elements, there are also nodes at mid-edge and cell-center positions. And that even if each DoF is associated with a vertex, it may not be the only DoF. For example, a Q_1^2 element (two vector components) has two DoFs per vertex. As a consequence, there is no single function in deal.II that provides the mapping you seek.

But, you can get it if you happen to have an element for which every DoF is on a vertex. For example, DoFTools::map_dofs_to_support_points() returns for each DoF its physical location. And if you happen know for sure that you are using a Q1 element with just one vector component, on every cell you can use
  cell->vertex(i)
or
  cell->vertex_index(i)
and know that that is the location and vertex index of the i'th DoF on the current cell (where i=0...3 in 2d, and i=0...7 in 3d).

I hope this helps!
Best
 W.

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/dealii/3d7525ed-4d4c-4d45-afa1-56bef77c653f%40colostate.edu.

Reply via email to