Skip to content

Commit

Permalink
[Transport] Remove 'NoTransport' class
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl authored and speth committed Nov 27, 2021
1 parent 5a917b5 commit 1f23494
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
11 changes: 1 addition & 10 deletions include/cantera/transport/TransportBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class Transport
//! Identifies the Transport object type. Each derived class should override
//! this method to return a meaningful identifier.
virtual std::string transportType() const {
return "Transport";
return "None";
}

/*!
Expand Down Expand Up @@ -788,15 +788,6 @@ class Transport
std::weak_ptr<Solution> m_root;
};


//! Empty transport object used for exception handling
class NoTransport : public Transport
{
virtual std::string transportType() const {
return "None";
}
};

}

#endif
7 changes: 3 additions & 4 deletions src/transport/TransportFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ TransportFactory::TransportFactory()
{
reg("", []() { return new Transport(); });
addAlias("", "Transport");
reg("None", []() { return new NoTransport(); });
addAlias("None", "none");
addAlias("None", "NoTransport");
addAlias("", "None");
addAlias("", "none");
reg("unity-Lewis-number", []() { return new UnityLewisTransport(); });
addAlias("unity-Lewis-number", "UnityLewis");
reg("mixture-averaged", []() { return new MixTransport(); });
Expand Down Expand Up @@ -64,7 +63,7 @@ void TransportFactory::deleteFactory()
Transport* TransportFactory::newTransport(const std::string& transportModel,
ThermoPhase* phase, int log_level)
{
if (transportModel != "DustyGas" && canonicalize(transportModel) == "None") {
if (transportModel != "DustyGas" && canonicalize(transportModel) == "") {
return create(transportModel);
}
if (!phase) {
Expand Down

0 comments on commit 1f23494

Please sign in to comment.