Took out namespaces from headers

This commit is contained in:
Harry Moffat 2011-03-28 20:29:33 +00:00
parent 5de392c0a6
commit 361c8f655b
27 changed files with 59 additions and 49 deletions

View file

@ -22,6 +22,8 @@
#include <cmath>
using namespace ctml;
namespace Cantera {
ConstDensityThermo::ConstDensityThermo() : m_tlast(0.0) {

View file

@ -28,6 +28,7 @@
#include <cstdlib>
using namespace std;
using namespace ctml;
namespace Cantera {

View file

@ -489,7 +489,7 @@ namespace Cantera {
"thermo model attribute must be FixedChemPot or StoichSubstance or StoichSubstanceSSTP");
}
if (model == "FixedChemPot") {
double val = getFloatDefaultUnits(tnode, "chemicalPotential", "J/kmol");
double val = ctml::getFloatDefaultUnits(tnode, "chemicalPotential", "J/kmol");
chemPot_ = val;
}
SingleSpeciesTP::initThermoXML(phaseNode, id);
@ -528,7 +528,7 @@ namespace Cantera {
"thermo model attribute must be FixedChemPot or StoichSubstance or StoichSubstanceSSTP");
}
if (model == "FixedChemPotSSTP") {
doublereal val = getFloatDefaultUnits(eosdata, "chemicalPotential", "J/kmol");
doublereal val = ctml::getFloatDefaultUnits(eosdata, "chemicalPotential", "J/kmol");
chemPot_ = val;
}
}

View file

