Opm::data::Rates Class Reference

#include <Wells.hpp>

Public Types

enum class  opt : uint32_t {
  wat = (1 << 0) , oil = (1 << 1) , gas = (1 << 2) , polymer = (1 << 3) ,
  solvent = (1 << 4) , energy = (1 << 5) , dissolved_gas = (1 << 6) , vaporized_oil = (1 << 7) ,
  reservoir_water = (1 << 8) , reservoir_oil = (1 << 9) , reservoir_gas = (1 << 10) , productivity_index_water = (1 << 11) ,
  productivity_index_oil = (1 << 12) , productivity_index_gas = (1 << 13) , well_potential_water = (1 << 14) , well_potential_oil = (1 << 15) ,
  well_potential_gas = (1 << 16)
}
 
using enum_size = std::underlying_type< opt >::type
 

Public Member Functions

 Rates ()=default
 
bool has (opt) const
 Query if a value is set. More...
 
double get (opt m) const
 
double get (opt m, double default_value) const
 
Ratesset (opt m, double value)
 
bool flowing () const
 Returns true if any of the rates oil, gas, water is nonzero. More...
 
template<class MessageBufferType >
void write (MessageBufferType &buffer) const
 
template<class MessageBufferType >
void read (MessageBufferType &buffer)
 
bool operator== (const Rates &rat2) const
 

Member Typedef Documentation

◆ enum_size

using Opm::data::Rates::enum_size = std::underlying_type< opt >::type

Member Enumeration Documentation

◆ opt

enum class Opm::data::Rates::opt : uint32_t
strong
Enumerator
wat 
oil 
gas 
polymer 
solvent 
energy 
dissolved_gas 
vaporized_oil 
reservoir_water 
reservoir_oil 
reservoir_gas 
productivity_index_water 
productivity_index_oil 
productivity_index_gas 
well_potential_water 
well_potential_oil 
well_potential_gas 

Constructor & Destructor Documentation

◆ Rates()

Opm::data::Rates::Rates ( )
default

Member Function Documentation

◆ flowing()

bool Opm::data::Rates::flowing ( ) const
inline

Returns true if any of the rates oil, gas, water is nonzero.

Referenced by Opm::data::Well::flowing().

◆ get() [1/2]

double Opm::data::Rates::get ( opt  m) const
inline

Read the value indicated by m. Throws an exception if if the requested value is unset.

References has().

◆ get() [2/2]

double Opm::data::Rates::get ( opt  m,
double  default_value 
) const
inline

Read the value indicated by m. Returns a default value if the requested value is unset.

References has().

◆ has()

bool Opm::data::Rates::has ( opt  m) const
inline

Query if a value is set.

Referenced by get().

◆ operator==()

bool Opm::data::Rates::operator== ( const Rates rat2) const
inline

◆ read()

template<class MessageBufferType >
void Opm::data::Rates::read ( MessageBufferType &  buffer)

◆ set()

Rates & Opm::data::Rates::set ( opt  m,
double  value 
)
inline

Set the value specified by m. Throws an exception if multiple values are requested. Returns a self-reference to support chaining.

References exprtk::details::value().

◆ write()

template<class MessageBufferType >
void Opm::data::Rates::write ( MessageBufferType &  buffer) const

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