#include <EclipseGrid.hpp>

Public Member Functions

 EclipseGrid (const std::string &filename)
 
 EclipseGrid (const ecl_grid_type *src_ptr)
 
 EclipseGrid (size_t nx, size_t ny, size_t nz, double dx=1.0, double dy=1.0, double dz=1.0)
 
 EclipseGrid (std::shared_ptr< const Deck > deck)
 
size_t getNumActive () const
 
size_t getNX () const
 
size_t getNY () const
 
size_t getNZ () const
 
size_t getCartesianSize () const
 
bool isPinchActive () const
 
double getPinchThresholdThickness () const
 
PinchMode::ModeEnum getPinchOption () const
 
PinchMode::ModeEnum getMultzOption () const
 
MinpvMode::ModeEnum getMinpvMode () const
 
double getMinpvValue () const
 
bool hasCellInfo () const
 
size_t getGlobalIndex (size_t i, size_t j, size_t k) const
 
void assertGlobalIndex (size_t globalIndex) const
 
void assertIJK (size_t i, size_t j, size_t k) const
 
std::tuple< double, double,
double > 
getCellCenter (size_t i, size_t j, size_t k) const
 
std::tuple< double, double,
double > 
getCellCenter (size_t globalIndex) const
 
double getCellVolume (size_t globalIndex) const
 
double getCellVolume (size_t i, size_t j, size_t k) const
 
double getCellThicknes (size_t globalIndex) const
 
double getCellThicknes (size_t i, size_t j, size_t k) const
 
bool cellActive (size_t globalIndex) const
 
bool cellActive (size_t i, size_t, size_t k) const
 
double getCellDepth (size_t i, size_t j, size_t k) const
 
double getCellDepth (size_t globalIndex) const
 
void exportMAPAXES (std::vector< double > &mapaxes) const
 
void exportCOORD (std::vector< double > &coord) const
 
void exportZCORN (std::vector< double > &zcorn) const
 
void exportACTNUM (std::vector< int > &actnum) const
 
void resetACTNUM (const int *actnum)
 
bool equal (const EclipseGrid &other) const
 
void fwriteEGRID (const std::string &filename, bool output_metric) const
 
const ecl_grid_type * c_ptr () const
 

Static Public Member Functions

static bool hasCornerPointKeywords (std::shared_ptr< const Deck > deck)
 
static bool hasCartesianKeywords (std::shared_ptr< const Deck > deck)
 

Detailed Description

About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_grid_type instance. This pointer must be used for access to all cell related properties, including:

  • Size of cells
  • Real world position of cells
  • Active/inactive status of cells

However in may cases the only required information is the dimension of the grid. To facilitate simpler use, in particular in testing, the grid dimensions are internalized separate from the ecl_grid_type pointer. This means that in many cases a grid without the underlying ecl_grid_type pointer is sufficient. To create such a 'naked' grid you can parse a deck with only DIMENS / SPECGRID and no further grid related keywords, or alternatively use the:

EclipseGrid::EclipseGrid(nx,ny,nz)

constructor.

To query a grid instance if it has proper underlying grid support use the method:

bool EclipseGrid::hasCellInfo();

Constructor & Destructor Documentation

Opm::EclipseGrid::EclipseGrid ( const std::string &  filename)
explicit
Opm::EclipseGrid::EclipseGrid ( const ecl_grid_type *  src_ptr)
explicit
Opm::EclipseGrid::EclipseGrid ( size_t  nx,
size_t  ny,
size_t  nz,
double  dx = 1.0,
double  dy = 1.0,
double  dz = 1.0 
)
explicit
Opm::EclipseGrid::EclipseGrid ( std::shared_ptr< const Deck deck)
explicit

Member Function Documentation

void Opm::EclipseGrid::assertGlobalIndex ( size_t  globalIndex) const
void Opm::EclipseGrid::assertIJK ( size_t  i,
size_t  j,
size_t  k 
) const
const ecl_grid_type* Opm::EclipseGrid::c_ptr ( ) const
bool Opm::EclipseGrid::cellActive ( size_t  globalIndex) const
bool Opm::EclipseGrid::cellActive ( size_t  i,
size_t  ,
size_t  k 
) const
bool Opm::EclipseGrid::equal ( const EclipseGrid other) const
void Opm::EclipseGrid::exportACTNUM ( std::vector< int > &  actnum) const
void Opm::EclipseGrid::exportCOORD ( std::vector< double > &  coord) const
void Opm::EclipseGrid::exportMAPAXES ( std::vector< double > &  mapaxes) const
void Opm::EclipseGrid::exportZCORN ( std::vector< double > &  zcorn) const
void Opm::EclipseGrid::fwriteEGRID ( const std::string &  filename,
bool  output_metric 
) const
size_t Opm::EclipseGrid::getCartesianSize ( ) const
std::tuple<double,double,double> Opm::EclipseGrid::getCellCenter ( size_t  i,
size_t  j,
size_t  k 
) const
std::tuple<double,double,double> Opm::EclipseGrid::getCellCenter ( size_t  globalIndex) const
double Opm::EclipseGrid::getCellDepth ( size_t  i,
size_t  j,
size_t  k 
) const
double Opm::EclipseGrid::getCellDepth ( size_t  globalIndex) const
double Opm::EclipseGrid::getCellThicknes ( size_t  globalIndex) const
double Opm::EclipseGrid::getCellThicknes ( size_t  i,
size_t  j,
size_t  k 
) const
double Opm::EclipseGrid::getCellVolume ( size_t  globalIndex) const
double Opm::EclipseGrid::getCellVolume ( size_t  i,
size_t  j,
size_t  k 
) const
size_t Opm::EclipseGrid::getGlobalIndex ( size_t  i,
size_t  j,
size_t  k 
) const
MinpvMode::ModeEnum Opm::EclipseGrid::getMinpvMode ( ) const
double Opm::EclipseGrid::getMinpvValue ( ) const
PinchMode::ModeEnum Opm::EclipseGrid::getMultzOption ( ) const
size_t Opm::EclipseGrid::getNumActive ( ) const
size_t Opm::EclipseGrid::getNX ( ) const
size_t Opm::EclipseGrid::getNY ( ) const
size_t Opm::EclipseGrid::getNZ ( ) const
PinchMode::ModeEnum Opm::EclipseGrid::getPinchOption ( ) const
double Opm::EclipseGrid::getPinchThresholdThickness ( ) const
static bool Opm::EclipseGrid::hasCartesianKeywords ( std::shared_ptr< const Deck deck)
static
bool Opm::EclipseGrid::hasCellInfo ( ) const
static bool Opm::EclipseGrid::hasCornerPointKeywords ( std::shared_ptr< const Deck deck)
static
bool Opm::EclipseGrid::isPinchActive ( ) const
void Opm::EclipseGrid::resetACTNUM ( const int *  actnum)

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