opm-common
Toggle main menu visibility
Loading...
Searching...
No Matches
BrooksCoreyParams.hpp
Go to the documentation of this file.
1
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2
// vi: set et ts=4 sw=4 sts=4:
3
/*
4
This file is part of the Open Porous Media project (OPM).
5
6
OPM is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 2 of the License, or
9
(at your option) any later version.
10
11
OPM is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
19
Consult the COPYING file in the top-level source directory of this
20
module for the precise wording of the license and the list of
21
copyright holders.
22
*/
27
#ifndef OPM_BROOKS_COREY_PARAMS_HPP
28
#define OPM_BROOKS_COREY_PARAMS_HPP
29
30
#include <
opm/material/common/Valgrind.hpp
>
31
#include <
opm/material/common/EnsureFinalized.hpp
>
32
33
#include <cassert>
34
35
namespace
Opm
{
36
45
template
<
class
TraitsT>
46
class
BrooksCoreyParams :
public
EnsureFinalized
47
{
48
typedef
typename
TraitsT::Scalar Scalar;
49
public
:
50
using
EnsureFinalized
:: finalize
;
51
52
typedef
TraitsT Traits;
53
54
BrooksCoreyParams()
55
{
56
Valgrind::SetUndefined
(*
this
);
57
}
58
59
BrooksCoreyParams(Scalar ePressure, Scalar shapeParam)
60
: entryPressure_(ePressure), lambda_(shapeParam)
61
{
62
finalize
();
63
}
64
68
Scalar
entryPressure
()
const
69
{ EnsureFinalized::check();
return
entryPressure_; }
70
74
void
setEntryPressure
(Scalar v)
75
{ entryPressure_ = v; }
76
77
81
Scalar
lambda
()
const
82
{ EnsureFinalized::check();
return
lambda_; }
83
87
void
setLambda
(Scalar v)
88
{ lambda_ = v; }
89
90
private
:
91
Scalar entryPressure_;
92
Scalar lambda_;
93
};
94
}
// namespace Opm
95
96
#endif
EnsureFinalized.hpp
Default implementation for asserting finalization of parameter objects.
Valgrind.hpp
Some templates to wrap the valgrind client request macros.
Opm::Valgrind::SetUndefined
OPM_HOST_DEVICE void SetUndefined(const T &value)
Make the memory on which an object resides undefined in valgrind runs.
Definition
Valgrind.hpp:174
Opm::BrooksCoreyParams::lambda
Scalar lambda() const
Returns the lambda shape parameter.
Definition
BrooksCoreyParams.hpp:81
Opm::BrooksCoreyParams::setEntryPressure
void setEntryPressure(Scalar v)
Set the entry pressure [Pa].
Definition
BrooksCoreyParams.hpp:74
Opm::BrooksCoreyParams::setLambda
void setLambda(Scalar v)
Set the lambda shape parameter.
Definition
BrooksCoreyParams.hpp:87
Opm::BrooksCoreyParams::entryPressure
Scalar entryPressure() const
Returns the entry pressure [Pa].
Definition
BrooksCoreyParams.hpp:68
Opm::EnsureFinalized::EnsureFinalized
OPM_HOST_DEVICE EnsureFinalized()
The default constructor.
Definition
EnsureFinalized.hpp:58
Opm::EnsureFinalized::finalize
OPM_HOST_DEVICE void finalize()
Mark the object as finalized.
Definition
EnsureFinalized.hpp:82
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition
Exceptions.hpp:30
opm
material
fluidmatrixinteractions
BrooksCoreyParams.hpp
Generated by
1.17.0