opm-common
ScheduleStatic.hpp
1 /*
2  Copyright 2013 Statoil ASA.
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 3 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 #ifndef SCHEDULE_STATIC_HPP
20 #define SCHEDULE_STATIC_HPP
21 
22 #include <opm/input/eclipse/EclipseState/Runspec.hpp>
23 
24 #include <opm/input/eclipse/Schedule/MessageLimits.hpp>
25 #include <opm/input/eclipse/Schedule/RPTConfig.hpp>
26 #include <opm/input/eclipse/Schedule/RSTConfig.hpp>
27 #include <opm/input/eclipse/Schedule/ScheduleRestartInfo.hpp>
28 
29 #include <opm/input/eclipse/Units/UnitSystem.hpp>
30 
31 #include <array>
32 #include <memory>
33 #include <optional>
34 #include <string>
35 #include <utility>
36 
37 namespace Opm {
38 
39  class Python;
40 
41 } // namespace Opm
42 
43 namespace Opm {
44 
48 {
49  // Note to maintainers: When changing this list of data members, please
50  // update operator==(), serializationTestObject(), and serializeOp()
51  // accordingly.
52 
54  std::shared_ptr<const Python> m_python_handle{};
55 
57  std::string m_input_path{};
58 
61 
64 
67 
70 
75 
77  std::optional<int> output_interval{};
78 
83  double sumthin{-1.0};
84 
89  bool rptonly{false};
90 
92  bool gaslift_opt_active{false};
93 
95  std::optional<std::array<double,2>> oilVap{};
96 
99  bool slave_mode{false};
100 
104  std::optional<RPTConfig> rpt_config{};
105 
110  ScheduleStatic() = default;
111 
119  explicit ScheduleStatic(std::shared_ptr<const Python> python_handle)
120  : m_python_handle { std::move(python_handle) }
121  {}
122 
144  ScheduleStatic(std::shared_ptr<const Python> python_handle,
145  const ScheduleRestartInfo& restart_info,
146  const Deck& deck,
147  const Runspec& runspec,
148  const std::optional<int>& output_interval_,
149  const ParseContext& parseContext,
150  ErrorGuard& errors,
151  const bool slave_mode);
152 
158  template<class Serializer>
159  void serializeOp(Serializer& serializer)
160  {
161  serializer(this->m_input_path);
162  serializer(this->rst_info);
163  serializer(this->m_deck_message_limits);
164  serializer(this->m_unit_system);
165  serializer(this->m_runspec);
166  serializer(this->rst_config);
167  serializer(this->output_interval);
168  serializer(this->sumthin);
169  serializer(this->rptonly);
170  serializer(this->gaslift_opt_active);
171  serializer(this->oilVap);
172  serializer(this->slave_mode);
173  serializer(this->rpt_config);
174  }
175 
178 
185  bool operator==(const ScheduleStatic& other) const;
186 };
187 
188 } // end namespace Opm
189 
190 #endif // SCHEDULE_STATIC_HPP
Definition: RSTConfig.hpp:201
MessageLimits m_deck_message_limits
Limits on number of messages of each kind (MESSAGES keyword).
Definition: ScheduleStatic.hpp:63
std::optional< std::array< double, 2 > > oilVap
Oil vaporisation propensities (i.e., VAPPARS in SOLUTION section).
Definition: ScheduleStatic.hpp:95
static ScheduleStatic serializationTestObject()
Create a serialisation test object.
Definition: ScheduleStatic.cpp:129
ScheduleStatic(std::shared_ptr< const Python > python_handle)
Constructor.
Definition: ScheduleStatic.hpp:119
RSTConfig rst_config
Initial restart file output requests.
Definition: ScheduleStatic.hpp:74
Runspec m_runspec
Run&#39;s descriptive meta information (RUNSPEC section).
Definition: ScheduleStatic.hpp:69
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: Runspec.hpp:608
std::optional< int > output_interval
Not really used and therefore intentionally undocumented.
Definition: ScheduleStatic.hpp:77
bool gaslift_opt_active
Whether or not run activates the gas-lift optimisation facility.
Definition: ScheduleStatic.hpp:92
Initial state of Schedule object created from information in SOLUTION section.
Definition: ScheduleStatic.hpp:47
bool slave_mode
Whether or not this run is externally controlled by another simulation run (reservoir coupling facili...
Definition: ScheduleStatic.hpp:99
Definition: MessageLimits.hpp:28
std::shared_ptr< const Python > m_python_handle
Run&#39;s Python interpreter.
Definition: ScheduleStatic.hpp:54
double sumthin
Sparse summary output interval (SUMTHIN keyword in SUMMARY section).
Definition: ScheduleStatic.hpp:83
UnitSystem m_unit_system
Run&#39;s input/output unit system conventions.
Definition: ScheduleStatic.hpp:66
ScheduleRestartInfo rst_info
How to handle SCHEDULE section in a restarted simulation run.
Definition: ScheduleStatic.hpp:60
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition: ScheduleStatic.hpp:159
Definition: UnitSystem.hpp:34
ScheduleStatic()=default
Default constructor.
bool rptonly
Whether or not to output summary information at report steps only (RPTONLY keyword in SUMMARY section...
Definition: ScheduleStatic.hpp:89
bool operator==(const ScheduleStatic &other) const
Equality predicate.
Definition: ScheduleStatic.cpp:150
Definition: ScheduleRestartInfo.hpp:30
std::string m_input_path
On-disk location of run&#39;s model description (".DATA" file).
Definition: ScheduleStatic.hpp:57
Class for (de-)serializing.
Definition: Serializer.hpp:94
std::optional< RPTConfig > rpt_config
SOLUTION section&#39;s PRT file report configuration (RPTSOL keyword).
Definition: ScheduleStatic.hpp:104