[Dune] Intersection iterator problem

Martin Nolte nolte at mathematik.uni-freiburg.de
Tue Aug 4 16:35:23 CEST 2009


Hi Aleksejs, hi Christian,

I think what Aleksejs means is that the global number of the face that has a
neighbor should be unique. This is indeed true. The error due to mixing old and
new numberings. The method indexInInside returns the local face number with
respect to the new (generic) reference element, while the method map< codim > on
the mapper uses the old numbering. The correct code would be


std::cout << "Global "
          << faceMapper.map(*elementIter,faceIntersIter->indexInInside(),1)
          << std::endl;

Please be aware of this change when reading documentation (though the MCMGMapper
is ill-documented with respect to this issue).

Yours,

Martin

Christian Engwer wrote:
> 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
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune

-- 
Martin Nolte <nolte at mathematik.uni-freiburg.de>

Universität Freiburg                                   phone: +49-761-203-5642
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany




More information about the Dune mailing list