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();
while(controller->doStep()) {
const auto time = controller->getTime();
const auto dt = controller->getDT();
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
  • I have never understood why this method is adapting the grid before it writes the computed solution. Becuase what I understand is that it is printing the old solution in the new grid view. It should work, but it must be wasting unnecessary space. @lriedel is there another logical explanation or something I don't get here?

  • We don't plot the results of the error estimator. If we plot the solution first and then adapt, the adaptation becomes visible in the output of the next step, which makes it harder to determine the features of the solution that caused local adaptations. You're right, we plot the projection of the old solution on the adapted grid. Notice that it's not necessarily wasting space because adaptivity can also coarsen the grid.

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