Upward connectivities between mesh entities

23 views
Skip to first unread message

Olivier Jamond

unread,
Jul 18, 2022, 12:25:04 PM7/18/22
to deal.II User Group
Hello deal.II users,

I am considering using deal.II "triangulation" module as a mesh backend handling distributed meshes with AMR functionnalities in the software I am working on for the french Alternative Energies and Atomic Energy Commission.

I started looking and playing with the classes of this module, but at this time I couldn't find a way to get upward adjacencies between mes entities, i.e. topological connections from lower dimentionnal entities to higher ones (vertex->faces, face->cells, vertex->cells, ...). For example, let's say for a 3D mesh composed of hexahedra, considering a quad face I would like to get the two (or one if the face is located at a booundary) cells adjacent to this face.

Is such a query possible with the "triangulation" module of deal.II?

Many thanks!
Olivier Jamond 

Wolfgang Bangerth

unread,
Jul 18, 2022, 2:18:08 PM7/18/22
to dea...@googlegroups.com
On 7/18/22 10:25, Olivier Jamond wrote:
>
> I started looking and playing with the classes of this module, but at this
> time I couldn't find a way to get upward adjacencies between mes entities,
> i.e. topological connections from lower dimentionnal entities to higher ones
> (vertex->faces, face->cells, vertex->cells, ...). For example, let's say for a
> 3D mesh composed of hexahedra, considering a quad face I would like to get the
> two (or one if the face is located at a booundary) cells adjacent to this face.
>
> Is such a query possible with the "triangulation" module of deal.II?

No. Connectivities are only ever "down" from cells to faces to edges to
vertices. That's because the number of these connections is always known and
fixed (or historically at least, *used* to be known when we had only hypercube
meshes) whereas the number of "up" connections (e.g., the number of cells
adjacent to a vertex) is dynamic.

As a consequence, we generally structure our algorithms in such a way that we
start with loops over all cells, and then over their faces, edges, vertices,
depending on what you want to do. You can "tag" these lower-dimensional
objects via the "user flag" to make sure you only ever touch each object once.

In practice, there are cases where one really does want to loop over all
vertices and their adjacent cells. For such cases, there are often functions
in namespace GridTools that can give you the adjacent cells to a vertex. At
the same time, this is not the preferred order of things, and it is not as
efficient as looping over cells and then the cells' components.

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Reply all
Reply to author
Forward
0 new messages