Loading...
Searching...
No Matches
Opm::HandlerContext Class Reference

## Public Member Functions

HandlerContext (Schedule &schedule, const ScheduleBlock &block_, const DeckKeyword &keyword_, const ScheduleGrid &grid_, const std::size_t currentStep_, const std::vector< std::string > &matching_wells_, bool actionx_mode_, const ParseContext &parseContext_, ErrorGuard &errors_, SimulatorUpdate *sim_update_, const std::unordered_map< std::string, double > *target_wellpi_, std::unordered_map< std::string, double > &wpimult_global_factor_, WelSegsSet *welsegs_wells_, std::set< std::string > *compsegs_wells_)

void | affected_well (const std::string &well_name)
| Mark that a well has changed.
void | welpi_well (const std::string &well_name)
| Mark that a well is affected by WELPI.
void | record_tran_change ()
| Mark that transmissibilities must be recalculated.
void | record_well_structure_change ()
| Mark that well structure has changed.
ScheduleState & | state ()
| Returns a reference to current state.
const ScheduleStatic & | static_schedule () const
| Returns a const-ref to the static schedule.
void | welsegs_handled (const std::string &well_name)
| Mark that the well occured in a WELSEGS keyword.
void | compsegs_handled (const std::string &well_name)
| Mark that the well occured in a COMPSEGS keyword.
void | setExitCode (int code)
| Set exit code.
bool | updateWellStatus (const std::string &well, WellStatus status, std::optional< KeywordLocation > location={})
| Update status of a well.
WellStatus | getWellStatus (const std::string &well) const
| Get status of a well.
void | addGroup (const std::string &groupName)
| Adds a group to the schedule.
void | addGroupToGroup (const std::string &parent_group, const std::string &child_group)
| Adds a group to a group.
void | welspecsCreateNewWell (const DeckRecord &record, const std::string &wellName, const std::string &groupName)
| Create a new Well from a WELSPECS record.
void | welspecsUpdateExistingWells (const DeckRecord &record, const std::vector< std::string > &wellNames, const std::string &groupName)
| Update one or more existing wells from a WELSPECS record.
double | getWellPI (const std::string &well_name) const
| Obtain PI for a well.
double | elapsed_seconds () const
| Returns elapsed time since simulation start in seconds.
void | invalidNamePattern (const std::string &namePattern) const
| Adds parse error for an invalid name pattern.
const Action::WGNames & | action_wgnames () const
| Obtain action well group names.
std::vector< std::string > | groupNames (const std::string &pattern) const
| Obtain well group names from a pattern.
std::vector< std::string > | wellNames (const std::string &pattern) const
| Obtain well names from a pattern.
std::vector< std::string > | wellNames (const std::string &pattern, bool allowEmpty) const
| Obtain well names from a pattern.

## Public Attributes

const ScheduleBlock & | block
const DeckKeyword & | keyword
const std::size_t | currentStep
const std::vector< std::string > & | matching_wells
const bool | actionx_mode
const ParseContext & | parseContext
ErrorGuard & | errors
std::unordered_map< std::string, double > & | wpimult_global_factor
const ScheduleGrid & | grid

## Constructor & Destructor Documentation

## HandlerContext()

Opm::HandlerContext::HandlerContext | ( | Schedule & | schedule,
|  | const ScheduleBlock & | block_,
|  | const DeckKeyword & | keyword_,
|  | const ScheduleGrid & | grid_,
|  | const std::size_t | currentStep_,
|  | const std::vector< std::string > & | matching_wells_,
|  | bool | actionx_mode_,
|  | const ParseContext & | parseContext_,
|  | ErrorGuard & | errors_,
|  | SimulatorUpdate * | sim_update_,
|  | const std::unordered_map< std::string, double > * | target_wellpi_,
|  | std::unordered_map< std::string, double > & | wpimult_global_factor_,
|  | WelSegsSet * | welsegs_wells_,
|  | std::set< std::string > * | compsegs_wells_
| ) |  |

inline

Parameters

  welsegs_wells | All wells with a WELSEGS entry for checks.
  compegs_wells | All wells with a COMPSEGS entry for checks.

## Member Function Documentation

## wellNames() [1/2]

std::vector< std::string > Opm::HandlerContext::wellNames | ( | const std::string & | pattern | ) | const

Obtain well names from a pattern.

Throws if no wells match the pattern and pattern is not a WLIST.

## wellNames() [2/2]

std::vector< std::string > Opm::HandlerContext::wellNames | ( | const std::string & | pattern,
|  | bool | allowEmpty
| ) |  | const

Obtain well names from a pattern.

Parameters

  pattern | Pattern to match
  allowEmpty | If true do not throw if no wells match the pattern

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

- opm/input/eclipse/Schedule/HandlerContext.hpp
- opm/input/eclipse/Schedule/HandlerContext.cpp