@ -24,6 +24,7 @@
#include <cstdlib>
using namespace std;
using namespace ctml;
namespace Cantera {

View file

@ -33,6 +33,8 @@
#endif
//@}
using namespace ctml;
namespace Cantera {
//! Small value to be used in cutoff expressions with logs

View file

@ -1244,7 +1244,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", "toSI");
m_speciesMolarVolume[k] = ctml::getFloat(*ss, "molarVolume", "toSI");
}
/*

View file

@ -499,7 +499,7 @@ namespace Cantera {
XML_Node *ss = s->findByName("standardState");
if (ss) {
if (ss->findByName("molarVolume")) {
m_speciesMolarVolume[k] = getFloat(*ss, "molarVolume", "toSI");
m_speciesMolarVolume[k] = ctml::getFloat(*ss, "molarVolume", "toSI");
}
}
}
@ -541,8 +541,8 @@ namespace Cantera {
//=====================================================================================================
void LatticePhase::setParametersFromXML(const XML_Node& eosdata) {
eosdata._require("model", "Lattice");
m_site_density = getFloat(eosdata, "site_density", "toSI");
m_vacancy = getChildValue(eosdata, "vacancy_species");
m_site_density = ctml::getFloat(eosdata, "site_density", "toSI");
m_vacancy = ctml::getChildValue(eosdata, "vacancy_species");
}
//=====================================================================================================
}

View file

@ -639,7 +639,7 @@ namespace Cantera {
std::vector<string> pnam;
std::vector<string> pval;
XML_Node& ls = eosdata.child("LatticeStoichiometry");
int np = getPairs(ls, pnam, pval);
int np = ctml::getPairs(ls, pnam, pval);
theta_.resize(nl);
for (int i = 0; i < np; i++) {
double val = fpValueCheck(pval[i]);

View file

@ -1145,7 +1145,7 @@ namespace Cantera {
/*
* Get the string containing all of the values
*/
getFloatArray(xmlChild, vParams, true, "toSI", "excessEnthalpy");
ctml::getFloatArray(xmlChild, vParams, true, "toSI", "excessEnthalpy");
nParamsFound = vParams.size();
if (nParamsFound != 2) {
@ -1161,7 +1161,7 @@ namespace Cantera {
/*
* Get the string containing all of the values
*/
getFloatArray(xmlChild, vParams, true, "toSI", "excessEntropy");
ctml::getFloatArray(xmlChild, vParams, true, "toSI", "excessEntropy");
nParamsFound = vParams.size();
if (nParamsFound != 2) {
@ -1177,7 +1177,7 @@ namespace Cantera {
/*
* Get the string containing all of the values
*/
getFloatArray(xmlChild, vParams, true, "toSI", "excessVolume_Enthalpy");
ctml::getFloatArray(xmlChild, vParams, true, "toSI", "excessVolume_Enthalpy");
nParamsFound = vParams.size();
if (nParamsFound != 2) {
@ -1193,7 +1193,7 @@ namespace Cantera {
/*
* Get the string containing all of the values
*/
getFloatArray(xmlChild, vParams, true, "toSI", "excessVolume_Entropy");
ctml::getFloatArray(xmlChild, vParams, true, "toSI", "excessVolume_Entropy");
nParamsFound = vParams.size();
if (nParamsFound != 2) {

View file

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

View file

@ -433,7 +433,7 @@ namespace Cantera {
XML_Node &tnode = phaseNode.child("thermo");
doublereal dens = 2.65E3;
if (tnode.hasChild("density")) {
dens = getFloatDefaultUnits(tnode, "density", "kg/m3");
dens = ctml::getFloatDefaultUnits(tnode, "density", "kg/m3");
}
setDensity(dens);
SingleSpeciesTP::initThermoXML(phaseNode, id);
@ -537,7 +537,7 @@ namespace Cantera {
}
doublereal rho = 2.65E3;
if (eosdata.hasChild("density")) {
rho = getFloat(eosdata, "density", "toSI");
rho = ctml::getFloat(eosdata, "density", "toSI");
}
setDensity(rho);
}

View file

@ -493,7 +493,7 @@ namespace Cantera {
Aunits = aV.attrib("units");
Afactor = toSI(Aunits);
}
volVal = getFloat(*aStandardState, "V0_Pr_Tr");
volVal = ctml::getFloat(*aStandardState, "V0_Pr_Tr");
m_V0_pr_tr= volVal;
volVal *= Afactor;
m_speciesSize[0] = volVal;
@ -509,13 +509,13 @@ namespace Cantera {
m_deltaG_formation_pr_tr =
getFloatDefaultUnits(MinEQ3node, "DG0_f_Pr_Tr", "cal/gmol", "actEnergy");
ctml::getFloatDefaultUnits(MinEQ3node, "DG0_f_Pr_Tr", "cal/gmol", "actEnergy");
m_deltaH_formation_pr_tr =
getFloatDefaultUnits(MinEQ3node, "DH0_f_Pr_Tr", "cal/gmol", "actEnergy");
m_Entrop_pr_tr = getFloatDefaultUnits(MinEQ3node, "S0_Pr_Tr", "cal/gmol/K");
m_a = getFloatDefaultUnits(MinEQ3node, "a", "cal/gmol/K");
m_b = getFloatDefaultUnits(MinEQ3node, "b", "cal/gmol/K2");
m_c = getFloatDefaultUnits(MinEQ3node, "c", "cal-K/gmol");
ctml::getFloatDefaultUnits(MinEQ3node, "DH0_f_Pr_Tr", "cal/gmol", "actEnergy");
m_Entrop_pr_tr = ctml::getFloatDefaultUnits(MinEQ3node, "S0_Pr_Tr", "cal/gmol/K");
m_a = ctml::getFloatDefaultUnits(MinEQ3node, "a", "cal/gmol/K");
m_b = ctml::getFloatDefaultUnits(MinEQ3node, "b", "cal/gmol/K2");
m_c = ctml::getFloatDefaultUnits(MinEQ3node, "c", "cal-K/gmol");
convertDGFormation();

View file

@ -590,12 +590,12 @@ namespace Cantera {
*/
void MolalityVPSSTP::setStateFromXML(const XML_Node& state) {
VPStandardStateTP::setStateFromXML(state);
string comp = getChildValue(state,"soluteMolalities");
string comp = ctml::getChildValue(state,"soluteMolalities");
if (comp != "") {
setMolalitiesByName(comp);
}
if (state.hasChild("pressure")) {
double p = getFloat(state, "pressure", "pressure");
double p = ctml::getFloat(state, "pressure", "pressure");
setPressure(p);
}
}

View file

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

View file

@ -24,6 +24,7 @@
#include <cstdlib>
using namespace std;
using namespace ctml;
namespace Cantera {

View file

@ -131,17 +131,17 @@ namespace Cantera {
std::string model = (*ss)["model"];
if (model == "constant_incompressible" || model == "constant") {
volumeModel_ = cSSVOLUME_CONSTANT;
m_constMolarVolume = getFloat(*ss, "molarVolume", "toSI");
m_constMolarVolume = ctml::getFloat(*ss, "molarVolume", "toSI");
} else if (model == "temperature_polynomial") {
volumeModel_ = cSSVOLUME_TPOLY;
int num = getFloatArray(*ss, TCoeff_, true, "toSI", "volumeTemperaturePolynomial");
int num = ctml::getFloatArray(*ss, TCoeff_, true, "toSI", "volumeTemperaturePolynomial");
if (num != 4) {
throw CanteraError("PDSS_SSVol::constructPDSSXML",
" Didn't get 4 density polynomial numbers for species " + speciesNode.name());
}
} else if (model == "density_temperature_polynomial") {
volumeModel_ = cSSVOLUME_DENSITY_TPOLY;
int num = getFloatArray(*ss, TCoeff_, true, "toSI", "densityTemperaturePolynomial");
int num = ctml::getFloatArray(*ss, TCoeff_, true, "toSI", "densityTemperaturePolynomial");
if (num != 4) {
throw CanteraError("PDSS_SSVol::constructPDSSXML",
" Didn't get 4 density polynomial numbers for species " + speciesNode.name());

View file

@ -22,7 +22,6 @@
#include "vec_functions.h"
#include "ctml.h"
using namespace ctml;
namespace Cantera {

View file

@ -1208,7 +1208,7 @@ namespace Cantera {
/*
* Get the string containing all of the values
*/
getFloatArray(xmlChild, vParams, true, "toSI", "excessEnthalpy");
ctml::getFloatArray(xmlChild, vParams, true, "toSI", "excessEnthalpy");
nParamsFound = vParams.size();
if (nParamsFound != 2) {
@ -1224,7 +1224,7 @@ namespace Cantera {
/*
* Get the string containing all of the values
*/
getFloatArray(xmlChild, vParams, true, "toSI", "excessEntropy");
ctml::getFloatArray(xmlChild, vParams, true, "toSI", "excessEntropy");
nParamsFound = vParams.size();
if (nParamsFound != 2) {
@ -1240,7 +1240,7 @@ namespace Cantera {
/*
* Get the string containing all of the values
*/
getFloatArray(xmlChild, vParams, true, "toSI", "excessVolume_Enthalpy");
ctml::getFloatArray(xmlChild, vParams, true, "toSI", "excessVolume_Enthalpy");
nParamsFound = vParams.size();
if (nParamsFound != 2) {
@ -1256,7 +1256,7 @@ namespace Cantera {
/*
* Get the string containing all of the values
*/
getFloatArray(xmlChild, vParams, true, "toSI", "excessVolume_Entropy");
ctml::getFloatArray(xmlChild, vParams, true, "toSI", "excessVolume_Entropy");
nParamsFound = vParams.size();
if (nParamsFound != 2) {

View file

@ -17,8 +17,8 @@
* $Revision: 255 $
*/
#ifndef CT_LIFES_X_ONEPHASE_VPSSTP_H
#define CT_LIFES_X_ONEPHASE_VPSSTP_H
#ifndef CT_PHASECOMBO_INTERACTION_H
#define CT_PHASECOMBO_INTERACTION_H
#include "GibbsExcessVPSSTP.h"

View file

@ -70,15 +70,15 @@ namespace Cantera {
virtual void setParametersFromXML(const XML_Node& eosdata) {
eosdata._require("model","Semiconductor");
doublereal rho = getFloat(eosdata, "density", "-");
doublereal rho = ctml::getFloat(eosdata, "density", "-");
setDensity(rho);
doublereal bandgap = getFloat(eosdata, "bandgap", "-");
doublereal e_mass = getFloat(eosdata, "electron_mass", "-");
doublereal h_mass = getFloat(eosdata, "hole_mass", "-");
doublereal e_donor = getFloat(eosdata, "donor_energy", "-");
doublereal n_donor = getFloat(eosdata, "donor_concentration", "-");
doublereal e_acceptor = getFloat(eosdata, "acceptor_energy", "-");
doublereal n_acceptor = getFloat(eosdata, "acceptor_concentration", "-");
doublereal bandgap = ctml::getFloat(eosdata, "bandgap", "-");
doublereal e_mass = ctml::getFloat(eosdata, "electron_mass", "-");
doublereal h_mass = ctml::getFloat(eosdata, "hole_mass", "-");
doublereal e_donor = ctml::getFloat(eosdata, "donor_energy", "-");
doublereal n_donor = ctml::getFloat(eosdata, "donor_concentration", "-");
doublereal e_acceptor = ctml::getFloat(eosdata, "acceptor_energy", "-");
doublereal n_acceptor = ctml::getFloat(eosdata, "acceptor_concentration", "-");
setEffectiveMasses(e_mass, h_mass);
setDonorDoping(n_donor, e_donor);
setAcceptorDoping(n_acceptor, e_acceptor);

View file

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

View file

@ -434,7 +434,7 @@ namespace Cantera {
"no thermo XML node");
}
XML_Node &tnode = phaseNode.child("thermo");
double dens = getFloatDefaultUnits(tnode, "density", "kg/m3");
double dens = ctml::getFloatDefaultUnits(tnode, "density", "kg/m3");
setDensity(dens);
SingleSpeciesTP::initThermoXML(phaseNode, id);
}
@ -482,7 +482,7 @@ namespace Cantera {
throw CanteraError("StoichSubstanceSSTP::setParametersFromXML",
"thermo model attribute must be StoichSubstance");
}
doublereal rho = getFloat(eosdata, "density", "toSI");
doublereal rho = ctml::getFloat(eosdata, "density", "toSI");
setDensity(rho);
}

View file

@ -23,6 +23,8 @@
#include "EdgePhase.h"
#include "ThermoFactory.h"
using namespace ctml;
using namespace std;
///////////////////////////////////////////////////////////

View file

@ -81,6 +81,7 @@
#include <cstdlib>
using namespace std;
using namespace ctml;
namespace Cantera {

View file

@ -30,6 +30,7 @@
//@}
using namespace std;
using namespace ctml;
namespace Cantera {

View file

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

View file

@ -249,7 +249,7 @@ namespace Cantera {
"standardState model for species isn't "
"constant_incompressible: " + sName);
}
m_Vss[k] = getFloat(*ss, "molarVolume", "toSI");
m_Vss[k] = ctml::getFloat(*ss, "molarVolume", "toSI");
}
}
@ -300,7 +300,7 @@ namespace Cantera {
if ((int) m_Vss.size() < k+1) {
m_Vss.resize(k+1, 0.0);
}
m_Vss[k] = getFloat(*ss, "molarVolume", "toSI");
m_Vss[k] = ctml::getFloat(*ss, "molarVolume", "toSI");
// instantiate a new kPDSS object
kPDSS = new PDSS_ConstVol(m_vptp_ptr, k, speciesNode, *phaseNode_ptr, true);