Simulator state for a two-phase simulator. More...

#include <TwophaseState.hpp>

Inheritance diagram for Opm::TwophaseState:
Inheritance graph

Public Types

enum  ExtremalSat { MinSat, MaxSat }
 

Public Member Functions

void setFirstSat (const std::vector< int > &cells, const Opm::IncompPropertiesInterface &props, ExtremalSat es)
 
virtual bool equals (const SimulatorState &other, double epsilon=1e-8) const
 
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 ()
 
const std::vector< double > & pressure () const
 
std::vector< double > & temperature ()
 
const std::vector< double > & temperature () const
 
std::vector< double > & facepressure ()
 
const std::vector< double > & facepressure () const
 
std::vector< double > & faceflux ()
 
const std::vector< double > & faceflux () const
 
std::vector< double > & saturation ()
 
const std::vector< double > & saturation () 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...
 

Detailed Description

Simulator state for a two-phase simulator.

Member Enumeration Documentation

Enumerator
MinSat 
MaxSat 

Member Function Documentation

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

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

Reimplemented from Opm::SimulatorState.

References Opm::SimulatorState::equals().

std::vector< std::vector<double> >& Opm::SimulatorState::faceData ( )
inlineinherited
const std::vector< std::vector<double> >& Opm::SimulatorState::faceData ( ) const
inlineinherited
const std::vector< std::string >& Opm::SimulatorState::faceDataNames ( ) const
inlineinherited
std::vector<double>& Opm::SimulatorState::faceflux ( )
inlineinherited
const std::vector<double>& Opm::SimulatorState::faceflux ( ) const
inlineinherited
std::vector<double>& Opm::SimulatorState::facepressure ( )
inlineinherited
const std::vector<double>& Opm::SimulatorState::facepressure ( ) const
inlineinherited
virtual void Opm::SimulatorState::init ( const UnstructuredGrid g,
int  num_phases 
)
virtualinherited

Reimplemented in Opm::BlackoilState.

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

Reimplemented in Opm::BlackoilState.

int Opm::SimulatorState::numCells ( ) const
inlineinherited
int Opm::SimulatorState::numFaces ( ) const
inlineinherited
int Opm::SimulatorState::numPhases ( ) const
inlineinherited
std::vector<double>& Opm::SimulatorState::pressure ( )
inlineinherited
const std::vector<double>& Opm::SimulatorState::pressure ( ) const
inlineinherited
size_t Opm::SimulatorState::registerCellData ( const std::string &  name,
const int  components,
const double  initialValue = 0.0 
)
inherited
size_t Opm::SimulatorState::registerFaceData ( const std::string &  name,
const int  components,
const double  initialValue = 0.0 
)
inherited
std::vector<double>& Opm::SimulatorState::saturation ( )
inlineinherited
const std::vector<double>& Opm::SimulatorState::saturation ( ) const
inlineinherited
void Opm::TwophaseState::setFirstSat ( const std::vector< int > &  cells,
const Opm::IncompPropertiesInterface props,
ExtremalSat  es 
)
inline
template<typename Props >
void Opm::SimulatorState::setFirstSat ( const std::vector< int > &  cells,
const Props &  props,
ExtremalSat  es 
)
protectedinherited

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 setFirstSat().

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

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
staticprotectedinherited

The fluxes at the faces.

Referenced by Opm::SimulatorState::faceflux().

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

pressure per face.

Referenced by Opm::SimulatorState::facepressure().

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

pressure per cell.

Referenced by Opm::SimulatorState::pressure().

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

The saturation of each phase per cell.

Referenced by Opm::SimulatorState::saturation().

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

temperature per cell.

Referenced by Opm::SimulatorState::temperature().


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