3.3.0
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#warning "This header is deprecated. Removal after 3.3. Use new material laws."
30
31#include <dune/common/float_cmp.hh>
32
33namespace Dumux {
34
41template <class EffLawParamsT>
42class [[deprecated("Use new material laws! Removal after 3.3")]] EffToAbsLawParams : public EffLawParamsT
43{
44 using EffLawParams = EffLawParamsT;
45public:
46 using Scalar = typename EffLawParams::Scalar;
47
49 : EffLawParams()
50 { swr_ = snr_ = 0; }
51
55 template<class OtherParams>
56 bool operator== (const OtherParams& otherParams) const
57 {
58 return Dune::FloatCmp::eq(swr_, otherParams.swr(), /*eps*/1e-6*swr_)
59 && Dune::FloatCmp::eq(snr_, otherParams.snr(), /*eps*/1e-6*snr_)
60 && EffLawParamsT::operator==(otherParams);
61 }
62
66 Scalar swr() const
67 { return swr_; }
68
72 void setSwr(Scalar v)
73 { swr_ = v; }
74
78 Scalar snr() const
79 { return snr_; }
80
84 void setSnr(Scalar v)
85 { snr_ = v; }
86
87private:
88 Scalar swr_;
89 Scalar snr_;
90};
91
92} // end namespace Dumux
93
94#endif
Definition: adapt.hh:29
constexpr bool operator==(Tag< T1 >, Tag< T2 >)
Tags are equality comparable and return true if the tagged types are equal.
Definition: tag.hh:46
A default implementation of the parameters for the adapter class to convert material laws from effect...
Definition: 2p/efftoabslawparams.hh:43
void setSnr(Scalar v)
Set the residual nonwetting saturation.
Definition: 2p/efftoabslawparams.hh:84
Scalar snr() const
Return the residual nonwetting saturation.
Definition: 2p/efftoabslawparams.hh:78
EffToAbsLawParams()
Definition: 2p/efftoabslawparams.hh:48
void setSwr(Scalar v)
Set the residual wetting saturation.
Definition: 2p/efftoabslawparams.hh:72
Scalar swr() const
Return the residual wetting saturation.
Definition: 2p/efftoabslawparams.hh:66
typename EffLawParams::Scalar Scalar
Definition: 2p/efftoabslawparams.hh:46