All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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_OPM_PARSER
34 #include <opm/parser/eclipse/Deck/Deck.hpp>
35 #include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
36 #endif
37 
38 #include <string>
39 #include <memory>
40 #include <cassert>
41 #include <algorithm>
42 
44 
45 namespace Opm {
52 template <class EffLawT>
54 {
55  typedef typename EffLawT::Params EffLawParams;
56  typedef typename EffLawParams::Traits::Scalar Scalar;
57 
58 public:
59  typedef typename EffLawParams::Traits Traits;
61 
63  {
64  }
65 
70  void finalize()
71  {
72 #ifndef NDEBUG
73  assert(config_);
74  if (config_->enableSatScaling()) {
75  assert(unscaledPoints_);
76  }
77  assert(effectiveLawParams_);
78 #endif
80  }
81 
85  void setConfig(std::shared_ptr<EclEpsConfig> value)
86  { config_ = value; }
87 
91  const EclEpsConfig& config() const
92  { return *config_; }
93 
97  void setUnscaledPoints(std::shared_ptr<ScalingPoints> value)
98  { unscaledPoints_ = value; }
99 
104  { return *unscaledPoints_; }
105 
109  void setScaledPoints(std::shared_ptr<ScalingPoints> value)
110  { scaledPoints_ = *value; }
111 
116  { return scaledPoints_; }
117 
122  { return scaledPoints_; }
123 
127  void setEffectiveLawParams(std::shared_ptr<EffLawParams> value)
128  { effectiveLawParams_ = value; }
129 
133  const EffLawParams& effectiveLawParams() const
134  { return *effectiveLawParams_; }
135 
136 private:
137  std::shared_ptr<EffLawParams> effectiveLawParams_;
138 
139  std::shared_ptr<EclEpsConfig> config_;
140  std::shared_ptr<ScalingPoints> unscaledPoints_;
141  ScalingPoints scaledPoints_;
142 };
143 
144 } // namespace Opm
145 
146 #endif
void finalize()
Calculate all dependent quantities once the independent quantities of the parameter object have been ...
Definition: EclEpsTwoPhaseLawParams.hpp:70
const EffLawParams & effectiveLawParams() const
Returns the parameter object for the effective/nested material law.
Definition: EclEpsTwoPhaseLawParams.hpp:133
const ScalingPoints & scaledPoints() const
Returns the scaling points which are seen by the physical model.
Definition: EclEpsTwoPhaseLawParams.hpp:115
A default implementation of the parameters for the material law adapter class which implements ECL en...
Definition: EclEpsTwoPhaseLawParams.hpp:53
Specifies the configuration used by the endpoint scaling code.
Definition: EclEpsConfig.hpp:63
Represents the points on the X and Y axis to be scaled if endpoint scaling is used.
Definition: EclEpsScalingPoints.hpp:610
Default implementation for asserting finalization of parameter objects.
Specifies the configuration used by the endpoint scaling code.
void setConfig(std::shared_ptr< EclEpsConfig > value)
Set the endpoint scaling configuration object.
Definition: EclEpsTwoPhaseLawParams.hpp:85
void setScaledPoints(std::shared_ptr< ScalingPoints > value)
Set the scaling points which are seen by the physical model.
Definition: EclEpsTwoPhaseLawParams.hpp:109
void finalize()
Mark the object as finalized.
Definition: EnsureFinalized.hpp:77
void setEffectiveLawParams(std::shared_ptr< EffLawParams > value)
Sets the parameter object for the effective/nested material law.
Definition: EclEpsTwoPhaseLawParams.hpp:127
Default implementation for asserting finalization of parameter objects.
Definition: EnsureFinalized.hpp:46
ScalingPoints & scaledPoints()
Returns the scaling points which are seen by the physical model.
Definition: EclEpsTwoPhaseLawParams.hpp:121
const ScalingPoints & unscaledPoints() const
Returns the scaling points which are seen by the nested material law.
Definition: EclEpsTwoPhaseLawParams.hpp:103
const EclEpsConfig & config() const
Returns the endpoint scaling configuration object.
Definition: EclEpsTwoPhaseLawParams.hpp:91
void setUnscaledPoints(std::shared_ptr< ScalingPoints > value)
Set the scaling points which are seen by the nested material law.
Definition: EclEpsTwoPhaseLawParams.hpp:97