Added functionality for trivial outputs

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-08-03 18:55:52 +02:00
parent ab3b7b0f09
commit a2f45e29da
11 changed files with 253 additions and 109 deletions

View File

@@ -156,7 +156,27 @@ bool AbstractState::clear() {
return true;
}
double AbstractState::trivial_keyed_output(int key)
{
if (get_debug_level()>=50) std::cout << format("AbstractState: keyed_output called for %s ",get_parameter_information(key,"short").c_str()) << std::endl;
switch (key)
{
case imolar_mass:
return molar_mass();
case iT_reducing:
return get_reducing().T;
case irhomolar_reducing:
return get_reducing().rhomolar;
case iT_critical:
return this->T_critical();
case irhomolar_critical:
return this->rhomolar_critical();
case irhomass_critical:
return this->rhomolar_critical()*molar_mass();
default:
throw ValueError(format("This input [%d: \"%s\"] is not valid for trivial_keyed_output",key,get_parameter_information(key,"short").c_str()));
}
}
double AbstractState::keyed_output(int key)
{
if (get_debug_level()>=50) std::cout << format("AbstractState: keyed_output called for %s ",get_parameter_information(key,"short").c_str()) << std::endl;