Fesapi 2.9.0.1
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
|
Proxy class for a sub-representation. A sub representation is an ordered list of indexable elements and/or indexable element pairs of an existing representation. More...
#include <SubRepresentation.h>
Public Member Functions | |
virtual | ~SubRepresentation ()=default |
virtual gsoap_eml2_3::eml23__IndexableElement | getElementKindOfPatch (unsigned int patchIndex, unsigned int elementIndicesIndex) const =0 |
virtual uint64_t | getElementCountOfPatch (unsigned int patchIndex) const =0 |
virtual void | getElementIndicesOfPatch (unsigned int patchIndex, unsigned int elementIndicesIndex, uint64_t *elementIndices) const =0 |
virtual void | getSupportingRepresentationIndicesOfPatch (unsigned int patchIndex, short *supportingRepresentationIndices) const =0 |
Gets the indices of the supporting representations that refer the selected elements indices of a particular patch of this sub-representation. | |
virtual bool | areElementIndicesPairwise (unsigned int patchIndex) const =0 |
virtual bool | areElementIndicesBasedOnLattice (unsigned int patchIndex, unsigned int elementIndicesIndex=0) const =0 |
virtual int64_t | getLatticeElementIndicesStartValue (unsigned int patchIndex, unsigned int elementIndicesIndex=0) const =0 |
virtual uint64_t | getLatticeElementIndicesDimensionCount (unsigned int patchIndex, unsigned int elementIndicesIndex=0) const =0 |
virtual int64_t | getLatticeElementIndicesOffsetValue (unsigned int latticeDimensionIndex, unsigned int patchIndex, unsigned int elementIndicesIndex=0) const =0 |
virtual uint64_t | getLatticeElementIndicesOffsetCount (unsigned int latticeDimensionIndex, unsigned int patchIndex, unsigned int elementIndicesIndex=0) const =0 |
virtual void | pushBackSubRepresentationPatch (gsoap_eml2_3::eml23__IndexableElement elementKind, uint64_t originIndex, unsigned int elementCountInSlowestDimension, unsigned int elementCountInMiddleDimension, unsigned int elementCountInFastestDimension)=0 |
void | pushBackSubRepresentationPatch (gsoap_eml2_3::eml23__IndexableElement elementKind, uint64_t elementCount, uint64_t *elementIndices, eml2 ::AbstractHdfProxy *proxy=nullptr, short *supportingRepIndices=nullptr) |
void | pushBackSubRepresentationPatch (gsoap_eml2_3::eml23__IndexableElement elementKind, uint64_t elementCount, eml2 ::AbstractHdfProxy *proxy=nullptr) |
void | setElementIndices (uint64_t *elementIndices, uint64_t elementCount, uint64_t offset, eml2 ::AbstractHdfProxy *proxy=nullptr, unsigned int patchIndex=(std::numeric_limits< unsigned int >::max)()) |
virtual void | pushBackSubRepresentationPatch (gsoap_eml2_3::eml23__IndexableElement elementKind0, gsoap_eml2_3::eml23__IndexableElement elementKind1, uint64_t elementCount, uint64_t *elementIndices0, uint64_t *elementIndices1, eml2 ::AbstractHdfProxy *proxy=nullptr)=0 |
virtual void | pushBackRefToExistingDataset (gsoap_eml2_3::eml23__IndexableElement elementKind, uint64_t elementCount, const std::string &elementDataset, int64_t nullValue, eml2 ::AbstractHdfProxy *proxy, const std::string &supportingRepDataset="")=0 |
uint64_t | getXyzPointCountOfPatch (unsigned int patchIndex) const override |
void | getXyzPointsOfPatch (unsigned int patchIndex, double *xyzPoints) const override |
virtual uint64_t | getPatchCount () const override=0 |
void | pushBackSupportingRepresentation (AbstractRepresentation *supportingRep) |
virtual uint64_t | getSupportingRepresentationCount () const =0 |
AbstractRepresentation * | getSupportingRepresentation (uint64_t index) const |
virtual common::DataObjectReference | getSupportingRepresentationDor (uint64_t index) const =0 |
virtual std::string | getXmlTag () const final |
void | loadTargetRelationships () final |
Static Public Attributes | |
static constexpr char const * | XML_TAG = "SubRepresentation" |
Proxy class for a sub-representation. A sub representation is an ordered list of indexable elements and/or indexable element pairs of an existing representation.
Because the representation concepts of topology, geometry, and property values are separate in RESQML, it is now possible to select a range of nodes, edges, faces, or volumes (cells) indices from the topological support of an existing representation to define a sub-representation. A sub- representation may describe a different feature interpretation using the same geometry or property as the "parent" representation. In this case, the only information exchanged is a set of potentially non-consecutive indices of the topological support of the representation.
|
virtualdefault |
Destructor does nothing since the memory is managed by the gsoap context.
|
pure virtual |
Checks if the element indices of a particular patch are based on a lattice or not.
std::out_of_range | If patchIndex is out of range. |
std::out_of_range | If elementIndicesIndex is out of range. Must be: 0 for non pairwise element indices; 0 or 1 for pairwise element indices (0 for the left and 1 for the right part of the pairs). |
patchIndex | Zero-based index of the patch. |
elementIndicesIndex | (Optional) In case of pairwise elements, allows to select the first (elementIndicesIndex = 0 ) or second (elementIndicesIndex = 1 ) element index of the pair. Default value is 0 , corresponding to both non-pairwise elements and first element of a pair. |
|
pure virtual |
Checks if the element indices of a particular patch are pairwise or not.
std::out_of_range | If patchIndex is out of range. |
patchIndex | Zero-based index of the patch. |
|
pure virtual |
Gets the count of the selected elements of a particular patch of this sub-representation.
std::out_of_range | If patchIndex is out of range. |
patchIndex | Zero-based index of the patch from which we want to count the selected elements. |
|
pure virtual |
Gets the indices of the selected elements for a particular patch of this sub-representation.
std::out_of_range | If patchIndex is out of range. |
std::out_of_range | If elementIndicesIndex is out of range. Must be: 0 for non pairwise element indices; 0 or 1 for pairwise element indices (0 for the left and 1 for the right part of the pairs). |
logic_error | If the selected elements indices of the patch are not stored in a HDF5 integer array. |
patchIndex | Zero-based index of the patch. | |
elementIndicesIndex | Must be equal to 0 if the element indices are not pairwise. This method must be called twice if the element indices are pairwise: one call with elementIndicesIndex = 0 for getting the indices of the left elements of the pair; one call with elementIndices = 1 for getting the indices of the right elements of the pair. | |
[out] | elementIndices | Output array for collecting the indices of the selected elements. It must be preallocated with getElementCountOfPatch() size. |
|
pure virtual |
Gets the kind of the selected elements for a particular patch of this sub-representation.
std::out_of_range | If patchIndex is out of range. |
std::out_of_range | If elementIndicesIndex is out of range. Must be: 0 for non pairwise element indices; 0 or 1 for pairwise element indices (0 for the left and 1 for the right part of the pairs). |
std::invalid_argument | If the kind of the selected elements we look for is not supported (the kind is neither a node, edge, face, volume nor pillar). |
patchIndex | Zero-based index of the patch. |
elementIndicesIndex | Must be equal to 0 if the element indices are not pairwise. This method must be called twice if the element indices are pairwise: one call with elementIndicesIndex = 0 for getting the kind of the left elements of the pair; one call with elementIndices = 1 for getting the kind of the right elements of the pair. |
|
pure virtual |
Gets the dimension count of the lattice the element indices of a particular patch are based on.
std::invalid_argument | If the element indices are not based on a lattice. |
std::out_of_range | If patchIndex is out of range. |
std::out_of_range | If elementIndicesIndex is out of range. Must be: 0 for non pairwise element indices; 0 or 1 for pairwise element indices (0 for the left and 1 for the right part of the pairs). |
patchIndex | Zero-based index of the patch. |
elementIndicesIndex | (Optional) In case of pairwise elements, allow to select the first (elementIndicesIndex = 0 ) or second (elementIndicesIndex = 1 ) element index of the pair. Default value is 0 , corresponding to both non-pairwise elements and first element of a pair. |
|
pure virtual |
Gets the offset count at a given dimension of the lattice the element indices of a particular patch are based on.
std::invalid_argument | If the element indices are not based on a lattice. |
std::out_of_range | If latticeDimensionIndex is out of range. |
std::out_of_range | If patchIndex is out of range. |
std::out_of_range | If elementIndicesIndex is out of range. Must be: 0 for non pairwise element indices; 0 or 1 for pairwise element indices (0 for the left and 1 for the right part of the pairs). |
latticeDimensionIndex | Zero-based index of the lattice dimension. |
patchIndex | Zero-based index of the patch. |
elementIndicesIndex | (Optional) In case of pairwise elements, allow to select the first (elementIndicesIndex = 0 ) or second (elementIndicesIndex = 1 ) element index of the pair. Default value is 0 , corresponding to both non- pairwise elements and first element of a pair. |
|
pure virtual |
Gets the offset value at a given dimension of the lattice the element indices of a particular patch are based on.
std::invalid_argument | If the element indices are not based on a lattice. |
std::out_of_range | If latticeDimensionIndex is out of range. |
std::out_of_range | If patchIndex is out of range. |
std::out_of_range | If elementIndicesIndex is out of range. Must be: 0 for non pairwise element indices; 0 or 1 for pairwise element indices (0 for the left and 1 for the right part of the pairs). |
latticeDimensionIndex | Zero-based index of the lattice dimension. |
patchIndex | Zero-based index of the patch. |
elementIndicesIndex | (Optional) In case of pairwise elements, allow to select the first (elementIndicesIndex = 0 ) or second (elementIndicesIndex = 1 ) element index of the pair. Default value is 0 , corresponding to both non- pairwise elements and first element of a pair. |
|
pure virtual |
Gets the start value of the lattice the element indices of a particular patch are based on.
std::invalid_argument | If the element indices are not based on a lattice. |
std::out_of_range | If patchIndex is out of range. |
std::out_of_range | If elementIndicesIndex is out of range. Must be: 0 for non pairwise element indices; 0 or 1 for pairwise element indices (0 for the left and 1 for the right part of the pairs). |
patchIndex | Zero-based index of the patch. |
elementIndicesIndex | (Optional) In case of pairwise elements, allow to select the first (elementIndicesIndex = 0 ) or second (elementIndicesIndex = 1 ) element index of the pair. Default value is 0 , corresponding to both non-pairwise elements and first element of a pair. |
AbstractRepresentation * resqml2::SubRepresentation::getSupportingRepresentation | ( | uint64_t | index | ) | const |
Gets the supporting representation located at a specific index of this sub-representation.
std::invalid_argument | If no supporting representation is already associated to this sub-representation. |
std::out_of_range | If index is out of range. |
index | Zero-based index of the supporting representation we look for. |
index
.
|
pure virtual |
Gets the count of supporting representations of this sub-representation.
|
pure virtual |
Gets the data object reference of the supporting representation located at a specific index of this sub-representation.
std::invalid_argument | If no supporting representation is already associated to this sub-representation. |
std::out_of_range | If index is out of range. |
index | Zero-based index of the supporting representation we look for. |
index
.
|
pure virtual |
Gets the indices of the supporting representations that refer the selected elements indices of a particular patch of this sub-representation.
std::out_of_range | If patchIndex is out of range. |
patchIndex | Zero-based index of the patch. | |
[out] | supportingRepresentationIndices | Output array for collecting the supporting representations indices. This array must be preallocated with getElementCountOfPatch() size. The index at a given position is the index of the supporting representation associated to the selected element (or the selected pair of elements) at the same position in the sub- elements) at the same position in the sub- representation patch. |
|
override |
Get the xyz point count in a given patch of this representation.
std::out_of_range | If patchIndex is out of range. |
std::logic_error | If this representation is partial. |
patchIndex | Zero-based index of the patch from which we look for the xyz points. |
patchIndex
. std::logic_error | If the kind of the selected elements of this patch is not node (non pairwise) or if the kind of the left part of the pairs of elements is not node (pairwise case). |
|
override |
Please do note use : not implemented yet.
|
final |
Loads target relationships
|
pure virtual |
Pushes back a new patch (without pairwise elements) in this sub-representation where the indices values have not to yet been written in the HDF5 file. The reason can be that the indices values already exist in an external file (only HDF5 for now) or that the writing of these indices values in the external file is postponed in time.
elementKind | The kind of (indexable) elements which constitutes the sub-representation patch. | |
elementCount | The count of elements which constitutes the sub- representation patch. | |
elementDataset | The HDF5 dataset name where the element indices are stored. If empty, the dataset will be named the same as the dataset naming convention fesapi : getHdfGroup() + subRep- >uuid + "/subrepresentation_elementIndices0_patch" + patchIndex; | |
nullValue | The null value which has been chosen in the referenced HDF5 dataset. | |
[in] | proxy | The HDF5 proxy where the values are already stored or will be stored. |
supportingRepDataset | (Optional) The HDF5 dataset name where the element indices are stored. If empty (default), no information about suppporting representation will be exported since there is only one suppporting representation for this whole patch. |
void resqml2::SubRepresentation::pushBackSubRepresentationPatch | ( | gsoap_eml2_3::eml23__IndexableElement | elementKind, |
uint64_t | elementCount, | ||
eml2 ::AbstractHdfProxy * | proxy = nullptr ) |
Pushes back a new patch (without pairwise elements) in this sub-representation. The pushed patch is uninitialized and values must be set to this new patch afterwards.
elementKind | The kind of (indexable) elements which constitutes the sub-representation patch. | |
[in] | elementIndices | The indices of the elements in the supporting representation. |
[in] | proxy | The HDF proxy where the numerical values (indices) are stored. |
void resqml2::SubRepresentation::pushBackSubRepresentationPatch | ( | gsoap_eml2_3::eml23__IndexableElement | elementKind, |
uint64_t | elementCount, | ||
uint64_t * | elementIndices, | ||
eml2 ::AbstractHdfProxy * | proxy = nullptr, | ||
short * | supportingRepIndices = nullptr ) |
Pushes back a new patch (without pairwise elements) in this sub-representation.
elementKind | The kind of (indexable) elements which constitutes the sub-representation patch. | |
elementCount | The count of elements which constitutes the sub- representation patch. | |
[in] | elementIndices | The indices of the elements in the supporting representation. |
[in] | proxy | The HDF proxy where the numerical values (indices) are stored. |
[in] | supportingRepIndices | (Optional) The indices of the supporting representation corresponding to the element indices. The count must be elementCount. |
|
pure virtual |
Pushes back a new lattice-based patch (without pairwise elements) in this sub-representation. The offset value is set to 1 in each dimension of the lattice.
elementKind | The kind of (indexable) elements which constitutes the sub-representation patch. |
originIndex | The index of the origin (its start value). |
elementCountInSlowestDimension | The number of elements in the slowest dimension (commonly in K dimension). |
elementCountInMiddleDimension | The number of elements in the middle dimension (commonly in J dimension). |
elementCountInFastestDimension | The number of elements in the fastest dimension (commonly in I dimension). |
|
pure virtual |
Pushes back a new patch in this sub-representation which is constituted by means of pairwise elements.
elementKind0 | The kind of (indexable) elements which constitutes the first part of the pair of elements of the sub-representation patch. | |
elementKind1 | The kind of (indexable) elements which constitutes the second part of the pair of elements of the sub-representation patch. | |
elementCount | The count of elements which constitutes the sub- representation patch. | |
[in,out] | elementIndices0 | The indices of the first part of the element pairs in the supporting representation. |
[in,out] | elementIndices1 | The indices of the second part of the element pairs in the supporting representation. |
[in,out] | proxy | The HDF proxy where the numerical values (indices) are stored. |
void resqml2::SubRepresentation::pushBackSupportingRepresentation | ( | AbstractRepresentation * | supportingRep | ) |
Pushes back a representation which is one of the support of this sub-representation. And push back this sub-representation as a subrepresentation of the representation as well.
std::invalid_argument | If supportingRep is nullptr. |
[in] | supportingRep | If representation to set as a supporting representation of this sub-representation. |
void resqml2::SubRepresentation::setElementIndices | ( | uint64_t * | elementIndices, |
uint64_t | elementCount, | ||
uint64_t | offset, | ||
eml2 ::AbstractHdfProxy * | proxy = nullptr, | ||
unsigned int | patchIndex = (std::numeric_limits< unsigned int >::max)() ) |
Set the element indices of an already created SubRepresentationPatch
std::invalid_argument | If proxy is nullptr and no default HDF proxy is defined into the data object repository. |
std::out_of_range | If patchIndex is strictly greater than patch count and different from unsigned int maximum value. |
[in] | elementIndices | All the element indices to set in the already created SubRepresentationPatch. |
elementCount | The number of elements to write. | |
offset | The offset value. | |
[in,out] | proxy | (Optional) The HDF proxy where to write the element indices. It must be already opened for writing and won't be closed in this method. If nullptr (default value), a default HDF proxy must be defined into the data object repository. |
patchIndex | (Optional) Zero-based index of the patch where to write the element indices. If not provided, its default value is by convention set to unsigned int maximum value and the element indices will be written in the last subrepresentation patch (the one with the greatest index). |
|
staticconstexpr |
The standard XML tag without XML namespace for serializing this data object