#include <SimulatorState.hpp>

Inheritance diagram for Opm::SimulatorState:
Inheritance graph

Public Types

enum  ExtremalSat { MinSat, MaxSat }
 

Public Member Functions

virtual void init (const UnstructuredGrid &g, int num_phases)
 
virtual void init (int number_of_cells, int number_of_faces, int num_phases)
 
int numPhases () const
 
int numCells () const
 
int numFaces () const
 
std::vector< double > & pressure ()
 
std::vector< double > & temperature ()
 
std::vector< double > & facepressure ()
 
std::vector< double > & faceflux ()
 
std::vector< double > & saturation ()
 
const std::vector< double > & pressure () const
 
const std::vector< double > & temperature () const
 
const std::vector< double > & facepressure () const
 
const std::vector< double > & faceflux () const
 
const std::vector< double > & saturation () const
 
virtual bool equals (const SimulatorState &other, double epsilon=1e-8) const
 
std::vector< std::vector
< double > > & 
cellData ()
 
const std::vector< std::vector
< double > > & 
cellData () const
 
std::vector< std::vector
< double > > & 
faceData ()
 
const std::vector< std::vector
< double > > & 
faceData () const
 
const std::vector< std::string > & cellDataNames () const
 
const std::vector< std::string > & faceDataNames () const
 
size_t registerCellData (const std::string &name, const int components, const double initialValue=0.0)
 
size_t registerFaceData (const std::string &name, const int components, const double initialValue=0.0)
 

Protected Member Functions

template<typename Props >
void setFirstSat (const std::vector< int > &cells, const Props &props, ExtremalSat es)
 

Static Protected Member Functions

static bool vectorApproxEqual (const std::vector< double > &v1, const std::vector< double > &v2, double epsilon)
 

Static Protected Attributes

static const int pressureId_ = 0
 pressure per cell. More...
 
static const int temperatureId_ = 1
 temperature per cell. More...
 
static const int saturationId_ = 2
 The saturation of each phase per cell. More...
 
static const int facePressureId_ = 0
 pressure per face. More...
 
static const int faceFluxId_ = 1
 The fluxes at the faces. More...
 

Member Enumeration Documentation

Enumerator
MinSat 
MaxSat 

Member Function Documentation

std::vector< std::vector<double> >& Opm::SimulatorState::cellData ( )
inline
const std::vector< std::vector<double> >& Opm::SimulatorState::cellData ( ) const
inline
const std::vector< std::string >& Opm::SimulatorState::cellDataNames ( ) const
inline
virtual bool Opm::SimulatorState::equals ( const SimulatorState other,
double  epsilon = 1e-8 
) const
virtual

Compare this state with another, to see if they are different only within a small margin.

Reimplemented in Opm::BlackoilState, and Opm::TwophaseState.

Referenced by Opm::TwophaseState::equals().

std::vector< std::vector<double> >& Opm::SimulatorState::faceData ( )
inline
const std::vector< std::vector<double> >& Opm::SimulatorState::faceData ( ) const
inline
const std::vector< std::string >& Opm::SimulatorState::faceDataNames ( ) const
inline
std::vector<double>& Opm::SimulatorState::faceflux ( )
inline

References faceFluxId_.

const std::vector<double>& Opm::SimulatorState::faceflux ( ) const
inline

References faceFluxId_.

std::vector<double>& Opm::SimulatorState::facepressure ( )
inline

References facePressureId_.

const std::vector<double>& Opm::SimulatorState::facepressure ( ) const
inline

References facePressureId_.

virtual void Opm::SimulatorState::init ( const UnstructuredGrid g,
int  num_phases 
)
virtual

Reimplemented in Opm::BlackoilState.

virtual void Opm::SimulatorState::init ( int  number_of_cells,
int  number_of_faces,
int  num_phases 
)
virtual

Reimplemented in Opm::BlackoilState.

int Opm::SimulatorState::numCells ( ) const
inline
int Opm::SimulatorState::numFaces ( ) const
inline
int Opm::SimulatorState::numPhases ( ) const
inline
std::vector<double>& Opm::SimulatorState::pressure ( )
inline

References pressureId_.

Referenced by Opm::initStateEquil().

const std::vector<double>& Opm::SimulatorState::pressure ( ) const
inline

References pressureId_.

size_t Opm::SimulatorState::registerCellData ( const std::string &  name,
const int  components,
const double  initialValue = 0.0 
)
size_t Opm::SimulatorState::registerFaceData ( const std::string &  name,
const int  components,
const double  initialValue = 0.0 
)
std::vector<double>& Opm::SimulatorState::saturation ( )
inline
const std::vector<double>& Opm::SimulatorState::saturation ( ) const
inline

References saturationId_.

template<typename Props >
void Opm::SimulatorState::setFirstSat ( const std::vector< int > &  cells,
const Props &  props,
ExtremalSat  es 
)
protected

Initialize the first saturation to maximum value. This method should be considered deprecated. Avoid to use it!

Template Parameters
PropsFluid and rock properties that pertain to this kind of simulation. Currently, only Blackoil- and IncompPropertiesInterface are supported.

Referenced by Opm::TwophaseState::setFirstSat().

std::vector<double>& Opm::SimulatorState::temperature ( )
inline
const std::vector<double>& Opm::SimulatorState::temperature ( ) const
inline

References temperatureId_.

static bool Opm::SimulatorState::vectorApproxEqual ( const std::vector< double > &  v1,
const std::vector< double > &  v2,
double  epsilon 
)
staticprotected

Check if two vectors are equal within a margin.

Parameters
epsilonRelative difference that is tolerated for the vectors to still be considered equal.
Returns
True if every element is within the margin, false if there is at least one that is not.

Member Data Documentation

const int Opm::SimulatorState::faceFluxId_ = 1
staticprotected

The fluxes at the faces.

Referenced by faceflux().

const int Opm::SimulatorState::facePressureId_ = 0
staticprotected

pressure per face.

Referenced by facepressure().

const int Opm::SimulatorState::pressureId_ = 0
staticprotected

pressure per cell.

Referenced by pressure().

const int Opm::SimulatorState::saturationId_ = 2
staticprotected

The saturation of each phase per cell.

Referenced by saturation().

const int Opm::SimulatorState::temperatureId_ = 1
staticprotected

temperature per cell.

Referenced by temperature().


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