An initial implementation of a string function that returns
the eosType(). This is something that we've been lacking.
This commit is contained in:
parent
47aba7b3fd
commit
0e85b295cc
2 changed files with 30 additions and 0 deletions
|
|
@ -218,6 +218,26 @@ namespace Cantera {
|
|||
return th;
|
||||
}
|
||||
|
||||
// Translate the eosType id into a string
|
||||
/*
|
||||
* Returns a string representation of the eosType id for a phase.
|
||||
* @param ieos eosType id of the phase. This is unique for the phase
|
||||
* @param length maximum length of the return string. Defaults to 100
|
||||
*
|
||||
* @return returns a string representation.
|
||||
*/
|
||||
std::string eosTypeString(int ieos, int length)
|
||||
{
|
||||
std::string ss = "UnknownPhaseType";
|
||||
// bool found = false;
|
||||
for (int n = 0; n < ntypes; n++) {
|
||||
if (_itypes[n] == ieos) {
|
||||
ss = _types[n];
|
||||
//found = true;
|
||||
}
|
||||
}
|
||||
return ss;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -143,6 +143,16 @@ namespace Cantera {
|
|||
return f->newThermoPhase(model);
|
||||
}
|
||||
|
||||
//! Translate the eosType id into a string
|
||||
/*!
|
||||
* Returns a string representation of the eosType id for a phase.
|
||||
* @param ieos eosType id of the phase. This is unique for the phase
|
||||
* @param length maximum length of the return string. Defaults to 100
|
||||
*
|
||||
* @return returns a string representation.
|
||||
*/
|
||||
std::string eosTypeString(int ieos, int length = 100);
|
||||
|
||||
|
||||
/*!
|
||||
* This routine first looks up the
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue