3.3.0
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
31namespace Dumux {
32
39// "Use new material laws! Removal after 3.3")
40template <class ScalarT>
42{
43public:
44 using Scalar = ScalarT;
45
46 BrooksCoreyParams() = default;
47
49 : pe_(pe), lambda_(lambda)
50 {}
51
55 template<class OtherParams>
56 bool operator== (const OtherParams& otherParams) const
57 {
58 return Dune::FloatCmp::eq(pe_, otherParams.pe(), /*eps*/1e-6*pe_)
59 && Dune::FloatCmp::eq(lambda_, otherParams.lambda(), /*eps*/1e-6*lambda_);
60 }
61
65 Scalar pe() const
66 { return pe_; }
67
71 void setPe(Scalar v)
72 { pe_ = v; }
73
74
78 Scalar lambda() const
79 { return lambda_; }
80
85 { lambda_ = v; }
86
87private:
88 Scalar pe_;
89 Scalar lambda_;
90};
91} // namespace Dumux
92
93#endif
Definition: adapt.hh:29
Specification of the material parameters for the Brooks Corey constitutive relations.
Definition: brookscoreyparams.hh:42
Scalar pe() const
Returns the entry pressure in .
Definition: brookscoreyparams.hh:65
void setLambda(Scalar v)
Set the lambda shape parameter .
Definition: brookscoreyparams.hh:84
void setPe(Scalar v)
Set the entry pressure in ].
Definition: brookscoreyparams.hh:71
bool operator==(const OtherParams &otherParams) const
Equality comparison with another set of params.
Definition: brookscoreyparams.hh:56
Scalar lambda() const
Returns the lambda shape parameter .
Definition: brookscoreyparams.hh:78
ScalarT Scalar
Definition: brookscoreyparams.hh:44
BrooksCoreyParams(Scalar pe, Scalar lambda)
Definition: brookscoreyparams.hh:48