OGS
BishopsSaturationCutoff.cpp
Go to the documentation of this file.
1
11
12namespace MaterialPropertyLib
13{
15 double const cutoff_value)
16 : S_L_max_(cutoff_value)
17{
18 name_ = std::move(name);
19}
20
22{
23 if (!std::holds_alternative<Medium*>(scale_))
24 {
26 "The property 'BishopsSaturationCutoff' is implemented on the "
27 "'media' scale only.");
28 }
29}
30
32 VariableArray const& variable_array,
33 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
34 double const /*dt*/) const
35{
36 auto const S_L = variable_array.liquid_saturation;
37
38 return S_L < S_L_max_ ? 0. : 1.;
39}
40
42 VariableArray const& /*variable_array*/, Variable const variable,
43 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
44 double const /*dt*/) const
45{
46 if (variable != Variable::liquid_saturation)
47 {
49 "BishopsSaturationCutoff::dValue is implemented for derivatives "
50 "with respect to liquid saturation only.");
51 }
52
53 return 0.;
54}
55} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:26
BishopsSaturationCutoff(std::string name, double const cutoff_value)
PropertyDataType dValue(VariableArray const &variable_array, Variable const variable, ParameterLib::SpatialPosition const &, double const, double const) const override
virtual PropertyDataType value() const
Definition Property.cpp:76
std::variant< Medium *, Phase *, Component * > scale_
Definition Property.h:297
std::variant< double, Eigen::Matrix< double, 2, 1 >, Eigen::Matrix< double, 3, 1 >, Eigen::Matrix< double, 2, 2 >, Eigen::Matrix< double, 3, 3 >, Eigen::Matrix< double, 4, 1 >, Eigen::Matrix< double, 6, 1 >, Eigen::MatrixXd > PropertyDataType
Definition Property.h:31