Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve cauchy convergence to handle quantities that converge to small values #1577

Merged
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion SU2_CFD/src/output/COutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,12 @@ bool COutput::Convergence_Monitoring(CConfig *config, unsigned long Iteration) {

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

cauchySerie[iField_Conv][Iteration % nCauchy_Elems] = cauchyFunc;
cauchyValue = 0.0;
Expand Down