![]() |
OGS
|
This class defines material phases.
The Phase class consists of a vector of components and an array of properties.
#include <Phase.h>
Public Member Functions | |
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. More... | |
Component const & | component (std::size_t const &index) const |
bool | hasComponent (std::size_t const &index) const |
Component const & | component (std::string const &name) const |
A get-function for a component by component name. More... | |
Property const & | property (PropertyType const &p) const |
Property const & | operator[] (PropertyType const &p) const |
bool | hasProperty (PropertyType const &p) const |
std::size_t | numberOfComponents () const |
A get-function for retrieving the number of components in this phase. More... | |
std::string | description () const |
Short description of the phase with its name. More... | |
Public Attributes | |
std::string const | name |
Private Attributes | |
std::vector< std::unique_ptr< Component > > const | components_ |
PropertyArray | properties_ |
MaterialPropertyLib::Phase::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.
Definition at line 21 of file Phase.cpp.
References MaterialPropertyLib::overwriteExistingProperties(), and properties_.
Component const & MaterialPropertyLib::Phase::component | ( | std::size_t const & | index | ) | const |
A simple get-function for a component. The argument refers to the Index of the component in the components vector.
Definition at line 32 of file Phase.cpp.
References components_.
Referenced by component(), ChemistryLib::PhreeqcIOData::anonymous_namespace{PhreeqcIO.cpp}::initializeExchangerMolality(), ChemistryLib::PhreeqcIOData::anonymous_namespace{PhreeqcIO.cpp}::initializeReactantMolality(), ChemistryLib::PhreeqcIOData::anonymous_namespace{PhreeqcIO.cpp}::setPorosityPostReaction(), and ChemistryLib::PhreeqcIOData::anonymous_namespace{PhreeqcIO.cpp}::setReactantMolality().
Component const & MaterialPropertyLib::Phase::component | ( | std::string const & | name | ) | const |
A get-function for a component by component name.
Definition at line 42 of file Phase.cpp.
References component(), components_, BaseLib::findElementOrError(), and name.
std::string MaterialPropertyLib::Phase::description | ( | ) | const |
Short description of the phase with its name.
Definition at line 77 of file Phase.cpp.
References name.
Referenced by property().
bool MaterialPropertyLib::Phase::hasComponent | ( | std::size_t const & | index | ) | const |
Definition at line 37 of file Phase.cpp.
References components_.
bool MaterialPropertyLib::Phase::hasProperty | ( | PropertyType const & | p | ) | const |
Definition at line 67 of file Phase.cpp.
References properties_.
Referenced by ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::assemble(), ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::assembleWithJacobian(), ProcessLib::ThermoRichardsFlow::SimplifiedElasticityModel::bulkCompressibilityFromYoungsModulus(), MaterialPropertyLib::checkRequiredProperties(), MaterialPropertyLib::getLiquidThermalExpansivity(), and ProcessLib::RichardsMechanics::updateSwellingStressAndVolumetricStrain().
std::size_t MaterialPropertyLib::Phase::numberOfComponents | ( | ) | const |
A get-function for retrieving the number of components in this phase.
Definition at line 72 of file Phase.cpp.
References components_.
Property const & MaterialPropertyLib::Phase::operator[] | ( | PropertyType const & | p | ) | const |
Definition at line 62 of file Phase.cpp.
References property().
Property const & MaterialPropertyLib::Phase::property | ( | PropertyType const & | p | ) | const |
A get-function for a property. The argument refers to the name of the property.
Definition at line 51 of file Phase.cpp.
References description(), OGS_FATAL, properties_, and MaterialPropertyLib::property_enum_to_string.
Referenced by ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::assemble(), ProcessLib::ThermoRichardsFlow::ThermoRichardsFlowLocalAssembler< ShapeFunction, IntegrationMethod, GlobalDim >::assembleWithJacobian(), MaterialPropertyLib::getLiquidThermalExpansivity(), operator[](), and ProcessLib::RichardsMechanics::updateSwellingStressAndVolumetricStrain().
|
private |
Definition at line 64 of file Phase.h.
Referenced by component(), hasComponent(), and numberOfComponents().
std::string const MaterialPropertyLib::Phase::name |
Definition at line 61 of file Phase.h.
Referenced by MaterialPropertyLib::checkRequiredProperties(), component(), description(), and MaterialPropertyLib::Medium::hasPhase().
|
private |
Here, all for all properties listed in the Properties enumerator are initialized by mole average functions of value zero. However, 'special-default' properties are allowed to be set.
After this, other special properties can be set as exceptional defaults.
Definition at line 71 of file Phase.h.
Referenced by Phase(), hasProperty(), and property().