From 5ea000fc20241b6c543990355f35c1cb6115ac48 Mon Sep 17 00:00:00 2001 From: Lisa Bachmann Date: Thu, 10 Oct 2024 12:14:53 +0200 Subject: [PATCH] adding variable iter to indicate current iteration depending on multizone/singlezone problem --- SU2_CFD/src/solvers/CSolver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SU2_CFD/src/solvers/CSolver.cpp b/SU2_CFD/src/solvers/CSolver.cpp index 2a38151fd52..66fcff45732 100644 --- a/SU2_CFD/src/solvers/CSolver.cpp +++ b/SU2_CFD/src/solvers/CSolver.cpp @@ -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;