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

Collection of run's summary vectors. More...

#include <SummaryConfig.hpp>

Public Types

using keyword_list = std::vector<SummaryConfigNode>
 Convenience type alias for a linear sequence of summary vector definitions.

Public Member Functions

 SummaryConfig ()=default
 Default constructor.
 SummaryConfig (const Deck &deck, const Schedule &schedule, const FieldPropsManager &field_props, const AquiferConfig &aquiferConfig, const ParseContext &parseContext, ErrorGuard &errors)
 Constructor.
template<typename T>
 SummaryConfig (const Deck &deck, const Schedule &schedule, const FieldPropsManager &field_props, const AquiferConfig &aquiferConfig, const ParseContext &parseContext, T &&errors)
 Constructor.
 SummaryConfig (const Deck &deck, const Schedule &schedule, const FieldPropsManager &field_props, const AquiferConfig &aquiferConfig)
 Constructor.
 SummaryConfig (const keyword_list &keywords, const std::set< std::string > &shortKwds, const std::set< std::string > &smryKwds)
 Constructor.
auto begin () const
 Beginning of sequence of summary vector definitions.
auto end () const
 One past the end of the sequence of summary vector definitions.
std::size_t size () const
 Number of summary vectors in current collection.
SummaryConfigmerge (const SummaryConfig &other)
 Incorporate other vector collection into current.
SummaryConfigmerge (SummaryConfig &&other)
 Incorporate other vector collection into current.
keyword_list registerRequisiteUDQorActionSummaryKeys (const std::vector< std::string > &extraKeys, const EclipseState &es, const Schedule &sched)
 Form definitions from vectors used in UDQs and ACTIONX.
bool hasKeyword (const std::string &keyword) const
 Query existence of summary vector name.
bool match (const std::string &keywordPattern) const
 Query existence of summary vector name with pattern matching.
keyword_list keywords (const std::string &keywordPattern) const
 Retrieve all vector definitions matching a vector name pattern.
bool hasSummaryKey (const std::string &key) const
 Query existence of fully qualified summary vector key.
bool require3DField (const std::string &keyword) const
 Query whether or not a 3D dynamic property is needed to evaluate some/all summary vectors.
std::set< std::string > fip_regions () const
 Named region sets needed across all known region level vectors.
std::set< std::string > fip_regions_interreg_flow () const
 Named region sets needed across all known inter-region vectors.
bool operator== (const SummaryConfig &data) const
 Equality predicate.
template<class Serializer>
void serializeOp (Serializer &serializer)
 Convert between byte array and object representation.
bool createRunSummary () const
 Whether or not to create a human-readable .RSM file at the end of the simulation run.
const SummaryConfigNodeoperator[] (std::size_t index) const
 Retrieve summary vector definition from linear index.

Static Public Member Functions

static SummaryConfig serializationTestObject ()
 Create a serialisation test object.

Detailed Description

Collection of run's summary vectors.

Constructor & Destructor Documentation

◆ SummaryConfig() [1/4]

Opm::SummaryConfig::SummaryConfig ( const Deck & deck,
const Schedule & schedule,
const FieldPropsManager & field_props,
const AquiferConfig & aquiferConfig,
const ParseContext & parseContext,
ErrorGuard & errors )

Constructor.

Parses the SUMMARY section of the run's model description and configures the initial collection of summary vectors. Parse failures such as missing or incorrect well names are reported through the normal ErrorGuard mechanism.

Parameters
[in]deckRun's model description.
[in]scheduleRun's collection of dynamic objects (wells, groups, &c). Needed to configure vectors for keywords that apply to "all" entities such as

WOPR /

Parameters
[in]field_propsRun's static property container. Needed to define region-level vectors, especially for those that use user-defined region sets such as FIPABC.
[in]aquiferConfigRun's collection of analytic and numerical aquifers. Needed to define aquifer level vectors that apply to "all" aquifers.
[in]parseContextError handling controls.
[in,out]errorsCollection of parse errors encountered thus far. Behaviour controlled by parseContext.

◆ SummaryConfig() [2/4]

template<typename T>
Opm::SummaryConfig::SummaryConfig ( const Deck & deck,
const Schedule & schedule,
const FieldPropsManager & field_props,
const AquiferConfig & aquiferConfig,
const ParseContext & parseContext,
T && errors )

Constructor.

Trampoline for expiring ErrorGuard objects. This constructor should arguably not exist.

Parses the SUMMARY section of the run's model description and configures the initial collection of summary vectors. Parse failures such as missing or incorrect well names are reported through the normal ErrorGuard mechanism, though the ErrorGuard object does not exist when the constructor completes.

Template Parameters
TError guard type. Must be ErrorGuard.
Parameters
[in]deckRun's model description.
[in]scheduleRun's collection of dynamic objects (wells, groups, &c). Needed to configure vectors for keywords that apply to "all" entities such as

WOPR /

Parameters
[in]field_propsRun's static property container. Needed to define region-level vectors, especially for those that use user-defined region sets such as FIPABC.
[in]aquiferConfigRun's collection of analytic and numerical aquifers. Needed to define aquifer level vectors that apply to "all" aquifers.
[in]parseContextError handling controls.
[in,out]errorsCollection of parse errors encountered thus far. Behaviour controlled by parseContext.

◆ SummaryConfig() [3/4]

Opm::SummaryConfig::SummaryConfig ( const Deck & deck,
const Schedule & schedule,
const FieldPropsManager & field_props,
const AquiferConfig & aquiferConfig )

