Skip to content

[bugfix] make Dune::Fem::GlobalRefine work on LeafGridPart

Martin Nolte requested to merge bugfix/globalrefine-on-leafgridpart into master

When calling Dune::Fem::GlobalRefine with a discrete function living on the LeafGridPart, the mappers were not updated correctly. This patch fixes the bug.

Note: The bug fix consists in an interface change described below.

Mappers now have an extra method "void update ();", which is required to ensure that the mapper is consistent with the updated grid. This method has to be stateless and may be called arbitrarily often without affecting the result. As adaptive mappers are up to date by definition, this method does nothing on them.

The DofManager now distinguishes between adaptive mappers and non-adaptive ones. For adaptive mappers, it will ensure the values are correctly moved within the DoF vector, but will not call update. For non-adaptive ones, it will only call update and resize the DoF vector accordingly, as preserving data is not possible in this case anyway.

Merge request reports