OGS
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
v
w
Typedefs
b
c
e
f
h
j
k
l
m
n
p
q
r
s
t
v
w
x
Enumerations
b
c
d
e
f
g
i
l
m
n
o
p
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
l
m
n
p
r
s
t
v
y
Classes
Class List
Class Index
Class Hierarchy
Files
File List
File Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
x
Functions
a
c
d
e
f
g
i
m
o
p
r
s
t
v
w
x
Variables
Typedefs
Enumerations
Macros
a
b
c
e
g
h
i
l
m
n
o
p
r
s
t
v
w
x
DupuitPermeability.cpp
Go to the documentation of this file.
1
11
#include "
MaterialLib/MPL/Properties/DupuitPermeability.h
"
12
13
namespace
MaterialPropertyLib
14
{
15
DupuitPermeability::DupuitPermeability
(
16
std::string
name
,
ParameterLib::Parameter<double>
const
& parameter)
17
: parameter_(parameter)
18
{
19
name_
= std::move(
name
);
20
}
21
22
PropertyDataType
DupuitPermeability::value
(
23
MaterialPropertyLib::VariableArray
const
& variable_array,
24
ParameterLib::SpatialPosition
const
& pos,
double
const
t,
25
double
const
/*dt*/
)
const
26
{
27
double
const
pressure = std::get<double>(variable_array[
static_cast<
int
>
(
28
MaterialPropertyLib::Variable::phase_pressure
)]);
29
auto
const
& permeability_values =
parameter_
(t, pos);
30
31
auto
const
& permeability_variant =
fromVector
(permeability_values);
32
PropertyDataType
dupuit_permeability = std::visit(
33
[&pressure](
auto
const
& permeability_variant) ->
PropertyDataType
34
{
35
using
T = std::decay_t<decltype(permeability_variant)>;
36
if
constexpr (std::is_same_v<T, double>)
37
{
38
return
pressure * permeability_variant;
39
}
40
else
41
{
42
return
(pressure * permeability_variant).eval();
43
}
44
},
45
permeability_variant);
46
47
return
dupuit_permeability;
48
}
49
50
}
// namespace MaterialPropertyLib
DupuitPermeability.h
MaterialPropertyLib::DupuitPermeability::parameter_
ParameterLib::Parameter< double > const & parameter_
Definition:
DupuitPermeability.h:34
MaterialPropertyLib::DupuitPermeability::DupuitPermeability
DupuitPermeability(std::string name, ParameterLib::Parameter< double > const ¶meter)
This constructor accepts two parameters.
Definition:
DupuitPermeability.cpp:15
MaterialPropertyLib::Property::value
virtual PropertyDataType value() const
Definition:
Property.cpp:72
MaterialPropertyLib::Property::name_
std::string name_
Definition:
Property.h:280
ParameterLib::SpatialPosition
Definition:
SpatialPosition.h:27
MaterialPropertyLib
Definition:
ChemicalSolverInterface.h:17
MaterialPropertyLib::fromVector
PropertyDataType fromVector(std::vector< double > const &values)
Definition:
Property.cpp:23
MaterialPropertyLib::Variable::phase_pressure
@ phase_pressure
MaterialPropertyLib::PropertyDataType
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 > > PropertyDataType
Definition:
Property.h:35
MaterialPropertyLib::VariableArray
std::array< VariableType, static_cast< int >(Variable::number_of_variables)> VariableArray
Definition:
VariableType.h:108
MaterialPropertyLib::name
@ name
Definition:
PropertyType.h:65
ParameterLib::Parameter< double >
MaterialLib
MPL
Properties
DupuitPermeability.cpp
Generated by
1.9.1