![]() |
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 17 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 12 of file Component.cpp.
Referenced by MaterialPropertyLib::Water::Water().
| MaterialPropertyLib::Component::Component | ( | std::string const & | component_name, |
| std::unique_ptr< PropertyArray > && | properties ) |
Constructor for a custom component.
Definition at line 14 of file Component.cpp.
References name, MaterialPropertyLib::overwriteExistingProperties(), and properties_.
|
virtualdefault |
|
inline |
Definition at line 57 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 46 of file Component.cpp.
References name.
Referenced by property().
|
inline |
Definition at line 49 of file Component.h.
References dValue(), and property().
Referenced by dValue().
| bool MaterialPropertyLib::Component::hasProperty | ( | PropertyType const & | p | ) | const |
Definition at line 41 of file Component.cpp.
References properties_.
| 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 24 of file Component.cpp.
References description(), OGS_FATAL, properties_, property(), and MaterialPropertyLib::property_enum_to_string.
Referenced by d2Value(), dValue(), operator[](), property(), value(), and value().
|
inline |
|
inline |
Definition at line 43 of file Component.h.
References property(), and value().
| std::string const MaterialPropertyLib::Component::name |
Definition at line 70 of file Component.h.
Referenced by Component(), and description().
|
protected |
The property array of the component.
Definition at line 74 of file Component.h.
Referenced by Component(), hasProperty(), and property().