From 6eb303d1347844292cbda69598e1d844b05c4232 Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Thu, 20 Nov 2014 18:59:59 -0500 Subject: [PATCH] Get reducing state works properly - now virtual Signed-off-by: Ian Bell --- include/AbstractState.h | 2 +- src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/AbstractState.h b/include/AbstractState.h index 4b4ddf53..c8d378df 100644 --- a/include/AbstractState.h +++ b/include/AbstractState.h @@ -310,7 +310,7 @@ public: void set_mass_fractions(const std::vector &mass_fractions){set_mass_fractions(std::vector(mass_fractions.begin(), mass_fractions.end()));}; void set_volu_fractions(const std::vector &volu_fractions){set_volu_fractions(std::vector(volu_fractions.begin(), volu_fractions.end()));}; - const CoolProp::SimpleState & get_reducing_state(){return _reducing;}; + virtual const CoolProp::SimpleState & get_reducing_state(){return _reducing;}; const CoolProp::SimpleState & get_state(const std::string &state){return calc_state(state);}; // Limits diff --git a/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h b/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h index 1655b413..c816271a 100644 --- a/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h +++ b/src/Backends/Helmholtz/HelmholtzEOSMixtureBackend.h @@ -242,6 +242,8 @@ public: void calc_reducing_state(void); SimpleState calc_reducing_state_nocache(const std::vector & mole_fractions); + const CoolProp::SimpleState & get_reducing_state(){calc_reducing_state(); return _reducing;}; + /** In a general way we can calculate any first partial derivative based on calculating derivatives with respect to the fundamental variables of the EOS, \f$\tau\f$ and \f$\delta\f$ \f[