Remove unnecessary calls to parseCompString

This commit is contained in:
Ray Speth 2014-04-08 19:39:06 +00:00
parent 53820ed4a3
commit c887c1b6fb
3 changed files with 6 additions and 12 deletions

View file

@ -222,8 +222,7 @@ extern "C" {
{
try {
ThermoPhase& p = ThermoCabinet::item(n);
compositionMap xx = parseCompString(x, p.speciesNames());
p.setMoleFractionsByName(xx);
p.setMoleFractionsByName(x);
return 0;
} catch (...) {
return handleAllExceptions(-1, ERR);
@ -251,8 +250,7 @@ extern "C" {
{
try {
ThermoPhase& p = ThermoCabinet::item(n);
compositionMap yy = parseCompString(y, p.speciesNames());
p.setMassFractionsByName(yy);
p.setMassFractionsByName(y);
return 0;
} catch (...) {
return handleAllExceptions(-1, ERR);

View file

@ -251,8 +251,7 @@ extern "C" {
{
try {
ThermoPhase* p = _fph(n);
compositionMap xx = parseCompString(f2string(x, lx), p->speciesNames());
p->setMoleFractionsByName(xx);
p->setMoleFractionsByName(f2string(x, lx));
} catch (...) {
return handleAllExceptions(-1, ERR);
}
@ -278,8 +277,7 @@ extern "C" {
{
try {
ThermoPhase* p = _fph(n);
compositionMap yy = parseCompString(f2string(y, leny), p->speciesNames());
p->setMassFractionsByName(yy);
p->setMassFractionsByName(f2string(y, leny));
} catch (...) {
return handleAllExceptions(-1, ERR);
}

View file

@ -147,8 +147,7 @@ void ThermoPhase::setState_TPX(doublereal t, doublereal p, const compositionMap&
void ThermoPhase::setState_TPX(doublereal t, doublereal p, const std::string& x)
{
compositionMap xx = parseCompString(x, speciesNames());
setMoleFractionsByName(xx);
setMoleFractionsByName(x);
setState_TP(t,p);
}
@ -166,8 +165,7 @@ void ThermoPhase::setState_TPY(doublereal t, doublereal p, const compositionMap&
void ThermoPhase::setState_TPY(doublereal t, doublereal p, const std::string& y)
{
compositionMap yy = parseCompString(y, speciesNames());
setMassFractionsByName(yy);
setMassFractionsByName(y);
setState_TP(t,p);
}