Commit f5575719 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Merge branch 'issue/adapt_grid_dependencies' into 'master'

Add update() method for grid to adapt dependencies

See merge request !185
parents 883e5723 f98dafa2
Pipeline #4328 passed with stage
in 42 minutes and 59 seconds
......@@ -202,6 +202,12 @@ namespace AMDiS
info(2,"AdaptiveGrid::postAdapt needed {} seconds", t.elapsed());
}
/// Update all registered dependent objects if grid is changed manually
void update()
{
this->notify(event::adapt{true});
}
/// Returns the grid change index, see \ref changeIndex.
unsigned long changeIndex() const
{
......
......@@ -150,8 +150,10 @@ void DataTransfer<C,B>::adapt(C& coeff)
{
coeff.resize();
test_exit(!persistentContainer_.empty(), "No data was saved before adapting the grid, make "
"sure to call DataTransfer::preAdapt before calling adapt() on the grid");
// No data was saved before adapting the grid, make
// sure to call DataTransfer::preAdapt before calling adapt() on the grid
if (persistentContainer_.empty())
return;
GridView gv = basis_->gridView();
LocalView lv = basis_->localView();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment