My Project
Loading...
Searching...
No Matches
Opm::Action::Context Class Reference

Manager of summary vector values. More...

#include <ActionContext.hpp>

Public Member Functions

 Context (const SummaryState &summary_state, const WListManager &wlm)
 Constructor.
 
void add (std::string_view func, std::string_view arg, double value)
 Assign function value for named entity.
 
void add (const std::string &key, double value)
 Assign function value.
 
double get (std::string_view func, std::string_view arg) const
 Retrieve function value (e.g., WOPR) for a specific entity.
 
double get (const std::string &key) const
 Retrieve function value.
 
std::vector< std::string > wells (const std::string &func) const
 Retrieve name of all wells for which specified summary function is defined.
 
const WListManagerwlist_manager () const
 Get read-only access to run's well lists.
 

Detailed Description

Manager of summary vector values.

Mainly a small wrapper around a SummaryState object.

Constructor & Destructor Documentation

◆ Context()

Opm::Action::Context::Context ( const SummaryState summary_state,
const WListManager wlm 
)
explicit

Constructor.

Parameters
[in]summary_stateRun's current summary vectors.
[in]wlmRun's active well lists (WLIST keyword).

Member Function Documentation

◆ add() [1/2]

void Opm::Action::Context::add ( const std::string &  key,
double  value 
)

Assign function value.

Parameters
[in]keyCombined key for a unique summary vector, e.g., WOPR:PROD1, GGOR:FIELD, or SUBUNIT:PROD1:42.
[in]valueNumeric function value.

◆ add() [2/2]

void Opm::Action::Context::add ( std::string_view  func,
std::string_view  arg,
double  value 
)

Assign function value for named entity.

Parameters
[in]funcNamed summary function, e.g., WOPR, GWCT, or WURST.
[in]argObject for which to retrieve function value, e.g., a well name.
[in]valueNumeric function value for func associated to named entity arg.

◆ get() [1/2]

double Opm::Action::Context::get ( const std::string &  key) const

Retrieve function value.

Parameters
[in]keyCombined key for a unique summary vector, e.g., WOPR:PROD1, GGOR:FIELD, or SUBUNIT:PROD1:42.
Returns
Current value of summary function for named entity.

◆ get() [2/2]

double Opm::Action::Context::get ( std::string_view  func,
std::string_view  arg 
) const

Retrieve function value (e.g., WOPR) for a specific entity.

Parameters
[in]funcNamed summary function, e.g., WOPR, GWCT, or WURST.
[in]argObject for which to retrieve function value, e.g., a well name.
Returns
Current value of summary function for named entity.

◆ wells()

std::vector< std::string > Opm::Action::Context::wells ( const std::string &  func) const

Retrieve name of all wells for which specified summary function is defined.

Parameters
[in]funcNamed well-level summary function, e.g., WOPR or WMCTL.
Returns
All wells for which the named summary function is defined.

◆ wlist_manager()

const WListManager & Opm::Action::Context::wlist_manager ( ) const
inline

Get read-only access to run's well lists.

Convenience method.


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