From aa01fa76b4e7f2712c9ddfb98b79f267fb65fc6b Mon Sep 17 00:00:00 2001 From: Dave Goodwin Date: Thu, 18 Mar 2004 01:13:26 +0000 Subject: [PATCH] *** empty log message *** --- Cantera/src/ChemEquil.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Cantera/src/ChemEquil.cpp b/Cantera/src/ChemEquil.cpp index 185a39afb..3d1a63f9d 100755 --- a/Cantera/src/ChemEquil.cpp +++ b/Cantera/src/ChemEquil.cpp @@ -456,14 +456,6 @@ namespace Cantera { for (int ii = 0; ii < m_mm; ii++) x[ii] = -100.0; estimateElementPotentials(s, x); - x[m_mm] = log(m_phase->temperature()); - if (m_thermo->temperature() > m_thermo->maxTemp() || - m_thermo->temperature() < m_thermo->minTemp() ) { - throw CanteraError("ChemEquil","Temperature (" - +fp2str(m_thermo->temperature())+" K) outside " - "valid range of "+fp2str(m_thermo->minTemp())+" K to " - +fp2str(m_thermo->maxTemp())+" K\n"); - } vector_fp above(nvar); vector_fp below(nvar); @@ -556,6 +548,15 @@ namespace Cantera { && fabs(deltax) < options.relTolerance && fabs(deltay) < options.relTolerance) { options.iterations = iter; + + if (m_thermo->temperature() > m_thermo->maxTemp() || + m_thermo->temperature() < m_thermo->minTemp() ) { + throw CanteraError("ChemEquil","Temperature (" + +fp2str(m_thermo->temperature())+" K) outside " + "valid range of "+fp2str(m_thermo->minTemp())+" K to " + +fp2str(m_thermo->maxTemp())+" K\n"); + } + return 0; }