Commit 4937ded4 authored by Müller, Felix's avatar Müller, Felix

Use new adapt(grid, basis) in globalRefine/Coarsen

parent 446dd263
Pipeline #1702 passed with stage
in 110 minutes and 38 seconds
...@@ -365,8 +365,7 @@ globalCoarsen(int n) ...@@ -365,8 +365,7 @@ globalCoarsen(int n)
for (const auto& element : elements(grid_->leafGridView())) for (const auto& element : elements(grid_->leafGridView()))
grid_->mark(-1, element); grid_->mark(-1, element);
adapted |= GridTransferManager::adapt(*grid_); adapted |= GridTransferManager::adapt(*grid_, *globalBasis_);
globalBasis_->update(gridView());
} }
msg("globalCoarsen needed {} seconds", t.elapsed()); msg("globalCoarsen needed {} seconds", t.elapsed());
...@@ -386,6 +385,7 @@ globalRefine(int refCount) ...@@ -386,6 +385,7 @@ globalRefine(int refCount)
bool adapted = false; bool adapted = false;
Dune::Hybrid::ifElse(Dune::Std::is_detected<HasGlobalRefineADHI, Grid>{}, Dune::Hybrid::ifElse(Dune::Std::is_detected<HasGlobalRefineADHI, Grid>{},
/*then*/ [&](auto id) { /*then*/ [&](auto id) {
// TODO(FM): Add a way to pass a GridTransfer as ADH with *globalBasis_ argument
id(grid_)->globalRefine(refCount, GridTransferManager::gridTransfer(*grid_)); id(grid_)->globalRefine(refCount, GridTransferManager::gridTransfer(*grid_));
globalBasis_->update(this->gridView()); globalBasis_->update(this->gridView());
}, },
...@@ -395,8 +395,7 @@ globalRefine(int refCount) ...@@ -395,8 +395,7 @@ globalRefine(int refCount)
for (const auto& element : elements(grid_->leafGridView())) for (const auto& element : elements(grid_->leafGridView()))
grid_->mark(1, element); grid_->mark(1, element);
adapted |= GridTransferManager::adapt(*id(grid_)); adapted |= GridTransferManager::adapt(*id(grid_), *id(globalBasis_));
globalBasis_->update(this->gridView());
} }
}); });
......
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