24 std::unique_ptr<PropertyArray>&& properties)
25 :
name(component_name)
38 OGS_FATAL(
"Trying to access undefined property '{:s}' of {:s}",
57 return "component '" +
name +
"'";
61 Component const&
c, std::span<PropertyType const>
const required_properties)
63 for (
auto const& p : required_properties)
65 if (!
c.hasProperty(p))
67 OGS_FATAL(
"The property '{:s}' is missing in the component '{:s}'.",
This class defines components (substances).
Property const & property(PropertyType const &) const
A get-function for retrieving a certain property.
Property const & operator[](PropertyType const &p) const
PropertyArray properties_
The property array of the component.
bool hasProperty(PropertyType const &p) const
std::string description() const
Short description of the component with its name.
void overwriteExistingProperties(PropertyArray &properties, PropertyArray &new_properties, std::variant< Medium *, Phase *, Component * > scale_pointer)
void checkRequiredProperties(Component const &c, std::span< PropertyType const > const required_properties)
static const std::array< std::string, PropertyType::number_of_properties > property_enum_to_string