1 #ifndef ABLATELIBRARY_RADIATIONMODEL_H
2 #define ABLATELIBRARY_RADIATIONMODEL_H
4 #include <petscsystypes.h>
7 namespace ablate::eos::radiationProperties {
9 enum class RadiationProperty { Absorptivity, Emissivity };
29 constexpr std::string_view to_string(
const RadiationProperty& prop) {
31 case RadiationProperty::Absorptivity:
32 return "absorptivity";
33 case RadiationProperty::Emissivity:
44 constexpr RadiationProperty from_string(
const std::string_view& prop) {
45 if (prop ==
"absorptivity")
return RadiationProperty::Absorptivity;
46 if (prop ==
"emissivity")
return RadiationProperty::Emissivity;
47 throw std::invalid_argument(
"No known RadiationProperty for " + std::string(prop));
56 inline std::ostream& operator<<(std::ostream& out,
const RadiationProperty& prop) {
57 auto string = to_string(prop);
68 inline std::istream& operator>>(std::istream& in, RadiationProperty& prop) {
69 std::string propString;
71 prop = from_string(propString);
Definition: radiationProperties.hpp:11
virtual ThermodynamicTemperatureFunction GetRadiationPropertiesTemperatureFunction(RadiationProperty property, const std::vector< domain::Field > &fields) const =0