getFloat() interface changes.

This commit is contained in:
Harry Moffat 2008-10-31 15:45:34 +00:00
parent 75e56cf8d3
commit ff61654c6c
13 changed files with 21 additions and 21 deletions

View file

@ -173,7 +173,7 @@ namespace Cantera {
void ConstDensityThermo::setParametersFromXML(const XML_Node& eosdata) {
eosdata._require("model","Incompressible");
doublereal rho = getFloat(eosdata, "density", "-");
doublereal rho = getFloat(eosdata, "density", "toSI");
setDensity(rho);
}

View file

@ -1261,7 +1261,7 @@ namespace Cantera {
m_speciesSize[k] << endl;
#endif
} else if (modelString == "constant_incompressible") {
m_speciesSize[k] = getFloat(*ss, "molarVolume", "-");
m_speciesSize[k] = getFloat(*ss, "molarVolume", "toSi");
#ifdef DEBUG_HKM_NOT
cout << "species " << sss[k] << " has volume " <<
m_speciesSize[k] << endl;
@ -1277,7 +1277,7 @@ namespace Cantera {
"Solute SS Model \"" + modelStringa +
"\" is not known");
}
m_speciesSize[k] = getFloat(*ss, "molarVolume", "-");
m_speciesSize[k] = getFloat(*ss, "molarVolume", "toSI");
#ifdef DEBUG_HKM_NOT
cout << "species " << sss[k] << " has volume " <<
m_speciesSize[k] << endl;

View file

@ -1044,7 +1044,7 @@ namespace Cantera {
"\" is not known");
}
if (modelString == "constant_incompressible" ) {
m_speciesSize[k] = getFloat(*ss, "molarVolume", "-");
m_speciesSize[k] = getFloat(*ss, "molarVolume", "toSI");
#ifdef DEBUG_HKM_NOT
cout << "species " << sss[k] << " has volume " <<
m_speciesSize[k] << endl;

View file

@ -897,7 +897,7 @@ namespace Cantera {
for (int k = 0; k < m_kk; k++) {
XML_Node* s = speciesDB->findByAttr("name", sss[k]);
XML_Node *ss = s->findByName("standardState");
m_speciesMolarVolume[k] = getFloat(*ss, "molarVolume", "-");
m_speciesMolarVolume[k] = getFloat(*ss, "molarVolume", "toSI");
}
MolalityVPSSTP::initThermoXML(phaseNode, id);

View file

@ -1253,7 +1253,7 @@ namespace Cantera {
for (int k = 0; k < m_kk; k++) {
XML_Node* s = speciesDB->findByAttr("name", sss[k]);
XML_Node *ss = s->findByName("standardState");
m_speciesMolarVolume[k] = getFloat(*ss, "molarVolume", "-");
m_speciesMolarVolume[k] = getFloat(*ss, "molarVolume", "toSI");
}
/*

View file

@ -248,7 +248,7 @@ namespace Cantera {
void LatticePhase::setParametersFromXML(const XML_Node& eosdata) {
eosdata._require("model","Lattice");
m_molar_density = getFloat(eosdata, "site_density", "-");
m_molar_density = getFloat(eosdata, "site_density", "toSI");
m_vacancy = getString(eosdata, "vacancy_species");
}
}

View file

@ -119,7 +119,7 @@ namespace Cantera {
"standardState model for species isn't constant_incompressible: " + speciesNode.name());
}
m_constMolarVolume = getFloat(*ss, "molarVolume", "-");
m_constMolarVolume = getFloat(*ss, "molarVolume", "toSI");
std::string id = "";
initThermoXML(phaseNode, id);

View file

@ -452,10 +452,10 @@ namespace Cantera {
if (tmax == 0.0) tmax = 1.0e30;
vector_fp c(4);
c[0] = getFloat(f, "t0", "-");
c[1] = getFloat(f, "h0", "-");
c[2] = getFloat(f, "s0", "-");
c[3] = getFloat(f, "cp0", "-");
c[0] = getFloat(f, "t0", "toSI");
c[1] = getFloat(f, "h0", "toSI");
c[2] = getFloat(f, "s0", "toSI");
c[3] = getFloat(f, "cp0", "toSI");
doublereal p0 = OneAtm;
sp.install(speciesName, k, SIMPLE, &c[0], tmin, tmax, p0);
}
@ -540,7 +540,7 @@ namespace Cantera {
}
vector_fp coeffs(nfreq + 2);
coeffs[0] = nfreq;
coeffs[1] = getFloat(f, "binding_energy", "-");
coeffs[1] = getFloat(f, "binding_energy", "toSI");
copy(freqs.begin(), freqs.end(), coeffs.begin() + 2);
//posc = new Adsorbate(k, tmin, tmax, pref,
// DATA_PTR(coeffs));

View file

@ -135,7 +135,7 @@ namespace Cantera {
void StoichSubstance::setParametersFromXML(const XML_Node& eosdata) {
eosdata._require("model","StoichSubstance");
doublereal rho = getFloat(eosdata, "density", "-");
doublereal rho = getFloat(eosdata, "density", "toSI");
setDensity(rho);
}

View file

@ -467,7 +467,7 @@ namespace Cantera {
throw CanteraError("StoichSubstanceSSTP::StoichSubstanceSSTP",
"thermo model attribute must be StoichSubstance");
}
doublereal rho = getFloat(eosdata, "density", "-");
doublereal rho = getFloat(eosdata, "density", "toSI");
setDensity(rho);
}

View file

@ -457,7 +457,7 @@ namespace Cantera {
void SurfPhase::
setParametersFromXML(const XML_Node& eosdata) {
eosdata._require("model","Surface");
doublereal n = getFloat(eosdata, "site_density", "-");
doublereal n = getFloat(eosdata, "site_density", "toSI");
if (n <= 0.0)
throw CanteraError("SurfPhase::setParametersFromXML",
"missing or negative site density");
@ -523,7 +523,7 @@ namespace Cantera {
void EdgePhase::
setParametersFromXML(const XML_Node& eosdata) {
eosdata._require("model","Edge");
doublereal n = getFloat(eosdata, "site_density", "-");
doublereal n = getFloat(eosdata, "site_density", "toSI");
if (n <= 0.0)
throw CanteraError("EdgePhase::setParametersFromXML",
"missing or negative site density");

View file

@ -116,7 +116,7 @@ namespace Cantera {
throw CanteraError("VPSSMgr_ConstVol::initThermoXML",
"standardState model for species isn't constant_incompressible: " + s->name());
}
m_Vss[k] = getFloat(*ss, "molarVolume", "-");
m_Vss[k] = getFloat(*ss, "molarVolume", "toSI");
}
}
@ -143,7 +143,7 @@ namespace Cantera {
if ((int) m_Vss.size() < k+1) {
m_Vss.resize(k+1, 0.0);
}
m_Vss[k] = getFloat(*ss, "molarVolume", "-");
m_Vss[k] = getFloat(*ss, "molarVolume", "toSI");
installSTSpecies(k, speciesNode, phaseNode_ptr);

View file

@ -232,7 +232,7 @@ namespace Cantera {
throw CanteraError("VPSSMgr_Water_ConstVol::initThermoXML",
"standardState model for species isn't constant_incompressible: " + s->name());
}
m_Vss[k] = getFloat(*ss, "molarVolume", "-");
m_Vss[k] = getFloat(*ss, "molarVolume", "toSI");
}
}
@ -283,7 +283,7 @@ namespace Cantera {
if ((int) m_Vss.size() < k+1) {
m_Vss.resize(k+1, 0.0);
}
m_Vss[k] = getFloat(*ss, "molarVolume", "-");
m_Vss[k] = getFloat(*ss, "molarVolume", "toSI");
// instantiate a new kPDSS object
kPDSS = new PDSS_ConstVol(m_vptp_ptr, k, speciesNode, *phaseNode_ptr, true);