Fesapi 2.9.0.1
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
resqml2::AbstractIjkGridRepresentation Class Reference

Proxy class for an abstract IJK grid representation. This class is semantically abstract. Technically speaking, it is not an abstract because it can be used in case of partial transfer where we don't know the geometry of the IJK grid. More...

#include <AbstractIjkGridRepresentation.h>

Inheritance diagram for resqml2::AbstractIjkGridRepresentation:
resqml2::IjkGridExplicitRepresentation resqml2::IjkGridLatticeRepresentation resqml2::IjkGridNoGeometryRepresentation resqml2::IjkGridParametricRepresentation

Public Types

enum class  geometryKind {
  UNKNOWN = 0 , EXPLICIT = 1 , PARAMETRIC = 2 , LATTICE = 3 ,
  NO_GEOMETRY = 4
}
 

Public Member Functions

 AbstractIjkGridRepresentation (common ::DataObjectRepository *repo, const std::string &guid, const std::string &title, unsigned int iCount, unsigned int jCount, unsigned int kCount, bool *kGaps=nullptr, eml2 ::AbstractHdfProxy *proxy=nullptr)
 
 AbstractIjkGridRepresentation (resqml2 ::AbstractFeatureInterpretation *interp, const std::string &guid, const std::string &title, unsigned int iCount, unsigned int jCount, unsigned int kCount, bool *kGaps=nullptr, eml2 ::AbstractHdfProxy *proxy=nullptr)
 
 AbstractIjkGridRepresentation (gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject, bool withTruncatedPillars=false)
 
virtual ~AbstractIjkGridRepresentation ()
 
unsigned int getICellCount () const
 
void setICellCount (unsigned int iCount)
 
unsigned int getJCellCount () const
 
void setJCellCount (unsigned int jCount)
 Sets the count of cells in the J direction.
 
uint64_t getCellCount () const final
 
unsigned int getColumnCount () const
 
unsigned int getPillarCount () const
 
uint64_t getKGapsCount () const
 
void getKGaps (bool *kGaps) const
 
uint64_t getFaceCount () const
 
unsigned int getIPillarFromGlobalIndex (unsigned int globalIndex) const
 
unsigned int getJPillarFromGlobalIndex (unsigned int globalIndex) const
 
unsigned int getGlobalIndexPillarFromIjIndex (unsigned int iPillar, unsigned int jPillar) const
 
unsigned int getIColumnFromGlobalIndex (unsigned int globalIndex) const
 
unsigned int getJColumnFromGlobalIndex (unsigned int globalIndex) const
 
unsigned int getGlobalIndexColumnFromIjIndex (unsigned int iColumn, unsigned int jColumn) const
 
unsigned int getGlobalIndexCellFromIjkIndex (unsigned int iCell, unsigned int jCell, unsigned int kCell) const
 
bool isRightHanded () const
 
void getPillarsOfSplitCoordinateLines (unsigned int *pillarIndices, bool reverseIAxis=false, bool reverseJAxis=false) const
 
void getColumnsOfSplitCoordinateLines (unsigned int *columnIndices, bool reverseIAxis=false, bool reverseJAxis=false) const
 
void getColumnCountOfSplitCoordinateLines (unsigned int *columnIndexCountPerSplitCoordinateLine) const
 
uint64_t getSplitCoordinateLineCount () const
 
uint64_t getBlockSplitCoordinateLineCount () const
 
uint64_t getSplitNodeCount () const
 
void getPillarGeometryIsDefined (bool *pillarGeometryIsDefined, bool reverseIAxis=false, bool reverseJAxis=false) const
 
bool hasCellGeometryIsDefinedFlags () const
 
void getCellGeometryIsDefinedFlags (bool *cellGeometryIsDefinedFlags, bool reverseIAxis=false, bool reverseJAxis=false, bool reverseKAxis=false) const
 
void setCellGeometryIsDefinedFlags (uint8_t *cellGeometryIsDefinedFlags, eml2 ::AbstractHdfProxy *proxy=nullptr)
 
void setAllCellGeometryFlagsToDefined ()
 
void loadSplitInformation ()
 
void loadBlockInformation (unsigned int iInterfaceStart, unsigned int iInterfaceEnd, unsigned int jInterfaceStart, unsigned int jInterfaceEnd, unsigned int kInterfaceStart, unsigned int kInterfaceEnd)
 
void unloadSplitInformation ()
 
bool isColumnEdgeSplitted (unsigned int iColumn, unsigned int jColumn, unsigned int edge) const
 Checks either a given column edge is splitted or not. This method requires that you have already loaded the split information.
 
uint64_t getXyzPointIndexFromCellCorner (unsigned int iCell, unsigned int jCell, unsigned int kCell, unsigned int corner) const
 Gets the XYZ point index in the HDF dataset from the corner of a cell. This method requires that you have already loaded the split information.
 
