Fesapi  2.0.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 "AbstractSurfaceRepresentation.h"
22 
23 namespace RESQML2_NS
24 {
27  {
28  public:
30  virtual ~Grid2dRepresentation() = default;
31 
37  DLL_IMPORT_OR_EXPORT virtual uint64_t getNodeCountAlongIAxis() const = 0;
38 
44  DLL_IMPORT_OR_EXPORT virtual uint64_t getNodeCountAlongJAxis() const = 0;
45 
46  DLL_IMPORT_OR_EXPORT uint64_t getXyzPointCountOfPatch(unsigned int patchIndex) const final;
47 
49  DLL_IMPORT_OR_EXPORT void getXyzPointsOfPatch(unsigned int patchIndex, double * xyzPoints) const final;
50 
61  DLL_IMPORT_OR_EXPORT virtual void getZValues(double * values) const = 0;
62 
74  DLL_IMPORT_OR_EXPORT void getZValuesInGlobalCrs(double * values) const;
75 
82  DLL_IMPORT_OR_EXPORT virtual double getXOrigin() const = 0;
83 
90  DLL_IMPORT_OR_EXPORT virtual double getYOrigin() const = 0;
91 
98  DLL_IMPORT_OR_EXPORT virtual double getZOrigin() const = 0;
99 
106  DLL_IMPORT_OR_EXPORT double getXOriginInGlobalCrs() const;
107 
114  DLL_IMPORT_OR_EXPORT double getYOriginInGlobalCrs() const;
115 
122  DLL_IMPORT_OR_EXPORT double getZOriginInGlobalCrs() const;
123 
133  DLL_IMPORT_OR_EXPORT virtual double getXJOffset() const = 0;
134 
144  DLL_IMPORT_OR_EXPORT virtual double getYJOffset() const = 0;
145 
155  DLL_IMPORT_OR_EXPORT virtual double getZJOffset() const = 0;
156 
166  DLL_IMPORT_OR_EXPORT double getXJOffsetInGlobalCrs() const;
167 
177  DLL_IMPORT_OR_EXPORT double getYJOffsetInGlobalCrs() const;
178 
188  DLL_IMPORT_OR_EXPORT double getZJOffsetInGlobalCrs() const;
189 
199  DLL_IMPORT_OR_EXPORT virtual double getXIOffset() const = 0;
200 
210  DLL_IMPORT_OR_EXPORT virtual double getYIOffset() const = 0;
211 
221  DLL_IMPORT_OR_EXPORT virtual double getZIOffset() const = 0;
222 
232  DLL_IMPORT_OR_EXPORT double getXIOffsetInGlobalCrs() const;
233 
243  DLL_IMPORT_OR_EXPORT double getYIOffsetInGlobalCrs() const;
244 
254  DLL_IMPORT_OR_EXPORT double getZIOffsetInGlobalCrs() const;
255 
263  DLL_IMPORT_OR_EXPORT virtual bool isJSpacingConstant() const = 0;
264 
272  DLL_IMPORT_OR_EXPORT virtual bool isISpacingConstant() const = 0;
273 
281  DLL_IMPORT_OR_EXPORT virtual double getJSpacing() const = 0;
282 
293  DLL_IMPORT_OR_EXPORT virtual void getJSpacing(double* jSpacings) const = 0;
294 
302  DLL_IMPORT_OR_EXPORT virtual double getISpacing() const = 0;
303 
314  DLL_IMPORT_OR_EXPORT virtual void getISpacing(double* iSpacings) const = 0;
315 
339  DLL_IMPORT_OR_EXPORT virtual void setGeometryAsArray2dOfLatticePoints3d(
340  unsigned int numPointsInFastestDirection, unsigned int numPointsInSlowestDirection,
341  double xOrigin, double yOrigin, double zOrigin,
342  double xOffsetInFastestDirection, double yOffsetInFastestDirection, double zOffsetInFastestDirection,
343  double xOffsetInSlowestDirection, double yOffsetInSlowestDirection, double zOffsetInSlowestDirection,
344  double spacingInFastestDirection, double spacingInSlowestDirection, RESQML2_NS::AbstractLocal3dCrs * localCrs = nullptr) = 0;
345 
377  DLL_IMPORT_OR_EXPORT virtual void setGeometryAsArray2dOfExplicitZ(
378  double * zValues,
379  unsigned int numI, unsigned int numJ, EML2_NS::AbstractHdfProxy* proxy,
380  Grid2dRepresentation * supportingGrid2dRepresentation, RESQML2_NS::AbstractLocal3dCrs * localCrs = nullptr,
381  unsigned int startIndexI = 0, unsigned int startIndexJ = 0,
382  int indexIncrementI = 1, int indexIncrementJ = 1) = 0;
383 
415  DLL_IMPORT_OR_EXPORT virtual void setGeometryAsArray2dOfExplicitZ(
416  double * zValues,
417  unsigned int numI, unsigned int numJ, EML2_NS::AbstractHdfProxy* proxy,
418  double originX, double originY, double originZ,
419  double offsetIX, double offsetIY, double offsetIZ, double spacingI,
420  double offsetJX, double offsetJY, double offsetJZ, double spacingJ, RESQML2_NS::AbstractLocal3dCrs * localCrs = nullptr) = 0;
421 
428  virtual COMMON_NS::DataObjectReference getSupportingRepresentationDor() const = 0;
429 
435  DLL_IMPORT_OR_EXPORT Grid2dRepresentation* getSupportingRepresentation() const;
436 
447  DLL_IMPORT_OR_EXPORT virtual int getIndexOriginOnSupportingRepresentation() const = 0;
448 
462  DLL_IMPORT_OR_EXPORT virtual int getIndexOriginOnSupportingRepresentation(unsigned int dimension) const = 0;
463 
476  DLL_IMPORT_OR_EXPORT virtual int getNodeCountOnSupportingRepresentation(unsigned int dimension) const = 0;
477 
490  DLL_IMPORT_OR_EXPORT virtual int getIndexOffsetOnSupportingRepresentation(unsigned int dimension) const = 0;
491 
492  DLL_IMPORT_OR_EXPORT unsigned int getPatchCount() const final {return 1;}
493 
495  DLL_IMPORT_OR_EXPORT static const char* XML_TAG;
496 
497  DLL_IMPORT_OR_EXPORT std::string getXmlTag() const final { return XML_TAG; }
498 
499  protected:
500 
508  DLL_IMPORT_OR_EXPORT Grid2dRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject) : AbstractSurfaceRepresentation(partialObject) {}
509 
513  Grid2dRepresentation() {}
514 
520  Grid2dRepresentation(gsoap_resqml2_0_1::_resqml20__Grid2dRepresentation* fromGsoap) : AbstractSurfaceRepresentation(fromGsoap) {}
521 
527  Grid2dRepresentation(gsoap_eml2_3::_resqml22__Grid2dRepresentation* fromGsoap) : AbstractSurfaceRepresentation(fromGsoap) {}
528 
543  double getComponentInGlobalCrs(double x, double y, double z, size_t componentIndex, bool withoutTranslation = false) const;
544 
546  void loadTargetRelationships() final;
547  };
548 }
An abstract surface representation. It is the parent class of structural surface representations,...
Definition: AbstractSurfaceRepresentation.h:33
A 2d grid representation.
Definition: Grid2dRepresentation.h:27
virtual double getISpacing() const =0
virtual double getYJOffset() const =0
virtual double getZOrigin() const =0
double getYJOffsetInGlobalCrs() const
virtual double getYIOffset() const =0
virtual void getJSpacing(double *jSpacings) const =0
unsigned int getPatchCount() const final
Definition: Grid2dRepresentation.h:492
virtual uint64_t getNodeCountAlongIAxis() const =0
void getZValuesInGlobalCrs(double *values) const
double getXJOffsetInGlobalCrs() const
virtual ~Grid2dRepresentation()=default
virtual double getZIOffset() const =0
Grid2dRepresentation * getSupportingRepresentation() const
virtual double getXOrigin() const =0
double getZIOffsetInGlobalCrs() const
virtual void setGeometryAsArray2dOfExplicitZ(double *zValues, unsigned int numI, unsigned int numJ, eml2::AbstractHdfProxy *proxy, double originX, double originY, double originZ, double offsetIX, double offsetIY, double offsetIZ, double spacingI, double offsetJX, double offsetJY, double offsetJZ, double spacingJ, resqml2::AbstractLocal3dCrs *localCrs=nullptr)=0
virtual void getISpacing(double *iSpacings) const =0
double getZOriginInGlobalCrs() const
void getXyzPointsOfPatch(unsigned int patchIndex, double *xyzPoints) const final
virtual int getNodeCountOnSupportingRepresentation(unsigned int dimension) const =0
virtual int getIndexOffsetOnSupportingRepresentation(unsigned int dimension) const =0
Gets the index offset of the nodes of the current geometry on a particular dimension of the supportin...
virtual double getXIOffset() const =0
std::string getXmlTag() const final
Definition: Grid2dRepresentation.h:497
virtual int getIndexOriginOnSupportingRepresentation() const =0
double getXIOffsetInGlobalCrs() const
virtual void getZValues(double *values) const =0
virtual void setGeometryAsArray2dOfLatticePoints3d(unsigned int numPointsInFastestDirection, unsigned int numPointsInSlowestDirection, double xOrigin, double yOrigin, double zOrigin, double xOffsetInFastestDirection, double yOffsetInFastestDirection, double zOffsetInFastestDirection, double xOffsetInSlowestDirection, double yOffsetInSlowestDirection, double zOffsetInSlowestDirection, double spacingInFastestDirection, double spacingInSlowestDirection, resqml2::AbstractLocal3dCrs *localCrs=nullptr)=0
virtual double getJSpacing() const =0
static const char * XML_TAG
Definition: Grid2dRepresentation.h:495
double getXOriginInGlobalCrs() const
virtual double getZJOffset() const =0
virtual common::DataObjectReference getSupportingRepresentationDor() const =0
virtual bool isJSpacingConstant() const =0
double getYIOffsetInGlobalCrs() const
uint64_t getXyzPointCountOfPatch(unsigned int patchIndex) const final
virtual uint64_t getNodeCountAlongJAxis() const =0
virtual void setGeometryAsArray2dOfExplicitZ(double *zValues, unsigned int numI, unsigned int numJ, eml2::AbstractHdfProxy *proxy, Grid2dRepresentation *supportingGrid2dRepresentation, resqml2::AbstractLocal3dCrs *localCrs=nullptr, unsigned int startIndexI=0, unsigned int startIndexJ=0, int indexIncrementI=1, int indexIncrementJ=1)=0
virtual int getIndexOriginOnSupportingRepresentation(unsigned int dimension) const =0
virtual double getXJOffset() const =0
double getYOriginInGlobalCrs() const
virtual bool isISpacingConstant() const =0
double getZJOffsetInGlobalCrs() const
virtual double getYOrigin() const =0