If you don't mind, can you please send me a demo code snippet on how to do the successive refinement? How do I access the leaf descendants after I have marked and refined once, I find difficulty in constructing the correct loop. My current code looks like this:<br>

<br><b>for (ElementLeafIterator it = leafView.template begin<0>(); it!=leafView.template end<0>(); ++it)<br>{<br>int indexi = mapper.map(*it);<br>  if(indexi>135 && indexi<142) grid.mark(1,*it)<br>

}<br>        grid.preAdapt();<br>        grid.adapt();<br>        grid.postAdapt();</b><br><br>How do I assign ids to the leaf descendants of 135 < indexi < 142 elements, and how do I mark/refine them again?<br><u>                                                                                                                                                                                                    </u><br>

<br><div class="gmail_quote">On Wed, Dec 29, 2010 at 12:31 AM, Carsten Gräser <span dir="ltr"><<a href="mailto:graeser@math.fu-berlin.de">graeser@math.fu-berlin.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Dear Swayam,<br>
<br>
<br>
Am 29.12.2010 00:23, schrieb S. Swayamjyoti:<br>
<div><div></div><div class="h5">> If I know that a certain element can be refined n (n>1) times uniformly, I<br>
> can also tell that to* grid.mark( )* by calling *<br>
> grid.mark(n, element). *<br>
><br>
> Now, does this not hold true for UGGrid? Because when I try to mark my grid<br>
> by grid.mark(4, *it), I get an error while execution (not during<br>
> compilation) saying,<br>
><br>
> *DUNE ERROR: GridError: UGGrid only supports refCount values -1, 0, and 1<br>
> for mark( )!<br>
> *<br>
> Is it not implemented for UGGrid or is there a work-a-round?<br>
</div></div>it is as the error message says: No, it's not supported by UGGrid.<br>
<br>
<b>The workaround is to do several refinement successive refinements<br>
of the grid. You could e.g. store ids of the elements you want to<br>
refine more then once, refine the grid and then mark all leaf<br>
descendants of the elements the these ids and refine again.</b><br>
<br>
Best,<br>
<font color="#888888">Carsten<br>
<br>
</font></blockquote></div><br>