My Project
EclStone2MaterialParams.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_ECL_STONE2_MATERIAL_PARAMS_HPP
28 #define OPM_ECL_STONE2_MATERIAL_PARAMS_HPP
29 
31 
32 #include <memory>
33 
34 namespace Opm {
35 
44 template<class Traits, class GasOilParamsT, class OilWaterParamsT>
46 {
47  using Scalar = typename Traits::Scalar;
48  enum { numPhases = 3 };
49 public:
51 
52  using GasOilParams = GasOilParamsT;
53  using OilWaterParams = OilWaterParamsT;
54 
59  {
60  }
61 
65  const GasOilParams& gasOilParams() const
66  { EnsureFinalized::check(); return *gasOilParams_; }
67 
71  GasOilParams& gasOilParams()
72  { EnsureFinalized::check(); return *gasOilParams_; }
73 
77  void setGasOilParams(std::shared_ptr<GasOilParams> val)
78  { gasOilParams_ = val; }
79 
83  const OilWaterParams& oilWaterParams() const
84  { EnsureFinalized::check(); return *oilWaterParams_; }
85 
89  OilWaterParams& oilWaterParams()
90  { EnsureFinalized::check(); return *oilWaterParams_; }
91 
95  void setOilWaterParams(std::shared_ptr<OilWaterParams> val)
96  { oilWaterParams_ = val; }
97 
109  void setSwl(Scalar val)
110  { Swl_ = val; }
111 
115  Scalar Swl() const
116  { EnsureFinalized::check(); return Swl_; }
117 
118 private:
119  std::shared_ptr<GasOilParams> gasOilParams_;
120  std::shared_ptr<OilWaterParams> oilWaterParams_;
121 
122  Scalar Swl_;
123 };
124 } // namespace Opm
125 
126 #endif
Default implementation for asserting finalization of parameter objects.
Default implementation for the parameters required by the three-phase capillary pressure/relperm Ston...
Definition: EclStone2MaterialParams.hpp:46
OilWaterParams & oilWaterParams()
The parameter object for the oil-water twophase law.
Definition: EclStone2MaterialParams.hpp:89
Scalar Swl() const
Return the saturation of "connate" water.
Definition: EclStone2MaterialParams.hpp:115
void setSwl(Scalar val)
Set the saturation of "connate" water.
Definition: EclStone2MaterialParams.hpp:109
const OilWaterParams & oilWaterParams() const
The parameter object for the oil-water twophase law.
Definition: EclStone2MaterialParams.hpp:83
EclStone2MaterialParams()
The default constructor.
Definition: EclStone2MaterialParams.hpp:58
GasOilParams & gasOilParams()
The parameter object for the gas-oil twophase law.
Definition: EclStone2MaterialParams.hpp:71
const GasOilParams & gasOilParams() const
The parameter object for the gas-oil twophase law.
Definition: EclStone2MaterialParams.hpp:65
void setGasOilParams(std::shared_ptr< GasOilParams > val)
Set the parameter object for the gas-oil twophase law.
Definition: EclStone2MaterialParams.hpp:77
void setOilWaterParams(std::shared_ptr< OilWaterParams > val)
Set the parameter object for the oil-water twophase law.
Definition: EclStone2MaterialParams.hpp:95
Default implementation for asserting finalization of parameter objects.
Definition: EnsureFinalized.hpp:47
void finalize()
Mark the object as finalized.
Definition: EnsureFinalized.hpp:75