My Project
Loading...
Searching...
No Matches
Opm::Schedule Class Reference

Public Member Functions

 Schedule (std::shared_ptr< const Python > python_handle)
 
 Schedule (const Deck &deck, const EclipseGrid &grid, const FieldPropsManager &fp, const NumericalAquifers &numAquifers, const Runspec &runspec, const ParseContext &parseContext, ErrorGuard &errors, std::shared_ptr< const Python > python, const bool lowActionParsingStrictness=false, const bool slave_mode=false, const bool keepKeywords=true, const std::optional< int > &output_interval={}, const RestartIO::RstState *rst=nullptr, const TracerConfig *tracer_config=nullptr)
 Construct a Schedule object from a deck.
 
template<typename T >
 Schedule (const Deck &deck, const EclipseGrid &grid, const FieldPropsManager &fp, const NumericalAquifers &numAquifers, const Runspec &runspec, const ParseContext &parseContext, T &&errors, std::shared_ptr< const Python > python, const bool lowActionParsingStrictness=false, const bool slave_mode=false, const bool keepKeywords=true, const std::optional< int > &output_interval={}, const RestartIO::RstState *rst=nullptr, const TracerConfig *tracer_config=nullptr)
 
 Schedule (const Deck &deck, const EclipseGrid &grid, const FieldPropsManager &fp, const NumericalAquifers &numAquifers, const Runspec &runspec, std::shared_ptr< const Python > python, const bool lowActionParsingStrictness=false, const bool slave_mode=false, const bool keepKeywords=true, const std::optional< int > &output_interval={}, const RestartIO::RstState *rst=nullptr, const TracerConfig *tracer_config=nullptr)
 
 Schedule (const Deck &deck, const EclipseState &es, const ParseContext &parseContext, ErrorGuard &errors, std::shared_ptr< const Python > python, const bool lowActionParsingStrictness=false, const bool slave_mode=false, const bool keepKeywords=true, const std::optional< int > &output_interval={}, const RestartIO::RstState *rst=nullptr)
 
template<typename T >
 Schedule (const Deck &deck, const EclipseState &es, const ParseContext &parseContext, T &&errors, std::shared_ptr< const Python > python, const bool lowActionParsingStrictness=false, const bool slave_mode=false, const bool keepKeywords=true, const std::optional< int > &output_interval={}, const RestartIO::RstState *rst=nullptr)
 
 Schedule (const Deck &deck, const EclipseState &es, std::shared_ptr< const Python > python, const bool lowActionParsingStrictness=false, const bool slave_mode=false, const bool keepKeywords=true, const std::optional< int > &output_interval={}, const RestartIO::RstState *rst=nullptr)
 
 Schedule (const Deck &deck, const EclipseState &es, const std::optional< int > &output_interval={}, const RestartIO::RstState *rst=nullptr)
 
std::time_t getStartTime () const
 
std::time_t posixStartTime () const
 
std::time_t posixEndTime () const
 
std::time_t simTime (std::size_t timeStep) const
 
double seconds (std::size_t timeStep) const
 
double stepLength (std::size_t timeStep) const
 
std::optional< int > exitStatus () const
 
const UnitSystemgetUnits () const
 
const Runspecrunspec () const
 
std::size_t numWells () const
 
std::size_t numWells (std::size_t timestep) const
 
bool hasWell (const std::string &wellName) const
 
bool hasWell (const std::string &wellName, std::size_t timeStep) const
 
WellMatcher wellMatcher (std::size_t report_step) const
 
std::function< std::unique_ptr< SegmentMatcher >()> segmentMatcherFactory (std::size_t report_step) const
 
std::vector< std::string > wellNames (const std::string &pattern, std::size_t timeStep, const std::vector< std::string > &matching_wells={}) const
 
std::vector< std::string > wellNames (const std::string &pattern) const
 
std::vector< std::string > wellNames (std::size_t timeStep) const
 
std::vector< std::string > wellNames () const
 
bool hasGroup (const std::string &groupName, std::size_t timeStep) const
 Query for group existence at particular time.
 
std::vector< std::string > groupNames (const std::string &pattern, std::size_t timeStep) const
 Retrieve names of all groups at particular time whose names match a pattern.
 
