[Dune] How to get access to elements of a grid using faces?

Carsten Gräser graeser at math.fu-berlin.de
Tue Dec 21 22:41:28 CET 2010


Hi,
Am 21.12.2010 22:24, schrieb Sergei Malashenko:

> Hi
> I have a little question how I can get access to neighbor elements using face? 
If you refer to faces as codim 1 entities the answer is you can't.
However you can use IntersectionIterators that iterate over all
intersection of a fixed element (Entity<0>) with other elements.
Each of these intersections provides access to the element itself
and the neighboring element of the intersection using the inside()
and outside() method, respectively.

There are Leaf- and LevelIntersectionIterators for intersections
w.r.t. the leaf or a level grid view. For more information see
the documentation of Intersection and IntersectionIterator.

Best,
Carsten




More information about the Dune mailing list