void getXyzPointOfBlockFromCellCorner (unsigned int iCell, unsigned int jCell, unsigned int kCell, unsigned int corner, const double *xyzPoints, double &x, double &y, double &z) const
 Gets the x, y and z values of the corner of a cell of a given block. This method requires that you have already both loaded the block information and get the geometry of the block thanks to getXyzPointsOfBlock().
 
uint64_t getXyzPointCountOfKInterface () const
 
uint64_t getXyzPointCountOfBlock () const
 
void getXyzPointsOfKInterface (unsigned int kInterface, double *xyzPoints)
 
virtual void getXyzPointsOfKInterfaceSequence (unsigned int kInterfaceStart, unsigned int kInterfaceEnd, double *xyzPoints)
 Gets all the XYZ points of a particular sequence of K interfaces. XYZ points are given in the local CRS.
 
virtual void getXyzPointsOfBlock (double *xyzPoints)
 Gets all the XYZ points of the current block. XYZ points are given in the local CRS. Block information must be loaded.
 
virtual bool isNodeGeometryCompressed () const
 
gsoap_resqml2_0_1::resqml20__KDirection getKDirection () const override
 
virtual geometryKind getGeometryKind () const
 
virtual common::DataObjectReference getHdfProxyDor () const override
 
virtual uint64_t getXyzPointCountOfPatch (unsigned int patchIndex) const override
 
virtual void getXyzPointsOfPatch (unsigned int patchIndex, double *xyzPoints) const override
 Gets all the xyz points of a particular patch of this representation. xyz points are given in the local CRS.
 
std::string getXmlTag () const final
 
uint64_t getPatchCount () const override
 
virtual std::string getXmlNamespace () const override
 

Static Public Attributes

static constexpr char const * XML_TAG = "IjkGridRepresentation"
 
static constexpr char const * XML_TAG_TRUNCATED = "TruncatedIjkGridRepresentation"
 

Detailed Description

Proxy class for an abstract IJK grid representation. This class is semantically abstract. Technically speaking, it is not an abstract because it can be used in case of partial transfer where we don't know the geometry of the IJK grid.

Member Enumeration Documentation

◆ geometryKind

Values that represent geometry kinds.

Constructor & Destructor Documentation

◆ AbstractIjkGridRepresentation() [1/3]

resqml2::AbstractIjkGridRepresentation::AbstractIjkGridRepresentation ( common ::DataObjectRepository * repo,
const std::string & guid,
const std::string & title,
unsigned int iCount,
unsigned int jCount,
unsigned int kCount,
bool * kGaps = nullptr,
eml2 ::AbstractHdfProxy * proxy = nullptr )

Constructor of an IJK grid representation without link to an interpretation.

Exceptions
std::invalid_argumentIf repo is nullptr.
Parameters
[in,out]repoA repository which will manage the memory of this instance. It cannot be null.
guidThe guid to set to the ijk grid with no geometry representation. If empty then a new guid will be generated.
titleThe title to set to the ijk grid with no geometry representation. If empty then "unknown" title will be set.
iCountCount of cells in the i-direction in the grid.
jCountCount of cells in the j-direction in the grid.
kCountNumber of layers in the grid.
kGaps(Optional) Boolean array of length KCellCount-1. TRUE if there is a gap after the corresponding layer. Won't be freed by FESAPI.
[in]proxy(Optional) The HDF proxy for writing the enabledCells values. If nullptr (default), then the default HDF proxy will be used.

◆ AbstractIjkGridRepresentation() [2/3]

resqml2::AbstractIjkGridRepresentation::AbstractIjkGridRepresentation ( resqml2 ::AbstractFeatureInterpretation * interp,
const std::string & guid,
const std::string & title,
unsigned int iCount,
unsigned int jCount,
unsigned int kCount,
bool * kGaps = nullptr,
eml2 ::AbstractHdfProxy * proxy = nullptr )

Constructor of an IJK grid representation with a link to an interpretation.

Exceptions
std::invalid_argumentIf interp is nullptr.
Parameters
[in]interpThe interpretation this IJK grid represents. It cannot be null.
guidThe guid to set to the ijk grid with no geometry representation. If empty then a new guid will be generated.
titleThe title to set to the ijk grid with no geometry representation. If empty then "unknown" title will be set.
iCountCount of cells in the I direction in the grid.
jCountCount of cells in the J direction in the grid.
kCountNumber of layers in the grid.
kGaps(Optional) Boolean array of length KCellCount-1. TRUE if there is a gap after the corresponding layer. Won't be freed by FESAPI.
[in]proxy(Optional) The HDF proxy for writing the enabledCells values. If nullptr (default), then the default HDF proxy will be used.

◆ AbstractIjkGridRepresentation() [3/3]

resqml2::AbstractIjkGridRepresentation::AbstractIjkGridRepresentation ( gsoap_resqml2_0_1::eml20__DataObjectReference * partialObject,
bool withTruncatedPillars = false )
explicit

