From d983660c776938161f0ac3809f1c510ba2fa3850 Mon Sep 17 00:00:00 2001 From: Victor Brunini Date: Thu, 6 Mar 2014 00:40:50 +0000 Subject: [PATCH] Fix ThermoPhase::getElementPotentials and setElementPotentials Broken in r2719. --- src/thermo/ThermoPhase.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/thermo/ThermoPhase.cpp b/src/thermo/ThermoPhase.cpp index dc4e51926..e1ad752ac 100644 --- a/src/thermo/ThermoPhase.cpp +++ b/src/thermo/ThermoPhase.cpp @@ -758,14 +758,14 @@ void ThermoPhase::setElementPotentials(const vector_fp& lambda) if (!m_hasElementPotentials) { m_lambdaRRT.resize(mm); } - scale(m_lambdaRRT, 1.0/(GasConstant* temperature())); + scale(lambda.begin(), lambda.end(), m_lambdaRRT.begin(), 1.0/(GasConstant* temperature())); m_hasElementPotentials = true; } bool ThermoPhase::getElementPotentials(doublereal* lambda) const { if (m_hasElementPotentials) { - scale(lambda, lambda + nElements(), lambda, GasConstant* temperature()); + scale(m_lambdaRRT.begin(), m_lambdaRRT.end(), lambda, GasConstant* temperature()); } return m_hasElementPotentials; }