OGS
MaterialPropertyLib::Property Class Reference

Detailed Description

This class is the base class for any material property of any scale (i.e. components, phases, media, ...). The single value of that Property can hold scalars, vectors, tensors, strings, etc.

Definition at line 50 of file Property.h.

#include <Property.h>

Inherited by MaterialPropertyLib::AverageMolarMass, MaterialPropertyLib::BishopsPowerLaw, MaterialPropertyLib::BishopsSaturationCutoff, MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten, MaterialPropertyLib::CapillaryPressureVanGenuchten, MaterialPropertyLib::ClausiusClapeyron, MaterialPropertyLib::Constant, MaterialPropertyLib::Curve, MaterialPropertyLib::DupuitPermeability, MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::EmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::Exponential, MaterialPropertyLib::Function, MaterialPropertyLib::GasPressureDependentPermeability< DisplacementDim >, MaterialPropertyLib::IdealGasLaw, MaterialPropertyLib::IdealGasLawBinaryMixture, MaterialPropertyLib::KozenyCarmanModel, MaterialPropertyLib::Linear, MaterialPropertyLib::LinearSaturationSwellingStress, MaterialPropertyLib::LinearWaterVapourLatentHeat, MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::Parameter, MaterialPropertyLib::PermeabilityMohrCoulombFailureIndexModel< DisplacementDim >, MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >, MaterialPropertyLib::PorosityFromMassBalance, MaterialPropertyLib::RelPermBrooksCorey, MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase, MaterialPropertyLib::RelPermLiakopoulos, MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem, MaterialPropertyLib::RelPermUdell, MaterialPropertyLib::RelPermUdellNonwettingPhase, MaterialPropertyLib::RelPermVanGenuchten, MaterialPropertyLib::SaturationBrooksCorey, MaterialPropertyLib::SaturationDependentSwelling, MaterialPropertyLib::SaturationDependentThermalConductivity, MaterialPropertyLib::SaturationExponential, MaterialPropertyLib::SaturationLiakopoulos, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::SoilThermalConductivitySomerton< GlobalDimension >, MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >, MaterialPropertyLib::TemperatureDependentDiffusion, MaterialPropertyLib::TemperatureDependentFraction, MaterialPropertyLib::TransportPorosityFromMassBalance, MaterialPropertyLib::VapourDiffusionFEBEX, MaterialPropertyLib::VapourDiffusionPMQ, MaterialPropertyLib::VermaPruessModel, MaterialPropertyLib::VolumeFractionAverage, MaterialPropertyLib::WaterVapourDensity, and MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature.

Public Member Functions

virtual ~Property ()
 
virtual PropertyDataType initialValue (ParameterLib::SpatialPosition const &pos, double const t) const
 
virtual PropertyDataType value () const
 
