[Dune-devel] Validity of GridView after grid changes

Carsten Gräser graeser at math.fau.de
Fri Apr 11 14:23:04 CEST 2025


Hi Simon,

Am 11.04.25 um 13:59 schrieb Simon Praetorius:
> yes, probably one can construct a gridview that is invalidated once the grid changes.
there are plenty. If the number of levels changes due to coarsening,
the level grid views will in general be invalidated. How can a gridview
for level 5 be valid if there is no more level 5?

As the one who implemented the index sets in dune-subgrid I must say
that the specific behaviour is an implementation detail that might
very well be different.

Also custom gridviews (as far as I remember dune-fem has a e.g.
filtered gridview) will normally fail to stay valid.

(I'm not saying that the situation is satisfactory.)

Carsten

> But I have not yet found one. Gridviews that stay valid:
> 
> - dune-curvedgrid
> - dune-periodic (flat-periodic)
> - dune-mmesh
> - dune-multidomaingrid
> - dune-subgrid
> - geometrygrid
> - all metagrids from dune-metagrid
> - dune-gridglue
> 
> OK, the first one I have found is dune-spgrid where I think, the
> gridview is invalid after grid change. But this grid has already an
> update method that makes it valid again. And there the indexset is
> stored in the gridview what is not really necessary and could maybe
> even be changed in the implementation.> 
> Almost all gridview implementations are also (essentially) identical. There could even be a common pattern such that there would not be a need to implement a new gridview for all grid implementations.
> 
> I am just saying, this invalidity makes a lot of things extra complicated. There is also a gap in the grid interface that allows to update the gridview. Eliminating the need for such an update would already solve some problems.
> 
> Also, we cannot easily test our current implementation (that gridviews are correctly reconstructed instead of just left untouched) since we have nothing that would fail.



More information about the Dune-devel mailing list