opm-common
Loading...
Searching...
No Matches
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
37namespace Opm {
38
39 class Python;
40
41} // namespace Opm
42
43namespace 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 Deck.hpp:46
Definition ErrorGuard.hpp:30
Definition MessageLimits.hpp:28
Control parser behaviour in failure conditions.
Definition ParseContext.hpp:115
Definition Python.hpp:116
Definition RSTConfig.hpp:202
Definition Runspec.hpp:608
Class for (de-)serializing.
Definition Serializer.hpp:94
Definition UnitSystem.hpp:34
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Definition ScheduleRestartInfo.hpp:31
Initial state of Schedule object created from information in SOLUTION section.
Definition ScheduleStatic.hpp:48
std::optional< int > output_interval
Not really used and therefore intentionally undocumented.
Definition ScheduleStatic.hpp:77
bool rptonly
Whether or not to output summary information at report steps only (RPTONLY keyword in SUMMARY section...
Definition ScheduleStatic.hpp:89
ScheduleStatic(std::shared_ptr< const Python > python_handle)
Constructor.
Definition ScheduleStatic.hpp:119
bool operator==(const ScheduleStatic &other) const
Equality predicate.
Definition ScheduleStatic.cpp:150
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition ScheduleStatic.hpp:159
bool slave_mode
Whether or not this run is externally controlled by another simulation run (reservoir coupling facili...
Definition ScheduleStatic.hpp:99
Runspec m_runspec
Run's descriptive meta information (RUNSPEC section).
Definition ScheduleStatic.hpp:69
std::shared_ptr< const Python > m_python_handle
Run's Python interpreter.
Definition ScheduleStatic.hpp:54
std::optional< std::array< double, 2 > > oilVap
Oil vaporisation propensities (i.e., VAPPARS in SOLUTION section).
Definition ScheduleStatic.hpp:95
UnitSystem m_unit_system
Run's input/output unit system conventions.
Definition ScheduleStatic.hpp:66
static ScheduleStatic serializationTestObject()
Create a serialisation test object.
Definition ScheduleStatic.cpp:129
bool gaslift_opt_active
Whether or not run activates the gas-lift optimisation facility.
Definition ScheduleStatic.hpp:92
ScheduleStatic()=default
Default constructor.
std::optional< RPTConfig > rpt_config
SOLUTION section's PRT file report configuration (RPTSOL keyword).
Definition ScheduleStatic.hpp:104
RSTConfig rst_config
Initial restart file output requests.
Definition ScheduleStatic.hpp:74
MessageLimits m_deck_message_limits
Limits on number of messages of each kind (MESSAGES keyword).
Definition ScheduleStatic.hpp:63
ScheduleRestartInfo rst_info
How to handle SCHEDULE section in a restarted simulation run.
Definition ScheduleStatic.hpp:60
double sumthin
Sparse summary output interval (SUMTHIN keyword in SUMMARY section).
Definition ScheduleStatic.hpp:83
std::string m_input_path
On-disk location of run's model description (".DATA" file).
Definition ScheduleStatic.hpp:57