My Project
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 
32 
33 #include <cassert>
34 
35 namespace Opm {
36 
45 template <class TraitsT>
47 {
48  typedef typename TraitsT::Scalar Scalar;
49 public:
51 
52  typedef TraitsT Traits;
53 
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
Default implementation for asserting finalization of parameter objects.
Some templates to wrap the valgrind client request macros.
Specification of the material parameters for the Brooks-Corey constitutive relations.
Definition: BrooksCoreyParams.hpp:47
Scalar lambda() const
Returns the lambda shape parameter.
Definition: BrooksCoreyParams.hpp:81
void setEntryPressure(Scalar v)
Set the entry pressure [Pa].
Definition: BrooksCoreyParams.hpp:74
void setLambda(Scalar v)
Set the lambda shape parameter.
Definition: BrooksCoreyParams.hpp:87
Scalar entryPressure() const
Returns the entry pressure [Pa].
Definition: BrooksCoreyParams.hpp:68
Default implementation for asserting finalization of parameter objects.
Definition: EnsureFinalized.hpp:47
void finalize()
Mark the object as finalized.
Definition: EnsureFinalized.hpp:75