[Dune] Local Refinement in a DUNE Grid

Uli Sack usack at math.fu-berlin.de
Mon Jan 3 14:01:13 CET 2011


 > My current code looks like this:
 >
 > for (ElementLeafIterator it = leafView.template begin<0>();
 > it!=leafView.template end<0>(); ++it)
 > {...}

BTW you should NOT create the EndIterator inside the loop! This way you 
have to create it EACH time the loop is executed! This can be very slow 
indeed! So for perfomance's sake rather use

ElementLeafIterator end = leafView.template end<0>();
for (ElementLeafIterator it=leafView.template begin<0>();it!=end;++it)
{...}

-- 
************************************************************************
* Uli Sack                     ** email: usack at math.fu-berlin.de       *
* Freie Universität Berlin     ** phone: + 49 (30) 838 75250           *
* Institut für Mathematik      **                                      *
* Arnimallee 6                 ** -------------------------------------*
* 14195 Berlin, Germany        ** Member of MATHEON (www.matheon.de)   *
************************************************************************




More information about the Dune mailing list