Commit 08b9965e authored by Christian Engwer's avatar Christian Engwer
Browse files

Merge branch 'bugfix/delete-intermediate-stage-vectors-when-timestep-fails' into 'master'

BugFix: Delete intermediate instationary stage vectors when timestep failed

See merge request !538
parents d3cdb0cd 2fffadc0
Pipeline #31288 passed with stage
in 29 minutes and 59 seconds
......@@ -223,6 +223,12 @@ namespace Dune {
res.total.linear_solver_iterations += step_result.linear_solver_iterations;
res.total.nonlinear_solver_iterations += step_result.nonlinear_solver_iterations;
res.total.timesteps += 1;
// delete intermediate steps
for (unsigned i=1; i<r; ++i) delete x[i];
if (r < method->s())
delete x[r];
throw;
}
PDESolverResult pderes = pdesolver.result();
......@@ -362,6 +368,12 @@ namespace Dune {
res.total.linear_solver_iterations += step_result.linear_solver_iterations;
res.total.nonlinear_solver_iterations += step_result.nonlinear_solver_iterations;
res.total.timesteps += 1;
// delete intermediate steps
for (unsigned i=1; i<r; ++i) delete x[i];
if (r < method->s())
delete x[r];
throw;
}
PDESolverResult pderes = pdesolver.result();
......
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