#include <EclipseGrid.hpp>

Inheritance diagram for Opm::EclipseGrid:
Inheritance graph

Public Member Functions

 EclipseGrid ()=default
 
 EclipseGrid (const std::string &filename)
 
 EclipseGrid (const EclipseGrid &src)=default
 
 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 (std::array< int, 3 > &dims, const std::vector< double > &coord, const std::vector< double > &zcorn, const int *actnum=nullptr, const double *mapaxes=nullptr)
 
 EclipseGrid (const Deck &deck, const int *actnum=nullptr)
 
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
 
void save (const std::string &filename, bool formatted, const Opm::NNC &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
 
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
 
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
 
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
 
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
 
const std::vector< double > & getMAPAXES () const
 
const std::stringgetMAPUNITS () const
 
size_t fixupZCORN ()
 
size_t getZcornFixed ()
 
void resetACTNUM ()
 
void resetACTNUM (const std::vector< int > &actnum)
 
bool equal (const EclipseGrid &other) const
 
size_t getNX () const
 
size_t getNY () const
 
size_t getNZ () const
 
size_t operator[] (int dim) const
 
const std::array< int, 3 > getNXYZ () const
 
const std::array< int, 3 > getIJK (size_t globalIndex) const
 
size_t getCartesianSize () const
 
void assertGlobalIndex (size_t globalIndex) const
 
void assertIJK (size_t i, size_t j, 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 GridDims serializeObject ()
 

Protected Attributes

size_t m_nx
 
size_t m_ny
 
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() [1/8]

Opm::EclipseGrid::EclipseGrid ( )
default

◆ EclipseGrid() [2/8]

Opm::EclipseGrid::EclipseGrid ( const std::string filename)
explicit

◆ EclipseGrid() [3/8]

Opm::EclipseGrid::EclipseGrid ( const EclipseGrid src)
default

◆ EclipseGrid() [4/8]

Opm::EclipseGrid::EclipseGrid ( const EclipseGrid src,
const std::vector< int > &  actnum 
)

◆ EclipseGrid() [5/8]

Opm::EclipseGrid::EclipseGrid ( const EclipseGrid src,
const double *  zcorn,
const std::vector< int > &  actnum 
)

◆ EclipseGrid() [6/8]

Opm::EclipseGrid::EclipseGrid ( size_t  nx,
size_t  ny,
size_t  nz,
double  dx = 1.0,
double  dy = 1.0,
double  dz = 1.0 
)

◆ EclipseGrid() [7/8]

Opm::EclipseGrid::EclipseGrid ( std::array< int, 3 > &  dims,
const std::vector< double > &  coord,
const std::vector< double > &  zcorn,
const int *  actnum = nullptr,
const double *  mapaxes = nullptr 
)

◆ EclipseGrid() [8/8]

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

◆ activeIndex() [1/2]

size_t Opm::EclipseGrid::activeIndex ( size_t  globalIndex) const

◆ activeIndex() [2/2]

size_t Opm::EclipseGrid::activeIndex ( size_t  i,
size_t  j,
size_t  k 
) const

◆ activeVolume()

std::vector< double > Opm::EclipseGrid::activeVolume ( ) const

◆ allActive()

bool Opm::EclipseGrid::allActive ( ) const

◆ assertGlobalIndex()

void Opm::GridDims::assertGlobalIndex ( size_t  globalIndex) const
inherited

◆ assertIJK()

void Opm::GridDims::assertIJK ( size_t  i,
size_t  j,
size_t  k 
) const
inherited

◆ cellActive() [1/2]

bool Opm::EclipseGrid::cellActive ( size_t  globalIndex) const

◆ cellActive() [2/2]

bool Opm::EclipseGrid::cellActive ( size_t  i,
size_t  j,
size_t  k 
) const

◆ circle()

bool Opm::EclipseGrid::circle ( ) const

◆ compressedVector()

template<typename T >
std::vector< T > Opm::EclipseGrid::compressedVector ( const std::vector< T > &  input_vector) const
inline

◆ equal()

bool Opm::EclipseGrid::equal ( const EclipseGrid other) const

◆ fixupZCORN()

size_t Opm::EclipseGrid::fixupZCORN ( )

◆ getActiveMap()

const std::vector< int > & Opm::EclipseGrid::getActiveMap ( ) const

Will return a vector a length num_active; where the value of each element is the corresponding global index.

Referenced by compressedVector().

◆ getACTNUM()

const std::vector< int > & Opm::EclipseGrid::getACTNUM ( ) const

◆ getCartesianSize()

size_t Opm::GridDims::getCartesianSize ( ) const
inherited

Referenced by compressedVector().

◆ getCellCenter() [1/2]

std::array< double, 3 > Opm::EclipseGrid::getCellCenter ( size_t  globalIndex) const

◆ getCellCenter() [2/2]

std::array< double, 3 > Opm::EclipseGrid::getCellCenter ( size_t  i,
size_t  j,
size_t  k 
) const

◆ getCellDepth() [1/2]

double Opm::EclipseGrid::getCellDepth ( size_t  globalIndex) const

◆ getCellDepth() [2/2]

double Opm::EclipseGrid::getCellDepth ( size_t  i,
size_t  j,
size_t  k 
) const

◆ getCellDims() [1/2]

std::array< double, 3 > Opm::EclipseGrid::getCellDims ( size_t  globalIndex) const

◆ getCellDims() [2/2]

std::array< double, 3 > Opm::EclipseGrid::getCellDims ( size_t  i,
size_t  j,
size_t  k 
) const

◆ getCellThickness() [1/2]

double Opm::EclipseGrid::getCellThickness ( size_t  globalIndex) const

◆ getCellThickness() [2/2]

double Opm::EclipseGrid::getCellThickness ( size_t  i,
size_t  j,
size_t  k 
) const

◆ getCellVolume() [1/2]

double Opm::EclipseGrid::getCellVolume ( size_t  globalIndex) const

◆ getCellVolume() [2/2]

double Opm::EclipseGrid::getCellVolume ( size_t  i,
size_t  j,
size_t  k 
) const

◆ getCOORD()

const std::vector< double > & Opm::EclipseGrid::getCOORD ( ) const

◆ getCornerPos()

std::array< double, 3 > Opm::EclipseGrid::getCornerPos ( size_t  i,
size_t  j,
size_t  k,
size_t  corner_index 
) const

◆ getGlobalIndex() [1/2]

size_t Opm::EclipseGrid::getGlobalIndex ( size_t  active_index) const

◆ getGlobalIndex() [2/2]

size_t Opm::EclipseGrid::getGlobalIndex ( size_t  i,
size_t  j,
size_t  k 
) const

◆ getIJK()

const std::array< int, 3 > Opm::GridDims::getIJK ( size_t  globalIndex) const
inherited

◆ getMAPAXES()

const std::vector< double > & Opm::EclipseGrid::getMAPAXES ( ) const

◆ getMAPUNITS()

const std::string & Opm::EclipseGrid::getMAPUNITS ( ) const
inline

◆ getMinpvMode()

MinpvMode::ModeEnum Opm::EclipseGrid::getMinpvMode ( ) const

◆ getMinpvVector()

const std::vector< double > & Opm::EclipseGrid::getMinpvVector ( ) const

◆ getMultzOption()

PinchMode::ModeEnum Opm::EclipseGrid::getMultzOption ( ) const

◆ getNumActive()

size_t Opm::EclipseGrid::getNumActive ( ) const

Referenced by compressedVector().

◆ getNX()

size_t Opm::GridDims::getNX ( ) const
inherited

◆ getNXYZ()

const std::array< int, 3 > Opm::GridDims::getNXYZ ( ) const
inherited

◆ getNY()

size_t Opm::GridDims::getNY ( ) const
inherited

◆ getNZ()

size_t Opm::GridDims::getNZ ( ) const
inherited

◆ getPinchOption()

PinchMode::ModeEnum Opm::EclipseGrid::getPinchOption ( ) const

◆ getPinchThresholdThickness()

double Opm::EclipseGrid::getPinchThresholdThickness ( ) const

◆ getZCORN()

const std::vector< double > & Opm::EclipseGrid::getZCORN ( ) const

◆ getZcornFixed()

size_t Opm::EclipseGrid::getZcornFixed ( )
inline

◆ hasCartesianKeywords()

static bool Opm::EclipseGrid::hasCartesianKeywords ( const Deck )
static

◆ hasCornerPointKeywords()

static bool Opm::EclipseGrid::hasCornerPointKeywords ( const Deck )
static

◆ hasCylindricalKeywords()

static bool Opm::EclipseGrid::hasCylindricalKeywords ( const Deck deck)
static

◆ hasGDFILE()

static bool Opm::EclipseGrid::hasGDFILE ( const Deck deck)
static

◆ isPinchActive()

bool Opm::EclipseGrid::isPinchActive ( ) const

◆ operator==()

bool Opm::GridDims::operator== ( const GridDims data) const
inherited

◆ operator[]()

size_t Opm::GridDims::operator[] ( int  dim) const
inherited

◆ resetACTNUM() [1/2]

void Opm::EclipseGrid::resetACTNUM ( )

◆ resetACTNUM() [2/2]

void Opm::EclipseGrid::resetACTNUM ( const std::vector< int > &  actnum)

◆ save()

void Opm::EclipseGrid::save ( const std::string filename,
bool  formatted,
const Opm::NNC nnc,
const Opm::UnitSystem units 
) const

◆ serializeObject()

static GridDims Opm::GridDims::serializeObject ( )
staticinherited

◆ serializeOp()

template<class Serializer >
void Opm::GridDims::serializeOp ( Serializer serializer)
inlineinherited

◆ zcornMapper()

ZcornMapper Opm::EclipseGrid::zcornMapper ( ) const

Member Data Documentation

◆ m_nx

size_t Opm::GridDims::m_nx
protectedinherited

◆ m_ny

size_t Opm::GridDims::m_ny
protectedinherited

◆ m_nz

size_t Opm::GridDims::m_nz
protectedinherited

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