21#include "AbstractColumnLayerGridRepresentation.h"
38 enum class geometryKind { UNKNOWN = 0, EXPLICIT = 1, PARAMETRIC = 2, LATTICE = 3, NO_GEOMETRY = 4};
64 const std::string & guid,
const std::string & title,
65 unsigned int iCount,
unsigned int jCount,
unsigned int kCount,
bool* kGaps =
nullptr, EML2_NS::AbstractHdfProxy* proxy =
nullptr);
89 const std::string & guid,
const std::string & title,
90 unsigned int iCount,
unsigned int jCount,
unsigned int kCount,
bool* kGaps =
nullptr, EML2_NS::AbstractHdfProxy* proxy =
nullptr);
150 DLL_IMPORT_OR_EXPORT
explicit AbstractIjkGridRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference* partialObject,
bool withTruncatedPillars =
false);
155 unloadSplitInformation();
204 DLL_IMPORT_OR_EXPORT uint64_t
getCellCount() const final {
return getICellCount() * getJCellCount() * getKCellCount(); }
215 DLL_IMPORT_OR_EXPORT
unsigned int getColumnCount()
const {
return getICellCount() * getJCellCount(); }
226 DLL_IMPORT_OR_EXPORT
unsigned int getPillarCount()
const {
return (getICellCount()+1) * (getJCellCount()+1); }
247 DLL_IMPORT_OR_EXPORT
void getKGaps(
bool * kGaps)
const;
505 DLL_IMPORT_OR_EXPORT
void getPillarGeometryIsDefined(
bool * pillarGeometryIsDefined,
bool reverseIAxis =
false,
bool reverseJAxis =
false)
const;
535 DLL_IMPORT_OR_EXPORT
void getCellGeometryIsDefinedFlags(
bool* cellGeometryIsDefinedFlags,
bool reverseIAxis =
false,
bool reverseJAxis=
false,
bool reverseKAxis=
false)
const;
597 DLL_IMPORT_OR_EXPORT
void loadBlockInformation(
unsigned int iInterfaceStart,
unsigned int iInterfaceEnd,
unsigned int jInterfaceStart,
unsigned int jInterfaceEnd,
unsigned int kInterfaceStart,
unsigned int kInterfaceEnd);
620 DLL_IMPORT_OR_EXPORT
bool isColumnEdgeSplitted(
unsigned int iColumn,
unsigned int jColumn,
unsigned int edge)
const;
668 const double* xyzPoints,
double & x,
double & y,
double & z)
const;
704 DLL_IMPORT_OR_EXPORT
void getXyzPointsOfKInterface(
unsigned int kInterface,
double * xyzPoints);
750 DLL_IMPORT_OR_EXPORT gsoap_resqml2_0_1::resqml20__KDirection
getKDirection()
const override;
759 virtual COMMON_NS::DataObjectReference
getHdfProxyDor()
const override {
throw std::logic_error(
"Partial object"); }
773 DLL_IMPORT_OR_EXPORT
virtual void getXyzPointsOfPatch(
unsigned int patchIndex,
double * xyzPoints)
const override;
776 DLL_IMPORT_OR_EXPORT
static constexpr char const* XML_TAG =
"IjkGridRepresentation";
779 DLL_IMPORT_OR_EXPORT
static constexpr char const* XML_TAG_TRUNCATED =
"TruncatedIjkGridRepresentation";
781 DLL_IMPORT_OR_EXPORT std::string
getXmlTag() const final;
783 DLL_IMPORT_OR_EXPORT uint64_t getPatchCount()
const override {
return 1;}
789 if (gsoapProxy2_0_1 !=
nullptr) {
return "resqml20"; }
790 if (gsoapProxy2_3 !=
nullptr) {
return "resqml22"; }
793 if (partialObject !=
nullptr) {
794 if (partialObject->ContentType.find(
"x-resqml+xml;version=2.0") != std::string::npos ||
795 partialObject->ContentType.find(
"resqml20.") == 0) {
return "resqml20"; }
796 if (partialObject->ContentType.find(
"x-resqml+xml;version=2.2") != std::string::npos ||
797 partialObject->ContentType.find(
"resqml22.") == 0) {
return "resqml22"; }
800 throw std::logic_error(
"Cannot infer what is the Energistics namespace of this instance.");
817 explicit AbstractIjkGridRepresentation(gsoap_resqml2_0_1::_resqml20__TruncatedIjkGridRepresentation* fromGsoap) : AbstractColumnLayerGridRepresentation(fromGsoap, true) {}
818 explicit AbstractIjkGridRepresentation(gsoap_eml2_3::_resqml22__IjkGridRepresentation* fromGsoap) : AbstractColumnLayerGridRepresentation(fromGsoap, false) {}
819 explicit AbstractIjkGridRepresentation(gsoap_eml2_3::_resqml22__TruncatedIjkGridRepresentation* fromGsoap) : AbstractColumnLayerGridRepresentation(fromGsoap, true) {}
821 gsoap_resqml2_0_1::_resqml20__IjkGridRepresentation* getSpecializedGsoapProxy2_0_1()
const;
822 gsoap_resqml2_0_1::_resqml20__TruncatedIjkGridRepresentation* getSpecializedTruncatedGsoapProxy2_0_1()
const;
823 gsoap_eml2_3::_resqml22__IjkGridRepresentation* getSpecializedGsoapProxy2_2()
const;
824 gsoap_eml2_3::_resqml22__TruncatedIjkGridRepresentation* getSpecializedTruncatedGsoapProxy2_2()
const;
833 gsoap_resqml2_0_1::resqml20__PointGeometry* getPointGeometry2_0_1(uint64_t patchIndex)
const final;
834 gsoap_eml2_3::resqml22__PointGeometry* getPointGeometry2_2(uint64_t patchIndex)
const final;
855 std::unique_ptr < std::vector< std::pair< unsigned int, std::vector<unsigned int> > > [] > splitInformation;
861 std::unique_ptr<uint32_t[]> kCellIndexWithGapLayer;
864 class BlockInformation
869 unsigned int iInterfaceStart;
871 unsigned int iInterfaceEnd;
873 unsigned int jInterfaceStart;
875 unsigned int jInterfaceEnd;
877 unsigned int kInterfaceStart;
879 unsigned int kInterfaceEnd;
882 std::map<unsigned int, unsigned int> globalToLocalSplitCoordinateLinesIndex;
884 BlockInformation(
unsigned int iNodeStart,
unsigned int iNodeEnd,
unsigned int jNodeStart,
unsigned int jNodeEnd,
unsigned int kNodeStart,
unsigned int kNodeEnd) :
885 iInterfaceStart(iNodeStart), iInterfaceEnd(iNodeEnd), jInterfaceStart(jNodeStart), jInterfaceEnd(jNodeEnd), kInterfaceStart(kNodeStart), kInterfaceEnd(kNodeEnd) {}
888 ~BlockInformation() =
default;
892 std::unique_ptr <BlockInformation> blockInformation;
912 void init(COMMON_NS::DataObjectRepository * repo,
913 const std::string & guid,
const std::string & title,
914 unsigned int iCount,
unsigned int jCount,
unsigned int kCount,
bool* kGaps, EML2_NS::AbstractHdfProxy* proxy =
nullptr);
Proxy class for an abstract column layer grid representation.
Definition AbstractColumnLayerGridRepresentation.h:27
Proxy class for an abstract IJK grid representation. This class is semantically abstract....
Definition AbstractIjkGridRepresentation.h:34
void getPillarGeometryIsDefined(bool *pillarGeometryIsDefined, bool reverseIAxis=false, bool reverseJAxis=false) const
AbstractIjkGridRepresentation(common::DataObjectRepository *repo, const std::string &guid, const std::string &title, unsigned int iCount, unsigned int jCount, unsigned int kCount, bool *kGaps=nullptr, eml2::AbstractHdfProxy *proxy=nullptr)
bool hasCellGeometryIsDefinedFlags() const
uint64_t getFaceCount() const
unsigned int getIPillarFromGlobalIndex(unsigned int globalIndex) const
unsigned int getJPillarFromGlobalIndex(unsigned int globalIndex) const
geometryKind
Definition AbstractIjkGridRepresentation.h:38
uint64_t getBlockSplitCoordinateLineCount() const
void setJCellCount(unsigned int jCount)
Sets the count of cells in the J direction.
void setICellCount(unsigned int iCount)
unsigned int getICellCount() const
gsoap_resqml2_0_1::resqml20__KDirection getKDirection() const override
void loadSplitInformation()
virtual ~AbstractIjkGridRepresentation()
Definition AbstractIjkGridRepresentation.h:153
virtual bool isNodeGeometryCompressed() const
Definition AbstractIjkGridRepresentation.h:748
unsigned int getIColumnFromGlobalIndex(unsigned int globalIndex) const
unsigned int getJColumnFromGlobalIndex(unsigned int globalIndex) const
uint64_t getXyzPointIndexFromCellCorner(unsigned int iCell, unsigned int jCell, unsigned int kCell, unsigned int corner) const
Gets the XYZ point index in the HDF dataset from the corner of a cell. This method requires that you ...
bool isColumnEdgeSplitted(unsigned int iColumn, unsigned int jColumn, unsigned int edge) const
Checks either a given column edge is splitted or not. This method requires that you have already load...
void getColumnsOfSplitCoordinateLines(unsigned int *columnIndices, bool reverseIAxis=false, bool reverseJAxis=false) const
uint64_t getSplitCoordinateLineCount() const
void setAllCellGeometryFlagsToDefined()
virtual geometryKind getGeometryKind() const
Definition AbstractIjkGridRepresentation.h:757
void setCellGeometryIsDefinedFlags(uint8_t *cellGeometryIsDefinedFlags, eml2::AbstractHdfProxy *proxy=nullptr)
std::string getXmlTag() const final
void loadBlockInformation(unsigned int iInterfaceStart, unsigned int iInterfaceEnd, unsigned int jInterfaceStart, unsigned int jInterfaceEnd, unsigned int kInterfaceStart, unsigned int kInterfaceEnd)
uint64_t getKGapsCount() const
virtual void getXyzPointsOfKInterfaceSequence(unsigned int kInterfaceStart, unsigned int kInterfaceEnd, double *xyzPoints)
Gets all the XYZ points of a particular sequence of K interfaces. XYZ points are given in the local C...
void getXyzPointOfBlockFromCellCorner(unsigned int iCell, unsigned int jCell, unsigned int kCell, unsigned int corner, const double *xyzPoints, double &x, double &y, double &z) const
Gets the x, y and z values of the corner of a cell of a given block. This method requires that you ha...
virtual common::DataObjectReference getHdfProxyDor() const override
Gets the data object reference of the HDF proxy which is used for storing the numerical values of thi...
Definition AbstractIjkGridRepresentation.h:759
uint64_t getXyzPointCountOfKInterface() const
AbstractIjkGridRepresentation(resqml2::AbstractFeatureInterpretation *interp, const std::string &guid, const std::string &title, unsigned int iCount, unsigned int jCount, unsigned int kCount, bool *kGaps=nullptr, eml2::AbstractHdfProxy *proxy=nullptr)
unsigned int getGlobalIndexColumnFromIjIndex(unsigned int iColumn, unsigned int jColumn) const
void getColumnCountOfSplitCoordinateLines(unsigned int *columnIndexCountPerSplitCoordinateLine) const
virtual std::string getXmlNamespace() const override
Definition AbstractIjkGridRepresentation.h:788
unsigned int getGlobalIndexPillarFromIjIndex(unsigned int iPillar, unsigned int jPillar) const
virtual void getXyzPointsOfBlock(double *xyzPoints)
Gets all the XYZ points of the current block. XYZ points are given in the local CRS....
bool isRightHanded() const
unsigned int getPillarCount() const
Definition AbstractIjkGridRepresentation.h:226
AbstractIjkGridRepresentation(gsoap_resqml2_0_1::eml20__DataObjectReference *partialObject, bool withTruncatedPillars=false)
void getCellGeometryIsDefinedFlags(bool *cellGeometryIsDefinedFlags, bool reverseIAxis=false, bool reverseJAxis=false, bool reverseKAxis=false) const
virtual void getXyzPointsOfPatch(unsigned int patchIndex, double *xyzPoints) const override
Gets all the xyz points of a particular patch of this representation. xyz points are given in the loc...
void getPillarsOfSplitCoordinateLines(unsigned int *pillarIndices, bool reverseIAxis=false, bool reverseJAxis=false) const
uint64_t getCellCount() const final
Definition AbstractIjkGridRepresentation.h:204
void unloadSplitInformation()
void getKGaps(bool *kGaps) const
unsigned int getJCellCount() const
uint64_t getXyzPointCountOfBlock() const
unsigned int getGlobalIndexCellFromIjkIndex(unsigned int iCell, unsigned int jCell, unsigned int kCell) const
unsigned int getColumnCount() const
Definition AbstractIjkGridRepresentation.h:215
virtual uint64_t getXyzPointCountOfPatch(unsigned int patchIndex) const override
uint64_t getSplitNodeCount() const