Loading...
Searching...
No Matches
ScheduleStatic.hpp
/*
Copyright 2013 Statoil ASA.
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef SCHEDULE_STATIC_HPP
#define SCHEDULE_STATIC_HPP
#include <opm/input/eclipse/EclipseState/Runspec.hpp>
#include <opm/input/eclipse/Schedule/MessageLimits.hpp>
#include <opm/input/eclipse/Schedule/OilVaporizationProperties.hpp>
#include <opm/input/eclipse/Schedule/RPTConfig.hpp>
#include <opm/input/eclipse/Schedule/RSTConfig.hpp>
#include <opm/input/eclipse/Schedule/ScheduleRestartInfo.hpp>
#include <opm/input/eclipse/Units/UnitSystem.hpp>
#include <memory>
#include <optional>
#include <string>
#include <utility>
namespace Opm {
class Python;
} // namespace Opm
namespace Opm {
struct ScheduleStatic
{
// Note to maintainers: When changing this list of data members, please
// update operator==(), serializationTestObject(), and serializeOp()
// accordingly.
std::shared_ptr<const Python> m_python_handle{};
std::string m_input_path{};
ScheduleRestartInfo rst_info{};
MessageLimits m_deck_message_limits{};
UnitSystem m_unit_system{};
Runspec m_runspec{};
RSTConfig rst_config{};
std::optional<int> output_interval{};
double sumthin{-1.0};
bool rptonly{false};
bool gaslift_opt_active{false};
std::optional<OilVaporizationProperties> oilVap{};
bool slave_mode{false};
std::optional<RPTConfig> rpt_config{};
ScheduleStatic() = default;
explicit ScheduleStatic(std::shared_ptr<const Python> python_handle)
: m_python_handle { std::move(python_handle) }
{}
ScheduleStatic(std::shared_ptr<const Python> python_handle,
const ScheduleRestartInfo& restart_info,
const Deck& deck,
const Runspec& runspec,
const std::optional<int>& output_interval_,
const ParseContext& parseContext,
ErrorGuard& errors,
const bool slave_mode);
template<class Serializer>
void serializeOp(Serializer& serializer)
{
serializer(this->m_input_path);
serializer(this->rst_info);
serializer(this->m_deck_message_limits);
serializer(this->m_unit_system);
serializer(this->m_runspec);
serializer(this->rst_config);
serializer(this->output_interval);
serializer(this->sumthin);
serializer(this->rptonly);
serializer(this->gaslift_opt_active);
serializer(this->oilVap);
serializer(this->slave_mode);
serializer(this->rpt_config);
}
static ScheduleStatic serializationTestObject();
bool operator==(const ScheduleStatic& other) const;
};
} // end namespace Opm
#endif // SCHEDULE_STATIC_HPP
Opm::Deck
Definition Deck.hpp:46
Opm::ErrorGuard
Definition ErrorGuard.hpp:30
Opm::MessageLimits
Definition MessageLimits.hpp:28
Opm::ParseContext
Definition ParseContext.hpp:84
Opm::Python
Definition Python.hpp:116
Opm::RSTConfig
Definition RSTConfig.hpp:202
Opm::Runspec
Definition Runspec.hpp:489
Opm::Serializer
Class for (de-)serializing.
Definition Serializer.hpp:94
Opm::UnitSystem
Definition UnitSystem.hpp:34
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Opm::ScheduleRestartInfo
Definition ScheduleRestartInfo.hpp:31
Opm::ScheduleStatic
Initial state of Schedule object created from information in SOLUTION section.
Definition ScheduleStatic.hpp:48
Opm::ScheduleStatic::output_interval
std::optional< int > output_interval
Not really used and therefore intentionally undocumented.
Definition ScheduleStatic.hpp:77
Opm::ScheduleStatic::rptonly
bool rptonly
Whether or not to output summary information at report steps only (RPTONLY keyword in SUMMARY section...
Definition ScheduleStatic.hpp:89
Opm::ScheduleStatic::ScheduleStatic
ScheduleStatic(std::shared_ptr< const Python > python_handle)
Constructor.
Definition ScheduleStatic.hpp:120
Opm::ScheduleStatic::operator==
bool operator==(const ScheduleStatic &other) const
Equality predicate.
Definition ScheduleStatic.cpp:154
Opm::ScheduleStatic::serializeOp
void serializeOp(Serializer &serializer)
Convert between byte array and object representation.
Definition ScheduleStatic.hpp:160
Opm::ScheduleStatic::oilVap
std::optional< OilVaporizationProperties > oilVap
Limits on gas re-solution and oil vaporisation rates (e.g., DRSTD in SOLUTION section).
Definition ScheduleStatic.hpp:96
Opm::ScheduleStatic::slave_mode
bool slave_mode
Whether or not this run is externally controlled by another simulation run (reservoir coupling facili...
Definition ScheduleStatic.hpp:100
Opm::ScheduleStatic::m_runspec
Runspec m_runspec
Run's descriptive meta information (RUNSPEC section).
Definition ScheduleStatic.hpp:69
Opm::ScheduleStatic::m_python_handle
std::shared_ptr< const Python > m_python_handle
Run's Python interpreter.
Definition ScheduleStatic.hpp:54
Opm::ScheduleStatic::m_unit_system
UnitSystem m_unit_system
Run's input/output unit system conventions.
Definition ScheduleStatic.hpp:66
Opm::ScheduleStatic::serializationTestObject
static ScheduleStatic serializationTestObject()
Create a serialisation test object.
Definition ScheduleStatic.cpp:133
Opm::ScheduleStatic::gaslift_opt_active
bool gaslift_opt_active
Whether or not run activates the gas-lift optimisation facility.
Definition ScheduleStatic.hpp:92
Opm::ScheduleStatic::ScheduleStatic
ScheduleStatic()=default
Default constructor.
Opm::ScheduleStatic::rpt_config
std::optional< RPTConfig > rpt_config
SOLUTION section's PRT file report configuration (RPTSOL keyword).
Definition ScheduleStatic.hpp:105
Opm::ScheduleStatic::rst_config
RSTConfig rst_config
Initial restart file output requests.
Definition ScheduleStatic.hpp:74
Opm::ScheduleStatic::m_deck_message_limits
MessageLimits m_deck_message_limits
Limits on number of messages of each kind (MESSAGES keyword).
Definition ScheduleStatic.hpp:63
Opm::ScheduleStatic::rst_info
ScheduleRestartInfo rst_info
How to handle SCHEDULE section in a restarted simulation run.
Definition ScheduleStatic.hpp:60
Opm::ScheduleStatic::sumthin
double sumthin
Sparse summary output interval (SUMTHIN keyword in SUMMARY section).
Definition ScheduleStatic.hpp:83
Opm::ScheduleStatic::m_input_path
std::string m_input_path
On-disk location of run's model description (".DATA" file).
Definition ScheduleStatic.hpp:57