Skip to content

Rewrite adaption interface to allow to attach bases to the grid-transfer

Praetorius, Simon requested to merge feature/transfer_interface into master

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:

  1. Classes with preAdapt(bool) and postAdapt(bool)
  2. 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:

  1. preAdapt
  2. adapt
  3. update
  4. 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.

Edited by Praetorius, Simon

Merge request reports