My Project
EclEpsTwoPhaseLawParams.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_EPS_TWO_PHASE_LAW_PARAMS_HPP
28 #define OPM_ECL_EPS_TWO_PHASE_LAW_PARAMS_HPP
29 
30 #include "EclEpsConfig.hpp"
31 #include "EclEpsScalingPoints.hpp"
32 
33 #if HAVE_ECL_INPUT
34 #include <opm/input/eclipse/EclipseState/EclipseState.hpp>
35 #endif
36 
37 #include <memory>
38 #include <cassert>
39 
41 
42 namespace Opm {
49 template <class EffLawT>
51 {
52  using EffLawParams = typename EffLawT::Params;
53  using Scalar = typename EffLawParams::Traits::Scalar;
54 
55 public:
56  using Traits = typename EffLawParams::Traits;
58 
60  {
61  }
62 
67  void finalize()
68  {
69 #ifndef NDEBUG
70  assert(config_);
71  if (config_->enableSatScaling()) {
72  assert(unscaledPoints_);
73  }
74  assert(effectiveLawParams_);
75 #endif
77  }
78 
82  void setConfig(std::shared_ptr<EclEpsConfig> value)
83  { config_ = value; }
84 
88  const EclEpsConfig& config() const
89  { return *config_; }
90 
94  void setUnscaledPoints(std::shared_ptr<ScalingPoints> value)
95  { unscaledPoints_ = value; }
96 
101  { return *unscaledPoints_; }
102 
106  void setScaledPoints(const ScalingPoints& value)
107  { scaledPoints_ = value; }
108 
113  { return scaledPoints_; }
114 
119  { return scaledPoints_; }
120 
124  void setEffectiveLawParams(std::shared_ptr<EffLawParams> value)
125  { effectiveLawParams_ = value; }
126 
130  const EffLawParams& effectiveLawParams() const
131  { return *effectiveLawParams_; }
132 
133 private:
134  std::shared_ptr<EffLawParams> effectiveLawParams_;
135 
136  std::shared_ptr<EclEpsConfig> config_;
137  std::shared_ptr<ScalingPoints> unscaledPoints_;
138  ScalingPoints scaledPoints_;
139 };
140 
141 } // namespace Opm
142 
143 #endif
Specifies the configuration used by the endpoint scaling code.
Default implementation for asserting finalization of parameter objects.
Specifies the configuration used by the endpoint scaling code.
Definition: EclEpsConfig.hpp:57
Represents the points on the X and Y axis to be scaled if endpoint scaling is used.
Definition: EclEpsScalingPoints.hpp:306
A default implementation of the parameters for the material law adapter class which implements ECL en...
Definition: EclEpsTwoPhaseLawParams.hpp:51
const EffLawParams & effectiveLawParams() const
Returns the parameter object for the effective/nested material law.
Definition: EclEpsTwoPhaseLawParams.hpp:130
void finalize()
Calculate all dependent quantities once the independent quantities of the parameter object have been ...
Definition: EclEpsTwoPhaseLawParams.hpp:67
const ScalingPoints & scaledPoints() const
Returns the scaling points which are seen by the physical model.
Definition: EclEpsTwoPhaseLawParams.hpp:112
void setConfig(std::shared_ptr< EclEpsConfig > value)
Set the endpoint scaling configuration object.
Definition: EclEpsTwoPhaseLawParams.hpp:82
void setEffectiveLawParams(std::shared_ptr< EffLawParams > value)
Sets the parameter object for the effective/nested material law.
Definition: EclEpsTwoPhaseLawParams.hpp:124
ScalingPoints & scaledPoints()
Returns the scaling points which are seen by the physical model.
Definition: EclEpsTwoPhaseLawParams.hpp:118
void setScaledPoints(const ScalingPoints &value)
Set the scaling points which are seen by the physical model.
Definition: EclEpsTwoPhaseLawParams.hpp:106
const ScalingPoints & unscaledPoints() const
Returns the scaling points which are seen by the nested material law.
Definition: EclEpsTwoPhaseLawParams.hpp:100
const EclEpsConfig & config() const
Returns the endpoint scaling configuration object.
Definition: EclEpsTwoPhaseLawParams.hpp:88
void setUnscaledPoints(std::shared_ptr< ScalingPoints > value)
Set the scaling points which are seen by the nested material law.
Definition: EclEpsTwoPhaseLawParams.hpp:94
Default implementation for asserting finalization of parameter objects.
Definition: EnsureFinalized.hpp:47
void finalize()
Mark the object as finalized.
Definition: EnsureFinalized.hpp:75