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

Basic descriptive statistics about a model's fluid-in-place regions. More...

#include <FIPRegionStatistics.hpp>

Public Member Functions

 FIPRegionStatistics ()=default
 Default constructor.
 
 FIPRegionStatistics (const std::size_t declaredMaxRegID, const FieldPropsManager &fldPropsMgr, std::function< void(std::vector< int > &)> computeGlobalMax)
 Constructor.
 
bool operator== (const FIPRegionStatistics &that) const
 Equality predicate.
 
int declaredMaximumRegionID () const
 Retrieve model's declared maximum fluid-in-place region ID.
 
const std::vector< std::string > & regionSets () const
 Get list of named region sets, without the initial 'FIP' name prefix.
 
int maximumRegionID (std::string_view regionSet) const
 Get global maximum region ID of a named region set.
 
template<typename Serializer >
void serializeOp (Serializer &serializer)
 Serialisation operator.
 

Static Public Member Functions

static FIPRegionStatistics serializationTestObject ()
 Serialisation test object.
 

Detailed Description

Basic descriptive statistics about a model's fluid-in-place regions.

Constructor & Destructor Documentation

◆ FIPRegionStatistics()

Opm::FIPRegionStatistics::FIPRegionStatistics ( const std::size_t  declaredMaxRegID,
const FieldPropsManager fldPropsMgr,
std::function< void(std::vector< int > &)>  computeGlobalMax 
)
explicit

Constructor.

Parameters
[in]declaredMaxRegIDModel's declared maximum FIP region ID. Usually the maximum of TABDIMS(5) and REGDIMS(1).
[in]fldPropsMgrModel's field properties. In particular, for read-only access to the model's defined FIP* arrays.
[in]computeGlobalMaxCall-back function which computes the global maximum for each region set given an array of local maximum region IDs. Should be MPI-aware in a parallel run. Called as
auto localMax = computeLocalMax(all_fip_regions);
computeGlobalMax(localMax)
and is expected to replace the local maximum in each element of 'localMax' with the corresponding global maximum across the complete model.

Member Function Documentation

◆ declaredMaximumRegionID()

int Opm::FIPRegionStatistics::declaredMaximumRegionID ( ) const
inline

Retrieve model's declared maximum fluid-in-place region ID.

Returns
Constructor argument declaredMaxRegID

◆ maximumRegionID()

int Opm::FIPRegionStatistics::maximumRegionID ( std::string_view  regionSet) const

Get global maximum region ID of a named region set.

Parameters
[in]regionSetNamed region set, with or without the 'FIP' region set name prefix.
Returns
Model's global maximum region ID in regionSet. Negative value (-1) if regionSet is not a known region set name.

◆ operator==()

bool Opm::FIPRegionStatistics::operator== ( const FIPRegionStatistics that) const

Equality predicate.

Parameters
[in]thatObject to which
*this
will be compared for equality.

◆ regionSets()

const std::vector< std::string > & Opm::FIPRegionStatistics::regionSets ( ) const
inline

Get list of named region sets, without the initial 'FIP' name prefix.

As an example, the standard 'FIPNUM' region set will be represented by the name 'NUM' in this array.

◆ serializeOp()

template<typename Serializer >
void Opm::FIPRegionStatistics::serializeOp ( Serializer serializer)
inline

Serialisation operator.

Template Parameters
SerializerProtocol for serialising and deserialising objects between memory and character buffers.
Parameters
[in,out]serializerSerialisation object.

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