const std::vector< std::string > & groupNames (std::size_t timeStep) const
 Retrieve names of all groups at a particular time.
 
std::vector< std::string > groupNames (const std::string &pattern) const
 Retrieve names of all groups matching a pattern.
 
const std::vector< std::string > & groupNames () const
 Retrieve names of all groups in model.
 
std::vector< const Group * > restart_groups (std::size_t timeStep) const
 Retrieve collection of group objects suiteable for restart file output.
 
std::vector< std::string > changed_wells (std::size_t reportStep, std::size_t initialStep=0) const
 
const WellgetWell (std::size_t well_index, std::size_t timeStep) const
 
const WellgetWell (const std::string &wellName, std::size_t timeStep) const
 
const WellgetWellatEnd (const std::string &well_name) const
 
std::unordered_set< int > getAquiferFluxSchedule () const
 
std::vector< WellgetWells (std::size_t timeStep) const
 
std::vector< WellgetWellsatEnd () const
 
std::vector< WellgetActiveWellsAtEnd () const
 
std::vector< std::string > getInactiveWellNamesAtEnd () const
 
const std::unordered_map< std::string, std::set< int > > & getPossibleFutureConnections () const
 
void shut_well (const std::string &well_name, std::size_t report_step)
 
void shut_well (const std::string &well_name)
 
void stop_well (const std::string &well_name, std::size_t report_step)
 
void stop_well (const std::string &well_name)
 
void open_well (const std::string &well_name, std::size_t report_step)
 
void open_well (const std::string &well_name)
 
void clear_event (ScheduleEvents::Events, std::size_t report_step)
 
void add_event (ScheduleEvents::Events, std::size_t report_step)
 
void applyWellProdIndexScaling (const std::string &well_name, const std::size_t reportStep, const double scalingFactor)
 
void clearEvents (const std::size_t report_step)
 Clear out all registered events at a given report step.
 
WellProducerCMode getGlobalWhistctlMmode (std::size_t timestep) const
 
const UDQConfiggetUDQConfig (std::size_t timeStep) const
 
void evalAction (const SummaryState &summary_state, std::size_t timeStep)
 
GTNode groupTree (std::size_t report_step) const
 
GTNode groupTree (const std::string &root_node, std::size_t report_step) const
 
const GroupgetGroup (const std::string &groupName, std::size_t timeStep) const
 
std::optional< std::size_t > first_RFT () const
 
void filterConnections (const ActiveGridCells &grid)
 
std::size_t size () const
 
bool write_rst_file (std::size_t report_step) const
 
const std::map< std::string, int > & rst_keywords (size_t timestep) const
 
SimulatorUpdate applyAction (std::size_t reportStep, const Action::ActionX &action, const Action::Result::MatchingEntities &matches, const std::unordered_map< std::string, double > &wellpi)
 
SimulatorUpdate applyAction (std::size_t reportStep, const Action::ActionX &action, const Action::Result::MatchingEntities &matches, const std::unordered_map< std::string, float > &wellpi)
 
SimulatorUpdate runPyAction (std::size_t reportStep, const Action::PyAction &pyaction, Action::State &action_state, EclipseState &ecl_state, SummaryState &summary_state)
 
SimulatorUpdate runPyAction (std::size_t reportStep, const Action::PyAction &pyaction, Action::State &action_state, EclipseState &ecl_state, SummaryState &summary_state, const std::unordered_map< std::string, double > &target_wellpi)
 
SimulatorUpdate runPyAction (std::size_t reportStep, const Action::PyAction &pyaction, Action::State &action_state, EclipseState &ecl_state, SummaryState &summary_state, const std::unordered_map< std::string, float > &target_wellpi)
 
SimulatorUpdate modifyCompletions (const std::size_t reportStep, const std::map< std::string, std::vector< Connection > > &extraConns)
 
const GasLiftOptglo (std::size_t report_step) const
 
bool operator== (const Schedule &data) const
 
std::shared_ptr< const Pythonpython () const
 
const ScheduleStateback () const
 
const ScheduleStateoperator[] (std::size_t index) const
 
std::vector< ScheduleState >::const_iterator begin () const
 
std::vector< ScheduleState >::const_iterator end () const
 
