Fesapi  2.0.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
AbstractGridRepresentation.h
1 /*-----------------------------------------------------------------------
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"; you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9 
10  http://www.apache.org/licenses/LICENSE-2.0
11 
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 -----------------------------------------------------------------------*/
19 #pragma once
20 
21 #include "AbstractRepresentation.h"
22 
23 namespace RESQML2_NS
24 {
27  {
28  private:
29 
34  gsoap_resqml2_0_1::resqml20__Regrid* createRegrid2_0_1(unsigned int indexRegridStart, unsigned int * childCellCountPerInterval, unsigned int * parentCellCountPerInterval, unsigned int intervalCount, double * childCellWeights,
35  const std::string & dimension, EML2_NS::AbstractHdfProxy * proxy, bool forceConstantCellCountPerInterval = false);
36  gsoap_eml2_3::resqml22__Regrid* createRegrid2_2(unsigned int indexRegridStart, unsigned int * childCellCountPerInterval, unsigned int * parentCellCountPerInterval, unsigned int intervalCount, double * childCellWeights,
37  const std::string & dimension, EML2_NS::AbstractHdfProxy * proxy, bool forceConstantCellCountPerInterval = false);
38 
39  /*
40  * @param dimension It must be either 'i', 'j' ou 'k' (upper or lower case) for an ijk parent grid. 'k' for a strict column layer parent grid.
41  * @param childVsParentCellCount If true return the child cell count per interval. If false return the parent cell count per interval.
42  */
43  gsoap_resqml2_0_1::resqml20__AbstractIntegerArray* getCellCountPerInterval2_0_1(char dimension, bool childVsParentCellCount) const;
44  gsoap_eml2_3::eml23__AbstractIntegerArray* getCellCountPerInterval2_2(char dimension, bool childVsParentCellCount) const;
45 
51  gsoap_resqml2_0_1::resqml20__AbstractParentWindow* getParentWindow2_0_1() const;
52  gsoap_eml2_3::resqml22__AbstractParentWindow* getParentWindow2_2() const;
53 
54  protected:
55 
62  AbstractGridRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject, bool withTruncatedPillars) :AbstractRepresentation(partialObject), withTruncatedPillars(withTruncatedPillars) {}
63 
69  AbstractGridRepresentation(bool withTruncatedPillars) : withTruncatedPillars(withTruncatedPillars){}
70 
77  AbstractGridRepresentation(gsoap_resqml2_0_1::resqml20__AbstractGridRepresentation* fromGsoap, bool withTruncatedPillars) : AbstractRepresentation(fromGsoap), withTruncatedPillars(withTruncatedPillars) {}
78  AbstractGridRepresentation(gsoap_eml2_3::resqml22__AbstractGridRepresentation* fromGsoap, bool withTruncatedPillars) : AbstractRepresentation(fromGsoap), withTruncatedPillars(withTruncatedPillars) {}
79 
80  public:
81 
83  virtual ~AbstractGridRepresentation() = default;
84 
93  DLL_IMPORT_OR_EXPORT virtual uint64_t getCellCount() const = 0;
94 
95  //************************************************************
96  //****************** GRID CONNECTION SET *********************
97  //************************************************************
98 
104  DLL_IMPORT_OR_EXPORT std::vector<class GridConnectionSetRepresentation*> getGridConnectionSetRepresentationSet() const;
105 
114  DLL_IMPORT_OR_EXPORT unsigned int getGridConnectionSetRepresentationCount() const; // It is mainly used in SWIG context for parsing the vector from a non C++ language.
115 
125  DLL_IMPORT_OR_EXPORT class GridConnectionSetRepresentation * getGridConnectionSetRepresentation(unsigned int index) const; // It is mainly used in SWIG context for parsing the vector from a non C++ language.
126 
127 
128  //************************************************************
129  //******************** GRID PARENTAGE ************************
130  //************************************************************
131 
141  DLL_IMPORT_OR_EXPORT AbstractGridRepresentation* getParentGrid() const;
142 
153  COMMON_NS::DataObjectReference getParentGridDor() const;
154 
160  std::vector<RESQML2_NS::AbstractGridRepresentation *> getChildGridSet() const;
161 
170  DLL_IMPORT_OR_EXPORT unsigned int getChildGridCount() const;
171 
181  DLL_IMPORT_OR_EXPORT AbstractGridRepresentation * getChildGrid(unsigned int index) const;
182 
203  DLL_IMPORT_OR_EXPORT void setParentWindow(uint64_t* cellIndices, uint64_t cellIndexCount, class UnstructuredGridRepresentation* parentGrid, EML2_NS::AbstractHdfProxy* proxy = nullptr);
204 
248  DLL_IMPORT_OR_EXPORT void setParentWindow(unsigned int * columnIndices, unsigned int columnIndexCount,
249  unsigned int kLayerIndexRegridStart,
250  unsigned int * childCellCountPerInterval, unsigned int * parentCellCountPerInterval, unsigned int intervalCount,
251  class AbstractColumnLayerGridRepresentation* parentGrid,
252  EML2_NS::AbstractHdfProxy * proxy = nullptr, double * childCellWeights = nullptr);
253 
328  DLL_IMPORT_OR_EXPORT void setParentWindow(
329  unsigned int iCellIndexRegridStart, unsigned int * childCellCountPerIInterval, unsigned int * parentCellCountPerIInterval, unsigned int iIntervalCount,
330  unsigned int jCellIndexRegridStart, unsigned int * childCellCountPerJInterval, unsigned int * parentCellCountPerJInterval, unsigned int jIntervalCount,
331  unsigned int kCellIndexRegridStart, unsigned int * childCellCountPerKInterval, unsigned int * parentCellCountPerKInterval, unsigned int kIntervalCount,
332  class AbstractIjkGridRepresentation* parentGrid, EML2_NS::AbstractHdfProxy * proxy = nullptr, double * iChildCellWeights = nullptr, double * jChildCellWeights = nullptr, double * kChildCellWeights = nullptr);
333 
424  DLL_IMPORT_OR_EXPORT void setParentWindow(
425  unsigned int iCellIndexRegridStart, unsigned int constantChildCellCountPerIInterval, unsigned int constantParentCellCountPerIInterval, unsigned int iIntervalCount,
426  unsigned int jCellIndexRegridStart, unsigned int constantChildCellCountPerJInterval, unsigned int constantParentCellCountPerJInterval, unsigned int jIntervalCount,
427  unsigned int kCellIndexRegridStart, unsigned int constantChildCellCountPerKInterval, unsigned int constantParentCellCountPerKInterval, unsigned int kIntervalCount,
428  class AbstractIjkGridRepresentation* parentGrid, EML2_NS::AbstractHdfProxy * proxy = nullptr, double * iChildCellWeights = nullptr, double * jChildCellWeights = nullptr, double * kChildCellWeights = nullptr);
429 
486  DLL_IMPORT_OR_EXPORT void setParentWindow(
487  unsigned int iCellIndexRegridStart, unsigned int iChildCellCount, unsigned int iParentCellCount,
488  unsigned int jCellIndexRegridStart, unsigned int jChildCellCount, unsigned int jParentCellCount,
489  unsigned int kCellIndexRegridStart, unsigned int kChildCellCount, unsigned int kParentCellCount,
490  class AbstractIjkGridRepresentation* parentGrid, EML2_NS::AbstractHdfProxy * proxy = nullptr, double * iChildCellWeights = nullptr, double * jChildCellWeights = nullptr, double * kChildCellWeights = nullptr);
491 
508  DLL_IMPORT_OR_EXPORT void setForcedNonRegridedParentCell(uint64_t* cellIndices, uint64_t cellIndexCount);
509 
535  DLL_IMPORT_OR_EXPORT void setCellOverlap(uint64_t parentChildCellPairCount, uint64_t* parentChildCellPair,
536  const std::string& volumeUom, double* overlapVolumes = nullptr);
537 
550  DLL_IMPORT_OR_EXPORT int64_t getParentCellIndexCount() const;
551 
566  DLL_IMPORT_OR_EXPORT void getParentCellIndices(uint64_t * parentCellIndices) const;
567 
580  DLL_IMPORT_OR_EXPORT int64_t getParentColumnIndexCount() const;
581 
596  DLL_IMPORT_OR_EXPORT void getParentColumnIndices(uint64_t * parentColumnIndices) const;
597 
617  DLL_IMPORT_OR_EXPORT uint64_t getRegridStartIndexOnParentGrid(char dimension) const;
618 
639  DLL_IMPORT_OR_EXPORT uint64_t getRegridIntervalCount(char dimension) const;
640 
668  DLL_IMPORT_OR_EXPORT bool isRegridCellCountPerIntervalConstant(char dimension, bool childVsParentCellCount) const;
669 
698  DLL_IMPORT_OR_EXPORT uint64_t getRegridConstantCellCountPerInterval(char dimension, bool childVsParentCellCount) const;
699 
730  DLL_IMPORT_OR_EXPORT void getRegridCellCountPerInterval(char dimension, uint64_t* childCellCountPerInterval, bool childVsParentCellCount) const;
731 
754  DLL_IMPORT_OR_EXPORT bool hasRegridChildCellWeights(char dimension) const;
755 
782  DLL_IMPORT_OR_EXPORT void getRegridChildCellWeights(char dimension, double* childCellWeights) const;
783 
794  DLL_IMPORT_OR_EXPORT bool hasForcedNonRegridedParentCell() const;
795 
796  //************************************************************
797  //**************** LINK WITH STRATIGRAPHY ********************
798  //************************************************************
799 
815  DLL_IMPORT_OR_EXPORT void setCellAssociationWithStratigraphicOrganizationInterpretation(uint64_t* stratiUnitIndices, uint64_t nullValue, class AbstractStratigraphicOrganizationInterpretation* stratiOrgInterp);
816 
827 
838  DLL_IMPORT_OR_EXPORT virtual COMMON_NS::DataObjectReference getStratigraphicOrganizationInterpretationDor() const;
839 
849  DLL_IMPORT_OR_EXPORT bool hasCellStratigraphicUnitIndices() const;
850 
869  DLL_IMPORT_OR_EXPORT uint64_t getCellStratigraphicUnitIndices(uint64_t * stratiUnitIndices);
870 
871  //************************************************************
872  //**************** LINK WITH ROCKFLUID ********************
873  //************************************************************
874 
890  DLL_IMPORT_OR_EXPORT void setCellAssociationWithRockFluidOrganizationInterpretation(uint64_t* rockFluidUnitIndices, uint64_t nullValue, class RockFluidOrganizationInterpretation* rockFluidOrgInterp);
891 
902 
913  DLL_IMPORT_OR_EXPORT virtual COMMON_NS::DataObjectReference getRockFluidOrganizationInterpretationDor() const;
914 
924  DLL_IMPORT_OR_EXPORT bool hasCellFluidPhaseUnitIndices() const;
925 
945  DLL_IMPORT_OR_EXPORT uint64_t getCellFluidPhaseUnitIndices(uint64_t * rockfluidUnitIndices);
946 
947 
948  //************************************************************
949  //********************** TRUNCATION **************************
950  //************************************************************
951 
957  DLL_IMPORT_OR_EXPORT bool isTruncated() const;
958 
968  DLL_IMPORT_OR_EXPORT uint64_t getTruncatedFaceCount() const;
969 
982  DLL_IMPORT_OR_EXPORT void getNodeIndicesOfTruncatedFaces(uint64_t * nodeIndices) const;
983 
1001  DLL_IMPORT_OR_EXPORT void getCumulativeNodeCountPerTruncatedFace(uint64_t * nodeCountPerFace) const;
1002 
1017  DLL_IMPORT_OR_EXPORT void getNodeCountPerTruncatedFace(uint64_t * nodeCountPerFace) const;
1018 
1027  DLL_IMPORT_OR_EXPORT uint64_t getTruncatedCellCount() const;
1028 
1040  DLL_IMPORT_OR_EXPORT void getTruncatedCellIndices(uint64_t* cellIndices) const;
1041 
1057  DLL_IMPORT_OR_EXPORT void getTruncatedFaceIndicesOfTruncatedCells(uint64_t * faceIndices) const;
1058 
1077  DLL_IMPORT_OR_EXPORT void getCumulativeTruncatedFaceCountPerTruncatedCell(uint64_t * cumulativeFaceCountPerCell) const;
1078 
1093  DLL_IMPORT_OR_EXPORT void getTruncatedFaceCountPerTruncatedCell(uint64_t * faceCountPerCell) const;
1094 
1110  DLL_IMPORT_OR_EXPORT void getNonTruncatedFaceIndicesOfTruncatedCells(uint64_t * faceIndices) const;
1111 
1130  DLL_IMPORT_OR_EXPORT void getCumulativeNonTruncatedFaceCountPerTruncatedCell(uint64_t * cumulativeFaceCountPerCell) const;
1131 
1147  DLL_IMPORT_OR_EXPORT void getNonTruncatedFaceCountPerTruncatedCell(uint64_t * faceCountPerCell) const;
1148 
1164  DLL_IMPORT_OR_EXPORT void getTruncatedFaceIsRightHanded(unsigned char* cellFaceIsRightHanded) const;
1165 
1167  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
1168 
1171 
1172  protected:
1173 
1175  bool withTruncatedPillars;
1176  };
1177 }
Proxy class for an abstract column layer grid representation.
Definition: AbstractColumnLayerGridRepresentation.h:27
Proxy class for an abstract grid representation.
Definition: AbstractGridRepresentation.h:27
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 setCellAssociationWithStratigraphicOrganizationInterpretation(uint64_t *stratiUnitIndices, uint64_t nullValue, class AbstractStratigraphicOrganizationInterpretation *stratiOrgInterp)
static const char * XML_TAG
Definition: AbstractGridRepresentation.h:1167
uint64_t getRegridStartIndexOnParentGrid(char dimension) const
void getNonTruncatedFaceCountPerTruncatedCell(uint64_t *faceCountPerCell) const
common::DataObjectReference getParentGridDor() const
std::vector< class GridConnectionSetRepresentation * > getGridConnectionSetRepresentationSet() const
virtual common::DataObjectReference getStratigraphicOrganizationInterpretationDor() const
void getCumulativeTruncatedFaceCountPerTruncatedCell(uint64_t *cumulativeFaceCountPerCell) const
class RockFluidOrganizationInterpretation * getRockFluidOrganizationInterpretation() const
virtual common::DataObjectReference getRockFluidOrganizationInterpretationDor() const
void getNonTruncatedFaceIndicesOfTruncatedCells(uint64_t *faceIndices) const
void getParentColumnIndices(uint64_t *parentColumnIndices) const
void getTruncatedFaceIsRightHanded(unsigned char *cellFaceIsRightHanded) const
virtual ~AbstractGridRepresentation()=default
bool hasRegridChildCellWeights(char dimension) const
void getRegridCellCountPerInterval(char dimension, uint64_t *childCellCountPerInterval, bool childVsParentCellCount) const
uint64_t getRegridConstantCellCountPerInterval(char dimension, bool childVsParentCellCount) const
uint64_t getCellStratigraphicUnitIndices(uint64_t *stratiUnitIndices)
void setParentWindow(uint64_t *cellIndices, uint64_t cellIndexCount, class UnstructuredGridRepresentation *parentGrid, eml2::AbstractHdfProxy *proxy=nullptr)
void setCellOverlap(uint64_t parentChildCellPairCount, uint64_t *parentChildCellPair, const std::string &volumeUom, double *overlapVolumes=nullptr)
virtual uint64_t getCellCount() const =0
uint64_t getRegridIntervalCount(char dimension) const
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 getParentCellIndices(uint64_t *parentCellIndices) const
class AbstractStratigraphicOrganizationInterpretation * getStratigraphicOrganizationInterpretation() const
unsigned int getGridConnectionSetRepresentationCount() const
AbstractGridRepresentation * getChildGrid(unsigned int index) const
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)
std::vector< resqml2::AbstractGridRepresentation * > getChildGridSet() const
void getCumulativeNodeCountPerTruncatedFace(uint64_t *nodeCountPerFace) const
unsigned int getChildGridCount() const
void getNodeCountPerTruncatedFace(uint64_t *nodeCountPerFace) const
void getRegridChildCellWeights(char dimension, double *childCellWeights) const
bool isRegridCellCountPerIntervalConstant(char dimension, bool childVsParentCellCount) const
class GridConnectionSetRepresentation * getGridConnectionSetRepresentation(unsigned int index) const
void getCumulativeNonTruncatedFaceCountPerTruncatedCell(uint64_t *cumulativeFaceCountPerCell) const
void setForcedNonRegridedParentCell(uint64_t *cellIndices, uint64_t cellIndexCount)
void getTruncatedFaceCountPerTruncatedCell(uint64_t *faceCountPerCell) const
AbstractGridRepresentation * getParentGrid() const
uint64_t getCellFluidPhaseUnitIndices(uint64_t *rockfluidUnitIndices)
void setCellAssociationWithRockFluidOrganizationInterpretation(uint64_t *rockFluidUnitIndices, uint64_t nullValue, class RockFluidOrganizationInterpretation *rockFluidOrgInterp)
void getTruncatedFaceIndicesOfTruncatedCells(uint64_t *faceIndices) const
void getNodeIndicesOfTruncatedFaces(uint64_t *nodeIndices) const
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...
void getTruncatedCellIndices(uint64_t *cellIndices) const
Proxy class for an abstract IJK grid representation. This class is semantically abstract....
Definition: AbstractIjkGridRepresentation.h:34
Proxy class for an abstract representation.
Definition: AbstractRepresentation.h:32
An abstract stratigraphic organization interpretation is the main class that defines the relationship...
Definition: AbstractStratigraphicOrganizationInterpretation.h:37
Proxy class for a grid connection set representation. This representation consists of a list of conne...
Definition: GridConnectionSetRepresentation.h:51
This class describes the organization of geological reservoir, i.e., of an interconnected network of ...
Definition: RockFluidOrganizationInterpretation.h:34
Unstructured grid representation characterized by a cell count, and potentially nothing else....
Definition: UnstructuredGridRepresentation.h:30