Constructor of a truncated IJK grid representation without link to an interpretation.

Exceptions
std::invalid_argumentIf repo is nullptr.
Parameters
[in,out]repoA repository which will manage the memory of this instance. It cannot be null.
guidThe guid to set to the ijk grid with no geometry representation. If empty then a new guid will be generated.
titleThe title to set to the ijk grid with no geometry representation. If empty then "unknown" title will be set.
iCountCount of cells in the i-direction in the grid.
jCountCount of cells in the j-direction in the grid.
kCountNumber of layers in the grid.
truncationNodeCountNumber of additional nodes required for the truncation construction.
truncationFaceCountNumber of additional faces required for the split and truncation construction. The construction does not modify existing face definitions, but instead uses these new faces to redefine the truncated cell geometry.
truncationCellCountNumber of additional cells required for the truncation construction. Parent cells are replaced. Constructor of truncated IJK grid representation with a link to an interpretation.
Exceptions
std::invalid_argumentIf interp is nullptr.
Parameters
[in]interpThe interpretation this IJK grid represents. It cannot be null.
guidThe guid to set to the ijk grid with no geometry representation. If empty then a new guid will be generated.
titleThe title to set to the ijk grid with no geometry representation. If empty then "unknown" title will be set.
iCountCount of cells in the I direction in the grid.
jCountCount of cells in the J direction in the grid.
kCountNumber of layers in the grid.
withTruncatedPillars(Optional) True if this IJK grid has some truncated pillars, else false (default). Only to be used in partial transfer context.
[in]partialObjectIf non-nullptr, the partial object.
withTruncatedPillars(Optional) True to with truncated pillars.

◆ ~AbstractIjkGridRepresentation()

virtual resqml2::AbstractIjkGridRepresentation::~AbstractIjkGridRepresentation ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ getBlockSplitCoordinateLineCount()

uint64_t resqml2::AbstractIjkGridRepresentation::getBlockSplitCoordinateLineCount ( ) const

Gets the split coordinate lines count within the block. Block information must be loaded thanks to loadBlockInformation().

Exceptions
std::invalid_argumentIf the block information is not loaded.
Returns
The split coordinate lines count within the block.

◆ getCellCount()

uint64_t resqml2::AbstractIjkGridRepresentation::getCellCount ( ) const
inlinefinal

Gets the total count of cells in the IJK grid.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count is strictly greater than unsigned int max.
Returns
The total count of cells in the IJK grid.

◆ getCellGeometryIsDefinedFlags()

void resqml2::AbstractIjkGridRepresentation::getCellGeometryIsDefinedFlags ( bool * cellGeometryIsDefinedFlags,
bool reverseIAxis = false,
bool reverseJAxis = false,
bool reverseKAxis = false ) const

Get the flags for each cell indicating if its geometry is defined or not (i.e. meaning that at least one of the coordinates of at least one of the cell vertex is NaN). Do not mix this flag with the active one : http://docs.energistics.org/#RESQML/RESQML_TOPICS/RESQML-000-289-0-C-sv2010.html

Exceptions
std::invalid_argumentIf this grid has no geometry or no CellGeometryIsDefined flags.
std::invalid_argumentIf the CellGeometryIsDefined flags are neither stored in an HDF5 boolean array nor in a boolean constant array.
Parameters
[out]cellGeometryIsDefinedFlagsAn array for receiving the CellGeometryIsDefined flags. It must have a count of getCellCount() and must follow the index ordering I then J then K. It won't be free. A zero value in cellGeometryIsDefinedFlags means that the corresponding cell geometry is not defined. A non zero value means that the corresponding cell geometry is defined.
reverseIAxis(Optional) True to reverse i axis. Default value is false.
reverseJAxis(Optional) True to reverse j axis. Default value is false.
reverseKAxis(Optional) True to reverse k axis. Default value is false.

◆ getColumnCount()

unsigned int resqml2::AbstractIjkGridRepresentation::getColumnCount ( ) const
inline

Gets the count of columns in this grid.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I or J direction is strictly greater than unsigned int max.
Returns
The column count.

◆ getColumnCountOfSplitCoordinateLines()

void resqml2::AbstractIjkGridRepresentation::getColumnCountOfSplitCoordinateLines ( unsigned int * columnIndexCountPerSplitCoordinateLine) const

Gets the cumulative count of columns impacted by all the split coordinate lines. The order of the cumulative count values corresponds to the order of the split coordinates lines.

Exceptions
std::invalid_argumentIf the HDF proxy is missing.
std::invalid_argumentIf there is no geometry or no split coordinate line in this grid.
std::logic_errorIf the cumulative count of the columns impacted by the split coordinate lines are not stored within an HDF5 integer array.
Parameters
[out]columnIndexCountPerSplitCoordinateLineAn array for receiving the cumulative count of columns impacted by the split coordinate lines.

