From d4338249fb29d5de9a1154980dcb01d603354cc0 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sat, 29 Jul 2017 22:54:53 -0400 Subject: [PATCH] [Thermo] Remove debug exception from Phase::entropyElement298 Returning the special value ENTROPY298_UNKNOWN is (apparently) the expected behavior if no actual value was provided, and should not result in an exception. --- include/cantera/thermo/Phase.h | 4 +++- src/thermo/Phase.cpp | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/cantera/thermo/Phase.h b/include/cantera/thermo/Phase.h index 745e4f434..6ccc7042e 100644 --- a/include/cantera/thermo/Phase.h +++ b/include/cantera/thermo/Phase.h @@ -180,7 +180,9 @@ public: //! @param m Element index doublereal atomicWeight(size_t m) const; - //! Entropy of the element in its standard state at 298 K and 1 bar + //! Entropy of the element in its standard state at 298 K and 1 bar. + //! If no entropy value was provided when the phase was constructed, + //! returns the value `ENTROPY298_UNKNOWN`. //! @param m Element index doublereal entropyElement298(size_t m) const; diff --git a/src/thermo/Phase.cpp b/src/thermo/Phase.cpp index d9c9a1a38..2736fb964 100644 --- a/src/thermo/Phase.cpp +++ b/src/thermo/Phase.cpp @@ -132,10 +132,7 @@ doublereal Phase::atomicWeight(size_t m) const doublereal Phase::entropyElement298(size_t m) const { - AssertThrowMsg(m_entropy298[m] != ENTROPY298_UNKNOWN, - "Elements::entropy298", - "Entropy at 298 K of element is unknown"); - AssertTrace(m < m_mm); + checkElementIndex(m); return m_entropy298[m]; }