My Project
Loading...
Searching...
No Matches
Opm::data::Rates Class Reference

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) , brine = (1 << 17) , alq = (1 << 18) , tracer = (1 << 19) ,
  micp = (1 << 20) , vaporized_water = (1 << 21)
}
 
using enum_size = std::underlying_type< opt >::type
 

Public Member Functions

bool has (opt) const
 Query if a value is set.
 
double get (opt m) const
 Read the value indicated by m.
 
double get (opt m, double default_value) const
 Read the value indicated by m.
 
double get (opt m, double default_value, const std::string &tracer_name) const
 
Ratesset (opt m, double value)
 Set the value specified by m.
 
Ratesset (opt m, double value, const std::string &tracer_name)
 
bool flowing () const
 Returns true if any of the rates oil, gas, water is nonzero.
 
template<class MessageBufferType >
void write (MessageBufferType &buffer) const
 
template<class MessageBufferType >
void read (MessageBufferType &buffer)
 
bool operator== (const Rates &rat2) const
 
void init_json (Json::JsonObject &json_data) const
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 

Static Public Member Functions

static Rates serializationTestObject ()
 

Member Function Documentation

◆ 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.

◆ 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.

◆ 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.


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