OGS
|
This class defines components (substances).
The Component class is a base class used for not further specified components. Components are specified by the property 'name'. For specified components we derive special classes from this class (for clarity they are located in the 'components' subfolder).
Definition at line 25 of file Component.h.
#include <Component.h>
Public Member Functions | |
Component () | |
Component (std::string const &component_name, std::unique_ptr< PropertyArray > &&properties) | |
Constructor for a custom component. | |
virtual | ~Component ()=default |
Property const & | property (PropertyType const &) const |
A get-function for retrieving a certain property. | |
Property const & | operator[] (PropertyType const &p) const |
bool | hasProperty (PropertyType const &p) const |
template<typename T > | |
T | value (PropertyType const p) const |
template<typename T > | |
T | value (PropertyType const p, VariableArray const &variable_array) const |
template<typename T > | |
T | dValue (PropertyType const p, VariableArray const &variable_array, Variable const variable) const |
template<typename T > | |
T | d2Value (PropertyType const p, VariableArray const &variable_array, Variable const variable1, Variable const variable2) const |
std::string | description () const |
Short description of the component with its name. | |
Public Attributes | |
std::string const | name |
Protected Attributes | |
PropertyArray | properties_ |
The property array of the component. | |
MaterialPropertyLib::Component::Component | ( | ) |
Default constructor of Component. This constructor is used when the component is not specified via the 'name'-tag.
Definition at line 21 of file Component.cpp.
MaterialPropertyLib::Component::Component | ( | std::string const & | component_name, |
std::unique_ptr< PropertyArray > && | properties ) |
Constructor for a custom component.
Definition at line 23 of file Component.cpp.
References MaterialPropertyLib::overwriteExistingProperties(), and properties_.
|
virtualdefault |
|
inline |
Definition at line 65 of file Component.h.
References d2Value(), and property().
Referenced by d2Value().
std::string MaterialPropertyLib::Component::description | ( | ) | const |
Short description of the component with its name.
Definition at line 55 of file Component.cpp.
References name.
Referenced by property().
|
inline |
Definition at line 57 of file Component.h.
References dValue(), and property().
Referenced by dValue().
bool MaterialPropertyLib::Component::hasProperty | ( | PropertyType const & | p | ) | const |
Property const & MaterialPropertyLib::Component::operator[] | ( | PropertyType const & | p | ) | const |
Property const & MaterialPropertyLib::Component::property | ( | PropertyType const & | p | ) | const |
A get-function for retrieving a certain property.
Definition at line 33 of file Component.cpp.
References description(), OGS_FATAL, properties_, property(), and MaterialPropertyLib::property_enum_to_string.
Referenced by d2Value(), dValue(), ProcessLib::TH2M::ConstitutiveRelations::PhaseTransition::eval(), operator[](), property(), value(), and value().
|
inline |
|
inline |
Definition at line 51 of file Component.h.
References property(), and value().
std::string const MaterialPropertyLib::Component::name |
Definition at line 78 of file Component.h.
Referenced by MaterialPropertyLib::Phase::component(), and description().
|
protected |
The property array of the component.
Definition at line 82 of file Component.h.
Referenced by Component(), hasProperty(), and property().