Fesapi  0.13.0.0
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Grid2dRepresentation.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 "resqml2_0_1/AbstractSurfaceRepresentation.h"
22 
23 namespace RESQML2_0_1_NS
24 {
25  class DLL_IMPORT_OR_EXPORT Grid2dRepresentation : public AbstractSurfaceRepresentation
26  {
27  private :
28  gsoap_resqml2_0_1::resqml2__PointGeometry* getPointGeometry2_0_1(const unsigned int & patchIndex) const;
29  gsoap_resqml2_0_1::resqml2__Point3dLatticeArray* getArrayLatticeOfPoints3d() const;
30 
36  void setSupportingRepresentation(Grid2dRepresentation * supportingRep);
37 
41  double getComponentInGlobalCrs(double x, double y, double z, size_t componentIndex) const;
42 
43  public:
44 
48  Grid2dRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : AbstractSurfaceRepresentation(partialObject) {}
49 
58  const std::string & guid, const std::string & title);
59 
63  Grid2dRepresentation(gsoap_resqml2_0_1::_resqml2__Grid2dRepresentation* fromGsoap): AbstractSurfaceRepresentation(fromGsoap), supportingRepresentation(nullptr) {}
64 
69 
70  static const char* XML_TAG;
71  virtual std::string getXmlTag() const {return XML_TAG;}
72 
73  std::string getHdfProxyUuid() const;
74 
78  ULONG64 getNodeCountAlongIAxis() const;
79 
83  ULONG64 getNodeCountAlongJAxis() const;
84 
88  ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const;
89 
95  void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const;
96 
102  void getZValues(double * values) const;
103 
109  void getZValuesInGlobalCrs(double * values) const;
110 
116  double getXOrigin() const;
117 
123  double getYOrigin() const;
124 
130  double getZOrigin() const;
131 
137  double getXOriginInGlobalCrs() const;
138 
144  double getYOriginInGlobalCrs() const;
145 
151  double getZOriginInGlobalCrs() const;
152 
160  double getXJOffset() const;
161 
169  double getYJOffset() const;
170 
178  double getZJOffset() const;
179 
185  double getXJOffsetInGlobalCrs() const;
186 
192  double getYJOffsetInGlobalCrs() const;
193 
199  double getZJOffsetInGlobalCrs() const;
200 
206  double getXIOffset() const;
207 
213  double getYIOffset() const;
214 
220  double getZIOffset() const;
221 
227  double getXIOffsetInGlobalCrs() const;
228 
234  double getYIOffsetInGlobalCrs() const;
235 
241  double getZIOffsetInGlobalCrs() const;
242 
246  bool isJSpacingConstant() const;
247 
251  bool isISpacingConstant() const;
252 
257  double getJSpacing() const;
258 
264  void getJSpacing(double* const jSpacings) const;
265 
270  double getISpacing() const;
271 
277  void getISpacing(double* const iSpacings) const;
278 
283  void setGeometryAsArray2dOfLatticePoints3d(
284  const unsigned int & numPointsInFastestDirection, const unsigned int & numPointsInSlowestDirection,
285  const double & xOrigin, const double & yOrigin, const double & zOrigin,
286  const double & xOffsetInFastestDirection, const double & yOffsetInFastestDirection, const double & zOffsetInFastestDirection,
287  const double & xOffsetInSlowestDirection, const double & yOffsetInSlowestDirection, const double & zOffsetInSlowestDirection,
288  const double & spacingInFastestDirection, const double & spacingInSlowestDirection);
289 
294  void setGeometryAsArray2dOfExplicitZ(
295  double * zValues,
296  const unsigned int & numI, const unsigned int & numJ, COMMON_NS::AbstractHdfProxy* proxy,
297  Grid2dRepresentation * supportingGrid2dRepresentation,
298  const unsigned int & startIndexI = 0, const unsigned int & startIndexJ = 0,
299  const int & indexIncrementI = 1, const int & indexIncrementJ = 1);
300 
305  void setGeometryAsArray2dOfExplicitZ(
306  double * zValues,
307  const unsigned int & numI, const unsigned int & numJ, COMMON_NS::AbstractHdfProxy* proxy,
308  const double & originX, const double & originY, const double & originZ,
309  const double & offsetIX, const double & offsetIY, const double & offsetIZ, const double & spacingI,
310  const double & offsetJX, const double & offsetJY, const double & offsetJZ, const double & spacingJ);
311 
316  std::string getSupportingRepresentationUuid() const;
317 
321  Grid2dRepresentation* getSupportingRepresentation() {return supportingRepresentation;}
322 
327  int getIndexOriginOnSupportingRepresentation() const;
328 
332  int getIndexOriginOnSupportingRepresentation(const unsigned int & dimension) const;
333 
337  int getNodeCountOnSupportingRepresentation(const unsigned int & dimension) const;
338 
342  int getIndexOffsetOnSupportingRepresentation(const unsigned int & dimension) const;
343 
344  unsigned int getPatchCount() const {return 1;}
345 
346  private:
347  std::vector<epc::Relationship> getAllEpcRelationships() const;
348  void importRelationshipSetFromEpc(COMMON_NS::EpcDocument* epcDoc);
349 
350  // Forward relationships
351  Grid2dRepresentation * supportingRepresentation;
352 
353  // Backward relationships
354  std::vector<AbstractRepresentation *> supportedRepresentationSet;
355  };
356 }
357 
Grid2dRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject)
Definition: Grid2dRepresentation.h:48
Grid2dRepresentation(gsoap_resqml2_0_1::_resqml2__Grid2dRepresentation *fromGsoap)
Definition: Grid2dRepresentation.h:63
Definition: AbstractFeatureInterpretation.h:30
Definition: EpcDocument.h:65
Definition: Grid2dRepresentation.h:25
Definition: EpcDocument.h:154
Grid2dRepresentation * getSupportingRepresentation()
Definition: Grid2dRepresentation.h:321
virtual std::string getXmlTag() const
Definition: Grid2dRepresentation.h:71
~Grid2dRepresentation()
Definition: Grid2dRepresentation.h:68
Definition: AbstractHdfProxy.h:30
Definition: AbstractSurfaceRepresentation.h:25
Definition: AbstractLocal3dCrs.h:25