[Thermo] Check dynamic_cast to PDSS_Water

Resolves #6
This commit is contained in:
Ray Speth 2016-05-02 17:45:39 -04:00
parent ca2a330d5f
commit aa5f26bda6
4 changed files with 5 additions and 5 deletions

View file

@ -236,7 +236,7 @@ HMWSoln& HMWSoln::operator=(const HMWSoln& b)
m_waterProps = 0;
if (b.m_waterProps) {
m_waterProps.reset(new WaterProps(dynamic_cast<PDSS_Water*>(m_waterSS)));
m_waterProps.reset(new WaterProps(&dynamic_cast<PDSS_Water&>(*m_waterSS)));
}
m_tmpV = b.m_tmpV;

View file

@ -1149,7 +1149,7 @@ void HMWSoln::initThermoXML(XML_Node& phaseNode, const std::string& id_)
// Initialize the water property calculator. It will share the internal eos
// water calculator.
m_waterProps.reset(new WaterProps(dynamic_cast<PDSS_Water*>(m_waterSS)));
m_waterProps.reset(new WaterProps(&dynamic_cast<PDSS_Water&>(*m_waterSS)));
// Fill in parameters for the calculation of the stoichiometric Ionic
// Strength. The default is that stoich charge is the same as the regular

View file

@ -386,7 +386,7 @@ void PDSS_HKFT::initThermo()
{
PDSS::initThermo();
m_waterSS = dynamic_cast<PDSS_Water*>(m_tp->providePDSS(0));
m_waterSS = &dynamic_cast<PDSS_Water&>(*m_tp->providePDSS(0));
// Section to initialize m_Z_pr_tr and m_Y_pr_tr
m_temp = 273.15 + 25.;
@ -448,7 +448,7 @@ void PDSS_HKFT::initAllPtrs(VPStandardStateTP* vptp_ptr, VPSSMgr* vpssmgr_ptr,
SpeciesThermo* spthermo_ptr)
{
PDSS::initAllPtrs(vptp_ptr, vpssmgr_ptr, spthermo_ptr);
m_waterSS = dynamic_cast<PDSS_Water*>(m_tp->providePDSS(0));
m_waterSS = &dynamic_cast<PDSS_Water&>(*m_tp->providePDSS(0));
m_waterProps.reset(new WaterProps(m_waterSS));
}

View file

@ -53,7 +53,7 @@ VPSSMgr_Water_HKFT& VPSSMgr_Water_HKFT::operator=(const VPSSMgr_Water_HKFT& b)
return *this;
}
VPSSMgr::operator=(b);
m_waterSS = dynamic_cast<PDSS_Water*>(m_vptp_ptr->providePDSS(0));
m_waterSS = &dynamic_cast<PDSS_Water&>(*m_vptp_ptr->providePDSS(0));
m_tlastRef = -1.0;
return *this;
}