opm-common
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 Opm::EclipseGridLGR

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 getTotalActiveLGR () const
size_t getActiveIndexLGR (const std::string &label, size_t i, size_t j, size_t k) const
size_t getActiveIndexLGR (const std::string &label, size_t localIndex) const
size_t activeIndexLGR (const std::string &label, size_t i, size_t j, size_t k) const
size_t activeIndexLGR (const std::string &label, size_t localIndex) const
size_t getActiveIndex (size_t i, size_t j, size_t k) const
const std::vector< std::size_t > & get_print_order_lgr () const
size_t get_lgr_cell_index (const std::string &lgr_tag) const
size_t getActiveIndex (size_t globalIndex) const
std::vector< std::string > get_all_lgr_labels () const
const std::string & get_lgr_labels_by_number (std::size_t num) const
const std::vector< std::string > & get_all_labels () const
const std::string & get_lgr_tag () const
std::vector< GridDims > get_lgr_children_gridim () const
void assertIndexLGR (size_t localIndex) const
void assertLabelLGR (const std::string &label) const
void save (const std::string &filename, bool formatted, const std::vector< Opm::NNCdata > &nnc, const Opm::UnitSystem &units) const
void init_children_host_cells (bool logical=true)
void init_children_host_cells_logical (void)
void init_children_host_cells_geometrical (void)
std::array< int, 3 > getCellSubdivisionRatioLGR (const std::string &lgr_tag, std::array< int, 3 > acum={1, 1, 1}) const
size_t getGlobalIndex (size_t active_index) const
 Observe: the input argument is assumed to be in the space [0,num_active).
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.
void init_lgr_cells (const LgrCollection &lgr_input)
void create_lgr_cells_tree (const LgrCollection &)
std::tuple< std::array< double, 3 >, std::array< double, 3 >, std::array< double, 3 > > getCellAndBottomCenterNormal (size_t globalIndex) const
 get cell center, and center and normal of bottom face
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
bool cellActiveAfterMINPV (size_t i, size_t j, size_t k, double cell_porv) const
bool is_lgr () const
std::array< double, 3 > getCellDimensions (size_t i, size_t j, size_t k) const
std::array< double, 3 > getCellDimensionsLGR (const std::size_t i, const std::size_t j, const std::size_t k, const std::string &lgr_tag) const
 Computes the dimensions of a local grid refinement (LGR) cell.
double getCellDepthLGR (size_t i, size_t j, size_t k, const std::string &lgr_tag) 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
const std::optional< MapAxes > & getMapAxes () const
const std::map< size_t, std::array< int, 2 > > & getAquiferCellTabnums () 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
EclipseGridLGRgetLGRCell (std::size_t index)
const EclipseGridLGRgetLGRCell (std::size_t index) const
const EclipseGridLGRgetLGRCell (const std::string &lgr_tag) const
int getLGR_global_father (std::size_t global_index, const std::string &lgr_tag) const
int getLGR_father (std::size_t i, std::size_t j, std::size_t k, const std::string &lgr_tag) const
int getLGR_father (std::size_t global_index, const std::string &lgr_tag) const
std::array< int, 3 > getLGR_fatherIJK (std::size_t i, std::size_t j, std::size_t k, const std::string &lgr_tag) const
virtual void set_lgr_refinement (const std::string &lgr_tag, const std::vector< double > &coords, const std::vector< double > &zcorn)
 Sets Local Grid Refinement for the EclipseGrid.
std::size_t getGlobalIndex (std::size_t i, std::size_t j, std::size_t k) 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 ()

Public Attributes

std::vector< EclipseGridLGRlgr_children_cells

Protected Attributes

std::size_t lgr_global_counter = 0
std::string lgr_label = "GLOBAL"
int lgr_level = 0
int lgr_level_father = 0
std::vector< std::string > lgr_children_labels
std::vector< std::size_t > lgr_active_index
std::vector< std::size_t > lgr_level_active_map
std::vector< std::string > all_lgr_labels
std::map< std::vector< std::size_t >, std::size_t > num_lgr_children_cells
std::vector< double > m_zcorn
std::vector< double > m_coord
std::vector< int > m_actnum
std::vector< std::size_t > m_print_order_lgr_cells
std::optional< std::vector< double > > m_input_zcorn
std::optional< std::vector< double > > m_input_coord
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

◆ getCellDimensionsLGR()

std::array< double, 3 > Opm::EclipseGrid::getCellDimensionsLGR ( const std::size_t i,
const std::size_t j,
const std::size_t k,
const std::string & lgr_tag ) const

Computes the dimensions of a local grid refinement (LGR) cell.

This function calculates the dimensions of an LGR cell by dividing the parent cell's dimensions by the subdivision ratio for the given LGR tag.

Parameters
iLocal index of the parent cell in the x-direction.
jLocal index of the parent cell in the y-direction.
kLocal index of the parent cell in the z-direction.
lgr_tagIdentifier for the LGR region.
Returns
std::array<double,3> The computed dimensions of the LGR cell in the x, y, and z directions.

◆ 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.

◆ set_lgr_refinement()

void Opm::EclipseGrid::set_lgr_refinement ( const std::string & lgr_tag,
const std::vector< double > & coords,
const std::vector< double > & zcorn )
virtual

Sets Local Grid Refinement for the EclipseGrid.

Parameters
lgr_tagThe string that contains the name of a given LGR cell.
coordsThe coordinates of a given LGR cell in CPG COORDSformat.
zcornThe z-coordinates values of a given LGR cell in CPG ZCORN format.

Reimplemented in Opm::EclipseGridLGR.


The documentation for this class was generated from the following files:
  • opm/input/eclipse/EclipseState/Grid/EclipseGrid.hpp
  • opm/input/eclipse/EclipseState/Grid/EclipseGrid.cpp