Skip to content

Add mapper.update(gridView) method and fix mapper.update() where possible

Carsten Gräser requested to merge feature/fix-mapper-update into master

This adds an update(grindView) method to the (SCSG|MCMG)Mapper implementations and forwards to the latter in the (Leaf|Level)...Mapper classes.

Since there's no guarantee that a GridView or IndexSet& remains valid after grid adaptation, they must be updated inside of the mappers. For the MCMGMapper the only way to achieve this was

mapper = MCMGMapper(gridView, mapper.layout());

For the SCSGMapper it wasn't possible at all, because it stores a reference to the IndexSet. This patch adds new interface methods (SCSG|MCMG)Mapper::update(gridView) to allow a clean update.

Notice that the Mapper interface class is not modified, because it does not know about grid views (and is outdated anyway).

It may be reasonable to deprecate the plain mapper.update() methods. But this may require significant changes to downstream interfaces and should thus be discussed before.

Merge request reports

Loading