[Thermo] Fix overriding of IdealSolidSolnPhase::_updateThermo

Since IdealSolidSolnPhase::_updateThermo wasn't a virtual method, and
the signatures didn't match (const vs non-const), calls to this method
from IdealSolidSolnPhase weren't being overridden by
BinarySolutionTabulatedThermo::_updateThermo as expected.
This commit is contained in:
Ray Speth 2019-03-05 14:34:12 -05:00
parent 1f70f7751c
commit 47005a5008
3 changed files with 4 additions and 4 deletions

View file

@ -156,7 +156,7 @@ protected:
size_t m_kk_tab;
//! Current tabulated species mole fraction
double m_xlast;
mutable double m_xlast;
//! Vector for storing tabulated thermo
vector_fp m_molefrac_tab;
@ -164,7 +164,7 @@ protected:
vector_fp m_entropy_tab;
private:
void _updateThermo();
virtual void _updateThermo() const;
};
}

View file

@ -681,7 +681,7 @@ private:
* the temperature has changed, the species thermo manager is called to
* recalculate G, Cp, H, and S at the current temperature.
*/
void _updateThermo() const;
virtual void _updateThermo() const;
//@}
};

View file

@ -48,7 +48,7 @@ void BinarySolutionTabulatedThermo::compositionChanged()
_updateThermo();
}
void BinarySolutionTabulatedThermo::_updateThermo()
void BinarySolutionTabulatedThermo::_updateThermo() const
{
double tnow = temperature();
double xnow = moleFraction(m_kk_tab);