Skip to content

Commit a5f5513

Browse files
committed
same logic for target tol
1 parent f2c50cc commit a5f5513

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SU2_CFD/src/integration/CNewtonIntegration.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,9 +277,10 @@ void CNewtonIntegration::MultiGrid_Iteration(CGeometry ****geometry_, CSolver **
277277
solvers[FLOW_SOL]->SetResLinSolver(eps);
278278

279279
if (!startupPeriod && autoRelaxation) {
280-
if (eps > config->GetLinear_Solver_Error()) {
280+
const su2double adaptTol = config->GetCFL_Adapt() ? config->GetCFL_AdaptParam(4) : 0;
281+
if (eps > fmax(config->GetLinear_Solver_Error(), adaptTol)) {
281282
nkRelaxation *= 0.9;
282-
} else if (iter < config->GetLinear_Solver_Iter()) {
283+
} else if (eps < 0.9 * fmax(config->GetLinear_Solver_Error(), adaptTol)) {
283284
nkRelaxation = fmin(nkRelaxation * 1.05, 1);
284285
}
285286
}

0 commit comments

Comments
 (0)