3.1-git
DUNE for Multi-{Phase, Component, Scale, Physics, ...} flow and transport in porous media
2p/efftoabslawparams.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 *****************************************************************************/
26#ifndef DUMUX_EFF_TO_ABS_LAW_PARAMS_HH
27#define DUMUX_EFF_TO_ABS_LAW_PARAMS_HH
28
29#include <dune/common/float_cmp.hh>
30
31namespace Dumux {
32
39template <class EffLawParamsT>
40class EffToAbsLawParams : public EffLawParamsT
41{
42 using EffLawParams = EffLawParamsT;
43public:
44 using Scalar = typename EffLawParams::Scalar;
45
47 : EffLawParams()
48 { swr_ = snr_ = 0; }
49
53 template<class OtherParams>
54 bool operator== (const OtherParams& otherParams) const
55 {
56 return Dune::FloatCmp::eq(swr_, otherParams.swr(), /*eps*/1e-6*swr_)
57 && Dune::FloatCmp::eq(snr_, otherParams.snr(), /*eps*/1e-6*snr_)
58 && EffLawParamsT::operator==(otherParams);
59 }
60
64 Scalar swr() const
65 { return swr_; }
66
70 void setSwr(Scalar v)
71 { swr_ = v; }
72
76 Scalar snr() const
77 { return snr_; }
78
82 void setSnr(Scalar v)
83 { snr_ = v; }
84
85private:
86 Scalar swr_;
87 Scalar snr_;
88};
89
90} // end namespace Dumux
91
92#endif
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
A default implementation of the parameters for the adapter class to convert material laws from effect...
Definition: 2p/efftoabslawparams.hh:41
void setSnr(Scalar v)
Set the residual non-wetting saturation.
Definition: 2p/efftoabslawparams.hh:82
Scalar snr() const
Return the residual non-wetting saturation.
Definition: 2p/efftoabslawparams.hh:76
bool operator==(const OtherParams &otherParams) const
Equality comparison with another set of params.
Definition: 2p/efftoabslawparams.hh:54
EffToAbsLawParams()
Definition: 2p/efftoabslawparams.hh:46
void setSwr(Scalar v)
Set the residual wetting saturation.
Definition: 2p/efftoabslawparams.hh:70
Scalar swr() const
Return the residual wetting saturation.
Definition: 2p/efftoabslawparams.hh:64
typename EffLawParams::Scalar Scalar
Definition: 2p/efftoabslawparams.hh:44