Skip to content

Commit

Permalink
adding variable iter to indicate current iteration depending on multi…
Browse files Browse the repository at this point in the history
…zone/singlezone problem
  • Loading branch information
Lisa-Bachmann authored Oct 10, 2024
1 parent 6a9c8f9 commit 5ea000f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SU2_CFD/src/solvers/CSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1765,12 +1765,12 @@ void CSolver::AdaptCFLNumber(CGeometry **geometry,

/* Check if we should decrease or if we can increase, the 20% is to avoid flip-flopping. */
resetCFL = linRes > 0.99;
unsigned long iter = config->GetMultizone_Problem() ? config->GetOuterIter() : config->GetInnerIter();
unsigned long iter = config->GetMultizone_Problem() ? config->GetOuterIter() : config->GetInnerIter();

/* only change CFL number when larger than starting iteration */
reduceCFL = linRes > 1.2*linTol && (config->GetOuterIter() > startingIter);
reduceCFL = linRes > 1.2*linTol && (iter > startingIter);

canIncrease = (linRes < linTol) && (config->GetOuterIter() > startingIter);
canIncrease = (linRes < linTol) && (iter > startingIter);

if ((iMesh == MESH_0) && (Res_Count > 0)) {
Old_Func = New_Func;
Expand Down

0 comments on commit 5ea000f

Please sign in to comment.