Allow to create TracerConfig (for restart) without any data

This commit is contained in:
Joakim Hove 2021-11-26 14:55:53 +01:00
parent 508e2dac3c
commit ecdfa8413d
2 changed files with 7 additions and 1 deletions

View File

@ -74,6 +74,12 @@ public:
, solution_tvdp(std::move(solution_tvdp_))
{}
TracerEntry(const std::string& name_, const std::string& unit_string_, Phase phase_)
: name(name_)
, unit_string(unit_string_)
, phase(phase_)
{}
bool operator==(const TracerEntry& data) const {
return this->name == data.name &&
this->unit_string == data.unit_string &&

View File

@ -151,7 +151,7 @@ TracerConfig::TracerConfig(const UnitSystem& unit_system, const Deck& deck)
continue;
}
throw std::runtime_error("Uninitialized tracer concentration for tracer " + name);
this->tracers.emplace_back(name, unit_string, phase);
}
}
}