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/GasPlantTable.hpp>
25 #include <opm/input/eclipse/Schedule/MessageLimits.hpp>
26 #include <opm/input/eclipse/Schedule/RPTConfig.hpp>
27 #include <opm/input/eclipse/Schedule/RSTConfig.hpp>
28 #include <opm/input/eclipse/Schedule/ScheduleRestartInfo.hpp>
29 
30 #include <opm/input/eclipse/Units/UnitSystem.hpp>
31 
32 #include <array>
33 #include <memory>
34 #include <optional>
35 #include <string>
36 #include <utility>
37 #include <vector>
38 
39 namespace Opm {
40 
41  class Python;
42 
43 } // namespace Opm
44 
45 namespace Opm {
46 
50 {
51  // Note to maintainers: When changing this list of data members, please
52  // update operator==(), serializationTestObject(), and serializeOp()
53  // accordingly.
54 
56  std::shared_ptr<const Python> m_python_handle{};
57 
59  std::string m_input_path{};
60 
63 
66 
69 
72 
77 
79  std::optional<int> output_interval{};
80 
85  double sumthin{-1.0};
86 
91  bool rptonly{false};
92 
94  bool gaslift_opt_active{false};
95 
97  std::optional<std::array<double,2>> oilVap{};
98 
103  std::vector<GasPlantTable> gptable_solution{};
104 
107  bool slave_mode{false};
108 
112  std::optional<RPTConfig> rpt_config{};
113 
118  ScheduleStatic() = default;
119 
127  explicit ScheduleStatic(std::shared_ptr<const Python> python_handle)
128  : m_python_handle { std::move(python_handle) }
129  {}
130 
152  ScheduleStatic(std::shared_ptr<const Python> python_handle,
153  const ScheduleRestartInfo& restart_info,
154  const Deck& deck,
155  const Runspec& runspec,
156  const std::optional<int>& output_interval_,
157  const ParseContext& parseContext,
158  ErrorGuard& errors,
159  const bool slave_mode);
160 
166  template<class Serializer>
167  void serializeOp(Serializer& serializer)
168  {
169  serializer(this->m_input_path);
170  serializer(this->rst_info);
171  serializer(this->m_deck_message_limits);
172  serializer(this->m_unit_system);
173  serializer(this->m_runspec);
174  serializer(this->rst_config);
175  serializer(this->output_interval);
176  serializer(this->sumthin);
177  serializer(this->rptonly);
178  serializer(this->gaslift_opt_active);
179  serializer(this->oilVap);
180  serializer(this->gptable_solution);
181  serializer(this->slave_mode);
182  serializer(this->rpt_config);
183  }
184 
187 
194  bool operator==(const ScheduleStatic& other) const;
195 };
196 
197 } // end namespace Opm
198 
199 #endif // SCHEDULE_STATIC_HPP
Definition: RSTConfig.hpp:226
MessageLimits m_deck_message_limits
Limits on number of messages of each kind (MESSAGES keyword).
Definition: ScheduleStatic.hpp:65
std::optional< std::array< double, 2 > > oilVap
Oil vaporisation propensities (i.e., VAPPARS in SOLUTION section).
Definition: ScheduleStatic.hpp:97
static ScheduleStatic serializationTestObject()
Create a serialisation test object.
Definition: ScheduleStatic.cpp:169
ScheduleStatic(std::shared_ptr< const Python > python_handle)
Constructor.
Definition: ScheduleStatic.hpp:127
RSTConfig rst_config
Initial restart file output requests.
Definition: ScheduleStatic.hpp:76
Runspec m_runspec
Run&#39;s descriptive meta information (RUNSPEC section).
Definition: ScheduleStatic.hpp:71
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:79
bool gaslift_opt_active
Whether or not run activates the gas-lift optimisation facility.
Definition: ScheduleStatic.hpp:94
Initial state of Schedule object created from information in SOLUTION section.
Definition: ScheduleStatic.hpp:49
bool slave_mode
Whether or not this run is externally controlled by another simulation run (reservoir coupling facili...
Definition: ScheduleStatic.hpp:107
Definition: MessageLimits.hpp:28
std::shared_ptr< const Python > m_python_handle
Run&#39;s Python interpreter.
Definition: ScheduleStatic.hpp:56
double sumthin
Sparse summary output interval (SUMTHIN keyword in SUMMARY section).
Definition: ScheduleStatic.hpp:85
UnitSystem m_unit_system
Run&#39;s input/output unit system conventions.
Definition: ScheduleStatic.hpp:68
ScheduleRestartInfo rst_info
How to handle SCHEDULE section in a restarted simulation run.
Definition: ScheduleStatic.hpp:62
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition: ScheduleStatic.hpp:167
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:91
std::vector< GasPlantTable > gptable_solution
Gas plant recovery tables specified in the SOLUTION section (GPTABLE).
Definition: ScheduleStatic.hpp:103
bool operator==(const ScheduleStatic &other) const
Equality predicate.
Definition: ScheduleStatic.cpp:191
Definition: ScheduleRestartInfo.hpp:30
std::string m_input_path
On-disk location of run&#39;s model description (".DATA" file).
Definition: ScheduleStatic.hpp:59
Class for (de-)serializing.
Definition: Serializer.hpp:95
std::optional< RPTConfig > rpt_config
SOLUTION section&#39;s PRT file report configuration (RPTSOL keyword).
Definition: ScheduleStatic.hpp:112