+ };
+
+ class MEDFileField1TSStructItem;
+
+ class MEDMeshMultiLev : public RefCountObject
+ {
+ public:
+ std::size_t getHeapMemorySizeWithoutChildren() const;
+ std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
+ public:
+ static MEDMeshMultiLev *New(const MEDFileMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+ static MEDMeshMultiLev *New(const MEDFileMesh *m, const std::vector<int>& levs);
+ static MEDMeshMultiLev *NewOnlyOnNode(const MEDFileMesh *m, const DataArrayInt *pflOnNode);
+ void setNodeReduction(const DataArrayInt *nr);
+ void setCellReduction(const DataArrayInt *cr);
+ bool isFastlyTheSameStruct(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs) const;
+ MEDLOADER_EXPORT DataArray *buildDataArray(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs, const DataArray *vals) const;
+ MEDLOADER_EXPORT void retrieveFamilyIdsOnCells(DataArrayInt *& famIds, bool& isWithoutCopy) const;
+ MEDLOADER_EXPORT void retrieveNumberIdsOnCells(DataArrayInt *& numIds, bool& isWithoutCopy) const;
+ MEDLOADER_EXPORT void retrieveFamilyIdsOnNodes(DataArrayInt *& famIds, bool& isWithoutCopy) const;
+ MEDLOADER_EXPORT void retrieveNumberIdsOnNodes(DataArrayInt *& numIds, bool& isWithoutCopy) const;
+ MEDLOADER_EXPORT DataArrayInt *retrieveGlobalNodeIdsIfAny() const;
+ MEDLOADER_EXPORT std::vector< INTERP_KERNEL::NormalizedCellType > getGeoTypes() const;
+ void setFamilyIdsOnCells(DataArrayInt *famIds);
+ void setNumberIdsOnCells(DataArrayInt *numIds);
+ void setFamilyIdsOnNodes(DataArrayInt *famIds);
+ void setNumberIdsOnNodes(DataArrayInt *numIds);
+ virtual void selectPartOfNodes(const DataArrayInt *pflNodes) = 0;
+ virtual MEDMeshMultiLev *prepare() const = 0;
+ int getNumberOfCells(INTERP_KERNEL::NormalizedCellType t) const;
+ int getNumberOfNodes() const;
+ protected:
+ std::string getPflNameOfId(int id) const;
+ DataArray *constructDataArray(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs, const DataArray *vals) const;
+ virtual void appendVertices(const DataArrayInt *verticesToAdd, DataArrayInt *nr);
+ protected:
+ MEDMeshMultiLev(const MEDFileMesh *mesh);
+ MEDMeshMultiLev(const MEDMeshMultiLev& other);
+ MEDMeshMultiLev(const MEDFileMesh *mesh, int nbNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+ protected:
+ const MEDFileMesh *_mesh;
+ std::vector< MCAuto<DataArrayInt> > _pfls;
+ std::vector< INTERP_KERNEL::NormalizedCellType > _geo_types;
+ std::vector<int> _nb_entities;
+ MCAuto<DataArrayInt> _node_reduction;
+ int _nb_nodes;
+ //
+ MCAuto<DataArrayInt> _cell_fam_ids;
+ MCAuto<DataArrayInt> _cell_num_ids;
+ MCAuto<DataArrayInt> _node_fam_ids;
+ MCAuto<DataArrayInt> _node_num_ids;
+ public:
+ MEDLOADER_EXPORT static const int PARAMEDMEM_2_VTKTYPE_LGTH=34;
+ MEDLOADER_EXPORT static const unsigned char PARAMEDMEM_2_VTKTYPE[PARAMEDMEM_2_VTKTYPE_LGTH];
+ MEDLOADER_EXPORT static const unsigned char HEXA27_PERM_ARRAY[27];
+ };
+
+ class MEDStructuredMeshMultiLev;
+
+ class MEDUMeshMultiLev : public MEDMeshMultiLev
+ {
+ public:
+ static MEDUMeshMultiLev *New(const MEDFileUMesh *m, const std::vector<int>& levs);
+ static MEDUMeshMultiLev *New(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+ void selectPartOfNodes(const DataArrayInt *pflNodes);
+ MEDMeshMultiLev *prepare() const;
+ MEDUMeshMultiLev(const MEDStructuredMeshMultiLev& other, const MCAuto<MEDCoupling1GTUMesh>& part);
+ MEDLOADER_EXPORT bool buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *&types, DataArrayInt *&cellLocations, DataArrayInt *& cells, DataArrayInt *&faceLocations, DataArrayInt *&faces) const;
+ protected:
+ void appendVertices(const DataArrayInt *verticesToAdd, DataArrayInt *nr);
+ private:
+ void reorderNodesIfNecessary(MCAuto<DataArrayDouble>& coords, DataArrayInt *nodalConnVTK, DataArrayInt *polyhedNodalConnVTK) const;
+ private:
+ MEDUMeshMultiLev(const MEDUMeshMultiLev& other);
+ MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<int>& levs);
+ MEDUMeshMultiLev(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+ private:
+ std::vector< MCAuto<MEDCoupling1GTUMesh> > _parts;
+ //! this attribute is used only for mesh with no cells but having coordinates. For classical umeshes those pointer is equal to pointer of coordinates of instances in this->_parts.
+ MCAuto<DataArrayDouble> _coords;