3.2-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
brookscoreyparams.hh
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 * See the file COPYING for full copying permissions. *
5 * *
6 * This program 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 3 of the License, or *
9 * (at your option) any later version. *
10 * *
11 * This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
18 *****************************************************************************/
19
26#ifndef DUMUX_BROOKS_COREY_PARAMS_HH
27#define DUMUX_BROOKS_COREY_PARAMS_HH
28
29#include <dune/common/float_cmp.hh>
30
32
33namespace Dumux {
34
41template <class ScalarT>
43{
44public:
45 using Scalar = ScalarT;
46
48 {
50 }
51
53 : pe_(pe), lambda_(lambda)
54 {
55 }
56
60 template<class OtherParams>
61 bool operator== (const OtherParams& otherParams) const
62 {
63 return Dune::FloatCmp::eq(pe_, otherParams.pe(), /*eps*/1e-6*pe_)
64 && Dune::FloatCmp::eq(lambda_, otherParams.lambda(), /*eps*/1e-6*lambda_);
65 }
66
70 Scalar pe() const
71 { return pe_; }
72
76 void setPe(Scalar v)
77 { pe_ = v; }
78
79
83 Scalar lambda() const
84 { return lambda_; }
85
90 { lambda_ = v; }
91
92private:
93 Scalar pe_;
94 Scalar lambda_;
95};
96} // namespace Dumux
97
98#endif
Some templates to wrap the valgrind macros.
void SetUndefined(const T &value)
Make the memory on which an object resides undefined.
Definition: valgrind.hh:102
Definition: adapt.hh:29
Specification of the material parameters for the Brooks Corey constitutive relations.
Definition: brookscoreyparams.hh:43
Scalar pe() const
Returns the entry pressure in .
Definition: brookscoreyparams.hh:70
void setLambda(Scalar v)
Set the lambda shape parameter .
Definition: brookscoreyparams.hh:89
void setPe(Scalar v)
Set the entry pressure in ].
Definition: brookscoreyparams.hh:76
bool operator==(const OtherParams &otherParams) const
Equality comparison with another set of params.
Definition: brookscoreyparams.hh:61
BrooksCoreyParams()
Definition: brookscoreyparams.hh:47
Scalar lambda() const
Returns the lambda shape parameter .
Definition: brookscoreyparams.hh:83
ScalarT Scalar
Definition: brookscoreyparams.hh:45
BrooksCoreyParams(Scalar pe, Scalar lambda)
Definition: brookscoreyparams.hh:52