[Dune] Local Refinement in a DUNE Grid

Carsten Gräser graeser at math.fu-berlin.de
Wed Dec 29 00:31:25 CET 2010


Dear Swayam,


Am 29.12.2010 00:23, schrieb S. Swayamjyoti:
> If I know that a certain element can be refined n (n>1) times uniformly, I
> can also tell that to* grid.mark( )* by calling *
> grid.mark(n, element). *
> 
> Now, does this not hold true for UGGrid? Because when I try to mark my grid
> by grid.mark(4, *it), I get an error while execution (not during
> compilation) saying,
> 
> *DUNE ERROR: GridError: UGGrid only supports refCount values -1, 0, and 1
> for mark( )!
> *
> Is it not implemented for UGGrid or is there a work-a-round?
it is as the error message says: No, it's not supported by UGGrid.

The workaround is to do several refinement successive refinements
of the grid. You could e.g. store ids of the elements you want to
refine more then once, refine the grid and then mark all leaf
descendants of the elements the these ids and refine again.

Best,
Carsten





More information about the Dune mailing list