My Project
Opm::EclipseGrid Class Reference

About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_grid_type instance. More...

#include <EclipseGrid.hpp>

Inheritance diagram for Opm::EclipseGrid:
Opm::GridDims

Public Member Functions

 EclipseGrid (const std::string &filename)
 
 EclipseGrid (const EclipseGrid &src, const std::vector< int > &actnum)
 
 EclipseGrid (const EclipseGrid &src, const double *zcorn, const std::vector< int > &actnum)
 
 EclipseGrid (size_t nx, size_t ny, size_t nz, double dx=1.0, double dy=1.0, double dz=1.0)
 
 EclipseGrid (const GridDims &gd)
 
 EclipseGrid (const std::array< int, 3 > &dims, const std::vector< double > &coord, const std::vector< double > &zcorn, const int *actnum=nullptr)
 
 EclipseGrid (const Deck &deck, const int *actnum=nullptr)
 EclipseGrid ignores ACTNUM in Deck, and therefore needs ACTNUM explicitly. More...
 
size_t getNumActive () const
 
bool allActive () const
 
size_t activeIndex (size_t i, size_t j, size_t k) const
 
size_t activeIndex (size_t globalIndex) const
 
size_t getActiveIndex (size_t i, size_t j, size_t k) const
 
void save (const std::string &filename, bool formatted, const std::vector< Opm::NNCdata > &nnc, const Opm::UnitSystem &units) const
 
size_t getGlobalIndex (size_t active_index) const
 
size_t getGlobalIndex (size_t i, size_t j, size_t k) const
 
bool circle () const
 
bool isPinchActive () const
 
double getPinchThresholdThickness () const
 
PinchMode::ModeEnum getPinchOption () const
 
PinchMode::ModeEnum getMultzOption () const
 
PinchMode::ModeEnum getPinchGapMode () const
 
MinpvMode::ModeEnum getMinpvMode () const
 
const std::vector< double > & getMinpvVector () const
 
template<typename T >
std::vector< T > compressedVector (const std::vector< T > &input_vector) const
 
const std::vector< int > & getActiveMap () const
 Will return a vector a length num_active; where the value of each element is the corresponding global index.
 
std::array< double, 3 > getCellCenter (size_t i, size_t j, size_t k) const
 
std::array< double, 3 > getCellCenter (size_t globalIndex) const
 
std::array< double, 3 > getCornerPos (size_t i, size_t j, size_t k, size_t corner_index) const
 
const std::vector< double > & activeVolume () const
 
double getCellVolume (size_t globalIndex) const
 
double getCellVolume (size_t i, size_t j, size_t k) const
 
double getCellThickness (size_t globalIndex) const
 
double getCellThickness (size_t i, size_t j, size_t k) const
 
std::array< double, 3 > getCellDims (size_t i, size_t j, size_t k) const
 
std::array< double, 3 > getCellDims (size_t globalIndex) const
 
bool cellActive (size_t globalIndex) const
 
bool cellActive (size_t i, size_t j, size_t k) const
 
std::array< double, 3 > getCellDimensions (size_t i, size_t j, size_t k) const
 
bool isCellActive (size_t i, size_t j, size_t k) const
 
bool isValidCellGeomtry (const std::size_t globalIndex, const UnitSystem &usys) const
 Whether or not given cell has a valid cell geometry. More...
 
double getCellDepth (size_t i, size_t j, size_t k) const
 
double getCellDepth (size_t globalIndex) const
 
ZcornMapper zcornMapper () const
 
const std::vector< double > & getCOORD () const
 
const std::vector< double > & getZCORN () const
 
const std::vector< int > & getACTNUM () const
 
size_t fixupZCORN ()
 
size_t getZcornFixed ()
 
void resetACTNUM ()
 
void resetACTNUM (const std::vector< int > &actnum)
 
bool equal (const EclipseGrid &other) const
 
- Public Member Functions inherited from Opm::GridDims
 GridDims (const std::array< int, 3 > &xyz)
 
 GridDims (std::size_t nx, std::size_t ny, std::size_t nz)
 
 GridDims (const Deck &deck)
 
std::size_t getNX () const
 
std::size_t getNY () const
 
std::size_t getNZ () const
 
std::size_t operator[] (int dim) const
 
std::array< int, 3 > getNXYZ () const
 
std::size_t getGlobalIndex (std::size_t i, std::size_t j, std::size_t k) const
 
std::array< int, 3 > getIJK (std::size_t globalIndex) const
 
std::size_t getCartesianSize () const
 
void assertGlobalIndex (std::size_t globalIndex) const
 
void assertIJK (std::size_t i, std::size_t j, std::size_t k) const
 
bool operator== (const GridDims &data) const
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 

Static Public Member Functions

static bool hasGDFILE (const Deck &deck)
 
static bool hasCylindricalKeywords (const Deck &deck)
 
static bool hasCornerPointKeywords (const Deck &)
 
static bool hasCartesianKeywords (const Deck &)
 
static bool hasDVDEPTHZKeywords (const Deck &)
 
static bool hasEqualDVDEPTHZ (const Deck &)
 
static bool allEqual (const std::vector< double > &v)
 
- Static Public Member Functions inherited from Opm::GridDims
static GridDims serializationTestObject ()
 

Additional Inherited Members

- Protected Attributes inherited from Opm::GridDims
std::size_t m_nx
 
std::size_t m_ny
 
std::size_t m_nz
 

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

Constructor & Destructor Documentation

◆ EclipseGrid()

Opm::EclipseGrid::EclipseGrid ( const Deck deck,
const int *  actnum = nullptr 
)

EclipseGrid ignores ACTNUM in Deck, and therefore needs ACTNUM explicitly.

If a null pointer is passed, every cell is active.

Member Function Documentation

◆ isValidCellGeomtry()

bool Opm::EclipseGrid::isValidCellGeomtry ( const std::size_t  globalIndex,
const UnitSystem usys 
) const

Whether or not given cell has a valid cell geometry.

Valid geometry is defined as all vertices have finite coordinates and at least one pair of coordinates are separated by a physical distance along a pillar.


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