virtual PropertyDataType value (VariableArray const &variable_array, VariableArray const &variable_array_prev, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType dValue (VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
virtual PropertyDataType d2Value (VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 Default implementation: 2nd derivative of any constant property is zero. More...
 
virtual void setProperties (std::vector< std::unique_ptr< Phase > > const &phases)
 Default implementation: More...
 
void setScale (std::variant< Medium *, Phase *, Component * > scale)
 
template<typename T >
initialValue (ParameterLib::SpatialPosition const &pos, double const t) const
 
template<typename T >
value () const
 
template<typename T >
value (VariableArray const &variable_array, VariableArray const &variable_array_prev, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
value (VariableArray const &variable_array, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
dValue (VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
dValue (VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 
template<typename T >
d2Value (VariableArray const &variable_array, Variable const &variable1, Variable const &variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
 

Protected Attributes

std::string name_
 
PropertyDataType value_
 The single value of a property. More...
 
PropertyDataType dvalue_
 
std::variant< Medium *, Phase *, Component * > scale_
 

Private Member Functions

virtual void checkScale () const
 
std::string description () const
 

Private Attributes

bool property_used = false
 

Static Private Attributes

static constexpr std::array property_data_type_names_
 Corresponds to the PropertyDataType. More...
 

Constructor & Destructor Documentation

◆ ~Property()

virtual MaterialPropertyLib::Property::~Property ( )
inlinevirtual

Definition at line 54 of file Property.h.

55 {
56 if (property_used)
57 {
58 DBUG("Property is used: '{:s}'", description());
59 }
60 else
61 {
62 WARN("Property is not used: '{:s}'", description());
63 }
64 }
void DBUG(char const *fmt, Args const &... args)
Definition: Logging.h:29
void WARN(char const *fmt, Args const &... args)
Definition: Logging.h:39
std::string description() const
Definition: Property.cpp:151

References DBUG(), description(), property_used, and WARN().

Member Function Documentation

◆ checkScale()

virtual void MaterialPropertyLib::Property::checkScale ( ) const
inlineprivatevirtual

Reimplemented in MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::AverageMolarMass, MaterialPropertyLib::BishopsPowerLaw, MaterialPropertyLib::BishopsSaturationCutoff, MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten, MaterialPropertyLib::CapillaryPressureVanGenuchten, MaterialPropertyLib::SaturationBrooksCorey, MaterialPropertyLib::SaturationExponential, MaterialPropertyLib::SaturationLiakopoulos, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::ClausiusClapeyron, MaterialPropertyLib::WaterVapourDensity, MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::EmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::LinearWaterVapourLatentHeat, MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature, MaterialPropertyLib::GasPressureDependentPermeability< DisplacementDim >, MaterialPropertyLib::IdealGasLaw, MaterialPropertyLib::IdealGasLawBinaryMixture, MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::PermeabilityMohrCoulombFailureIndexModel< DisplacementDim >, MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >, MaterialPropertyLib::PorosityFromMassBalance, MaterialPropertyLib::RelPermBrooksCorey, MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase, MaterialPropertyLib::RelPermLiakopoulos, MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem, MaterialPropertyLib::RelPermUdell, MaterialPropertyLib::RelPermUdellNonwettingPhase, MaterialPropertyLib::RelPermVanGenuchten, MaterialPropertyLib::SaturationDependentSwelling, MaterialPropertyLib::SaturationDependentThermalConductivity, MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >, MaterialPropertyLib::LinearSaturationSwellingStress, MaterialPropertyLib::TemperatureDependentDiffusion, MaterialPropertyLib::TemperatureDependentFraction, MaterialPropertyLib::SoilThermalConductivitySomerton< GlobalDimension >, MaterialPropertyLib::TransportPorosityFromMassBalance, MaterialPropertyLib::VapourDiffusionFEBEX, MaterialPropertyLib::VapourDiffusionPMQ, and MaterialPropertyLib::VolumeFractionAverage.

Definition at line 300 of file Property.h.

301 {
302 // Empty check for properties which can be defined on every scale,
303 // medium, phase or component
304 }

Referenced by setScale().

◆ d2Value() [1/2]

template<typename T >
T MaterialPropertyLib::Property::d2Value ( VariableArray const &  variable_array,
Variable const &  variable1,
Variable const &  variable2,
ParameterLib::SpatialPosition const &  pos,
double const  t,
double const  dt 
) const
inline

Definition at line 263 of file Property.h.

267 {
268 try
269 {
270#ifndef NDEBUG
271 property_used = true;
272#endif
273 return std::get<T>(
274 d2Value(variable_array, variable1, variable2, pos, t, dt));
275 }
276 catch (std::bad_variant_access const&)
277 {
278 OGS_FATAL(
279 "The second derivative value of {:s} is not of the requested "
280 "type '{:s}' but a {:s}.",
281 description(),
282 typeid(T).name(),
283 property_data_type_names_[d2Value(variable_array, variable1,
284 variable2, pos, t, dt)
285 .index()]);
286 }
287 }
#define OGS_FATAL(...)
Definition: Error.h:26
virtual PropertyDataType d2Value(VariableArray const &variable_array, Variable const variable1, Variable const variable2, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
Default implementation: 2nd derivative of any constant property is zero.
Definition: Property.cpp:131
static constexpr std::array property_data_type_names_
Corresponds to the PropertyDataType.
Definition: Property.h:312
static const double t

References d2Value(), description(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, property_used, and MathLib::t.

◆ d2Value() [2/2]

PropertyDataType MaterialPropertyLib::Property::d2Value ( VariableArray const &  variable_array,
Variable const  variable1,
Variable const  variable2,
ParameterLib::SpatialPosition const &  pos,
double const  t,
double const  dt 
) const
virtual

Default implementation: 2nd derivative of any constant property is zero.

This virtual method will compute the second derivative of a property with respect to the given variables pv1 and pv2.

Reimplemented in MaterialPropertyLib::ClausiusClapeyron, MaterialPropertyLib::Exponential, MaterialPropertyLib::Linear, MaterialPropertyLib::Parameter, MaterialPropertyLib::SaturationBrooksCorey, MaterialPropertyLib::SaturationLiakopoulos, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::IdealGasLaw, MaterialPropertyLib::IdealGasLawBinaryMixture, MaterialPropertyLib::AverageMolarMass, MaterialPropertyLib::TemperatureDependentFraction, and MaterialPropertyLib::SaturationExponential.

Definition at line 131 of file Property.cpp.

137{
138#ifndef NDEBUG
139 property_used = true;
140#endif
141 return 0.0;
142}

References property_used.

Referenced by d2Value().

◆ description()

std::string MaterialPropertyLib::Property::description ( ) const
private

Definition at line 151 of file Property.cpp.

152{
153 return "property '" + name_ + "' defined for " +
154 std::visit(
155 [](auto&& scale) -> std::string
156 {
157 if (scale == nullptr)
158 {
159 return "unknown scale";
160 }
161 return scale->description();
162 },
163 scale_);
164}
std::variant< Medium *, Phase *, Component * > scale_
Definition: Property.h:297
void scale(PETScVector &x, PetscScalar const a)
Definition: LinAlg.cpp:44

References name_, MathLib::LinAlg::scale(), and scale_.

Referenced by ~Property(), d2Value(), dValue(), initialValue(), and value().

◆ dValue() [1/4]

PropertyDataType MaterialPropertyLib::Property::dValue ( VariableArray const &  variable_array,
Variable const  variable,
ParameterLib::SpatialPosition const &  pos,
double const  t,
double const  dt 
) const
virtual

This virtual method will compute the property derivative value based on the variables that are passed as arguments with the default implementation using empty variables array for the previous time step.

The default implementation of this method only returns the property value derivative without altering it.

Reimplemented in MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::AverageMolarMass, MaterialPropertyLib::SaturationExponential, MaterialPropertyLib::Curve, MaterialPropertyLib::Exponential, MaterialPropertyLib::Linear, MaterialPropertyLib::Parameter, MaterialPropertyLib::ClausiusClapeyron, MaterialPropertyLib::WaterVapourDensity, MaterialPropertyLib::EmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::LinearWaterVapourLatentHeat, MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature, MaterialPropertyLib::Function, MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::RelPermUdellNonwettingPhase, MaterialPropertyLib::BishopsPowerLaw, MaterialPropertyLib::BishopsSaturationCutoff, MaterialPropertyLib::SaturationBrooksCorey, MaterialPropertyLib::SaturationLiakopoulos, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::IdealGasLaw, MaterialPropertyLib::IdealGasLawBinaryMixture, MaterialPropertyLib::SaturationDependentThermalConductivity, MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten, MaterialPropertyLib::CapillaryPressureVanGenuchten, MaterialPropertyLib::GasPressureDependentPermeability< DisplacementDim >, MaterialPropertyLib::PermeabilityMohrCoulombFailureIndexModel< DisplacementDim >, MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >, MaterialPropertyLib::PorosityFromMassBalance, MaterialPropertyLib::RelPermBrooksCorey, MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase, MaterialPropertyLib::RelPermLiakopoulos, MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem, MaterialPropertyLib::RelPermUdell, MaterialPropertyLib::RelPermVanGenuchten, MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >, MaterialPropertyLib::LinearSaturationSwellingStress, MaterialPropertyLib::TemperatureDependentFraction, MaterialPropertyLib::SoilThermalConductivitySomerton< GlobalDimension >, MaterialPropertyLib::TransportPorosityFromMassBalance, MaterialPropertyLib::VapourDiffusionFEBEX, MaterialPropertyLib::VapourDiffusionPMQ, MaterialPropertyLib::VolumeFractionAverage, and MaterialPropertyLib::SoilThermalConductivitySomerton< GlobalDimension >.

Definition at line 119 of file Property.cpp.

123{
124#ifndef NDEBUG
125 property_used = true;
126#endif
127 return dValue(variable_array, VariableArray{}, variable, pos, t, dt);
128}
virtual PropertyDataType dValue(VariableArray const &variable_array, VariableArray const &variable_array_prev, Variable const variable, ParameterLib::SpatialPosition const &pos, double const t, double const dt) const
Definition: Property.cpp:105
std::array< VariableType, static_cast< int >(Variable::number_of_variables)> VariableArray
Definition: VariableType.h:110

References dValue(), property_used, and MathLib::t.

◆ dValue() [2/4]

template<typename T >
T MaterialPropertyLib::Property::dValue ( VariableArray const &  variable_array,
Variable const  variable,
ParameterLib::SpatialPosition const &  pos,
double const  t,
double const  dt 
) const
inline

Definition at line 240 of file Property.h.

243 {
244 try
245 {
246#ifndef NDEBUG
247 property_used = true;
248#endif
249 return std::get<T>(dValue(variable_array, variable, pos, t, dt));
250 }
251 catch (std::bad_variant_access const&)
252 {
253 OGS_FATAL(
254 "The first derivative value of {:s} is not of the requested "
255 "type '{:s}' but a {:s}.",
256 description(),
257 typeid(T).name(),
259 [dValue(variable_array, variable, pos, t, dt).index()]);
260 }
261 }

References description(), dValue(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, property_used, and MathLib::t.

◆ dValue() [3/4]

PropertyDataType MaterialPropertyLib::Property::dValue ( VariableArray const &  variable_array,
VariableArray const &  variable_array_prev,
Variable const  variable,
ParameterLib::SpatialPosition const &  pos,
double const  t,
double const  dt 
) const
virtual

This virtual method will compute the property derivative value based on the variables that are passed as arguments and the variables from the previous time step.

Reimplemented in MaterialPropertyLib::Constant, and MaterialPropertyLib::SaturationDependentSwelling.

Definition at line 105 of file Property.cpp.

110{
111#ifndef NDEBUG
112 property_used = true;
113#endif
114 return dvalue_;
115}
PropertyDataType dvalue_
Definition: Property.h:293

References dvalue_, and property_used.

Referenced by dValue().

◆ dValue() [4/4]

template<typename T >
T MaterialPropertyLib::Property::dValue ( VariableArray const &  variable_array,
VariableArray const &  variable_array_prev,
Variable const  variable,
ParameterLib::SpatialPosition const &  pos,
double const  t,
double const  dt 
) const
inline

Definition at line 215 of file Property.h.

219 {
220 try
221 {
222#ifndef NDEBUG
223 property_used = true;
224#endif
225 return std::get<T>(dValue(variable_array, variable_array_prev,
226 variable, pos, t, dt));
227 }
228 catch (std::bad_variant_access const&)
229 {
230 OGS_FATAL(
231 "The first derivative value of {:s} is not of the requested "
232 "type '{:s}' but a {:s}.",
233 description(),
234 typeid(T).name(),
236 [dValue(variable_array, variable, pos, t, dt).index()]);
237 }
238 }

References description(), dValue(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, property_used, and MathLib::t.

◆ initialValue() [1/2]

PropertyDataType MaterialPropertyLib::Property::initialValue ( ParameterLib::SpatialPosition const &  pos,
double const  t 
) const
virtual

Returns the initial (or reference) value of the property. The default implementation forwards to the value function.

Reimplemented in MaterialPropertyLib::PorosityFromMassBalance, and MaterialPropertyLib::TransportPorosityFromMassBalance.

Definition at line 69 of file Property.cpp.

71{
72 return value(VariableArray{}, pos, t,
73 std::numeric_limits<double>::quiet_NaN());
74}
virtual PropertyDataType value() const
Definition: Property.cpp:76

References MathLib::t, and value().

Referenced by initialValue().

◆ initialValue() [2/2]

template<typename T >
T MaterialPropertyLib::Property::initialValue ( ParameterLib::SpatialPosition const &  pos,
double const  t 
) const
inline

Definition at line 125 of file Property.h.

127 {
128 try
129 {
130 return std::get<T>(initialValue(pos, t));
131 }
132 catch (std::bad_variant_access const&)
133 {
134 OGS_FATAL(
135 "The initial value of {:s} does not hold requested type '{:s}' "
136 "but a {:s}.",
137 description(),
138 typeid(T).name(),
140 }
141 }
virtual PropertyDataType initialValue(ParameterLib::SpatialPosition const &pos, double const t) const
Definition: Property.cpp:69

References description(), initialValue(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, and MathLib::t.

◆ setProperties()

void MaterialPropertyLib::Property::setProperties ( std::vector< std::unique_ptr< Phase > > const &  phases)
virtual

Default implementation:

This virtual method will collect the properties of the phases in order to access them from the medium property level.

Reimplemented in MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, and MaterialPropertyLib::VolumeFractionAverage.

Definition at line 145 of file Property.cpp.

147{
148 // empty
149}

◆ setScale()

void MaterialPropertyLib::Property::setScale ( std::variant< Medium *, Phase *, Component * >  scale)
inline

Definition at line 118 of file Property.h.

119 {
120 scale_ = scale;
121 checkScale();
122 };
virtual void checkScale() const
Definition: Property.h:300

References checkScale(), MathLib::LinAlg::scale(), and scale_.

◆ value() [1/6]

◆ value() [2/6]

template<typename T >
T MaterialPropertyLib::Property::value ( ) const
inline

Definition at line 144 of file Property.h.

145 {
146 try
147 {
148#ifndef NDEBUG
149 property_used = true;
150#endif
151 return std::get<T>(value());
152 }
153 catch (std::bad_variant_access const&)
154 {
155 OGS_FATAL(
156 "The value of {:s} does not hold requested type '{:s}' but a "
157 "{:s}.",
158 description(),
159 typeid(T).name(),
161 }
162 }

References description(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, property_used, and value().

◆ value() [3/6]

PropertyDataType MaterialPropertyLib::Property::value ( VariableArray const &  variable_array,
ParameterLib::SpatialPosition const &  pos,
double const  t,
double const  dt 
) const
virtual

This virtual method will compute the property value based on the variables that are passed as arguments with the default implementation using empty variables array for the previous time step.

Reimplemented in MaterialPropertyLib::DupuitPermeability, MaterialPropertyLib::KozenyCarmanModel, MaterialPropertyLib::VermaPruessModel, MaterialPropertyLib::AverageMolarMass, MaterialPropertyLib::BishopsPowerLaw, MaterialPropertyLib::BishopsSaturationCutoff, MaterialPropertyLib::SaturationBrooksCorey, MaterialPropertyLib::SaturationExponential, MaterialPropertyLib::SaturationLiakopoulos, MaterialPropertyLib::SaturationVanGenuchten, MaterialPropertyLib::IdealGasLaw, MaterialPropertyLib::IdealGasLawBinaryMixture, MaterialPropertyLib::Linear, MaterialPropertyLib::SaturationDependentThermalConductivity, MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten, MaterialPropertyLib::CapillaryPressureVanGenuchten, MaterialPropertyLib::ClausiusClapeyron, MaterialPropertyLib::Curve, MaterialPropertyLib::WaterVapourDensity, MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >, MaterialPropertyLib::EmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::LinearWaterVapourLatentHeat, MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature, MaterialPropertyLib::Exponential, MaterialPropertyLib::Function, MaterialPropertyLib::GasPressureDependentPermeability< DisplacementDim >, MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >, MaterialPropertyLib::Parameter, MaterialPropertyLib::PermeabilityMohrCoulombFailureIndexModel< DisplacementDim >, MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >, MaterialPropertyLib::PorosityFromMassBalance, MaterialPropertyLib::RelPermBrooksCorey, MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase, MaterialPropertyLib::RelPermLiakopoulos, MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem, MaterialPropertyLib::RelPermUdell, MaterialPropertyLib::RelPermUdellNonwettingPhase, MaterialPropertyLib::RelPermVanGenuchten, MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat, MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >, MaterialPropertyLib::LinearSaturationSwellingStress, MaterialPropertyLib::TemperatureDependentFraction, MaterialPropertyLib::SoilThermalConductivitySomerton< GlobalDimension >, MaterialPropertyLib::TransportPorosityFromMassBalance, MaterialPropertyLib::VapourDiffusionFEBEX, MaterialPropertyLib::VapourDiffusionPMQ, MaterialPropertyLib::VolumeFractionAverage, MaterialPropertyLib::SoilThermalConductivitySomerton< GlobalDimension >, and MaterialPropertyLib::TemperatureDependentDiffusion.

Definition at line 95 of file Property.cpp.

98{
99#ifndef NDEBUG
100 property_used = true;
101#endif
102 return value(variable_array, VariableArray{}, pos, t, dt);
103}

References property_used, MathLib::t, and value().

◆ value() [4/6]

template<typename T >
T MaterialPropertyLib::Property::value ( VariableArray const &  variable_array,
ParameterLib::SpatialPosition const &  pos,
double const  t,
double const  dt 
) const
inline

Definition at line 191 of file Property.h.

194 {
195 try
196 {
197#ifndef NDEBUG
198 property_used = true;
199#endif
200 return std::get<T>(value(variable_array, pos, t, dt));
201 }
202 catch (std::bad_variant_access const&)
203 {
204 OGS_FATAL(
205 "The value of {:s} is not of the requested type '{:s}' but a "
206 "{:s}.",
207 description(),
208 typeid(T).name(),
209 property_data_type_names_[value(variable_array, pos, t, dt)
210 .index()]);
211 }
212 }

References description(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, property_used, MathLib::t, and value().

◆ value() [5/6]

PropertyDataType MaterialPropertyLib::Property::value ( VariableArray const &  variable_array,
VariableArray const &  variable_array_prev,
ParameterLib::SpatialPosition const &  pos,
double const  t,
double const  dt 
) const
virtual

This virtual method will compute the property value based on the variables that are passed as arguments and the variables from the previous time step.

Reimplemented in MaterialPropertyLib::Parameter, MaterialPropertyLib::PorosityFromMassBalance, MaterialPropertyLib::SaturationDependentSwelling, MaterialPropertyLib::LinearSaturationSwellingStress, and MaterialPropertyLib::TransportPorosityFromMassBalance.

Definition at line 84 of file Property.cpp.

88{
89#ifndef NDEBUG
90 property_used = true;
91#endif
92 return value_;
93}

References property_used, and value_.

◆ value() [6/6]

template<typename T >
T MaterialPropertyLib::Property::value ( VariableArray const &  variable_array,
VariableArray const &  variable_array_prev,
ParameterLib::SpatialPosition const &  pos,
double const  t,
double const  dt 
) const
inline

Definition at line 165 of file Property.h.

169 {
170 try
171 {
172#ifndef NDEBUG
173 property_used = true;
174#endif
175 return std::get<T>(
176 value(variable_array, variable_array_prev, pos, t, dt));
177 }
178 catch (std::bad_variant_access const&)
179 {
180 OGS_FATAL(
181 "The value of {:s} is not of the requested type '{:s}' but a "
182 "{:s}.",
183 description(),
184 typeid(T).name(),
185 property_data_type_names_[value(variable_array,
186 variable_array_prev, pos, t, dt)
187 .index()]);
188 }
189 }

References description(), MaterialPropertyLib::name, OGS_FATAL, property_data_type_names_, property_used, MathLib::t, and value().

Member Data Documentation

◆ dvalue_

PropertyDataType MaterialPropertyLib::Property::dvalue_
protected

Definition at line 293 of file Property.h.

Referenced by MaterialPropertyLib::Constant::Constant(), and dValue().

◆ name_

std::string MaterialPropertyLib::Property::name_
protected

Definition at line 290 of file Property.h.

Referenced by MaterialPropertyLib::AverageMolarMass::AverageMolarMass(), MaterialPropertyLib::BishopsPowerLaw::BishopsPowerLaw(), MaterialPropertyLib::BishopsSaturationCutoff::BishopsSaturationCutoff(), MaterialPropertyLib::CapillaryPressureVanGenuchten::CapillaryPressureVanGenuchten(), MaterialPropertyLib::ClausiusClapeyron::ClausiusClapeyron(), MaterialPropertyLib::Constant::Constant(), MaterialPropertyLib::Curve::Curve(), MaterialPropertyLib::DupuitPermeability::DupuitPermeability(), MaterialPropertyLib::EffectiveThermalConductivityPorosityMixing< GlobalDim >::EffectiveThermalConductivityPorosityMixing(), MaterialPropertyLib::EmbeddedFracturePermeability< DisplacementDim >::EmbeddedFracturePermeability(), MaterialPropertyLib::Exponential::Exponential(), MaterialPropertyLib::Function::Function(), MaterialPropertyLib::GasPressureDependentPermeability< DisplacementDim >::GasPressureDependentPermeability(), MaterialPropertyLib::IdealGasLaw::IdealGasLaw(), MaterialPropertyLib::IdealGasLawBinaryMixture::IdealGasLawBinaryMixture(), MaterialPropertyLib::Linear::Linear(), MaterialPropertyLib::LinearSaturationSwellingStress::LinearSaturationSwellingStress(), MaterialPropertyLib::LinearWaterVapourLatentHeat::LinearWaterVapourLatentHeat(), MaterialPropertyLib::OrthotropicEmbeddedFracturePermeability< DisplacementDim >::OrthotropicEmbeddedFracturePermeability(), MaterialPropertyLib::Parameter::Parameter(), MaterialPropertyLib::PermeabilityMohrCoulombFailureIndexModel< DisplacementDim >::PermeabilityMohrCoulombFailureIndexModel(), MaterialPropertyLib::PermeabilityOrthotropicPowerLaw< DisplacementDim >::PermeabilityOrthotropicPowerLaw(), MaterialPropertyLib::PorosityFromMassBalance::PorosityFromMassBalance(), MaterialPropertyLib::RelPermBrooksCorey::RelPermBrooksCorey(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::RelPermBrooksCoreyNonwettingPhase(), MaterialPropertyLib::RelPermLiakopoulos::RelPermLiakopoulos(), MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem::RelPermNonWettingPhaseVanGenuchtenMualem(), MaterialPropertyLib::RelPermUdell::RelPermUdell(), MaterialPropertyLib::RelPermUdellNonwettingPhase::RelPermUdellNonwettingPhase(), MaterialPropertyLib::RelPermVanGenuchten::RelPermVanGenuchten(), MaterialPropertyLib::SaturationBrooksCorey::SaturationBrooksCorey(), MaterialPropertyLib::SaturationDependentSwelling::SaturationDependentSwelling(), MaterialPropertyLib::SaturationDependentThermalConductivity::SaturationDependentThermalConductivity(), MaterialPropertyLib::SaturationExponential::SaturationExponential(), MaterialPropertyLib::SaturationLiakopoulos::SaturationLiakopoulos(), MaterialPropertyLib::SaturationVanGenuchten::SaturationVanGenuchten(), MaterialPropertyLib::SoilThermalConductivitySomerton< GlobalDimension >::SoilThermalConductivitySomerton(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::SpecificHeatCapacityWithLatentHeat(), MaterialPropertyLib::StrainDependentPermeability< DisplacementDim >::StrainDependentPermeability(), MaterialPropertyLib::TemperatureDependentFraction::TemperatureDependentFraction(), MaterialPropertyLib::TransportPorosityFromMassBalance::TransportPorosityFromMassBalance(), MaterialPropertyLib::VapourDiffusionFEBEX::VapourDiffusionFEBEX(), MaterialPropertyLib::VapourDiffusionPMQ::VapourDiffusionPMQ(), MaterialPropertyLib::VolumeFractionAverage::VolumeFractionAverage(), MaterialPropertyLib::WaterVapourDensity::WaterVapourDensity(), MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature::WaterVapourLatentHeatWithCriticalTemperature(), description(), and MaterialPropertyLib::Function::dValue().

◆ property_data_type_names_

constexpr std::array MaterialPropertyLib::Property::property_data_type_names_
staticconstexprprivate
Initial value:
= {
"scalar", "2-vector", "3-vector",
"2x2-matrix", "3x3-matrix", "2D-Kelvin vector",
"3D-Kelvin vector", "dynamic matrix type"}

Corresponds to the PropertyDataType.

Definition at line 312 of file Property.h.

Referenced by d2Value(), dValue(), initialValue(), and value().

◆ property_used

bool MaterialPropertyLib::Property::property_used = false
mutableprivate

Definition at line 307 of file Property.h.

Referenced by ~Property(), d2Value(), dValue(), and value().

◆ scale_

std::variant<Medium*, Phase*, Component*> MaterialPropertyLib::Property::scale_
protected

Definition scale of the property. Can be one of medium, phase, or component in general. Set through setScale method which takes care of the correctness in special cases.

Definition at line 297 of file Property.h.

Referenced by MaterialPropertyLib::AverageMolarMass::checkScale(), MaterialPropertyLib::BishopsPowerLaw::checkScale(), MaterialPropertyLib::BishopsSaturationCutoff::checkScale(), MaterialPropertyLib::CapillaryPressureRegularizedVanGenuchten::checkScale(), MaterialPropertyLib::CapillaryPressureVanGenuchten::checkScale(), MaterialPropertyLib::SaturationBrooksCorey::checkScale(), MaterialPropertyLib::SaturationExponential::checkScale(), MaterialPropertyLib::SaturationLiakopoulos::checkScale(), MaterialPropertyLib::SaturationVanGenuchten::checkScale(), MaterialPropertyLib::ClausiusClapeyron::checkScale(), MaterialPropertyLib::WaterVapourDensity::checkScale(), MaterialPropertyLib::LinearWaterVapourLatentHeat::checkScale(), MaterialPropertyLib::WaterVapourLatentHeatWithCriticalTemperature::checkScale(), MaterialPropertyLib::IdealGasLaw::checkScale(), MaterialPropertyLib::IdealGasLawBinaryMixture::checkScale(), MaterialPropertyLib::PorosityFromMassBalance::checkScale(), MaterialPropertyLib::RelPermBrooksCorey::checkScale(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::checkScale(), MaterialPropertyLib::RelPermLiakopoulos::checkScale(), MaterialPropertyLib::RelPermNonWettingPhaseVanGenuchtenMualem::checkScale(), MaterialPropertyLib::RelPermUdell::checkScale(), MaterialPropertyLib::RelPermUdellNonwettingPhase::checkScale(), MaterialPropertyLib::RelPermVanGenuchten::checkScale(), MaterialPropertyLib::SaturationDependentSwelling::checkScale(), MaterialPropertyLib::SaturationDependentThermalConductivity::checkScale(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::checkScale(), MaterialPropertyLib::LinearSaturationSwellingStress::checkScale(), MaterialPropertyLib::TemperatureDependentDiffusion::checkScale(), MaterialPropertyLib::TemperatureDependentFraction::checkScale(), MaterialPropertyLib::SoilThermalConductivitySomerton< GlobalDimension >::checkScale(), MaterialPropertyLib::TransportPorosityFromMassBalance::checkScale(), MaterialPropertyLib::VapourDiffusionFEBEX::checkScale(), MaterialPropertyLib::VapourDiffusionPMQ::checkScale(), MaterialPropertyLib::VolumeFractionAverage::checkScale(), MaterialPropertyLib::TemperatureDependentFraction::d2Value(), description(), MaterialPropertyLib::AverageMolarMass::dValue(), MaterialPropertyLib::ClausiusClapeyron::dValue(), MaterialPropertyLib::RelPermBrooksCorey::dValue(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::dValue(), MaterialPropertyLib::RelPermLiakopoulos::dValue(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::dValue(), MaterialPropertyLib::TemperatureDependentFraction::dValue(), MaterialPropertyLib::VolumeFractionAverage::dValue(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::effectiveVolumetricHeatCapacity(), setScale(), MaterialPropertyLib::AverageMolarMass::value(), MaterialPropertyLib::ClausiusClapeyron::value(), MaterialPropertyLib::RelPermBrooksCorey::value(), MaterialPropertyLib::RelPermBrooksCoreyNonwettingPhase::value(), MaterialPropertyLib::RelPermLiakopoulos::value(), MaterialPropertyLib::SpecificHeatCapacityWithLatentHeat::value(), MaterialPropertyLib::TemperatureDependentFraction::value(), MaterialPropertyLib::VolumeFractionAverage::value(), MaterialPropertyLib::PorosityFromMassBalance::value(), and MaterialPropertyLib::TransportPorosityFromMassBalance::value().

◆ value_


The documentation for this class was generated from the following files: