opm-common
Loading...
Searching...
No Matches
Opm::ScheduleDeck Class Reference

All SCHEDULE section keywords in a simulation run. More...

#include <ScheduleDeck.hpp>

Public Member Functions

 ScheduleDeck ()
 Default constructor.
 ScheduleDeck (const time_point &start_time, const Deck &deck, const ScheduleRestartInfo &rst_info)
 Constructor.
ScheduleBlockmutableKeywordBlock (const std::size_t index)
 Model input associated to a single report step.
const ScheduleBlockoperator[] (const std::size_t index) const
 Model input associated to a single report step.
auto begin () const
 Start of report step sequence.
auto end () const
 One past the end of report step sequence.
auto size () const
 Number of report steps in SCHEDULE section.
std::size_t restart_offset () const
 Report step index of restarted simulation's restart step.
const KeywordLocationlocation () const
 Location of simulation run's SCHEDULE section keyword.
double seconds (std::size_t timeStep) const
 Simulated time, in seconds, since start of simulation.
bool operator== (const ScheduleDeck &other) const
 Equality predicate.
template<class Serializer>
void serializeOp (Serializer &serializer)
 Convert between byte array and object representation.
void dump_deck (std::ostream &os, const UnitSystem &usys) const
 Write schedule section keywords to output stream.
void clearKeywords (const std::size_t idx)
 Discard input keywords for a single report step.

Static Public Member Functions

static ScheduleDeck serializationTestObject ()
 Create a serialisation test object.

Detailed Description

All SCHEDULE section keywords in a simulation run.

Knows how to partition the schedule section into report steps. In turn, we form the Schedule object by iterating over the contents of the ScheduleDeck. Finally, class ScheduleDeck provides indexed access through operator[] whose argument is a report step. Internally the ScheduleDeck class is a vector of ScheduleBlock instances, one for each report step.

Constructor & Destructor Documentation

◆ ScheduleDeck() [1/2]

Opm::ScheduleDeck::ScheduleDeck ( )

Default constructor.

Forms an object that's mostly usable as the target of a deserialisation operation.

◆ ScheduleDeck() [2/2]

Opm::ScheduleDeck::ScheduleDeck ( const time_point & start_time,
const Deck & deck,
const ScheduleRestartInfo & rst_info )
explicit

Constructor.

Parameters
[in]start_timeSimulation start time inferred from the START keyword.
[in]deckSimulation model description.
[in]rst_infoRestart step and restart time in restarted simulation runs, and whether or not the SKIPREST keyword is active in the run.

Member Function Documentation

◆ begin()

auto Opm::ScheduleDeck::begin ( ) const
inline

Start of report step sequence.

Provided mostly to enable using standard algorithms and range-for for iterating over the ScheduleDeck.

◆ clearKeywords()

void Opm::ScheduleDeck::clearKeywords ( const std::size_t idx)

Discard input keywords for a single report step.

This provides memory savings for runs that don't need dynamic ACTION* processing.

Parameters
[in]idxReport step for which to discard input keywords that have already been internalised into a Schedule object.

◆ dump_deck()

void Opm::ScheduleDeck::dump_deck ( std::ostream & os,
const UnitSystem & usys ) const

Write schedule section keywords to output stream.

Mostly for debugging support and the opmpack utility.

Parameters
[in,out]osOutput stream.
[in]usysRun's unit system for converting quantities in internal (SI) units to run's input units.

◆ end()

auto Opm::ScheduleDeck::end ( ) const
inline

One past the end of report step sequence.

Provided mostly to enable using standard algorithms and range-for for iterating over the ScheduleDeck.

◆ mutableKeywordBlock()

ScheduleBlock & Opm::ScheduleDeck::mutableKeywordBlock ( const std::size_t index)

Model input associated to a single report step.

Bounds-checked, mutable version.

Parameters
[in]indexReport step. Must be in the range 0..size()-1. This function will throw an exception if the bound is violated.
Returns
Mutable collection of input keywords associated to report step index.

◆ operator==()

bool Opm::ScheduleDeck::operator== ( const ScheduleDeck & other) const

Equality predicate.

Parameters
[in]otherObject against which
will be tested for equality.
Returns
Whether or not
is the same as other.

◆ operator[]()

const ScheduleBlock & Opm::ScheduleDeck::operator[] ( const std::size_t index) const

Model input associated to a single report step.

Bounds-checked, immutable version.

Parameters
[in]indexReport step. Must be in the range 0..size()-1. This function will throw an exception if the bound is violated.
Returns
Input keywords associated to report step index.

◆ seconds()

double Opm::ScheduleDeck::seconds ( std::size_t timeStep) const

Simulated time, in seconds, since start of simulation.

Parameters
[in]timeStepReport step.
Returns
Simulated time in seconds, at start of report step timeStep, since beginning of the simulation.

◆ serializeOp()

template<class Serializer>
void Opm::ScheduleDeck::serializeOp ( Serializer & serializer)
inline

Convert between byte array and object representation.

Template Parameters
SerializerByte array conversion protocol.
Parameters
[in,out]serializerByte array conversion object.

The documentation for this class was generated from the following files:
  • opm/input/eclipse/Schedule/ScheduleDeck.hpp
  • opm/input/eclipse/Schedule/ScheduleDeck.cpp