Add ability to instantiate Transport objects from YAML files
This commit is contained in:
parent
6d6f34bee3
commit
40c403c07d
1 changed files with 4 additions and 1 deletions
|
|
@ -90,7 +90,10 @@ Transport* TransportFactory::newTransport(thermo_t* phase, int log_level)
|
|||
{
|
||||
std::string transportModel = "None";
|
||||
XML_Node& phaseNode = phase->xml();
|
||||
if (phaseNode.hasChild("transport")) {
|
||||
AnyMap& input = phase->input();
|
||||
if (input.hasKey("transport")) {
|
||||
transportModel = input["transport"].asString();
|
||||
} else if (phaseNode.hasChild("transport")) {
|
||||
transportModel = phaseNode.child("transport").attrib("model");
|
||||
}
|
||||
return newTransport(transportModel, phase,log_level);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue