Misc changes due to porting to solaris 10. Caught a few inconsistencies

in inherited functions
This commit is contained in:
Harry Moffat 2008-09-16 16:33:16 +00:00
parent 4d18ce8427
commit 33c8065a7c
14 changed files with 22 additions and 21 deletions

View file

@ -861,7 +861,9 @@ done:
m_phase[p]->setState_TPX(m_temp, m_press, x);
m_temp_OK[p] = true;
if (m_temp < m_phase[p]->minTemp()
|| m_temp > m_phase[p]->maxTemp()) m_temp_OK[p] = false;
|| m_temp > m_phase[p]->maxTemp()) {
m_temp_OK[p] = false;
}
}
}

View file

@ -180,7 +180,7 @@ namespace Cantera {
}
/// index of component with name \a name.
int componentIndex(std::string name) {
int componentIndex(std::string name) const {
int nc = nComponents();
for (int n = 0; n < nc; n++) {
if (name == componentName(n)) return n;

View file

@ -186,7 +186,7 @@ namespace Cantera {
* @exception CanteraError
* If a match is not found, a CanteraError is thrown as well
*/
double Elements::LookupWtElements(const std::string& s) {
doublereal Elements::LookupWtElements(const std::string& s) {
int num = sizeof(aWTable) / sizeof(struct awData);
string s3 = s.substr(0,3);
for (int i = 0; i < num; i++) {

View file

@ -179,7 +179,7 @@ namespace Cantera {
delete fxml;
}
void PDSS_ConstVol::initThermoXML(const XML_Node& phaseNode, std::string id) {
void PDSS_ConstVol::initThermoXML(const XML_Node& phaseNode, std::string& id) {
PDSS::initThermoXML(phaseNode, id);
}

View file

@ -407,7 +407,7 @@ namespace Cantera {
* phase. If none is given, the first XML
* phase element will be used.
*/
virtual void initThermoXML(const XML_Node& phaseNode, std::string id);
virtual void initThermoXML(const XML_Node& phaseNode, std::string& id);
//@}

View file

@ -45,6 +45,7 @@ namespace Cantera {
m_charge_j(0.0)
{
m_pdssType = cPDSS_MOLAL_HKFT;
m_presR_bar = OneAtm * 1.0E-5;
}
@ -74,6 +75,7 @@ namespace Cantera {
m_charge_j(0.0)
{
m_pdssType = cPDSS_MOLAL_HKFT;
m_presR_bar = OneAtm * 1.0E-5;
constructPDSSFile(tp, spindex, inputFile, id);
}
@ -104,6 +106,7 @@ namespace Cantera {
m_charge_j(0.0)
{
m_pdssType = cPDSS_MOLAL_HKFT;
m_presR_bar = OneAtm * 1.0E-5;
// We have to read the info from here
constructPDSSXML(tp, spindex, speciesNode, phaseRoot, spInstalled);
}
@ -201,7 +204,6 @@ namespace Cantera {
PDSS_HKFT::cp_mole() const {
double pbar = m_pres * 1.0E-5;
double m_presR_bar = OneAtm * 1.0E-5;
double c1term = m_c1;
@ -274,7 +276,6 @@ namespace Cantera {
PDSS_HKFT::molarVolume() const {
// double pbar = m_pres * 1.0E-5;
//double m_presR_bar = OneAtm * 1.0E-5;
double a1term = m_a1 * 1.0E-5;
@ -478,7 +479,7 @@ namespace Cantera {
}
void PDSS_HKFT::initThermoXML(const XML_Node& phaseNode, std::string id) {
void PDSS_HKFT::initThermoXML(const XML_Node& phaseNode, std::string& id) {
PDSS::initThermoXML(phaseNode, id);
}
@ -633,7 +634,7 @@ namespace Cantera {
double PDSS_HKFT::deltaG() const {
double pbar = m_pres * 1.0E-5;
double m_presR_bar = OneAtm * 1.0E-5;
//double m_presR_bar = OneAtm * 1.0E-5;
double sterm = - m_Entrop_tr_pr * (m_temp - 298.15);
@ -679,7 +680,6 @@ namespace Cantera {
double PDSS_HKFT::deltaS() const {
double pbar = m_pres * 1.0E-5;
double m_presR_bar = OneAtm * 1.0E-5;
double c1term = m_c1 * log(m_temp/298.15);

View file

@ -411,7 +411,7 @@ namespace Cantera {
* phase. If none is given, the first XML
* phase element will be used.
*/
virtual void initThermoXML(const XML_Node& phaseNode, std::string id);
virtual void initThermoXML(const XML_Node& phaseNode, std::string& id);
//@}

View file

@ -348,6 +348,7 @@ namespace Cantera {
/// saturation pressure
doublereal PDSS_IdealGas::satPressure(doublereal t){
throw CanteraError("PDSS_IdealGas::satPressure()", "unimplemented");
/*NOTREACHED*/
return (0.0);
}

View file

@ -274,7 +274,7 @@ namespace Cantera {
PDSS::initThermo();
}
void PDSS_Water::initThermoXML(const XML_Node& phaseNode, std::string id) {
void PDSS_Water::initThermoXML(const XML_Node& phaseNode, std::string& id) {
PDSS::initThermoXML(phaseNode, id);
}

View file

@ -470,8 +470,7 @@ namespace Cantera {
* phase. If none is given, the first XML
* phase element will be used.
*/
virtual void initThermoXML(const XML_Node& phaseNode, std::string id);
virtual void initThermoXML(const XML_Node& phaseNode, std::string& id);
//@}

View file

@ -413,8 +413,8 @@ namespace Cantera {
unstablePhaseNew = true;
Tunstable = Tnew;
} else {
break;
unstablePhaseNew = false;
break;
}
if (unstablePhase == false) {
if (unstablePhaseNew == true) {
@ -673,8 +673,8 @@ namespace Cantera {
unstablePhaseNew = true;
Tunstable = Tnew;
} else {
break;
unstablePhaseNew = false;
break;
}
if (unstablePhase == false) {
if (unstablePhaseNew == true) {

View file

@ -230,9 +230,9 @@ namespace Cantera {
if (iwater == 1) {
if (ihptx == 0) {
vpss == new VPSSMgr_Water_ConstVol(vp_ptr, spth);
vpss = new VPSSMgr_Water_ConstVol(vp_ptr, spth);
} else {
vpss == new VPSSMgr_Water_HKFT(vp_ptr, spth);
vpss = new VPSSMgr_Water_HKFT(vp_ptr, spth);
}
}
// The default here is to fall back to use the completely
@ -329,7 +329,6 @@ namespace Cantera {
case cVPSSMGR_PUREFLUID:
throw CanteraError("VPSSMgrFactory::newVPSSMgr",
"unimplemented");
break;
case cVPSSMGR_WATER_CONSTVOL:
return new VPSSMgr_Water_ConstVol(vp_ptr, &spthermoRef);
break;

View file

@ -161,7 +161,7 @@ namespace Cantera {
}
void VPSSMgr_Water_ConstVol::updateRefStateThermo() {
void VPSSMgr_Water_ConstVol::updateRefStateThermo() const {
// Fix up the water
doublereal RT = GasConstant * m_tlast;
m_waterSS->setState_TP(m_tlast, m_p0);

View file

@ -206,7 +206,7 @@ namespace Cantera {
virtual void getStandardVolumes_ref(doublereal *vol) const ;
void updateRefStateThermo();
void updateRefStateThermo() const;
//! @name Initialization Methods - For Internal use (VPStandardState)
/*!