Commit 6ef7cc06 authored by Lukas Riedel's avatar Lukas Riedel 📝

Fix severe bug when calling adaptivity algorithm

Time parameter has to be the conclusion time of the last time step.

[ci skip] because this branch has the old testing scheme
parent 61efc64a
......@@ -168,10 +168,12 @@ void Simulation<Traits>::run ()
const auto t_start = controller->getTime();
output->write_vtk_output(t_start);
while(controller->doStep()) {
const auto time = controller->getTime();
const auto dt = controller->getDT();
if(!compute_time_step()){
continue;
}
if(adaptivity->adapt_grid(*grid, gv, *gfs, *param, *fboundary, t_start, *uold, *unew)){ // reset operators if grid changes
if(adaptivity->adapt_grid(*grid, gv, *gfs, *param, *fboundary, time+dt, *uold, *unew)){ // reset operators if grid changes
operator_setup();
}
output->write_vtk_output(controller->getTime());
......
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