diff --git a/MaterialLib/MPL/Medium.h b/MaterialLib/MPL/Medium.h index 02ca470aee7f1253ca25f40dba99f158e41e661a..f3defca3d60a1098ac4f41445d47637fd14c6681 100644 --- a/MaterialLib/MPL/Medium.h +++ b/MaterialLib/MPL/Medium.h @@ -88,4 +88,19 @@ private: /// special-defaults are allowed as well... PropertyArray _properties; }; + +template <typename Container> +void checkRequiredProperties(Medium const& medium, + Container const& required_properties) +{ + for (auto const& p : required_properties) + { + if (!medium.hasProperty(p)) + { + OGS_FATAL("The property '%s' is missing in the medium definition.", + property_enum_to_string[p].c_str()); + } + } +} + } // namespace MaterialPropertyLib