From f61cbeafcb61cd7e1bbb1f1ba5360ba05a642abb Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 23 Aug 2013 17:43:44 +0000 Subject: [PATCH] [Equil] Fix infinite loop in VCS equilibrium solver The threshold being removed here was introduced in r714, which was merged into trunk in r1115. Fixes Issue 113. --- src/equil/vcs_solve_TP.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/equil/vcs_solve_TP.cpp b/src/equil/vcs_solve_TP.cpp index 5a69dfb8c..dc8dd76a7 100644 --- a/src/equil/vcs_solve_TP.cpp +++ b/src/equil/vcs_solve_TP.cpp @@ -434,8 +434,7 @@ L_MAINLOOP_ALL_SPECIES: * converged. -> we have run out of iterations! */ if (m_VCount->Its > maxit) { - solveFail = -1; - goto L_RETURN_BLOCK; + return -1; } /* ********************************************************************** */ @@ -2671,9 +2670,6 @@ size_t VCS_SOLVE::vcs_add_all_deleted() double maxDG = std::min(m_deltaGRxn_new[irxn], 690.0); double dx = m_tPhaseMoles_old[iph] * exp(- maxDG); m_molNumSpecies_new[kspec] = dx; - if (m_molNumSpecies_new[kspec] > 2 *VCS_DELETE_MINORSPECIES_CUTOFF) { - m_molNumSpecies_new[kspec] = 2 * VCS_DELETE_MINORSPECIES_CUTOFF; - } } } }