Fesapi  0.13.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
UnstructuredGridRepresentation.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 
20 #pragma once
21 
22 #include "resqml2/AbstractGridRepresentation.h"
23 
24 namespace RESQML2_0_1_NS
25 {
27  {
28  private :
29 
33  void init(soap* soapContext, RESQML2_NS::AbstractLocal3dCrs * crs,
34  const std::string & guid, const std::string & title,
35  const ULONG64 & cellCount);
36 
37  gsoap_resqml2_0_1::_resqml2__UnstructuredGridRepresentation* getSpecializedGsoapProxy() const;
38 
39  gsoap_resqml2_0_1::resqml2__PointGeometry* getPointGeometry2_0_1(const unsigned int & patchIndex) const;
40 
53  void setConstantCellShapeGeometryUsingExistingDatasets(const std::string& cellFaceIsRightHanded, const std::string& points,
54  ULONG64 pointCount, ULONG64 faceCount, COMMON_NS::AbstractHdfProxy* proxy,
55  const std::string& faceIndicesPerCell, ULONG64 faceCountPerCell,
56  const std::string& nodeIndicesPerFace, ULONG64 nodeCountPerFace);
57 
70  void setConstantCellShapeGeometry(unsigned char * cellFaceIsRightHanded, double * points,
71  ULONG64 pointCount, ULONG64 faceCount, COMMON_NS::AbstractHdfProxy* proxy,
72  ULONG64 * faceIndicesPerCell, ULONG64 faceCountPerCell,
73  ULONG64 * nodeIndicesPerFace, ULONG64 nodeCountPerFace);
74 
75  unsigned int constantNodeCountPerFace;
76  unsigned int constantFaceCountPerCell;
77  ULONG64 * cumulativeNodeCountPerFace;
78  ULONG64 * cumulativeFaceCountPerCell;
79  ULONG64 * nodeIndicesOfFaces;
80  ULONG64 * faceIndicesOfCells;
81 
82  public:
83 
87  UnstructuredGridRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject):
88  RESQML2_NS::AbstractGridRepresentation(partialObject, false), constantNodeCountPerFace(0), constantFaceCountPerCell(0),
89  cumulativeNodeCountPerFace(nullptr), cumulativeFaceCountPerCell(nullptr),
90  nodeIndicesOfFaces(nullptr), faceIndicesOfCells(nullptr)
91  {
92  }
93 
98  const std::string & guid, const std::string & title,
99  const ULONG64 & cellCount);
100 
102  const std::string & guid, const std::string & title,
103  const ULONG64 & cellCount);
104 
108  UnstructuredGridRepresentation(gsoap_resqml2_0_1::_resqml2__UnstructuredGridRepresentation* fromGsoap):
109  RESQML2_NS::AbstractGridRepresentation(fromGsoap, false), constantNodeCountPerFace(0), constantFaceCountPerCell(0),
110  cumulativeNodeCountPerFace(nullptr), cumulativeFaceCountPerCell(nullptr),
111  nodeIndicesOfFaces(nullptr), faceIndicesOfCells(nullptr) {}
112 
117 
121  bool hasGeometry() const;
122 
123  std::string getHdfProxyUuid() const;
124 
128  ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const;
129 
135  void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const;
136 
141  void getFaceIndicesOfCells(ULONG64 * faceIndices) const;
142 
150  void getCumulativeFaceCountPerCell(ULONG64 * cumulativeFaceCountPerCell) const;
151 
158  void getFaceCountPerCell(ULONG64 * faceCountPerCell) const;
159 
163  bool isFaceCountOfCellsConstant() const;
164 
165  /*
166  * Get the constant face count per cell in the grid.
167  */
168  unsigned int getConstantFaceCountOfCells() const;
169 
174  void getNodeIndicesOfFaces(ULONG64 * nodeIndices) const;
175 
183  void getCumulativeNodeCountPerFace(ULONG64 * nodeCountPerFace) const;
184 
191  void getNodeCountPerFace(ULONG64 * nodeCountPerFace) const;
192 
196  bool isNodeCountOfFacesConstant() const;
197 
198  /*
199  * Get the constant node count per face in the grid.
200  */
201  unsigned int getConstantNodeCountOfFaces() const;
202 
207  void loadGeometry();
208 
212  void unloadGeometry();
213 
218  unsigned int getFaceCountOfCell(const ULONG64 & cellIndex) const;
219 
224  unsigned int getNodeCountOfFaceOfCell(const ULONG64 & cellIndex, const unsigned int & localFaceIndex) const;
225 
230  ULONG64 * getNodeIndicesOfFaceOfCell(const ULONG64 & cellIndex, const unsigned int & localFaceIndex) const;
231 
235  ULONG64 getCellCount() const;
236 
240  ULONG64 getFaceCount() const;
241 
245  ULONG64 getNodeCount() const;
246 
250  void getCellFaceIsRightHanded(unsigned char* cellFaceIsRightHanded) const;
251 
265  void setGeometryUsingExistingDatasets(const std::string& cellFaceIsRightHanded, const std::string& points, ULONG64 pointCount, COMMON_NS::AbstractHdfProxy* proxy,
266  const std::string& faceIndicesPerCell, const std::string&faceIndicesCumulativeCountPerCell,
267  ULONG64 faceCount, const std::string& nodeIndicesPerFace, const std::string& nodeIndicesCumulativeCountPerFace,
268  const gsoap_resqml2_0_1::resqml2__CellShape & cellShape);
269 
283  void setGeometry(unsigned char * cellFaceIsRightHanded, double * points, ULONG64 pointCount, COMMON_NS::AbstractHdfProxy* proxy,
284  ULONG64 * faceIndicesPerCell, ULONG64 * faceIndicesCumulativeCountPerCell,
285  ULONG64 faceCount, ULONG64 * nodeIndicesPerFace, ULONG64 * nodeIndicesCumulativeCountPerFace,
286  const gsoap_resqml2_0_1::resqml2__CellShape & cellShape);
287 
298  void setTetrahedraOnlyGeometryUsingExistingDatasets(const std::string& cellFaceIsRightHanded, const std::string& points,
299  ULONG64 pointCount, ULONG64 faceCount, COMMON_NS::AbstractHdfProxy* proxy,
300  const std::string& faceIndicesPerCell, const std::string& nodeIndicesPerFace);
301 
312  void setTetrahedraOnlyGeometry(unsigned char * cellFaceIsRightHanded, double * points,
313  ULONG64 pointCount, ULONG64 faceCount, COMMON_NS::AbstractHdfProxy* proxy,
314  ULONG64 * faceIndicesPerCell, ULONG64 * nodeIndicesPerFace);
315 
326  void setHexahedraOnlyGeometryUsingExistingDatasets(const std::string& cellFaceIsRightHanded, const std::string& points,
327  ULONG64 pointCount, ULONG64 faceCount, COMMON_NS::AbstractHdfProxy* proxy,
328  const std::string& faceIndicesPerCell, const std::string& nodeIndicesPerFace);
329 
340  void setHexahedraOnlyGeometry(unsigned char * cellFaceIsRightHanded, double * points,
341  ULONG64 pointCount, ULONG64 faceCount, COMMON_NS::AbstractHdfProxy* proxy,
342  ULONG64 * faceIndicesPerCell, ULONG64 * nodeIndicesPerFace);
343 
344  static const char* XML_TAG;
345  virtual std::string getXmlTag() const {return XML_TAG;}
346 
347  unsigned int getPatchCount() const {return 1;}
348  };
349 }
350 
UnstructuredGridRepresentation(gsoap_resqml2_0_1::_resqml2__UnstructuredGridRepresentation *fromGsoap)
Definition: UnstructuredGridRepresentation.h:108
virtual std::string getXmlTag() const
Definition: UnstructuredGridRepresentation.h:345
Definition: AbstractFeatureInterpretation.h:30
virtual ~UnstructuredGridRepresentation()
Definition: UnstructuredGridRepresentation.h:116
Definition: EpcDocument.h:65
UnstructuredGridRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: UnstructuredGridRepresentation.h:87
Definition: AbstractGridRepresentation.h:32
Definition: AbstractHdfProxy.h:30
Definition: UnstructuredGridRepresentation.h:26
Definition: AbstractLocal3dCrs.h:25
Definition: EpcDocument.h:49