◆ getColumnsOfSplitCoordinateLines()

void resqml2::AbstractIjkGridRepresentation::getColumnsOfSplitCoordinateLines ( unsigned int * columnIndices,
bool reverseIAxis = false,
bool reverseJAxis = false ) const

Gets all the columns impacted by all the split coordinate lines. The order of the columns corresponds to the order of the split coordinate lines.

Exceptions
std::invalid_argumentIf the HDF proxy is missing.
std::invalid_argumentIf there is no geometry or no split coordinate line in this grid.
std::logic_errorIf the indices of the columns impacted by the split coordinate lines are not stored within an HDF5 integer array.
Parameters
[out]columnIndicesAn array for receiving the indices of the columns impacted by the split coordinate lines. It must be preallocated with a size equal to the last value of the array outputted from getColumnCountOfSplitCoordinateLines().
reverseIAxis(Optional) True to reverse i axis. Default value is false.
reverseJAxis(Optional) True to reverse j axis. Default value is false.

◆ getFaceCount()

uint64_t resqml2::AbstractIjkGridRepresentation::getFaceCount ( ) const

Gets the count of faces in this grid. This method requires you have already loaded the split information thanks to loadSplitInformation().

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I, J or K direction is strictly greater than unsigned int max.
std::invalid_argumentIf there is no geometry on this grid.
Returns
The face count.

◆ getGeometryKind()

virtual geometryKind resqml2::AbstractIjkGridRepresentation::getGeometryKind ( ) const
inlinevirtual

Gets the geometry kind of this IJK grid.

Returns
The geometry kind of this IJK grid.

Reimplemented in resqml2::IjkGridExplicitRepresentation, resqml2::IjkGridLatticeRepresentation, resqml2::IjkGridNoGeometryRepresentation, and resqml2::IjkGridParametricRepresentation.

◆ getGlobalIndexCellFromIjkIndex()

unsigned int resqml2::AbstractIjkGridRepresentation::getGlobalIndexCellFromIjkIndex ( unsigned int iCell,
unsigned int jCell,
unsigned int kCell ) const

Gets the global index of a cell from its I, J and K indices in the grid.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I, J or K direction is strictly greater than unsigned int max.
std::out_of_rangeIf iCell is greater than or equal to getICellCount().
std::out_of_rangeIf jCell is greater than or equal to getJCellCount().
std::out_of_rangeIf kCell is greater than or equal to getKCellCount().
Parameters
iCellThe I index of the cell.
jCellThe J index of the cell.
kCellThe K index of the cell.
Returns
The global index of the cell.

◆ getGlobalIndexColumnFromIjIndex()

unsigned int resqml2::AbstractIjkGridRepresentation::getGlobalIndexColumnFromIjIndex ( unsigned int iColumn,
unsigned int jColumn ) const

Gets the global index of a column from its I and J indices in the grid. The global (or linearized) index of a given column is i column + j column * (nI cell) where i column and j column are respectively the I and J indices of the column and nI cell is the count of cells in the I direction.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I or J direction is strictly greater than unsigned int max.
std::out_of_rangeIf iColumn is greater than or equal to getICellCount().
std::out_of_rangeIf jColumn is greater than or equal to getJCellCount().
Parameters
iColumnThe I index of the column.
jColumnThe J index of the column.
Returns
The global index of the column.

◆ getGlobalIndexPillarFromIjIndex()

unsigned int resqml2::AbstractIjkGridRepresentation::getGlobalIndexPillarFromIjIndex ( unsigned int iPillar,
unsigned int jPillar ) const

Gets the global index of a pillar from its I and J indices in the grid. The global (or linearized) index of a given pillar is i pillar + j pillar * (nI pillar) where i pillar and j pillar are respectively the I and J indices of the pillar and nI pillar is the count of pillars in the I direction.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I or J direction is strictly greater than unsigned int max.
std::out_of_rangeIf iPillar is strictly greater than getICellCount().
std::out_of_rangeIf jPillar is strictly greater than getJCellCount().
Parameters
iPillarThe I index of the pillar.
jPillarThe J index of the pillar.
Returns
The global index of the pillar.

◆ getICellCount()

unsigned int resqml2::AbstractIjkGridRepresentation::getICellCount ( ) const

Gets the count of cells in the I direction.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count is strictly greater than unsigned int max.
Returns
The count of cell in the I direction.

◆ getIColumnFromGlobalIndex()

unsigned int resqml2::AbstractIjkGridRepresentation::getIColumnFromGlobalIndex ( unsigned int globalIndex) const

Gets the I index of a column from its global index in the grid. The global (or linearized) index of a given column is i column + j column * (nI cell) where i column and j column are respectively the I and J indices of the column and nI cell is the count of cells in the I direction.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I or J direction is strictly greater than unsigned int max.
std::out_of_rangeIf globalIndex is out of range (greater than or equal to getColumnCount()).
Parameters
globalIndexThe global index of the column for which we want to get the I index.
Returns
The I index of the column.

◆ getIPillarFromGlobalIndex()

unsigned int resqml2::AbstractIjkGridRepresentation::getIPillarFromGlobalIndex ( unsigned int globalIndex) const

Gets the I index of a pillar from its global index in this grid. The global (or linearized) index of a given pillar is i pillar + j pillar * (nI pillar) where i pillar and j pillar are respectively the I and J indices of the pillar and nI pillar is the count of pillars in the I direction.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I or J direction is strictly greater than unsigned int max.
std::out_of_rangeIf globalIndex is out of range (greater than or equal to getPillarCount()).
Parameters
globalIndexThe global index of the pillar for which we want to get the I index.
Returns
The I index of the pillar.

◆ getJCellCount()

unsigned int resqml2::AbstractIjkGridRepresentation::getJCellCount ( ) const

Gets the count of cells in the J direction.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count is strictly greater than unsigned int max.
Returns
The count of cell in the J direction.

◆ getJColumnFromGlobalIndex()

unsigned int resqml2::AbstractIjkGridRepresentation::getJColumnFromGlobalIndex ( unsigned int globalIndex) const

Gets the J index of a column from its global index in the grid. The global (or linearized) index of a given column is i column + j column * (nI cell) where i column and j column are respectively the I and J indices of the column and nI cell is the count of cells in the I direction.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I or J direction is strictly greater than unsigned int max.
std::out_of_rangeIf globalIndex is out of range (greater than or equal to getColumnCount()).
Parameters
globalIndexThe global index of the column for which we want to get the J index.
Returns
The J index of the column.

◆ getJPillarFromGlobalIndex()

unsigned int resqml2::AbstractIjkGridRepresentation::getJPillarFromGlobalIndex ( unsigned int globalIndex) const

Gets the J index of a pillar from its global index in this grid. The global (or linearized) index of a given pillar is i pillar + j pillar * (nI pillar) where i pillar and j pillar are respectively the I and J indices of the pillar and nI pillar is the count of pillars in the I direction.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I or J direction is strictly greater than unsigned int max.
std::out_of_rangeIf globalIndex is out of range (greater than or equal to getPillarCount()).
Parameters
globalIndexThe global index of the pillar for which we want to get the J index.
Returns
The J index of the pillar.

◆ getKGaps()

void resqml2::AbstractIjkGridRepresentation::getKGaps ( bool * kGaps) const

For each K Layer except the last one, indicate wether there is a layer or not after it.

Parameters
[out]kGapsAn array for receiving the information about kGaps. It must have a count of getKCellCount() - 1. It won't be free. A false value in kGaps means that the corresponding k layer has no gaps just after it. A true value means that the corresponding k layer has a gap just after it.

◆ getKGapsCount()

uint64_t resqml2::AbstractIjkGridRepresentation::getKGapsCount ( ) const

Gets the count of K layer gaps in this grid.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I or J direction is strictly greater than unsigned int max.
Returns
The K Layer gaps count.

◆ getPillarCount()

unsigned int resqml2::AbstractIjkGridRepresentation::getPillarCount ( ) const
inline

Gets the count of pillars in this grid.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I or J direction is strictly greater than unsigned int max.
Returns
The pillar count.

◆ getPillarGeometryIsDefined()

void resqml2::AbstractIjkGridRepresentation::getPillarGeometryIsDefined ( bool * pillarGeometryIsDefined,
bool reverseIAxis = false,
bool reverseJAxis = false ) const

Tells for each pillar if its geometry is defined. This method only looks at the corresponding PillarGeometryIsDefined attribute in the gSOAP proxy.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I or J direction is strictly greater than unsigned int max.
std::invalid_argumentIf there is no geometry on this IJK grid.
std::invalid_argumentIf the values indicating for each pillar if its geometry is defined are neither stored in an HDF5 boolean array nor in a boolean constant array.
Parameters
[out]pillarGeometryIsDefinedAn array for receiving a boolean value for each pillar indicating if its geometry is defined or not. It must be preallocated with a size of getPillarCount().
reverseIAxis(Optional) True to reverse i axis. Default value is false.
reverseJAxis(Optional) True to reverse j axis. Default value is false.

◆ getPillarsOfSplitCoordinateLines()

void resqml2::AbstractIjkGridRepresentation::getPillarsOfSplitCoordinateLines ( unsigned int * pillarIndices,
bool reverseIAxis = false,
bool reverseJAxis = false ) const

Gets all the pillars which correspond to all split coordinate lines. The order of the pillars corresponds to the order of the split coordinate lines.

Exceptions
std::invalid_argumentIf the HDF proxy is missing.
std::invalid_argumentIf there is no geometry or no split coordinate line in this grid.
std::logic_errorIf the indices of the pillars corresponding to the split coordinate lines are not stored within an HDF5 integer array.
Parameters
[out]pillarIndicesAn array for receiving the indices of the pillars corresponding to the split coordinate lines. It must be preallocated with a size of getSplitCoordinateLineCount().
reverseIAxis(Optional) True to reverse I axis. Default value is false.
reverseJAxis(Optional) True to reverse J axis. Default value is false.

◆ getSplitCoordinateLineCount()

uint64_t resqml2::AbstractIjkGridRepresentation::getSplitCoordinateLineCount ( ) const

Gets the split coordinate lines count.

Exceptions
std::invalid_argumentIf there is no geometry on this IJK grid.
std::range_errorIf the count of split coordinate lines is strictly greater than unsigned int max.
Returns
The split coordinate lines count.

◆ getSplitNodeCount()

uint64_t resqml2::AbstractIjkGridRepresentation::getSplitNodeCount ( ) const

Gets the split nodes count.

Exceptions
std::invalid_argumentIf there is no geometry on this IJK grid.
Returns
The split nodes count.

◆ getXmlNamespace()

virtual std::string resqml2::AbstractIjkGridRepresentation::getXmlNamespace ( ) const
inlineoverridevirtual

Get the standard XML namespace for serializing this data object.

◆ getXyzPointCountOfBlock()

uint64_t resqml2::AbstractIjkGridRepresentation::getXyzPointCountOfBlock ( ) const

Gets the XYZ points count of the current block. Block information must be loaded.

Exceptions
std::invalid_argumentIf the block information is not loaded.
Returns
The XYZ point count of the current block.

◆ getXyzPointCountOfKInterface()

uint64_t resqml2::AbstractIjkGridRepresentation::getXyzPointCountOfKInterface ( ) const

Get the XYZ points count in each K layer interface.

Exceptions
std::logic_errorIf this grid is partial.
std::range_errorIf the count of cells in I or J direction is strictly greater than unsigned int max.
std::invalid_argumentIf there is no geometry on this IJK grid.
std::range_errorIf the count of split coordinate lines is strictly greater than unsigned int max.
Returns
The XYZ point count of each K layer interface.

◆ getXyzPointCountOfPatch()

virtual uint64_t resqml2::AbstractIjkGridRepresentation::getXyzPointCountOfPatch ( unsigned int patchIndex) const
overridevirtual

◆ getXyzPointIndexFromCellCorner()

uint64_t resqml2::AbstractIjkGridRepresentation::getXyzPointIndexFromCellCorner ( unsigned int iCell,
unsigned int jCell,
unsigned int kCell,
unsigned int corner ) const

Gets the XYZ point index in the HDF dataset from the corner of a cell. This method requires that you have already loaded the split information.

Exceptions
std::logic_errorIf this grid is partial.
std::invalid_argumentIf the split information is not loaded.
std::out_of_rangeIf iCell > getICellCount(), jCell > getJCellCount() or kCell > getKCellCount().
std::out_of_rangeIf corner > 7.
Parameters
iCellThe I index of the cell.
jCellThe J index of the cell.
kCellThe K index of the cell.
cornerIndex of the corner: 0 for (0,0,0); 1 for (1,0,0); 2 for (1,1,0); 3 for (0,1, 0); 4 for (0,0,1); 5 for (1,0,1); 6 for (1,1,1); 7 for (0,1,1).
Returns
The index of the XYZ point in the HDF dataset corresponding to the corner of the cell. Keep in mind to multiply the result by 3 to get the X index since the points are triplet of values.

◆ getXyzPointOfBlockFromCellCorner()

void resqml2::AbstractIjkGridRepresentation::getXyzPointOfBlockFromCellCorner ( unsigned int iCell,
unsigned int jCell,
unsigned int kCell,
unsigned int corner,
const double * xyzPoints,
double & x,
double & y,
double & z ) const

Gets the x, y and z values of the corner of a cell of a given block. This method requires that you have already both loaded the block information and get the geometry of the block thanks to getXyzPointsOfBlock().

Exceptions
std::logic_errorIf this grid is partial.
std::invalid_argumentIf the split or block information is not loaded.
std::out_of_rangeIf iCell > getICellCount(), jCell > getJCellCount() or kCell > getKCellCount().
std::out_of_rangeIf corner > 7.
Parameters
iCellThe I index of the cell.
jCellThe J index of the cell.
kCellThe K index of the cell.
cornerIndex of the corner: 0 for (0,0,0); 1 for (1,0,0); 2 for (1,1,0); 3 for (0,1,0); 4 for (0,0,1); 5 for (1,0,1); 6 for (1,1,1); 7 for (0,1, 1).
xyzPointsThe XYZ points of the block (resulting from a call to getXyzPointsOfBlock()).
[out]xThe x value of the corner we look for.
[out]yThe y value of the corner we look for.
[out]zThe z value of the corner we look for.

◆ getXyzPointsOfBlock()

virtual void resqml2::AbstractIjkGridRepresentation::getXyzPointsOfBlock ( double * xyzPoints)
virtual

Gets all the XYZ points of the current block. XYZ points are given in the local CRS. Block information must be loaded.

Exceptions
std::invalid_argumentIf the block information is not loaded.
std::invalid_argumentIf xyzPoints is nullptr.
Parameters
[out]xyzPointsA linearized 2d array where the first (quickest) dimension is coordinate dimension (XYZ) and second dimension is vertex dimension. It must be pre allocated with a size of 3 * getXyzPointCountOfBlock().

Reimplemented in resqml2::IjkGridParametricRepresentation, and resqml2::IjkGridExplicitRepresentation.

◆ getXyzPointsOfKInterfaceSequence()

virtual void resqml2::AbstractIjkGridRepresentation::getXyzPointsOfKInterfaceSequence ( unsigned int kInterfaceStart,
unsigned int kInterfaceEnd,
double * xyzPoints )
virtual

Gets all the XYZ points of a particular sequence of K interfaces. XYZ points are given in the local CRS.

Exceptions
std::out_of_rangeIf kInterfaceStart > getKCellCount() or kInterfaceEnd > getKCellCount() + getKGapsCount().
std::range_errorIf kInterfaceStart > kInterfaceEnd.
std::invalid_argumentIf xyzPoints is nullptr.
Parameters
kInterfaceStartThe K index of the starting interface taken from zero to getKCellCount().
kInterfaceEndThe K index of the ending interface taken from zero to getKCellCount() + getKGapsCount().
[out]xyzPointsA linearized 2d array where the first (quickest) dimension is coordinate dimension (XYZ) and second dimension is vertex dimension. It must be preallocated with a size of 3 * getXyzPointCountOfKInterface() * (kInterfaceEnd - kInterfaceStart + 1).

Reimplemented in resqml2::IjkGridParametricRepresentation, and resqml2::IjkGridExplicitRepresentation.

◆ getXyzPointsOfPatch()

virtual void resqml2::AbstractIjkGridRepresentation::getXyzPointsOfPatch ( unsigned int patchIndex,
double * xyzPoints ) const
overridevirtual

Gets all the xyz points of a particular patch of this representation. xyz points are given in the local CRS.

Exceptions
std::out_of_rangeIf patchIndex >= getPatchCount().
Parameters
patchIndexThe index of the patch.
xyzPointsxyz double triplets ordered by i then j then split then k. It must be preallocated with a count of ((iCellCount+1) * (jCellCount+1) + splitCoordinateLineCount) * kCellCount.

Reimplemented in resqml2::IjkGridLatticeRepresentation, and resqml2::IjkGridNoGeometryRepresentation.

◆ hasCellGeometryIsDefinedFlags()

bool resqml2::AbstractIjkGridRepresentation::hasCellGeometryIsDefinedFlags ( ) const

Indicates if this grid contains a flag on each cell indicating if its geometry is defined or not (i.e. meaning that at least one of the coordinates of at least one of the cell vertex is NaN). Do not mix this flag with the active one : http://docs.energistics.org/#RESQML/RESQML_TOPICS/RESQML-000-289-0-C-sv2010.html

Returns
True if this grid contains a flag on each cell indicating if its geometry is defined or not, false if not.

◆ isColumnEdgeSplitted()

bool resqml2::AbstractIjkGridRepresentation::isColumnEdgeSplitted ( unsigned int iColumn,
unsigned int jColumn,
unsigned int edge ) const

Checks either a given column edge is splitted or not. This method requires that you have already loaded the split information.

Exceptions
std::logic_errorIf this grid is partial.
std::invalid_argumentIf the split information is not loaded.
std::out_of_rangeIf iColumn is strictly greater than getICellCount().
std::out_of_rangeIf iColumn is strictly greater than getJCellCount().
std::out_of_rangeIf edge is strictly greater than 3.
Parameters
iColumnThe I index of the column.
jColumnThe J index of the column.
edge0 for edge from i to i+1, lower j connection; 1 for edge from j to j+1, upper i connection; 2 for edge from i+1 to i, upper j connection; 3 for edge from j+1 to j, lower i connection.
Returns
True if the column edge is splitted, false if not.

◆ isNodeGeometryCompressed()

virtual bool resqml2::AbstractIjkGridRepresentation::isNodeGeometryCompressed ( ) const
inlinevirtual

Checks whether the node geometry dataset is compressed or not.

Exceptions
std::invalid_argumentIf this grid has no geometry.
Returns
True if the node geometry dataset is compressed, false if not.

Reimplemented in resqml2::IjkGridExplicitRepresentation, and resqml2::IjkGridParametricRepresentation.

◆ isRightHanded()

bool resqml2::AbstractIjkGridRepresentation::isRightHanded ( ) const

Queries if this grid is right handed, as determined by the triple product of tangent vectors in the I, J, and K directions.

Exceptions
std::logic_errorIf this grid has no geometry. Or, if it is in an unrecognized version of RESQML.
Returns
True if this grid is right handed, false if it is not.

◆ loadBlockInformation()

void resqml2::AbstractIjkGridRepresentation::loadBlockInformation ( unsigned int iInterfaceStart,
unsigned int iInterfaceEnd,
unsigned int jInterfaceStart,
unsigned int jInterfaceEnd,
unsigned int kInterfaceStart,
unsigned int kInterfaceEnd )

Loads the block information into memory to speed up the processes and make easier block geometry handling for the user. This method requires that you have already loaded the split information.

Exceptions
std::logic_errorIf this grid is partial.
std::invalid_argumentIf the split information is not loaded.
std::out_of_rangeIf iInterfaceEnd > getICellCount(), jInterfaceEnd > getJCellCount() or kInterfaceEnd > getKCellCount() + getKGapsCount().
std::range_errorIf iInterfaceStart > iInterfaceEnd, jInterfaceStart > jInterfaceEnd or kInterfaceStart > kInterfaceEnd.
Parameters
iInterfaceStartThe starting I interface index of the block taken from zero to getICellCount().
iInterfaceEndThe ending I interface index of the block taken from zero to getICellCount().
jInterfaceStartThe starting J interface index of the block taken from zero to getJCellCount().
jInterfaceEndThe ending J interface index of the block taken from zero to getJCellCount().
kInterfaceStartThe starting K interface index of the block taken from zero to getKCellCount() + getKGapsCount().
kInterfaceEndThe ending K interface index of the block taken from zero to getKCellCount().

◆ loadSplitInformation()

void resqml2::AbstractIjkGridRepresentation::loadSplitInformation ( )

Loads the split information into memory to speed up processes. Be aware that you must unload by yourself this memory thanks to unloadSplitInformation().

◆ setAllCellGeometryFlagsToDefined()

void resqml2::AbstractIjkGridRepresentation::setAllCellGeometryFlagsToDefined ( )

Set to "defined" the flags for each cell indicating if its geometry is defined or not (i.e. meaning that at least one of the coordinates of at least one of the cell vertex is NaN). Do not mix this flag with the active one : http://docs.energistics.org/#RESQML/RESQML_TOPICS/RESQML-000-289-0-C-sv2010.html

◆ setCellGeometryIsDefinedFlags()

void resqml2::AbstractIjkGridRepresentation::setCellGeometryIsDefinedFlags ( uint8_t * cellGeometryIsDefinedFlags,
eml2 ::AbstractHdfProxy * proxy = nullptr )

Sets the flags for each cell indicating if its geometry is defined or not (i.e. meaning that at least one of the coordinates of at least one of the cell vertex is NaN). Do not mix this flag with the active one : http://docs.energistics.org/#RESQML/RESQML_TOPICS/RESQML-000-289-0-C-sv2010.html

Exceptions
std::invalid_argumentIf proxy is nullptr and no default HDF proxy is defined in the repository.
std::invalid_argumentIf this grid has no geometry.
Parameters
[in]cellGeometryIsDefinedFlagsAn array containing the CellGeometryIsDefined flags. It must have a count of getCellCount() and must follow the index ordering I then J then K. A zero value in cellGeometryIsDefinedFlags means that the corresponding cell geometry is not defined. A non zero value means that the corresponding cell geometry is defined.
[in]proxy(Optional) The HDF proxy for writing the cellGeometryIsDefinedFlags values. If nullptr (default), then the default HDF proxy will be used.

◆ setICellCount()

void resqml2::AbstractIjkGridRepresentation::setICellCount ( unsigned int iCount)

Sets the count of cells in the I direction.

Exceptions
std::logic_errorIf this grid is partial.
Parameters
iCountThe count of cells to set in the I direction.

◆ setJCellCount()

void resqml2::AbstractIjkGridRepresentation::setJCellCount ( unsigned int jCount)

Sets the count of cells in the J direction.

Exceptions
std::logic_errorIf this grid is partial.
Parameters
jCountThe count of cells to set in the J direction.

◆ unloadSplitInformation()

void resqml2::AbstractIjkGridRepresentation::unloadSplitInformation ( )

Unloads the split information from memory.

Member Data Documentation

◆ XML_TAG

constexpr char const* resqml2::AbstractIjkGridRepresentation::XML_TAG = "IjkGridRepresentation"
staticconstexpr

The standard XML tag without XML namespace for serializing this data object.

◆ XML_TAG_TRUNCATED

constexpr char const* resqml2::AbstractIjkGridRepresentation::XML_TAG_TRUNCATED = "TruncatedIjkGridRepresentation"
staticconstexpr

The standard XML tag without XML namespace for serializing this data object if truncated.


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