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/OilVaporizationProperties.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 <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
96 std::optional<OilVaporizationProperties> oilVap{};
97
100 bool slave_mode{false};
101
105 std::optional<RPTConfig> rpt_config{};
106
111 ScheduleStatic() = default;
112
120 explicit ScheduleStatic(std::shared_ptr<const Python> python_handle)
121 : m_python_handle { std::move(python_handle) }
122 {}
123
145 ScheduleStatic(std::shared_ptr<const Python> python_handle,
146 const ScheduleRestartInfo& restart_info,
147 const Deck& deck,
148 const Runspec& runspec,
149 const std::optional<int>& output_interval_,
150 const ParseContext& parseContext,
151 ErrorGuard& errors,
152 const bool slave_mode);
153
159 template<class Serializer>
160 void serializeOp(Serializer& serializer)
161 {
162 serializer(this->m_input_path);
163 serializer(this->rst_info);
164 serializer(this->m_deck_message_limits);
165 serializer(this->m_unit_system);
166 serializer(this->m_runspec);
167 serializer(this->rst_config);
168 serializer(this->output_interval);
169 serializer(this->sumthin);
170 serializer(this->rptonly);
171 serializer(this->gaslift_opt_active);
172 serializer(this->oilVap);
173 serializer(this->slave_mode);
174 serializer(this->rpt_config);
175 }
176
179
186 bool operator==(const ScheduleStatic& other) const;
187};
188
189} // end namespace Opm
190
191#endif // SCHEDULE_STATIC_HPP
Definition Deck.hpp:46
Definition ErrorGuard.hpp:30
Definition MessageLimits.hpp:28
Definition ParseContext.hpp:84
Definition Python.hpp:116
Definition RSTConfig.hpp:202
Definition Runspec.hpp:489
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:120
bool operator==(const ScheduleStatic &other) const
Equality predicate.
Definition ScheduleStatic.cpp:154
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition ScheduleStatic.hpp:160
std::optional< OilVaporizationProperties > oilVap
Limits on gas re-solution and oil vaporisation rates (e.g., DRSTD in SOLUTION section).
Definition ScheduleStatic.hpp:96
bool slave_mode
Whether or not this run is externally controlled by another simulation run (reservoir coupling facili...
Definition ScheduleStatic.hpp:100
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
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:133
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:105
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