Constructor.

Parses the SUMMARY section of the run's model description and configures the initial collection of summary vectors. Parse failures such as missing or incorrect well names generate exceptions and stop the simulation run.

Parameters
[in]deckRun's model description.
[in]scheduleRun's collection of dynamic objects (wells, groups, &c). Needed to configure vectors for keywords that apply to "all" entities such as

WOPR /

Parameters
[in]field_propsRun's static property container. Needed to define region-level vectors, especially for those that use user-defined region sets such as FIPABC.
[in]aquiferConfigRun's collection of analytic and numerical aquifers. Needed to define aquifer level vectors that apply to "all" aquifers.

◆ SummaryConfig() [4/4]

Opm::SummaryConfig::SummaryConfig ( const keyword_list & keywords,
const std::set< std::string > & shortKwds,
const std::set< std::string > & smryKwds )

Constructor.

Forms collection from existing set of summary vector definitions.

Parameters
[in]keywordsSummary vector definitions.
[in]shortKwdsUnique vector names in keywords.
[in]smryKwdsUnique vector keys in keywords.

Member Function Documentation

◆ begin()

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

Beginning of sequence of summary vector definitions.

Exists to support using standard algorithms and range-for.

◆ end()

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

One past the end of the sequence of summary vector definitions.

Exists to support using standard algorithms and range-for.

◆ hasKeyword()

bool Opm::SummaryConfig::hasKeyword ( const std::string & keyword) const

Query existence of summary vector name.

Parameters
[in]keywordSummary vector name. Should be a regular summary keyword like "WWCT" or "FOPR" rather than a fully qualified vector key.
Returns
Whether or not keyword exists in the current collection.

◆ hasSummaryKey()

bool Opm::SummaryConfig::hasSummaryKey ( const std::string & key) const

Query existence of fully qualified summary vector key.

Parameters
[in]keyFully qualified summary key like "SOFR:P-123:42".
Returns
Whether or not the summary key exists in the current collection.

◆ keywords()

keyword_list Opm::SummaryConfig::keywords ( const std::string & keywordPattern) const

Retrieve all vector definitions matching a vector name pattern.

Parameters
[in]keywordPatternShell-style pattern for summary vector names. Should be a regular summary keyword names like "WWCT" or "FOPR" rather than a fully qualified vector key. As an example,
will retrieve all existing vector definitions for all inter-region cumulative oil flow.
Returns
List of definitions mathcing the keywordPattern.

◆ match()

bool Opm::SummaryConfig::match ( const std::string & keywordPattern) const

Query existence of summary vector name with pattern matching.

Parameters
[in]keywordPatternShell-style pattern for summary vector names. Should be a regular summary keyword names like "WWCT" or "FOPR" rather than a fully qualified vector key. As an example,
will query whether or not any well-level summary vectors have been defined.
Returns
Whether or not any vectors matching the keywordPattern exist in the current collection.

◆ merge() [1/2]

SummaryConfig & Opm::SummaryConfig::merge ( const SummaryConfig & other)

Incorporate other vector collection into current.

Parameters
[in]otherCollection of vector definitions.
Returns

◆ merge() [2/2]

SummaryConfig & Opm::SummaryConfig::merge ( SummaryConfig && other)

Incorporate other vector collection into current.

Assumes ownership over the vector definitions in the other collection.

Parameters
[in,out]otherCollection of vector definitions. Will be empty on return.
Returns

◆ operator==()

bool Opm::SummaryConfig::operator== ( const SummaryConfig & data) const

Equality predicate.

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

◆ operator[]()

const SummaryConfigNode & Opm::SummaryConfig::operator[] ( std::size_t index) const

Retrieve summary vector definition from linear index.

Parameters
[in]indexLinear index in the range [0..size()).
Returns
Vector definition at position index in the internal collection.

◆ registerRequisiteUDQorActionSummaryKeys()

keyword_list Opm::SummaryConfig::registerRequisiteUDQorActionSummaryKeys ( const std::vector< std::string > & extraKeys,
const EclipseState & es,
const Schedule & sched )

Form definitions from vectors used in UDQs and ACTIONX.

Parameters
[in]extraKeysVector names used in defining expressions for UDQs or in ACTIONX condition blocks.
[in]esRun's static objects such as property arrays, region definitions, and aquifers. Note that this function will create vector definitions for all applicable entities. In other words, we will create one vector for each well when processing a well level vector name and similarly for groups, connections, segments, and regions. Moreover, for the purpose of this function, FIELD is treated as a regular group name. This treatment enables using expressions such as "GOPR FIELD" in an ACTIONX condition block.
[in]schedRun's dynamic objects such as wells and groups.
Returns
Vector definitions for the vectors in extraKeys that did not already exist.

◆ require3DField()

bool Opm::SummaryConfig::require3DField ( const std::string & keyword) const

Query whether or not a 3D dynamic property is needed to evaluate some/all summary vectors.

Parameters
[in]keywordName of 3D dynamic property (e.g., "PRESSURE" or "OIP").
Returns
Whether or not the keyword property is needed to evaluate some or all of the summary vectors in this collection.

◆ serializeOp()

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

Convert between byte array and object representation.

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

Member Data Documentation

◆ narrow

bool Opm::SummaryConfig::narrow { false }

Whether or not to output the .RSM file in "narrow" format.

Ignored.

◆ separate

bool Opm::SummaryConfig::separate { true }

Whether or not to create a separate .RSM file instead of placing the run summary at the end of the .PRT file.

Ignored.


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