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/