Skip to content

Commit

Permalink
Address Alex's previous review:
Browse files Browse the repository at this point in the history
- clean up logic for multi-sys FP iteration loop
And break out the multi-system loop if diverging!
  • Loading branch information
GiudGiud committed Nov 27, 2024
1 parent 663db3b commit 8eb53e5
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions framework/src/executioners/FEProblemSolve.C
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,7 @@ FEProblemSolve::solve()
// being converged
num_fp_multisys_iters = 0;
converged = false;
while (_multi_sys_fp_convergence
? (_multi_sys_fp_convergence->checkConvergence(num_fp_multisys_iters) ==
Convergence::MooseConvergenceStatus::ITERATING)
: !converged)
while (!converged)
{
// Loop over each system
for (const auto sys : _systems)
Expand Down Expand Up @@ -435,8 +432,17 @@ FEProblemSolve::solve()
_console << COLOR_GREEN << solve_name << " Skipped!" << COLOR_DEFAULT << std::endl;
}

// Assess convergence of the multi-system fixed point iteration
if (!_using_multi_sys_fp_iterations)
converged = true;
else
{
converged = _multi_sys_fp_convergence->checkConvergence(num_fp_multisys_iters) ==
Convergence::MooseConvergenceStatus::CONVERGED;
if (_multi_sys_fp_convergence->checkConvergence(num_fp_multisys_iters) ==
Convergence::MooseConvergenceStatus::DIVERGED)
break;
}
num_fp_multisys_iters++;
}

Expand Down

0 comments on commit 8eb53e5

Please sign in to comment.