Skip to content

Commit

Permalink
adapt AMR check for final step
Browse files Browse the repository at this point in the history
  • Loading branch information
ranocha committed Nov 11, 2020
1 parent 42bf494 commit 807e1e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/callbacks/amr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function AMRCallback(semi, controller, adaptor;

# AMR every `interval` time steps, but not after the final step
if interval > 0
condition = (u, t, integrator) -> integrator.iter % interval == 0 && t < integrator.sol.prob.tspan[2]
condition = (u, t, integrator) -> integrator.iter % interval == 0 && !isfinished(integrator)
else # disable the AMR callback except possibly for initial refinement during initialization
condition = (u, t, integrator) -> false
end
Expand Down

0 comments on commit 807e1e6

Please sign in to comment.