Skip to content

Commit

Permalink
Add a default convergence criterion for multi-system + steady-state t…
Browse files Browse the repository at this point in the history
…olerance examination

in default transient executioner
refs idaholab#29157
  • Loading branch information
GiudGiud committed Nov 27, 2024
1 parent 8eb53e5 commit ffe5006
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion framework/src/executioners/Transient.C
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,17 @@ Transient::Transient(const InputParameters & parameters)
Real
Transient::relativeSolutionDifferenceNorm()
{
// TODO: add multi-system support
if (_check_aux)
return _aux.solution().l2_norm_diff(_aux.solutionOld()) / _aux.solution().l2_norm();
else
{
// Default criterion for now until we add a "steady-state-convergence-object" option
Real residual = 0;
for (const auto sys : _feproblem_solve.systemsToSolve())
residual +=
std::pow(sys->solution().l2_norm_diff(sys->solutionOld()) / sys->solution().l2_norm(), 2);
return std::sqrt(residual);
}
}

std::vector<TimeIntegrator *>
Expand Down

0 comments on commit ffe5006

Please sign in to comment.