My Project
Grid2dRepresentation.h
1 /*-----------------------------------------------------------------------
2 Copyright F2I-CONSULTING, (2014-2016)
3 
4 philippe.verney@f2i-consulting.com
5 
6 This software is a computer program whose purpose is to access to data formatted using Energistics standards.
7 
8 This software is governed by the CeCILL-B license under French law and
9 abiding by the rules of distribution of free software. You can use,
10 modify and/ or redistribute the software under the terms of the CeCILL-B
11 license as circulated by CEA, CNRS and INRIA at the following URL
12 "http://www.cecill.info".
13 
14 As a counterpart to the access to the source code and rights to copy,
15 modify and redistribute granted by the license, users are provided only
16 with a limited warranty and the software's author, the holder of the
17 economic rights, and the successive licensors have only limited
18 liability.
19 
20 In this respect, the user's attention is drawn to the risks associated
21 with loading, using, modifying and/or developing or reproducing the
22 software by the user in light of its specific status of free software,
23 that may mean that it is complicated to manipulate, and that also
24 therefore means that it is reserved for developers and experienced
25 professionals having in-depth computer knowledge. Users are therefore
26 encouraged to load and test the software's suitability as regards their
27 requirements in conditions enabling the security of their systems and/or
28 data to be ensured and, more generally, to use and operate it in the
29 same conditions as regards security.
30 
31 The fact that you are presently reading this means that you have had
32 knowledge of the CeCILL-B license and that you accept its terms.
33 -----------------------------------------------------------------------*/
34 #pragma once
35 
36 #include "resqml2_0_1/Grid2dSetRepresentation.h"
37 
38 namespace resqml2_0_1
39 {
40  class DLL_IMPORT_OR_EXPORT Grid2dRepresentation : public AbstractSurfaceRepresentation
41  {
42  private :
43  gsoap_resqml2_0_1::resqml2__PointGeometry* getPointGeometry2_0_1(const unsigned int & patchIndex) const;
44  gsoap_resqml2_0_1::resqml2__Point3dLatticeArray* getArrayLatticeOfPoints3d() const;
45 
51  void setSupportingRepresentation(Grid2dRepresentation * supportingRep);
52 
53  public:
62  const std::string & guid, const std::string & title);
63 
67  Grid2dRepresentation(gsoap_resqml2_0_1::_resqml2__Grid2dRepresentation* fromGsoap): AbstractSurfaceRepresentation(fromGsoap), supportingRepresentation(nullptr) {}
68 
73 
74  static const char* XML_TAG;
75  virtual std::string getXmlTag() const {return XML_TAG;}
76 
77  std::string getHdfProxyUuid() const;
78 
82  ULONG64 getNodeCountAlongIAxis() const;
83 
87  ULONG64 getNodeCountAlongJAxis() const;
88 
92  ULONG64 getXyzPointCountOfPatch(const unsigned int & patchIndex) const;
93 
99  void getXyzPointsOfPatch(const unsigned int & patchIndex, double * xyzPoints) const;
100 
106  void getZValues(double * values) const;
107 
113  void getZValuesInGlobalCrs(double * values) const;
114 
120  double getXOrigin() const;
121 
127  double getYOrigin() const;
128 
134  double getXOriginInGlobalCrs() const;
135 
141  double getYOriginInGlobalCrs() const;
142 
148  double getXJOffset() const;
149 
155  double getYJOffset() const;
156 
162  double getXJOffsetInGlobalCrs() const;
163 
169  double getYJOffsetInGlobalCrs() const;
170 
176  double getXIOffset() const;
177 
183  double getYIOffset() const;
184 
190  double getXIOffsetInGlobalCrs() const;
191 
197  double getYIOffsetInGlobalCrs() const;
198 
202  bool isJSpacingConstant() const;
203 
207  bool isISpacingConstant() const;
208 
213  double getJSpacing() const;
214 
220  void getJSpacing(double* const jSpacings) const;
221 
226  double getISpacing() const;
227 
233  void getISpacing(double* const iSpacings) const;
234 
239  void setGeometryAsArray2dOfLatticePoints3d(
240  const unsigned int & numPointsInFastestDirection, const unsigned int & numPointsInSlowestDirection,
241  const double & xOrigin, const double & yOrigin, const double & zOrigin,
242  const double & xOffsetInFastestDirection, const double & yOffsetInFastestDirection, const double & zOffsetInFastestDirection,
243  const double & xOffsetInSlowestDirection, const double & yOffsetInSlowestDirection, const double & zOffsetInSlowestDirection,
244  const double & spacingInFastestDirection, const double & spacingInSlowestDirection);
245 
250  void setGeometryAsArray2dOfExplicitZ(
251  double * zValues,
252  const unsigned int & numI, const unsigned int & numJ, resqml2::AbstractHdfProxy* proxy,
253  Grid2dRepresentation * supportingGrid2dRepresentation,
254  const unsigned int & startIndexI = 0, const unsigned int & startIndexJ = 0,
255  const int & indexIncrementI = 1, const int & indexIncrementJ = 1);
256 
261  void setGeometryAsArray2dOfExplicitZ(
262  double * zValues,
263  const unsigned int & numI, const unsigned int & numJ, resqml2::AbstractHdfProxy* proxy,
264  const double & originX, const double & originY, const double & originZ,
265  const double & offsetIX, const double & offsetIY, const double & offsetIZ, const double & spacingI,
266  const double & offsetJX, const double & offsetJY, const double & offsetJZ, const double & spacingJ);
267 
272  std::string getSupportingRepresentationUuid() const;
273 
277  Grid2dRepresentation* getSupportingRepresentation() {return supportingRepresentation;}
278 
283  int getIndexOriginOnSupportingRepresentation() const;
284 
288  int getIndexOriginOnSupportingRepresentation(const unsigned int & dimension) const;
289 
293  int getNodeCountOnSupportingRepresentation(const unsigned int & dimension) const;
294 
298  int getIndexOffsetOnSupportingRepresentation(const unsigned int & dimension) const;
299 
300  unsigned int getPatchCount() const {return 1;}
301 
302  private:
303  std::vector<epc::Relationship> getAllEpcRelationships() const;
304  void importRelationshipSetFromEpc(common::EpcDocument* epcDoc);
305 
306  // Forward relationships
307  Grid2dRepresentation * supportingRepresentation;
308 
309  // Backward relationships
310  std::vector<AbstractRepresentation *> supportedRepresentationSet;
311 
313  double * zValues,
314  const unsigned int & numI, const unsigned int & numJ, resqml2::AbstractHdfProxy* proxy,
315  Grid2dRepresentation * supportingGrid2dRepresentation,
316  const unsigned int & startIndexI, const unsigned int & startIndexJ,
317  const int & indexIncrementI, const int & indexIncrementJ);
318  };
319 }
Grid2dRepresentation(gsoap_resqml2_0_1::_resqml2__Grid2dRepresentation *fromGsoap)
Definition: Grid2dRepresentation.h:67
void pushBackGeometryPatch(double *zValues, const unsigned int &numI, const unsigned int &numJ, resqml2::AbstractHdfProxy *proxy, Grid2dRepresentation *supportingGrid2dRepresentation, const unsigned int &startIndexI=0, const unsigned int &startIndexJ=0, const int &indexIncrementI=1, const int &indexIncrementJ=1)
Definition: Grid2dSetRepresentation.cpp:138
virtual std::string getXmlTag() const
Definition: Grid2dRepresentation.h:75
Definition: AbstractSurfaceRepresentation.h:40
Definition: AbstractHdfProxy.h:44
Definition: AbstractLocal3dCrs.h:40
Definition: Grid2dRepresentation.h:40
Definition: EpcDocument.h:79
Definition: EpcDocument.h:155
~Grid2dRepresentation()
Definition: Grid2dRepresentation.h:72
Definition: AbstractFeatureInterpretation.h:45
Grid2dRepresentation * getSupportingRepresentation()
Definition: Grid2dRepresentation.h:277