[Dune] Local Refinement in a DUNE Grid

Christian Engwer christi at uni-hd.de
Tue Dec 28 10:38:15 CET 2010


Dear Swayam,

did you have a look at the dune-grid-howto? The Howto provides a lot
of basic axamplex on how to iterate through the grid.

The grid only allows access via forward-iterators, thus the
(+i)-operator is not available. There are no means of
random-access. That the begin<0>() iterator yields a boundary cell is
only coincidence, for other grids the behavior might be completely
different.

Please have a look at the howto and try to understand these examples.

Ciao
Christian

On Tue, Dec 28, 2010 at 09:15:23AM +0100, S. Swayamjyoti wrote:
> How can I access an codim<0> entity at the center of the domain? For the
> boundary element, I can access it as, *leafView.template begin<0>( )*. But
> how can I access other elements? I tried *leafView.template begin<0>( ) + 1
> *or *leafView.template end<0>( ) - 1, *but to no avail.
> 
> In the loop, I am iterating through all the elements,
> *
> for (ElementLeafIterator it = leafView.template begin<0>( );
> it!=leafView.template end<0>( ); ++it)*
> 
> but later if I give a conditional statement such as, *if(it==leafView.template
> begin<0>( ) + 1) grid.mark(1,*it); *then I get an error saying operator + 1
> does not match. I can mark the 1st element though, that is without the + 1.
> 
> Regards,
> Swayam

> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune





More information about the Dune mailing list