@@ -1595,10 +1595,7 @@ void CTurbSASolver::ComputeUnderRelaxationFactor(const CConfig *config) {
15951595 SA_NEG model is more robust due to allowing for negative nu_tilde,
15961596 so the under-relaxation is not applied to that variant. */
15971597
1598- bool sa_model = ((config->GetKind_Turb_Model () == SA) ||
1599- (config->GetKind_Turb_Model () == SA_E) ||
1600- (config->GetKind_Turb_Model () == SA_COMP) ||
1601- (config->GetKind_Turb_Model () == SA_E_COMP));
1598+ if (config->GetKind_Turb_Model () == SA_NEG) return ;
16021599
16031600 /* Loop over the solution update given by relaxing the linear
16041601 system for this nonlinear iteration. */
@@ -1610,19 +1607,11 @@ void CTurbSASolver::ComputeUnderRelaxationFactor(const CConfig *config) {
16101607 for (unsigned long iPoint = 0 ; iPoint < nPointDomain; iPoint++) {
16111608
16121609 localUnderRelaxation = 1.0 ;
1613- if (sa_model) {
1614- for (unsigned short iVar = 0 ; iVar < nVar; iVar++) {
1615-
1616- /* We impose a limit on the maximum percentage that the
1617- turbulence variables can change over a nonlinear iteration. */
1618-
1619- const unsigned long index = iPoint * nVar + iVar;
1620- su2double ratio = fabs (LinSysSol[index]) / (fabs (nodes->GetSolution (iPoint, iVar)) + EPS);
1621- if (ratio > allowableRatio) {
1622- localUnderRelaxation = min (allowableRatio / ratio, localUnderRelaxation);
1623- }
1624-
1625- }
1610+ su2double ratio = fabs (LinSysSol[iPoint]) / (fabs (nodes->GetSolution (iPoint, 0 )) + EPS);
1611+ /* We impose a limit on the maximum percentage that the
1612+ turbulence variables can change over a nonlinear iteration. */
1613+ if (ratio > allowableRatio) {
1614+ localUnderRelaxation = min (allowableRatio / ratio, localUnderRelaxation);
16261615 }
16271616
16281617 /* Threshold the relaxation factor in the event that there is
0 commit comments