22 std::vector<std::unique_ptr<Component>>&& components,
23 std::unique_ptr<PropertyArray>&& properties)
24 :
name(std::move(phase_name)), components_(std::move(components))
47 { return component->name == name; },
48 "Could not find component name '" +
name +
"'.");
56 OGS_FATAL(
"Trying to access undefined property '{:s}' of {:s}",
79 return "phase '" +
name +
"'";
This class defines components (substances).
Property const & property(PropertyType const &p) const
PropertyArray properties_
std::string description() const
Short description of the phase with its name.
std::size_t numberOfComponents() const
A get-function for retrieving the number of components in this phase.
std::vector< std::unique_ptr< Component > > const components_
Property const & operator[](PropertyType const &p) const
bool hasProperty(PropertyType const &p) const
Phase(std::string &&phase_name, std::vector< std::unique_ptr< Component >> &&components, std::unique_ptr< PropertyArray > &&properties)
The Phase constructor is called with the optional phase name.
bool hasComponent(std::size_t const &index) const
Component const & component(std::size_t const &index) const
std::iterator_traits< InputIt >::reference findElementOrError(InputIt begin, InputIt end, Predicate predicate, std::string const &error="")
void overwriteExistingProperties(PropertyArray &properties, PropertyArray &new_properties, std::variant< Medium *, Phase *, Component * > scale_pointer)
static const std::array< std::string, PropertyType::number_of_properties > property_enum_to_string