[Dune] face loop

Matteo Semplice matteo.semplice at unito.it
Wed Jun 6 09:33:37 CEST 2012


Hi,
  this brought to my mind that it's a while that I wanted to ask on the 
list what's the meaning of the following comment at lines 93-94 of 
evolve.hh...

// compute flux from one side only
// this should become easier with the new IntersectionIterator 
functionality!

Best,
     Matteo

Il 05/06/2012 18:45, Martin Nolte ha scritto:
> Hi Marco,
>
> the DUNE interface does not provide means to obtain the elements (entities of
> codimension 0) sharing a common face (entity of codimension 1).
>
> Moreover, I guess from your question that you are actually interested in the
> intersections rather than the faces. Ask yourself what kind of object you want
> if the grid is non-conforming.
>
> Unfortunately, there is no intersection iterator that stops exactly once at each
> intersection of the grid view. So you have loop over all elements and then loop
> over their intersections. However, if the flux computation is expensive (and you
> don't use a surface grid), you can use the fact that each interior interection
> is visited exactly twice in order to evaluate the flux only once. Just evaluate
> it iff, e.g., the index of the inside entity is less than the index of the
> outside entity.
>
> I hope this throws some light on the matter.
>
> Best,
>
> Martin
>
> On 06/05/2012 05:27 PM, Marco Cisternino wrote:
>> Hi,
>> I'm looking at the tutorial codes, specifically, at evolve.hh. I see that a loop
>> over the intersections is nested in a loop over the elements.
>> I would like to loop over all the faces (old intersections) to compute the
>> fluxes but I would need to know which elements the face belong to.
>> How could I do?
>> I defined the face iterator on the leaves like this:
>> typedef typename GridView::template Codim<1>::template
>> Partition<Dune::All_Partition>::Iterator FLeafIterator;
>> Is there a way to ask for the elements of codim=0 which own the face pointed by
>> FLeafIterator??
>> Thanks for any help.
>>
>> Cheers,
>> Marco
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune





More information about the Dune mailing list