void create_next (const time_point &start_time, const std::optional< time_point > &end_time)
 
void create_next (const ScheduleBlock &block)
 
void create_first (const time_point &start_time, const std::optional< time_point > &end_time)
 
void treat_critical_as_non_critical (bool value)
 
void applyKeywords (std::vector< std::unique_ptr< DeckKeyword > > &keywords, std::unordered_map< std::string, double > &target_wellpi, bool action_mode, std::size_t report_step)
 
void applyKeywords (std::vector< std::unique_ptr< DeckKeyword > > &keywords, std::unordered_map< std::string, double > &target_wellpi, bool action_mode)
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 
template<typename T >
std::vector< std::pair< std::size_t, T > > unique () const
 
void dump_deck (std::ostream &os) const
 

Static Public Member Functions

static Schedule serializationTestObject ()
 
static bool cmp (const Schedule &sched1, const Schedule &sched2, std::size_t report_step)
 

Friends

class HandlerContext
 
std::ostream & operator<< (std::ostream &os, const Schedule &sched)
 

Constructor & Destructor Documentation

◆ Schedule()

Opm::Schedule::Schedule ( const Deck deck,
const EclipseGrid grid,
const FieldPropsManager fp,
const NumericalAquifers numAquifers,
const Runspec runspec,
const ParseContext parseContext,
ErrorGuard errors,
std::shared_ptr< const Python python,
const bool  lowActionParsingStrictness = false,
const bool  slave_mode = false,
const bool  keepKeywords = true,
const std::optional< int > &  output_interval = {},
const RestartIO::RstState rst = nullptr,
const TracerConfig tracer_config = nullptr 
)

Construct a Schedule object from a deck.

Parameters
deckDeck to construct Schedule from
fpField property manager
runspecRun specification parameters to use
parseContextParsing context
errorsError configuration
pythonPython interpreter to use
lowActionParsingStrictnessReduce parsing strictness for actions
slave_modeSlave mode flag
keepKeywordsKeep the schdule keywords even if there are no actions
output_intervalOutput interval to use
rstRestart state to use
tracer_configTracer configuration to use

Member Function Documentation

◆ groupNames() [1/4]

const std::vector< std::string > & Opm::Schedule::groupNames ( ) const

Retrieve names of all groups in model.

Includes FIELD group.

◆ groupNames() [2/4]

std::vector< std::string > Opm::Schedule::groupNames ( const std::string &  pattern) const

Retrieve names of all groups matching a pattern.

Parameters
[in]patternGroup name pattern. Expected to be a group name root such as 'PR*' or a fully specified group name such as 'PROD'.
Returns
Names of all groups in simulation run matching the pattern.

◆ groupNames() [3/4]

std::vector< std::string > Opm::Schedule::groupNames ( const std::string &  pattern,
std::size_t  timeStep 
) const

Retrieve names of all groups at particular time whose names match a pattern.

Parameters
[in]patternGroup name pattern. Expected to be a group name root such as 'PR*' or a fully specified group name such as 'PROD'.
[in]timeStepZero-based report step index.
Returns
Names of all groups at timeStep whose names match the pattern.

◆ groupNames() [4/4]

const std::vector< std::string > & Opm::Schedule::groupNames ( std::size_t  timeStep) const

Retrieve names of all groups at a particular time.

Parameters
[in]timeStepZero-based report step index.
Returns
Names of all groups in simulation which are active at time timeStep.

◆ hasGroup()

bool Opm::Schedule::hasGroup ( const std::string &  groupName,
std::size_t  timeStep 
) const

Query for group existence at particular time.

Parameters
[in]groupNameFully specified group name.
[in]timeStepZero-based report step index.
Returns
Whether or not group groupName exists at time timeStep.

◆ restart_groups()

std::vector< const Group * > Opm::Schedule::restart_groups ( std::size_t  timeStep) const

Retrieve collection of group objects suiteable for restart file output.

The collection is sized and ordered as follows

  1. The number of elements is WELLDIMS::MAXGROUPS + 1
  2. The elements are sorted according to group.insert_index().
  3. Nullptr represents an unused slot.
  4. The very last element corresponds to the FIELD group.
Parameters
[in]timeStepZero-based report step index.

The documentation for this class was generated from the following files: