[Dune] How to iterate over the vertices of an element?
Oliver Sander
sander at mi.fu-berlin.de
Mon Nov 3 11:10:43 CET 2008
Hi Arne!
If you want the actual entity there is a method (of the Entity)
template<int cc> Codim< cc >::EntityPointer
<cid:part1.04030004.06040204 at mi.fu-berlin.de> entity
<cid:part2.09090906.02090403 at mi.fu-berlin.de> (int i) const Access to
subentity |i| of codimension |cc|.
If you just want the vertex entity to get its id or index I suggest you
use the
subIndex methods of the index and id sets. These can be expected to be
a lot faster.
enjoy,
Oliver
Arne Rekdal schrieb:
> Hello.
>
> In my code I have an expression like this:
>
> const int dim=2;
> for (ElementIterator it=grid.template leafbegin<0>(); it<grid.template
> leafend<0>(); ++it){
> // Here I want to iterate over the vertices for this element
> ( Entities of codim 2 restricted on this element)
> }
>
> I need the entities, so the the coordinates of each vertex (it-
> >geometry()[i]) is not enough. How can I do this?
>
> Thank you.
>
>
> Greetings
> Arne Rekdal
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
--
************************************************************************
* Oliver Sander ** email: sander at mi.fu-berlin.de *
* Freie Universität Berlin ** phone: + 49 (30) 838 75217 *
* Institut für Mathematik ** URL : page.mi.fu-berlin.de/~sander *
* Arnimallee 6 ** -------------------------------------*
* 14195 Berlin, Germany ** Member of MATHEON (www.matheon.de) *
************************************************************************
More information about the Dune
mailing list