[Thermo] Add default value for 'id' argument of 'newPhase'

This commit is contained in:
Ray Speth 2014-09-27 00:09:11 +00:00
parent 4baccc732c
commit 79461c34e8
7 changed files with 11 additions and 11 deletions

View file

@ -161,7 +161,7 @@ ThermoPhase* newPhase(XML_Node& phase);
* @return
* Returns an initialized ThermoPhase object.
*/
ThermoPhase* newPhase(const std::string& infile, std::string id);
ThermoPhase* newPhase(const std::string& infile, std::string id="");
//! Import a phase information into an empty thermophase object
/*!

View file

@ -19,7 +19,7 @@ public:
void initializeTestPhaseWithXML(const std::string & filename)
{
test_phase = newPhase(filename.c_str(), "");
test_phase = newPhase(filename.c_str());
}
void set_r(const double r) {

View file

@ -51,7 +51,7 @@ class TestThermoMethods : public testing::Test
public:
ThermoPhase* thermo;
TestThermoMethods() {
thermo = newPhase("h2o2.xml", "");
thermo = newPhase("h2o2.xml");
}
~TestThermoMethods() {

View file

@ -13,7 +13,7 @@ class FixedChemPotSstpConstructorTest : public testing::Test
TEST_F(FixedChemPotSstpConstructorTest, fromXML)
{
ThermoPhase* p = newPhase("../data/LiFixed.xml", "");
ThermoPhase* p = newPhase("../data/LiFixed.xml");
ASSERT_EQ((int) p->nSpecies(), 1);
double mu;
p->getChemPotentials(&mu);
@ -51,15 +51,15 @@ public:
};
TEST_F(CtiConversionTest, ExplicitConversion) {
p1 = newPhase("../data/air-no-reactions.xml", "");
p1 = newPhase("../data/air-no-reactions.xml");
ctml::ct2ctml("../data/air-no-reactions.cti");
p2 = newPhase("air-no-reactions.xml", "");
compare();
}
TEST_F(CtiConversionTest, ImplicitConversion) {
p1 = newPhase("../data/air-no-reactions.xml", "");
p2 = newPhase("../data/air-no-reactions.cti", "");
p1 = newPhase("../data/air-no-reactions.xml");
p2 = newPhase("../data/air-no-reactions.cti");
compare();
}
@ -76,7 +76,7 @@ public:
TEST_F(ChemkinConversionTest, ValidConversion) {
copyInputFile("pdep-test.inp");
ctml::ck2cti("pdep-test.inp");
ThermoPhase* p = newPhase("pdep-test.cti", "");
ThermoPhase* p = newPhase("pdep-test.cti");
ASSERT_GT(p->temperature(), 0.0);
}

View file

@ -97,7 +97,7 @@ int main(int argc, char** argv)
Xmol[iH2OL] = 1.0;
hmw.setState_TPX(T, pres, DATA_PTR(Xmol));
ThermoPhase* gas = newPhase("gas.xml", "");
ThermoPhase* gas = newPhase("gas.xml");
kk = gas->nSpecies();
Xmol.resize(kk, 0.0);

View file

@ -13,7 +13,7 @@ int main(int argc, char** argv)
try {
int log_level = 0;
std::auto_ptr<ThermoPhase> g(newPhase("h2o2.xml", "ohmech"));
std::auto_ptr<ThermoPhase> g(newPhase("h2o2.xml"));
auto_ptr<Transport> tran(newTransportMgr("DustyGas", g.get(), log_level));
DustyGasTransport* tranDusty = dynamic_cast<DustyGasTransport*>(tran.get());

View file

@ -49,7 +49,7 @@ void testProblem()
throw CanteraError("couldn't find file", "");
}
std::auto_ptr<ThermoPhase> surfTP(newPhase(*xg));
std::auto_ptr<ThermoPhase> gasTP(newPhase("gas.xml", ""));
std::auto_ptr<ThermoPhase> gasTP(newPhase("gas.xml"));
std::auto_ptr<ThermoPhase> cao_s(newPhase("solidPhases.xml", "CaO(S)"));
std::auto_ptr<ThermoPhase> caco3_s(newPhase("solidPhases.xml", "CaCO3(S)"));