Rewrite adaption interface to allow to attach bases to the grid-transfer
The GlobalBasis needs to be updated after each grid change. So, we have added a list of callbacks that are called in the GridTransfer
class in preAdapt()
, after adapt()
and in postAdapt()
. There are two types of supported data:
- Classes with
preAdapt(bool)
andpostAdapt(bool)
- Classes with
update(gridView())
The first one is typically implemented by data containers that need interpolation. The second one is implemented by a basis.
The DOFVector
and its basis are automatically registered in the GridTransfer in construction of the DOFVector
. If you have a data-container or a basis independent of a DOFVector you have to attach (and detach before destruction) yourself. Therefore, simply call
GridTransferManager::attach(grid, data); // or
GridTransferManager::detach(grid, data);
where data must implement on of the interface 1. or 2., described also in the AdaptionInterface.hh
.
Note, the adaption cycle works as follows:
- preAdapt
- adapt
- update
- postAdapt
So, in the postAdapt step we can assume that all update callbacks are executed. The order of the update methods could be random, though. And also the order of the pre/postAdapt callbacks is arbitrary.