Skip to content

Commit 2ce680a

Browse files
authored
Merge pull request #1577 from ArneVoss/feature_improved_cauchy_convergence
Improve cauchy convergence to handle quantities that converge to small values
2 parents e129c1e + c59ed24 commit 2ce680a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

SU2_CFD/src/output/COutput.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,7 +1039,12 @@ bool COutput::Convergence_Monitoring(CConfig *config, unsigned long Iteration) {
10391039

10401040
oldFunc[iField_Conv] = newFunc[iField_Conv];
10411041
newFunc[iField_Conv] = monitor;
1042-
cauchyFunc = fabs(newFunc[iField_Conv] - oldFunc[iField_Conv]) / fabs(monitor);
1042+
/*--- Automatically modify the scaling factor of relative Cauchy convergence for
1043+
* coefficients that are close to zero. Example: For the clean aircraft, the rolling
1044+
* moment coefficient MOMENT_X is close to zero and thus will never reach a relative
1045+
* cauchy convergence ->> dividing tiny numbers is not a good idea. Using absolute
1046+
* cauchy convergence is more robust in this case. ---*/
1047+
cauchyFunc = fabs(newFunc[iField_Conv] - oldFunc[iField_Conv]) / fmax(fabs(monitor), 0.1);
10431048

10441049
cauchySerie[iField_Conv][Iteration % nCauchy_Elems] = cauchyFunc;
10451050
cauchyValue = 0.0;

0 commit comments

Comments
 (0)