My Project
Loading...
Searching...
No Matches
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)
 Will create an EclipseGrid instance based on an existing GRID/EGRID file.
 
 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, double top=0.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.
 
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
 Observe: the input argument is assumed to be in the space [0,num_active).
 
size_t getGlobalIndex (size_t i, size_t j, size_t k) const
 
bool circle () const
 
bool isPinchActive () const
 
double getPinchThresholdThickness () const
 
PinchMode getPinchOption () const
 
PinchMode getMultzOption () const
 
PinchMode getPinchGapMode () const
 
double getPinchMaxEmptyGap () const
 
MinpvMode 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.
 
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)
 
void setMINPVV (const std::vector< double > &minpvv)
 Sets MINPVV if MINPV and MINPORV are not used.
 
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 hasRadialKeywords (const Deck &deck)
 
static bool hasSpiderKeywords (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 
)
explicit

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 files: