Fesapi
2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
|
Unstructured grid representation characterized by a cell count, and potentially nothing else. Both the oldest and newest simulation formats are based on this format. More...
#include <UnstructuredGridRepresentation.h>
Public Member Functions | |
UnstructuredGridRepresentation (gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject) | |
UnstructuredGridRepresentation () | |
UnstructuredGridRepresentation (gsoap_resqml2_0_1::_resqml20__UnstructuredGridRepresentation *fromGsoap) | |
UnstructuredGridRepresentation (gsoap_eml2_3::_resqml22__UnstructuredGridRepresentation *fromGsoap) | |
virtual | ~UnstructuredGridRepresentation ()=default |
virtual bool | hasGeometry () const =0 |
uint64_t | getXyzPointCountOfPatch (unsigned int patchIndex) const final |
virtual void | getFaceIndicesOfCells (uint64_t *faceIndices) const =0 |
virtual void | getCumulativeFaceCountPerCell (uint64_t *cumulativeFaceCountPerCell_) const =0 |
uint64_t const * | getCumulativeFaceCountPerCell () const |
void | getFaceCountPerCell (uint64_t *faceCountPerCell) const |
virtual bool | isFaceCountOfCellsConstant () const =0 |
virtual unsigned int | getConstantFaceCountOfCells () const =0 |
virtual void | getNodeIndicesOfFaces (uint64_t *nodeIndices) const =0 |
virtual void | getCumulativeNodeCountPerFace (uint64_t *nodeCountPerFace) const =0 |
void | getNodeCountPerFace (uint64_t *nodeCountPerFace) const |
virtual bool | isNodeCountOfFacesConstant () const =0 |
virtual unsigned int | getConstantNodeCountOfFaces () const =0 |
void | loadGeometry () |
void | unloadGeometry () |
unsigned int | getFaceCountOfCell (uint64_t cellIndex) const |
unsigned int | getNodeCountOfFaceOfCell (uint64_t cellIndex, unsigned int localFaceIndex) const |
uint64_t const * | getNodeIndicesOfFaceOfCell (uint64_t cellIndex, unsigned int localFaceIndex) const |
virtual uint64_t | getCellCount () const override=0 |
virtual uint64_t | getFaceCount () const =0 |
virtual uint64_t | getNodeCount () const =0 |
virtual void | getCellFaceIsRightHanded (unsigned char *cellFaceIsRightHanded) const =0 |
virtual void | setGeometryUsingExistingDatasets (const std::string &cellFaceIsRightHanded, const std::string &points, uint64_t pointCount, eml2::AbstractHdfProxy *proxy, const std::string &faceIndicesPerCell, const std::string &faceIndicesCumulativeCountPerCell, uint64_t faceCount, const std::string &nodeIndicesPerFace, const std::string &nodeIndicesCumulativeCountPerFace, gsoap_resqml2_0_1::resqml20__CellShape cellShape, resqml2::AbstractLocal3dCrs *localCrs=nullptr)=0 |
void | setGeometry (unsigned char *cellFaceIsRightHanded, double *points, uint64_t pointCount, eml2::AbstractHdfProxy *proxy, uint64_t *faceIndicesPerCell, uint64_t *faceIndicesCumulativeCountPerCell, uint64_t faceCount, uint64_t *nodeIndicesPerFace, uint64_t *nodeIndicesCumulativeCountPerFace, gsoap_resqml2_0_1::resqml20__CellShape cellShape, resqml2::AbstractLocal3dCrs *localCrs=nullptr) |
void | setTetrahedraOnlyGeometryUsingExistingDatasets (const std::string &cellFaceIsRightHanded, const std::string &points, uint64_t pointCount, uint64_t faceCount, eml2::AbstractHdfProxy *proxy, const std::string &faceIndicesPerCell, const std::string &nodeIndicesPerFace, resqml2::AbstractLocal3dCrs *localCrs=nullptr) |
Sets a geometry which is only defined by means of tetrahedra using some existing HDF5 dataset. More... | |
void | setTetrahedraOnlyGeometry (unsigned char *cellFaceIsRightHanded, double *points, uint64_t pointCount, uint64_t faceCount, eml2::AbstractHdfProxy *proxy, uint64_t *faceIndicesPerCell, uint64_t *nodeIndicesPerFace, resqml2::AbstractLocal3dCrs *localCrs=nullptr) |
Sets a geometry which is only defined by means of tetrahedra and creates corresponding HDF5 datasets. More... | |
void | setHexahedraOnlyGeometryUsingExistingDatasets (const std::string &cellFaceIsRightHanded, const std::string &points, uint64_t pointCount, uint64_t faceCount, eml2::AbstractHdfProxy *proxy, const std::string &faceIndicesPerCell, const std::string &nodeIndicesPerFace, resqml2::AbstractLocal3dCrs *localCrs=nullptr) |
void | setHexahedraOnlyGeometry (unsigned char *cellFaceIsRightHanded, double *points, uint64_t pointCount, uint64_t faceCount, eml2::AbstractHdfProxy *proxy, uint64_t *faceIndicesPerCell, uint64_t *nodeIndicesPerFace, resqml2::AbstractLocal3dCrs *localCrs=nullptr) |
unsigned int | getPatchCount () const final |
virtual std::string | getXmlTag () const final |
Public Member Functions inherited from resqml2::AbstractGridRepresentation | |
virtual | ~AbstractGridRepresentation ()=default |
std::vector< class GridConnectionSetRepresentation * > | getGridConnectionSetRepresentationSet () const |
unsigned int | getGridConnectionSetRepresentationCount () const |
class GridConnectionSetRepresentation * | getGridConnectionSetRepresentation (unsigned int index) const |
AbstractGridRepresentation * | getParentGrid () const |
common::DataObjectReference | getParentGridDor () const |
std::vector< resqml2::AbstractGridRepresentation * > | getChildGridSet () const |
unsigned int | getChildGridCount () const |
AbstractGridRepresentation * | getChildGrid (unsigned int index) const |
void | setParentWindow (uint64_t *cellIndices, uint64_t cellIndexCount, class UnstructuredGridRepresentation *parentGrid, eml2::AbstractHdfProxy *proxy=nullptr) |
void | setParentWindow (unsigned int *columnIndices, unsigned int columnIndexCount, unsigned int kLayerIndexRegridStart, unsigned int *childCellCountPerInterval, unsigned int *parentCellCountPerInterval, unsigned int intervalCount, class AbstractColumnLayerGridRepresentation *parentGrid, eml2::AbstractHdfProxy *proxy=nullptr, double *childCellWeights=nullptr) |
void | setParentWindow (unsigned int iCellIndexRegridStart, unsigned int *childCellCountPerIInterval, unsigned int *parentCellCountPerIInterval, unsigned int iIntervalCount, unsigned int jCellIndexRegridStart, unsigned int *childCellCountPerJInterval, unsigned int *parentCellCountPerJInterval, unsigned int jIntervalCount, unsigned int kCellIndexRegridStart, unsigned int *childCellCountPerKInterval, unsigned int *parentCellCountPerKInterval, unsigned int kIntervalCount, class AbstractIjkGridRepresentation *parentGrid, eml2::AbstractHdfProxy *proxy=nullptr, double *iChildCellWeights=nullptr, double *jChildCellWeights=nullptr, double *kChildCellWeights=nullptr) |
void | setParentWindow (unsigned int iCellIndexRegridStart, unsigned int constantChildCellCountPerIInterval, unsigned int constantParentCellCountPerIInterval, unsigned int iIntervalCount, unsigned int jCellIndexRegridStart, unsigned int constantChildCellCountPerJInterval, unsigned int constantParentCellCountPerJInterval, unsigned int jIntervalCount, unsigned int kCellIndexRegridStart, unsigned int constantChildCellCountPerKInterval, unsigned int constantParentCellCountPerKInterval, unsigned int kIntervalCount, class AbstractIjkGridRepresentation *parentGrid, eml2::AbstractHdfProxy *proxy=nullptr, double *iChildCellWeights=nullptr, double *jChildCellWeights=nullptr, double *kChildCellWeights=nullptr) |
Indicates that this grid takes place into another IJK parent grid. This method assumes that the count of cells per regrid interval is constant in both child and parent grids. More... | |
void | setParentWindow (unsigned int iCellIndexRegridStart, unsigned int iChildCellCount, unsigned int iParentCellCount, unsigned int jCellIndexRegridStart, unsigned int jChildCellCount, unsigned int jParentCellCount, unsigned int kCellIndexRegridStart, unsigned int kChildCellCount, unsigned int kParentCellCount, class AbstractIjkGridRepresentation *parentGrid, eml2::AbstractHdfProxy *proxy=nullptr, double *iChildCellWeights=nullptr, double *jChildCellWeights=nullptr, double *kChildCellWeights=nullptr) |
void | setForcedNonRegridedParentCell (uint64_t *cellIndices, uint64_t cellIndexCount) |
void | setCellOverlap (uint64_t parentChildCellPairCount, uint64_t *parentChildCellPair, const std::string &volumeUom, double *overlapVolumes=nullptr) |
int64_t | getParentCellIndexCount () const |
void | getParentCellIndices (uint64_t *parentCellIndices) const |
int64_t | getParentColumnIndexCount () const |
void | getParentColumnIndices (uint64_t *parentColumnIndices) const |
uint64_t | getRegridStartIndexOnParentGrid (char dimension) const |
uint64_t | getRegridIntervalCount (char dimension) const |
bool | isRegridCellCountPerIntervalConstant (char dimension, bool childVsParentCellCount) const |
uint64_t | getRegridConstantCellCountPerInterval (char dimension, bool childVsParentCellCount) const |
void | getRegridCellCountPerInterval (char dimension, uint64_t *childCellCountPerInterval, bool childVsParentCellCount) const |
bool | hasRegridChildCellWeights (char dimension) const |
void | getRegridChildCellWeights (char dimension, double *childCellWeights) const |
bool | hasForcedNonRegridedParentCell () const |
void | setCellAssociationWithStratigraphicOrganizationInterpretation (uint64_t *stratiUnitIndices, uint64_t nullValue, class AbstractStratigraphicOrganizationInterpretation *stratiOrgInterp) |
class AbstractStratigraphicOrganizationInterpretation * | getStratigraphicOrganizationInterpretation () const |
virtual common::DataObjectReference | getStratigraphicOrganizationInterpretationDor () const |
bool | hasCellStratigraphicUnitIndices () const |
uint64_t | getCellStratigraphicUnitIndices (uint64_t *stratiUnitIndices) |
void | setCellAssociationWithRockFluidOrganizationInterpretation (uint64_t *rockFluidUnitIndices, uint64_t nullValue, class RockFluidOrganizationInterpretation *rockFluidOrgInterp) |
class RockFluidOrganizationInterpretation * | getRockFluidOrganizationInterpretation () const |
virtual common::DataObjectReference | getRockFluidOrganizationInterpretationDor () const |
bool | hasCellFluidPhaseUnitIndices () const |
uint64_t | getCellFluidPhaseUnitIndices (uint64_t *rockfluidUnitIndices) |
bool | isTruncated () const |
uint64_t | getTruncatedFaceCount () const |
void | getNodeIndicesOfTruncatedFaces (uint64_t *nodeIndices) const |
void | getCumulativeNodeCountPerTruncatedFace (uint64_t *nodeCountPerFace) const |
void | getNodeCountPerTruncatedFace (uint64_t *nodeCountPerFace) const |
uint64_t | getTruncatedCellCount () const |
void | getTruncatedCellIndices (uint64_t *cellIndices) const |
void | getTruncatedFaceIndicesOfTruncatedCells (uint64_t *faceIndices) const |
void | getCumulativeTruncatedFaceCountPerTruncatedCell (uint64_t *cumulativeFaceCountPerCell) const |
void | getTruncatedFaceCountPerTruncatedCell (uint64_t *faceCountPerCell) const |
void | getNonTruncatedFaceIndicesOfTruncatedCells (uint64_t *faceIndices) const |
void | getCumulativeNonTruncatedFaceCountPerTruncatedCell (uint64_t *cumulativeFaceCountPerCell) const |
void | getNonTruncatedFaceCountPerTruncatedCell (uint64_t *faceCountPerCell) const |
void | getTruncatedFaceIsRightHanded (unsigned char *cellFaceIsRightHanded) const |
void | loadTargetRelationships () |
Public Member Functions inherited from resqml2::AbstractRepresentation | |
virtual | ~AbstractRepresentation ()=default |
class AbstractLocal3dCrs * | getLocalCrs (unsigned int patchIndex) const |
virtual common::DataObjectReference | getLocalCrsDor (unsigned int patchIndex) const |
virtual common::DataObjectReference | getHdfProxyDor () const =0 |
Gets the data object reference of the HDF proxy which is used for storing the numerical values of this representation (i.e. its geometry). More... | |
std::vector< class AbstractProperty * > | getPropertySet () const |
void | setInterpretation (class AbstractFeatureInterpretation *interp) |
class AbstractFeatureInterpretation * | getInterpretation () const |
common::DataObjectReference | getInterpretationDor () const |
uint64_t | getXyzPointCountOfAllPatches () const |
virtual void | getXyzPointsOfPatch (unsigned int patchIndex, double *xyzPoints) const =0 |
Gets all the xyz points of a particular patch of this representation. xyz points are given in the local CRS. More... | |
void | getXyzPointsOfPatchInGlobalCrs (unsigned int patchIndex, double *xyzPoints) const |
Gets all the xyz points of a particular patch of this representation. xyz points are given in the global CRS. More... | |
void | getXyzPointsOfAllPatches (double *xyzPoints) const |
Gets all the xyz points of all patches of this representation. xyz points are given in the local CRS. More... | |
bool | isInSingleLocalCrs () const |
bool | isInSingleGlobalCrs () const |
void | getXyzPointsOfAllPatchesInGlobalCrs (double *xyzPoints) const |
AbstractRepresentation * | getSeismicSupportOfPatch (const unsigned int &patchIndex) const |
std::set< AbstractRepresentation * > | getAllSeismicSupport () const |
void | pushBackIntoRepresentationSet (class RepresentationSetRepresentation *repSet) |
void | addSeismic3dCoordinatesToPatch (unsigned int patchIndex, double *inlines, double *crosslines, unsigned int pointCount, resqml2::AbstractRepresentation *seismicSupport, eml2::AbstractHdfProxy *proxy) |
void | addSeismic3dCoordinatesToPatch (unsigned int patchIndex, double startInline, double incrInline, unsigned int countInline, double startCrossline, double incrCrossline, unsigned int countCrossline, resqml2::AbstractRepresentation *seismicSupport) |
void | addSeismic2dCoordinatesToPatch (unsigned int patchIndex, double *lineAbscissa, resqml2::AbstractRepresentation *seismicSupport, eml2::AbstractHdfProxy *proxy) |
void | getSeismicLineAbscissaOfPointsOfPatch (unsigned int patchIndex, double *values) const |
void | getInlinesOfPointsOfPatch (unsigned int patchIndex, double *values) const |
void | getCrosslinesOfPointsOfPatch (unsigned int patchIndex, double *values) const |
Public Member Functions inherited from common::AbstractObject | |
bool | isPartial () const |
virtual bool | isTopLevelElement () const |
std::string | getUuid () const |
std::string | getTitle () const |
std::string | getEditor () const |
time_t | getCreation () const |
tm | getCreationAsTimeStructure () const |
std::string | getOriginator () const |
std::string | getDescription () const |
time_t | getLastUpdate () const |
tm | getLastUpdateAsTimeStructure () const |
std::string | getFormat () const |
std::string | getDescriptiveKeywords () const |
std::string | getVersion () const |
void | setTitle (const std::string &title) |
void | setEditor (const std::string &editor) |
void | setCreation (time_t creation) |
void | setCreation (const tm &creation) |
void | setOriginator (const std::string &originator) |
void | setDescription (const std::string &description) |
void | setLastUpdate (time_t lastUpdate) |
void | setLastUpdate (const tm &lastUpdate) |
void | setDescriptiveKeywords (const std::string &descriptiveKeywords) |
void | setVersion (const std::string &version) |
void | setMetadata (const std::string &title, const std::string &editor, time_t creation, const std::string &originator, const std::string &description, time_t lastUpdate, const std::string &descriptiveKeywords) |
void | serializeIntoStream (std::ostream *stream) |
void | setGsoapProxy (gsoap_resqml2_0_1::eml20__AbstractCitedDataObject *gsoapProxy) |
void | setGsoapProxy (gsoap_eml2_1::eml21__AbstractObject *gsoapProxy) |
gsoap_resqml2_0_1::eml20__AbstractCitedDataObject * | getEml20GsoapProxy () const |
gsoap_eml2_1::eml21__AbstractObject * | getEml21GsoapProxy () const |
gsoap_eml2_2::eml22__AbstractObject * | getEml22GsoapProxy () const |
void | setGsoapProxy (gsoap_eml2_2::eml22__AbstractObject *gsoapProxy) |
gsoap_eml2_3::eml23__AbstractObject * | getEml23GsoapProxy () const |
void | setGsoapProxy (gsoap_eml2_3::eml23__AbstractObject *gsoapProxy) |
soap * | getGsoapContext () const |
int | getGsoapType () const |
gsoap_resqml2_0_1::eml20__DataObjectReference * | newResqmlReference () const |
gsoap_eml2_1::eml21__DataObjectReference * | newEmlReference () const |
gsoap_eml2_2::eml22__DataObjectReference * | newEml22Reference () const |
gsoap_eml2_3::eml23__DataObjectReference * | newEml23Reference () const |
gsoap_resqml2_0_1::resqml20__ContactElementReference * | newContactElementReference2_0_1 () const |
gsoap_eml2_3::resqml22__ContactElement * | newContactElementReference2_2 () const |
common::DataObjectRepository * | getRepository () const |
virtual std::string | getXmlNamespace () const =0 |
virtual std::string | getXmlNamespaceVersion () const |
virtual std::string | getContentType () const |
virtual std::string | getQualifiedType () const |
virtual std::string | getPartNameInEpcDocument () const |
std::string | serializeIntoString () |
void | addAlias (const std::string &authority, const std::string &title) |
unsigned int | getAliasCount () const |
std::string | getAliasAuthorityAtIndex (unsigned int index) const |
std::string | getAliasTitleAtIndex (unsigned int index) const |
std::vector< eml2::Activity * > | getActivitySet () const |
unsigned int | getActivityCount () const |
eml2::Activity * | getActivity (unsigned int index) const |
void | pushBackExtraMetadata (const std::string &key, const std::string &value) |
std::unordered_map< std::string, std::string > | getExtraMetadataSet () const |
std::vector< std::string > | getExtraMetadata (const std::string &key) const |
unsigned int | getExtraMetadataCount () const |
std::string | getExtraMetadataKeyAtIndex (unsigned int index) const |
std::string | getExtraMetadataStringValueAtIndex (unsigned int index) const |
Static Public Attributes | |
static const char * | XML_TAG |
Static Public Attributes inherited from resqml2::AbstractGridRepresentation | |
static const char * | XML_TAG |
Static Public Attributes inherited from resqml2::AbstractRepresentation | |
static const char * | XML_TAG |
Additional Inherited Members | |
Public Types inherited from resqml2::AbstractRepresentation | |
enum | indexableElement { NODE = 0 , EDGE = 1 , FACE = 2 , VOLUME = 3 , PILLAR = 4 } |
Public Types inherited from common::AbstractObject | |
enum | hdfDatatypeEnum { UNKNOWN = 0 , DOUBLE = 1 , FLOAT = 2 , LONG_64 = 3 , ULONG_64 = 4 , INT = 5 , UINT = 6 , SHORT = 7 , USHORT = 8 , CHAR = 9 , UCHAR = 10 } |
Static Public Member Functions inherited from common::AbstractObject | |
static void | setFormat (const std::string &vendor, const std::string &applicationName, const std::string &applicationVersionNumber) |
Unstructured grid representation characterized by a cell count, and potentially nothing else. Both the oldest and newest simulation formats are based on this format.
|
inline |
Only to be used in partial transfer context.
[in] | partialObject | If non-nullptr, the partial object. |
|
inline |
Default constructor
|
inline |
Creates an instance of this class by wrapping a gSOAP instance.
[in] | fromGsoap | If non-null, the gSOAP instance. |
|
inline |
Creates an instance of this class by wrapping a gSOAP instance.
[in] | fromGsoap | If non-null, the gSOAP instance. |
|
virtualdefault |
Destructor does nothing since the memory is managed by the gSOAP context.
Reimplemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
|
overridepure virtual |
Gets the count of (volumetric) cells in the grid.
std::range_error | If the cell count is strictly greater than unsigned int max. |
std::logic_error | If this grid is partial. |
Implements resqml2::AbstractGridRepresentation.
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
|
pure virtual |
Gets the orientation of each cell face. That is to say tells for each cell face, if its face normal defined using a right hand rule is outwardly directed.
std::logic_error | If this grid is partial. |
std::logic_error | If the geometry is not loaded. |
std::logic_error | If the data structure used to store the orientation of the cell is not already supported by fesapi. |
[out] | cellFaceIsRightHanded | Preallocated array for receiving the orientation of each cell face. The size is the last value returned by getCumulativeFaceCountPerCell(). |
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
|
pure virtual |
Gets the constant face count per cell in this unstructured grid.
std::logic_error | If the face count per cell is not constant (please check the constantness of the face count per cell with isFaceCountOfCellsConstant() before calling this method). |
std::logic_error | If this grid is partial. |
std::logic_error | If this grid has no geometry (please check the existence of a geometry thanks to hasGeometry() before calling this method). |
std::range_error | If the cumulative face count per cell is stored in an integer constant array while there is more than one cell in this grid. |
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
|
pure virtual |
Gets the constant node count per face in this unstructured grid.
std::logic_error | If the node count per face is not constant (please check the constantness of the node count per face with isNodeCountOfFacesConstant() before calling this method). |
std::logic_error | If this grid is partial. |
std::logic_error | If this grid has no geometry (please check the existence of a geometry thanks to hasGeometry() before calling this method). |
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
uint64_t const* resqml2::UnstructuredGridRepresentation::getCumulativeFaceCountPerCell | ( | ) | const |
Gets the cumulative face count per cell. This method requires you to have already loaded the geometry.
std::logic_error | If this grid has a constant count of faces per cell. |
std::logic_error | If the geometry is not loaded. |
|
pure virtual |
Gets the cumulative face count per cell. A single face count should be at least 4.
std::logic_error | If this grid is partial. |
std::logic_error | If this grid has no geometry (please check the existence of a geometry thanks to hasGeometry() before calling this method). |
std::invalid_argument | If a required HDF proxy is missing. |
std::range_error | If the cumulative face count per cell is stored in an integer constant array while there is more than one cell in this grid. |
[out] | cumulativeFaceCountPerCell_ | Preallocated array of size getCellCount() to receive the cumulative face count per cell. First value is the count of faces in the first cell. Second value is the count of faces in the first and in the second cell. Third value is the count of faces in the first and in the second and in the third cell. And so on. |
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
|
pure virtual |
Gets the cumulative node count per face. A single node count should be at least 3.
std::logic_error | If this grid is partial. |
std::logic_error | If this grid has no geometry (please check the existence of a geometry thanks to hasGeometry() before calling this method). |
std::invalid_argument | If a required HDF proxy is missing. |
std::range_error | If the cumulative node count per face is stored in a integer constant array. |
[out] | nodeCountPerFace | Preallocated array to receive the cumulative node count per face. Its size must be getFaceCount(). First value is the count of nodes in the first face. Second value is the count of nodes in the first and in the second face. Third value is the count of nodes in the first and in the second and in the third face. And so on. |
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
|
pure virtual |
Gets the face count
std::logic_error | If this grid is partial. |
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
unsigned int resqml2::UnstructuredGridRepresentation::getFaceCountOfCell | ( | uint64_t | cellIndex | ) | const |
Gets the face count of a particular cell. This method requires you to have already loaded the geometry.
std::logic_error | If this grid is partial. |
std::logic_error | If the geometry is not loaded. |
std::out_of_range | If cellIndex >= getCellCount(). |
cellIndex | Zero-based index of the cell for which we want to count the faces. |
cellIndex
. void resqml2::UnstructuredGridRepresentation::getFaceCountPerCell | ( | uint64_t * | faceCountPerCell | ) | const |
Gets the face count per cell. This method is less efficient than getCumulativeFaceCountPerCell().
std::logic_error | If this grid is partial. |
std::logic_error | If this grid has no geometry (please check the existence of a geometry thanks to hasGeometry() before calling this method). |
std::invalid_argument | If a required HDF proxy is missing. |
std::range_error | If the cumulative face count per cell is stored in an integer constant array while there is more than one cell in this grid. |
[out] | faceCountPerCell | Preallocated array of size getCellCount() to receive the face count per cell. First value is the count of faces in the first cell. Second value is the count of faces in the second cell. And so on. |
|
pure virtual |
Gets all the face indices of all the cells.
std::logic_error | If this grid is partial. |
std::logic_error | If this grid has no geometry (please check the existence of a geometry thanks to hasGeometry() before calling this method). |
std::logic_error | If the data structure used to store the face indices of the cells is not already supported by fesapi. |
std::invalid_argument | If a required HDF proxy is missing. |
[out] | faceIndices | Preallocated array to receive all the face indices of all the cells. It size must be the last value outputted by getCumulativeFaceCountPerCell(). It is ordered first by faces and then by cells. |
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
|
pure virtual |
Get the node count
std::logic_error | If this grid is partial. |
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
unsigned int resqml2::UnstructuredGridRepresentation::getNodeCountOfFaceOfCell | ( | uint64_t | cellIndex, |
unsigned int | localFaceIndex | ||
) | const |
Gets the node count of a particular face of a particular cell. This method requires you to have already loaded the geometry.
std::logic_error | If this grid is partial. |
std::logic_error | If the geometry is not loaded. |
std::out_of_range | If cellIndex >= getCellCount(). |
std::out_of_range | If localFaceIndex >= getFaceCountOfCell(cellIndex). |
cellIndex | Zero-based index of the cell for which we want to count the nodes of one face. |
localFaceIndex | Zero-based local index of the face for which we want to count the nodes. |
localFaceIndex
of the cell cellIndex
. void resqml2::UnstructuredGridRepresentation::getNodeCountPerFace | ( | uint64_t * | nodeCountPerFace | ) | const |
Gets the node count per face. This method is less efficient than getCumulativeNodeCountPerFace().
std::logic_error | If this grid is partial. |
std::logic_error | If this grid has no geometry (please check the existence of a geometry thanks to hasGeometry() before calling this method). |
std::invalid_argument | If a required HDF proxy is missing. |
std::range_error | If the cumulative node count per face is stored in a integer constant array. |
[out] | nodeCountPerFace | Preallocated array of size getFaceCount() to receive the node count per face. First value is the count of nodes in the first face. Second value is the count of nodes in the second face. And so on. |
uint64_t const* resqml2::UnstructuredGridRepresentation::getNodeIndicesOfFaceOfCell | ( | uint64_t | cellIndex, |
unsigned int | localFaceIndex | ||
) | const |
Gets all the node indices of a particular face of a particular cell. This method requires you to have already loaded the geometry.
std::logic_error | If this grid is partial. |
std::logic_error | If the geometry is not loaded. |
std::out_of_range | If cellIndex >= getCellCount(). |
std::out_of_range | If localFaceIndex >= getFaceCountOfCell(cellIndex). |
cellIndex | Zero-based index of the cell for which we want to get the node indices of one face. |
localFaceIndex | Zero-based local index of the face for which we want to get the node indices. |
localFaceIndex
of the cell cellIndex
. This array is allocated by loadGeometry() and is freed by unloadGeometry().
|
pure virtual |
Gets all the node indices of all the faces.
std::logic_error | If this grid is partial. |
std::logic_error | If this grid has no geometry (please check the existence of a geometry thanks to hasGeometry() before calling this method). |
std::logic_error | If the data structure used to store the node indices of the faces is not already supported by fesapi. |
std::invalid_argument | If a required HDF proxy is missing. |
[out] | nodeIndices | Preallocated array to receive all the node indices of all the faces. It size must be the last value outputted by getCumulativeNodeCountPerFace(). It is ordered first by nodes, then by faces and then by cells. |
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
|
inlinefinalvirtual |
|
inlinefinalvirtual |
Gets the standard XML tag without XML namespace for serializing this data object.
Implements common::AbstractObject.
|
finalvirtual |
Get the xyz point count in a given patch of this representation.
std::out_of_range | If patchIndex is out of range. |
std::logic_error | If this representation is partial. |
patchIndex | Zero-based index of the patch from which we look for the xyz points. |
patchIndex
. Implements resqml2::AbstractRepresentation.
|
pure virtual |
Indicates whether this grid has a geometry or not.
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
|
pure virtual |
Checks whether the face count per cell is constant in this unstructured grid.
std::logic_error | If this grid is partial. |
std::logic_error | If this grid has no geometry (please check the existence of a geometry thanks to hasGeometry() before calling this method). |
std::range_error | If the cumulative face count per cell is stored in an integer constant array while there is more than one cell in this grid. |
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
|
pure virtual |
Checks whether the node count per face is constant in this unstructured grid.
std::logic_error | If this grid is partial. |
std::logic_error | If this grid has no geometry (please check the existence of a geometry thanks to hasGeometry() before calling this method). |
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
void resqml2::UnstructuredGridRepresentation::loadGeometry | ( | ) |
Loads the geoemtry into memory in order to ease access. Be aware that you must unload by yourself this memory thanks to unloadGeometry().
std::logic_error | If this grid is partial. |
std::logic_error | If this grid has no geometry (please check the existence of a geometry thanks to hasGeometry() before calling this method). |
std::logic_error | If the data structure used to store the face indices of the cells is not already supported by fesapi. |
std::logic_error | If the data structure used to store the node indices of the faces is not already supported by fesapi. |
std::range_error | If the cumulative face count per cell is stored in an integer constant array while there is more than one cell in this grid. |
std::range_error | If the cumulative node count per face is stored in a integer constant array. |
std::invalid_argument | If a required HDF proxy is missing. |
void resqml2::UnstructuredGridRepresentation::setGeometry | ( | unsigned char * | cellFaceIsRightHanded, |
double * | points, | ||
uint64_t | pointCount, | ||
eml2::AbstractHdfProxy * | proxy, | ||
uint64_t * | faceIndicesPerCell, | ||
uint64_t * | faceIndicesCumulativeCountPerCell, | ||
uint64_t | faceCount, | ||
uint64_t * | nodeIndicesPerFace, | ||
uint64_t * | nodeIndicesCumulativeCountPerFace, | ||
gsoap_resqml2_0_1::resqml20__CellShape | cellShape, | ||
resqml2::AbstractLocal3dCrs * | localCrs = nullptr |
||
) |
Sets the geometry and creates corresponding HDF5 datasets.
std::logic_error | If this grid is partial. |
std::invalid_argument | If cellFaceIsRightHanded , points , faceIndicesPerCell , faceIndicesCumulativeCountPerCell , nodeIndicesPerFace or nodeIndicesCumulativeCountPerFace is nullptr . |
std::invalid_argument | If proxy == nullptr and no default HDF proxy is defined in the repository. |
std::invalid_argument | If localCrs == nullptr and no default local CRS is defined in the repository. |
[in] | cellFaceIsRightHanded | Boolean mask used to indicate which cell faces have an outwardly directed normal following a right hand rule. Array length is the sum of the cell face count per cell, and the data follows the order of the faces per cell RESQMLlist-of-lists. |
[in] | points | All the XYZ points defining the nodes of the unstructured grid. There must a double count of pointCount * 3 . |
pointCount | The count of points defining the nodes of this unstructured grid. | |
[in,out] | proxy | The HDF proxy which will store all the numerical values of this unstructured grid. If nullptr , then the repository default HDF proxy will be used. |
[in] | faceIndicesPerCell | Each item defines the index of the face of a cell. There must be a count of the last value in faceIndicesCumulativeCountPerCell . |
[in] | faceIndicesCumulativeCountPerCell | Each item defines the cumulative count of faces. The count of this array must be equal to the count of cells in this unstructured grid. For example if the first cell a 4 faces, the second cell 5 faces and the third cell 6 faces then the array would be {4, 9, 15}. |
faceCount | The count of faces in this unstructured grid. Be aware this count does not duplicate shared faces. Most of time, you have less faceCount than the last value of faceIndicesCumulativeCountPerCell which is the count of faces per cell. | |
[in] | nodeIndicesPerFace | Each item defines the index of the node of a face. There must be a count of the last value in nodeIndicesCumulativeCountPerFace . |
[in] | nodeIndicesCumulativeCountPerFace | Each item defines the cumulative count of nodes. The count of this array must be equal to faceCount . |
cellShape | A denormalization of the information which gives quick access to the most complex shape of polyhedron encountered in this unstructured grid. | |
[in] | localCrs | (Optional) The local CRS. If nullptr (default), then the repository default local CRS will be used. |
|
pure virtual |
Sets the geometry using some existing HDF5 dataset.
std::logic_error | If this grid is partial. |
std::invalid_argument | If cellFaceIsRightHanded , points , faceIndicesPerCell , faceIndicesCumulativeCountPerCell , nodeIndicesPerFace or nodeIndicesCumulativeCountPerFace is empty. |
std::invalid_argument | If proxy == nullptr and no default HDF proxy is defined in the repository. |
std::invalid_argument | If localCrs == nullptr and no default local CRS is defined in the repository. |
cellFaceIsRightHanded | The path to the HDF5 dataset in the HDF proxy where a boolean mask is used to indicate which cell faces have an outwardly directed normal following a right hand rule. Array length is the sum of the cell face count per cell, and the data follows the order of the faces per cell RESQMLlist-of-lists. | |
points | The path to the HDF5 dataset in the HDF proxy where all the xyz points defining the nodes of the unstructured grid are defined. There must a double count of pointCount * 3 . | |
pointCount | The count of points defining the nodes of this unstructured grid. | |
[in,out] | proxy | The HDF proxy which contains the datasets given in this method by means of paths. If nullptr , then the repository default HDF proxy will be used. |
faceIndicesPerCell | The path to the HDF5 dataset in the HDF proxy where each item defines the index of the face of a cell. There must be a count of the last value in faceIndicesCumulativeCountPerCell . | |
faceIndicesCumulativeCountPerCell | The path to the HDF5 dataset in the HDF proxy where each item defines the cumulative count of faces. The count of this array must be equal to the count of cells in this unstructured grid. For example if the first cell a 4 faces, the second cell 5 faces and the third cell 6 faces then the array would be {4, 9, 15}. | |
faceCount | The count of faces in this unstructured grid. Be aware this count does not duplicate shared faces. Most of time, you have less faceCount than the last value of faceIndicesCumulativeCountPerCell which is the count of faces per cell. | |
nodeIndicesPerFace | The path to the HDF5 dataset in the HDF proxy where each item defines the index of the node of a face. There must be a count of the last value in nodeIndicesCumulativeCountPerFace . | |
nodeIndicesCumulativeCountPerFace | The path to the HDF5 dataset in the HDF proxy where each item defines the cumulative count of nodes. The count of this array must be equal to faceCount . | |
cellShape | A denormalization of the information which gives quick access to the most complex shape of polyhedron encountered in this unstructured grid. | |
[in] | localCrs | (Optional) The local CRS. If nullptr (default), then the repository default local CRS will be used. |
Implemented in resqml2_2::UnstructuredGridRepresentation, and resqml2_0_1::UnstructuredGridRepresentation.
void resqml2::UnstructuredGridRepresentation::setHexahedraOnlyGeometry | ( | unsigned char * | cellFaceIsRightHanded, |
double * | points, | ||
uint64_t | pointCount, | ||
uint64_t | faceCount, | ||
eml2::AbstractHdfProxy * | proxy, | ||
uint64_t * | faceIndicesPerCell, | ||
uint64_t * | nodeIndicesPerFace, | ||
resqml2::AbstractLocal3dCrs * | localCrs = nullptr |
||
) |
Sets a geometry which is only defined by means of hexahedra and creates corresponding HDF5 datasets.
std::logic_error | If this grid is partial. |
std::invalid_argument | If cellFaceIsRightHanded , points , faceIndicesPerCell or nodeIndicesPerFace is nullptr . |
std::invalid_argument | If proxy == nullptr and no default HDF proxy is defined in the repository. |
std::invalid_argument | If localCrs == nullptr and no default local CRS is defined in the repository. |
[in] | cellFaceIsRightHanded | Boolean mask used to indicate which cell faces have an outwardly directed normal following a right hand rule. Array length is the sum of the cell face count per cell, and the data follows the order of the faces per cell RESQMLlist-of-lists. |
[in] | points | All the xyz points defining the nodes of the unstructured grid. There must a double count of pointCount * 3 . |
pointCount | The count of points defining the nodes of this unstructured grid. | |
faceCount | The count of faces in this unstructured grid. Be aware this count does not duplicate cell-shared faces. | |
[in,out] | proxy | The hdf proxy which contains the datasets given in this method by means of paths. If nullptr , then the repository default HDF proxy will be used. |
[in] | faceIndicesPerCell | Each item defines the index of the face of a cell. There must be a count of faceCountPerCell * cellCount . |
[in] | nodeIndicesPerFace | Each item defines the index of the node of a face. There must be a count of nodeCountPerFace * faceCount . |
[in] | localCrs | (Optional) The local CRS. If nullptr (default), then the repository default local CRS will be used. |
void resqml2::UnstructuredGridRepresentation::setHexahedraOnlyGeometryUsingExistingDatasets | ( | const std::string & | cellFaceIsRightHanded, |
const std::string & | points, | ||
uint64_t | pointCount, | ||
uint64_t | faceCount, | ||
eml2::AbstractHdfProxy * | proxy, | ||
const std::string & | faceIndicesPerCell, | ||
const std::string & | nodeIndicesPerFace, | ||
resqml2::AbstractLocal3dCrs * | localCrs = nullptr |
||
) |
Sets a geometry which is only defined by means of hexahedra using some existing HDF5 dataset.
std::logic_error | If this grid is partial. |
std::invalid_argument | If cellFaceIsRightHanded , points , faceIndicesPerCell or nodeIndicesPerFace is empty. |
std::invalid_argument | If proxy == nullptr and no default HDF proxy is defined in the repository. |
std::invalid_argument | If localCrs == nullptr and no default local CRS is defined in the repository. |
cellFaceIsRightHanded | The path to the HDF5 dataset in the HDF proxy where a boolean mask is used to indicate which cell faces have an outwardly directed normal following a right hand rule. Array length is the sum of the cell face count per cell, and the data follows the order of the faces per cell RESQMLlist-of-lists. | |
points | The path to the HDF5 dataset in the HDF proxy where all the xyz points defining the nodes of the unstructured grid are defined. There must a double count of pointCount * 3 . | |
pointCount | The count of points defining the nodes of this unstructured grid. | |
faceCount | The count of faces in this unstructured grid. Be aware this count does not duplicate cell-shared faces. | |
[in,out] | proxy | The HDF proxy which contains the datasets given in this method by means of paths. If nullptr , then the repository default HDF proxy will be used. |
faceIndicesPerCell | The path to the HDF5 dataset in the HDF proxy where each item defines the index of the face of a cell. There must be a count of faceCountPerCell * cellCount . | |
nodeIndicesPerFace | The path to the HDF5 dataset in the HDF proxy where each item defines the index of the node of a face. There must be a count of nodeCountPerFace * faceCount . | |
[in] | localCrs | (Optional) The local CRS. If nullptr (default), then the repository default local CRS will be used. |
void resqml2::UnstructuredGridRepresentation::setTetrahedraOnlyGeometry | ( | unsigned char * | cellFaceIsRightHanded, |
double * | points, | ||
uint64_t | pointCount, | ||
uint64_t | faceCount, | ||
eml2::AbstractHdfProxy * | proxy, | ||
uint64_t * | faceIndicesPerCell, | ||
uint64_t * | nodeIndicesPerFace, | ||
resqml2::AbstractLocal3dCrs * | localCrs = nullptr |
||
) |
Sets a geometry which is only defined by means of tetrahedra and creates corresponding HDF5 datasets.
std::logic_error | If this grid is partial. |
std::invalid_argument | If cellFaceIsRightHanded , points , faceIndicesPerCell or nodeIndicesPerFace is nullptr . |
std::invalid_argument | If proxy == nullptr and no default HDF proxy is defined in the repository. |
std::invalid_argument | If localCrs == nullptr and no default local CRS is defined in the repository. |
[in] | cellFaceIsRightHanded | Boolean mask used to indicate which cell faces have an outwardly directed normal following a right hand rule. Array length is the sum of the cell face count per cell, and the data follows the order of the faces per cell RESQMLlist-of-lists. |
[in] | points | All the xyz points defining the nodes of the unstructured grid. There must a double count of pointCount * 3 . |
pointCount | The count of points defining the nodes of this unstructured grid. | |
faceCount | The count of faces in this unstructured grid. Be aware this count does not duplicate cell-shared faces. | |
[in,out] | proxy | The hdf proxy which contains the datasets given in this method by means of paths. If nullptr , then the repository default HDF proxy will be used. |
[in] | faceIndicesPerCell | Each item defines the index of the face of a cell. There must be a count of faceCountPerCell * cellCount . |
[in] | nodeIndicesPerFace | Each item defines the index of the node of a face. There must be a count of nodeCountPerFace * faceCount . |
[in] | localCrs | (Optional) The local CRS. If nullptr (default), then the repository default local CRS will be used. |
void resqml2::UnstructuredGridRepresentation::setTetrahedraOnlyGeometryUsingExistingDatasets | ( | const std::string & | cellFaceIsRightHanded, |
const std::string & | points, | ||
uint64_t | pointCount, | ||
uint64_t | faceCount, | ||
eml2::AbstractHdfProxy * | proxy, | ||
const std::string & | faceIndicesPerCell, | ||
const std::string & | nodeIndicesPerFace, | ||
resqml2::AbstractLocal3dCrs * | localCrs = nullptr |
||
) |
Sets a geometry which is only defined by means of tetrahedra using some existing HDF5 dataset.
std::logic_error | If this grid is partial. |
std::invalid_argument | If cellFaceIsRightHanded , points , faceIndicesPerCell or nodeIndicesPerFace is empty. |
std::invalid_argument | If proxy == nullptr and no default HDF proxy is defined in the repository. |
std::invalid_argument | If localCrs == nullptr and no default local CRS is defined in the repository. |
cellFaceIsRightHanded | The path to the HDF5 dataset in the HDF proxy where a boolean mask is used to indicate which cell faces have an outwardly directed normal following a right hand rule. Array length is the sum of the cell face count per cell, and the data follows the order of the faces per cell RESQMLlist-of-lists. | |
points | The path to the HDF5 dataset in the HDF proxy where all the xyz points defining the nodes of the unstructured grid are defined. There must a double count of pointCount * 3 . | |
pointCount | The count of points defining the nodes of this unstructured grid. | |
faceCount | The count of faces in this unstructured grid. Be aware this count does not duplicate cell-shared faces. | |
[in,out] | proxy | The HDF proxy which contains the datasets given in this method by means of paths. If nullptr , then the repository default HDF proxy will be used. |
faceIndicesPerCell | The path to the HDF5 dataset in the HDF proxy where each item defines the index of the face of a cell. There must be a count of faceCountPerCell * cellCount . | |
nodeIndicesPerFace | The path to the HDF5 dataset in the HDF proxy where each item defines the index of the node of a face. There must be a count of nodeCountPerFace * faceCount . | |
[in] | localCrs | (Optional) The local CRS. If nullptr (default), then the repository default local CRS will be used. |
void resqml2::UnstructuredGridRepresentation::unloadGeometry | ( | ) |
Unloads the geometry from memory.
|
static |
The standard XML tag without XML namespace for serializing this data object.