OGS
BishopsSaturationCutoff.cpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2// SPDX-License-Identifier: BSD-3-Clause
3
5
7{
9 double const cutoff_value)
10 : S_L_max_(cutoff_value)
11{
12 name_ = std::move(name);
13}
14
16{
17 if (!std::holds_alternative<Medium*>(scale_))
18 {
20 "The property 'BishopsSaturationCutoff' is implemented on the "
21 "'media' scale only.");
22 }
23}
24
26 VariableArray const& variable_array,
27 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
28 double const /*dt*/) const
29{
30 auto const S_L = variable_array.liquid_saturation;
31
32 return S_L < S_L_max_ ? 0. : 1.;
33}
34
36 VariableArray const& /*variable_array*/, Variable const variable,
37 ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
38 double const /*dt*/) const
39{
40 if (variable != Variable::liquid_saturation)
41 {
43 "BishopsSaturationCutoff::dValue is implemented for derivatives "
44 "with respect to liquid saturation only.");
45 }
46
47 return 0.;
48}
49} // namespace MaterialPropertyLib
#define OGS_FATAL(...)
Definition Error.h:19
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
std::variant< Medium *, Phase *, Component * > scale_
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