+ };
+
+ class MEDFileField1TSStructItem;
+
+ class MEDMeshMultiLev : public RefCountObject
+ {
+ public:
+ std::size_t getHeapMemorySize() 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) throw(INTERP_KERNEL::Exception);
+ static MEDMeshMultiLev *New(const MEDFileMesh *m, const std::vector<int>& levs) throw(INTERP_KERNEL::Exception);
+ static MEDMeshMultiLev *NewOnlyOnNode(const MEDFileMesh *m, const DataArrayInt *pflOnNode) throw(INTERP_KERNEL::Exception);
+ void setNodeReduction(const DataArrayInt *nr);
+ bool isFastlyTheSameStruct(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs) const throw(INTERP_KERNEL::Exception);
+ DataArray *buildDataArray(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs, const DataArray *vals) const throw(INTERP_KERNEL::Exception);
+ virtual void selectPartOfNodes(const DataArrayInt *pflNodes) throw(INTERP_KERNEL::Exception) = 0;
+ virtual MEDMeshMultiLev *prepare() const throw(INTERP_KERNEL::Exception) = 0;
+ protected:
+ std::string getPflNameOfId(int id) const;
+ DataArray *constructDataArray(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs, const DataArray *vals) const throw(INTERP_KERNEL::Exception);
+ protected:
+ MEDMeshMultiLev();
+ MEDMeshMultiLev(const MEDMeshMultiLev& other);
+ MEDMeshMultiLev(const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+ protected:
+ std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > _pfls;
+ std::vector< INTERP_KERNEL::NormalizedCellType > _geo_types;
+ std::vector<int> _nb_entities;
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _node_reduction;
+ public:
+ static const int PARAMEDMEM_2_VTKTYPE_LGTH=34;
+ static const unsigned char PARAMEDMEM_2_VTKTYPE[PARAMEDMEM_2_VTKTYPE_LGTH];
+ };
+
+ class MEDStructuredMeshMultiLev;
+
+ class MEDUMeshMultiLev : public MEDMeshMultiLev
+ {
+ public:
+ static MEDUMeshMultiLev *New(const MEDFileUMesh *m, const std::vector<int>& levs) throw(INTERP_KERNEL::Exception);
+ static MEDUMeshMultiLev *New(const MEDFileUMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities) throw(INTERP_KERNEL::Exception);
+ void selectPartOfNodes(const DataArrayInt *pflNodes) throw(INTERP_KERNEL::Exception);
+ MEDMeshMultiLev *prepare() const throw(INTERP_KERNEL::Exception);
+ MEDUMeshMultiLev(const MEDStructuredMeshMultiLev& other, const MEDCouplingAutoRefCountObjectPtr<MEDCoupling1GTUMesh>& part);
+ void buildVTUArrays(DataArrayDouble *& coords, DataArrayByte *&types, DataArrayInt *&cellLocations, DataArrayInt *& cells, DataArrayInt *&faceLocations, DataArrayInt *&faces) const throw(INTERP_KERNEL::Exception);
+ private:
+ void reorderNodesIfNecessary(DataArrayDouble *coords, DataArrayInt *nodalConnVTK, DataArrayInt *polyhedNodalConnVTK) const throw(INTERP_KERNEL::Exception);
+ 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< MEDCouplingAutoRefCountObjectPtr<MEDCoupling1GTUMesh> > _parts;
+ };
+
+ class MEDStructuredMeshMultiLev : public MEDMeshMultiLev
+ {
+ public:
+ void selectPartOfNodes(const DataArrayInt *pflNodes) throw(INTERP_KERNEL::Exception);
+ virtual std::vector<int> getNodeGridStructure() const throw(INTERP_KERNEL::Exception) = 0;
+ protected:
+ MEDStructuredMeshMultiLev();
+ MEDStructuredMeshMultiLev(const MEDStructuredMeshMultiLev& other);
+ MEDStructuredMeshMultiLev(const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+ };
+
+ class MEDCMeshMultiLev : public MEDStructuredMeshMultiLev
+ {
+ public:
+ static MEDCMeshMultiLev *New(const MEDFileCMesh *m, const std::vector<int>& levs) throw(INTERP_KERNEL::Exception);
+ static MEDCMeshMultiLev *New(const MEDFileCMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities) throw(INTERP_KERNEL::Exception);
+ std::vector<int> getNodeGridStructure() const throw(INTERP_KERNEL::Exception);
+ MEDMeshMultiLev *prepare() const throw(INTERP_KERNEL::Exception);
+ std::vector< DataArrayDouble * > buildVTUArrays() const throw(INTERP_KERNEL::Exception);
+ private:
+ MEDCMeshMultiLev(const MEDCMeshMultiLev& other);
+ MEDCMeshMultiLev(const MEDFileCMesh *m, const std::vector<int>& levs);
+ MEDCMeshMultiLev(const MEDFileCMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+ private:
+ std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > _coords;
+ };
+
+ class MEDCurveLinearMeshMultiLev : public MEDStructuredMeshMultiLev
+ {
+ public:
+ static MEDCurveLinearMeshMultiLev *New(const MEDFileCurveLinearMesh *m, const std::vector<int>& levs) throw(INTERP_KERNEL::Exception);
+ static MEDCurveLinearMeshMultiLev *New(const MEDFileCurveLinearMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls , const std::vector<int>& nbEntities) throw(INTERP_KERNEL::Exception);
+ std::vector<int> getNodeGridStructure() const throw(INTERP_KERNEL::Exception);
+ MEDMeshMultiLev *prepare() const throw(INTERP_KERNEL::Exception);
+ void buildVTUArrays(DataArrayDouble *&coords, std::vector<int>& nodeStrct) const throw(INTERP_KERNEL::Exception);
+ private:
+ MEDCurveLinearMeshMultiLev(const MEDCurveLinearMeshMultiLev& other);
+ MEDCurveLinearMeshMultiLev(const MEDFileCurveLinearMesh *m, const std::vector<int>& levs);
+ MEDCurveLinearMeshMultiLev(const MEDFileCurveLinearMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+ private:
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> _coords;
+ std::vector<int> _structure;