[Dune] Intersection iterator problem

Christian Engwer christi at uni-hd.de
Tue Aug 4 16:16:11 CEST 2009


On Tue, Aug 04, 2009 at 03:48:02PM +0200, Aleksejs Fomins wrote:
> Dear Christian,
> 
> Sorry, I shall try to be more specific.
> 
> The grid contains 2 tetrahedrons with coordinates (0,0,0) (0,0,1) 
> (0,1,0) (1,0,0) and (0,0,0) (0,0,1) (0,1,0) (-1,0,0)
> The intersection iterator does indeed iterate through intersections 
> (which are faces), so I obtain the face local numbers using 
> indexInInside() method.

but only in this particular case.

>             std::cout << "Is neighbor " << faceIntersIter->neighbor() << std::endl;

Please read the documentation!

The intersection documentation
http://www.dune-project.org/doc/doxygen/dune-grid-html/classDune_1_1Intersection.html
clearly states:

    bool neighbor () const
 	   return true if intersection is shared with another element. 

This method tells you whether this intersection does have a
neighboring cell, and thus whether it is safe to call the outside
method.

Christian




More information about the Dune mailing list