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

## Public Types

enum class

Phase {
WATER = 0 , OIL = 1 , GAS = 2 , OilInLiquidPhase = 3 ,
OilInGasPhase = 4 , GasInLiquidPhase = 5 , GasInGasPhase = 6 , PoreVolume = 7 ,
PressurePV = 8 , HydroCarbonPV = 9 , PressureHydroCarbonPV = 10 , DynamicPoreVolume = 11 ,
WaterResVolume = 12 , OilResVolume = 13 , GasResVolume = 14 , SALT = 15 ,
CO2InWaterPhase = 16 , CO2InGasPhaseInMob = 17 , CO2InGasPhaseMob = 18 , CO2InGasPhaseInMobKrg = 19 ,
CO2InGasPhaseMobKrg = 20 , WaterInGasPhase = 21 , WaterInWaterPhase = 22 , CO2Mass = 23 ,
CO2MassInWaterPhase = 24 , CO2MassInGasPhase = 25 , CO2MassInGasPhaseInMob = 26 , CO2MassInGasPhaseMob = 27 ,
CO2MassInGasPhaseInMobKrg = 28 , CO2MassInGasPhaseMobKrg = 29 , CO2MassInGasPhaseEffectiveTrapped = 30 , CO2MassInGasPhaseEffectiveUnTrapped = 31 ,
CO2MassInGasPhaseMaximumTrapped = 32 , CO2MassInGasPhaseMaximumUnTrapped = 33
}

## Public Member Functions

void | add (const std::string &region, Phase phase, std::size_t region_number, double value)
| Assign value of particular quantity in specific region of named region set.
void | add (Phase phase, double value)
| Assign field-level value of particular quantity.
double | get (const std::string &region, Phase phase, std::size_t region_number) const
| Retrieve numerical value of particular quantity in specific region of named region set.
double | get (Phase phase) const
| Retrieve field-level value of particular quantity.
bool | has (const std::string &region, Phase phase, std::size_t region_number) const
| Check existence of particular quantity in specific region of named region set.
bool | has (Phase phase) const
| Check existence of specific field-level quantity.
std::size_t | max_region () const
| Retrieve the maximum region ID registered across all quantities in all registered region sets.
std::size_t | max_region (const std::string &region_name) const
| Retrieve the maximum region ID across all quantities registered for a specific region set.
std::vector< double > | get_vector (const std::string &region, Phase phase) const
| Linearised per-region values for a given phase in a specific region set.
template<class Serializer >
void | serializeOp (Serializer &serializer)
| Serialisation interface.
bool | operator== (const Inplace &rhs) const
| Equality predicate.

## Static Public Member Functions

static Inplace | serializationTestObject ()
| Create non-defaulted object suitable for testing the serialisation operation.
static const std::vector< Phase > & | phases ()
| Get iterable list of all quantities which can be handled/updated in a generic way.
static const std::vector< Phase > & | mixingPhases ()
| Get iterable list of all quantities, other than "pure" phases, which can be handled/updated in a generic way.

## Member Function Documentation

## add() [1/2]

void Opm::Inplace::add | ( | const std::string & | region,
|  | const Inplace::Phase | phase,
|  | std::size_t | region_number,
|  | double | value
| ) |  |

Assign value of particular quantity in specific region of named region set.

Parameters

  [in] | region | Region set name such as FIPNUM or FIPABC.
  [in] | phase | In-place quantity.
  [in] | region_number | Region ID for which to assign a new in-place quantity value.
  [in] | value | Numerical value of `phase` quantity in `region_number` region of `region` region set.

## add() [2/2]

void Opm::Inplace::add | ( | Inplace::Phase | phase,
|  | double | value
| ) |  |

Assign field-level value of particular quantity.

Parameters

  [in] | phase | In-place quantity.
  [in] | value | Numerical value of field-level `phase` quantity.

## get() [1/2]

double Opm::Inplace::get | ( | const std::string & | region,
|  | const Inplace::Phase | phase,
|  | std::size_t | region_number
| ) |  | const

Retrieve numerical value of particular quantity in specific region of named region set.

This function will throw an exception if the requested value has not been assigned in a previous call to add().

Parameters

  [in] | region | Region set name such as FIPNUM or FIPABC.
  [in] | phase | In-place quantity.
  [in] | region_number | Region ID for which to retrieve a the in-place quantity value.

Returns
  Numerical value of `phase` quantity in `region_number` region of `region` region set.

## get() [2/2]

double Opm::Inplace::get | ( | Inplace::Phase | phase | ) | const

Retrieve field-level value of particular quantity.

This function will throw an exception if the requested value has not been assigned in a previous call to add().

Parameters

  [in] | phase | In-place quantity.

Returns
  Numerical value of field-level `phase` quantity.

## get_vector()

std::vector< double > Opm::Inplace::get_vector | ( | const std::string & | region,
|  | Phase | phase
| ) |  | const

Linearised per-region values for a given phase in a specific region set.

Parameters

  [in] | region | Region set name, e.g., "FIPNUM" or "FIPABC".
  [in] | Phase | In-place quantity.

Returns
  Per-region values of requested quantity in the region set named by `region`. The get_vector functions return a vector of size max_region() which contains the values added with the add() function and is indexed by (region_number - 1).

## has() [1/2]

bool Opm::Inplace::has | ( | const std::string & | region,
|  | Phase | phase,
|  | std::size_t | region_number
| ) |  | const

Check existence of particular quantity in specific region of named region set.

Parameters

  [in] | region | Region set name such as FIPNUM or FIPABC.
  [in] | phase | In-place quantity.
  [in] | region_number | Region ID for which to check existence of the in-place quantity value.

Returns
  Whether or not a value of the specific quantity exists in the specific region of the named region set.

## has() [2/2]

bool Opm::Inplace::has | ( | Phase | phase | ) | const

Check existence of specific field-level quantity.

Parameters

  [in] | phase | In-place quantity.

Returns
  Whether or not a value of the specific quantity exists at field level.

## max_region()

std::size_t Opm::Inplace::max_region | ( | const std::string & | region_name | ) | const

Retrieve the maximum region ID across all quantities registered for a specific region set.

Parameters

  [in] | region_name | Region set name such as FIPNUM or FIPABC.

Returns
  Maximum region ID across all quantities registered for `region_name`. Zero if `region_name` does not have any registered quantities in this in-place quantity collection.

## operator==()

bool Opm::Inplace::operator== | ( | const Inplace & | rhs | ) | const

Equality predicate.

Parameters

  [in] | rhs | Object against which `*this` will be compared for equality.

Returns
  Whether or not `*this` equals `rhs`.

## serializeOp()

template<class Serializer >

void Opm::Inplace::serializeOp | ( | Serializer & | serializer | ) |

inline

Serialisation interface.

Template Parameters

  Serializer | Object serialisation protocol implementation

Parameters

  [in,out] | serializer | Serialisation object

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

- opm/output/eclipse/Inplace.hpp
- opm/output/eclipse/Inplace.cpp