Fixed an error in the function setMoleFractions_NoNorm().

The error was introduced in v. 1.2 of this file on 5/4/07,
and lead to bad values for output mass fractions.
This commit is contained in:
Harry Moffat 2007-07-18 21:27:52 +00:00
parent b3e656063c
commit 81af5d3a3a

View file

@ -1,10 +1,8 @@
/**
*
* @file State.cpp
* Definitions for the class State, that manages the independent variables of temperature, mass density,
* and species mass/mole fraction that define the thermodynamic state (see \ref phases and
* class \link Cantera::State State\endlink).
*
*/
/*
@ -101,7 +99,7 @@ namespace Cantera {
m_mmw = dot(x, x + m_kk, m_molwts.begin());
doublereal rmmw = 1.0/m_mmw;
transform(x, x + m_kk, m_ym.begin(), timesConstant<double>(rmmw));
transform(m_y.begin(), m_y.begin() + m_kk, m_molwts.begin(),
transform(m_ym.begin(), m_ym.begin() + m_kk, m_molwts.begin(),
m_y.begin(), multiplies<double>());
}