Salome HOME
API modification : input string have type :
[tools/medcoupling.git] / src / MEDLoader / MEDFileFieldOverView.hxx
index ff4ce6c418c86bf30dbaaa3149e5dc2f74527c20..d1c6b1cc61445a4a5c927c9f8394d845c8cf2f7f 100644 (file)
@@ -39,6 +39,7 @@ namespace ParaMEDMEM
   class MEDFileMesh;
   class MEDFileUMesh;
   class MEDFileCMesh;
+  class MEDFileStructuredMesh;
   class MEDFileCurveLinearMesh;
   class MEDFileFieldGlobs;
   class MEDFileFieldGlobsReal;
@@ -80,6 +81,14 @@ namespace ParaMEDMEM
     void setNodeReduction(const DataArrayInt *nr);
     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;
+    void setFamilyIdsOnCells(DataArrayInt *famIds, bool isNoCopy);
+    void setNumberIdsOnCells(DataArrayInt *numIds, bool isNoCopy);
+    void setFamilyIdsOnNodes(DataArrayInt *famIds, bool isNoCopy);
+    void setNumberIdsOnNodes(DataArrayInt *numIds, bool isNoCopy);
     virtual void selectPartOfNodes(const DataArrayInt *pflNodes) = 0;
     virtual MEDMeshMultiLev *prepare() const = 0;
     int getNumberOfCells(INTERP_KERNEL::NormalizedCellType t) const;
@@ -97,6 +106,15 @@ namespace ParaMEDMEM
     std::vector<int> _nb_entities;
     MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _node_reduction;
     int _nb_nodes;
+    //
+    MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _cell_fam_ids;
+    bool _cell_fam_ids_nocpy;
+    MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _cell_num_ids;
+    bool _cell_num_ids_nocpy;
+    MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _node_fam_ids;
+    bool _node_fam_ids_nocpy;
+    MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _node_num_ids;
+    bool _node_num_ids_nocpy;
   public:
     static const int PARAMEDMEM_2_VTKTYPE_LGTH=34;
     static const unsigned char PARAMEDMEM_2_VTKTYPE[PARAMEDMEM_2_VTKTYPE_LGTH];
@@ -131,7 +149,10 @@ namespace ParaMEDMEM
   protected:
     MEDStructuredMeshMultiLev();
     MEDStructuredMeshMultiLev(const MEDStructuredMeshMultiLev& other);
-    MEDStructuredMeshMultiLev(int nbOfNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+    MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, const std::vector<int>& lev);
+    MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m, int nbOfNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+  protected:
+    bool _is_internal;
   };
   
   class MEDCMeshMultiLev : public MEDStructuredMeshMultiLev
@@ -141,7 +162,7 @@ namespace ParaMEDMEM
     static MEDCMeshMultiLev *New(const MEDFileCMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
     std::vector<int> getNodeGridStructure() const;
     MEDMeshMultiLev *prepare() const;
-    MEDLOADER_EXPORT std::vector< DataArrayDouble * > buildVTUArrays() const;
+    MEDLOADER_EXPORT std::vector< DataArrayDouble * > buildVTUArrays(bool& isInternal) const;
   private:
     MEDCMeshMultiLev(const MEDCMeshMultiLev& other);
     MEDCMeshMultiLev(const MEDFileCMesh *m, const std::vector<int>& levs);
@@ -157,7 +178,7 @@ namespace ParaMEDMEM
     static MEDCurveLinearMeshMultiLev *New(const MEDFileCurveLinearMesh *m, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls , const std::vector<int>& nbEntities);
     std::vector<int> getNodeGridStructure() const;
     MEDMeshMultiLev *prepare() const;
-    MEDLOADER_EXPORT void buildVTUArrays(DataArrayDouble *&coords, std::vector<int>& nodeStrct) const;
+    MEDLOADER_EXPORT void buildVTUArrays(DataArrayDouble *&coords, std::vector<int>& nodeStrct, bool& isInternal) const;
   private:
     MEDCurveLinearMeshMultiLev(const MEDCurveLinearMeshMultiLev& other);
     MEDCurveLinearMeshMultiLev(const MEDFileCurveLinearMesh *m, const std::vector<int>& levs);
@@ -187,7 +208,7 @@ namespace ParaMEDMEM
     int getNbOfIntegrationPts(const MEDFileFieldGlobsReal *globs) const;
     //! warning this method also set _nb_of_entity attribute !
     void checkInRange(int nbOfEntity, int nip, const MEDFileFieldGlobsReal *globs);
-    bool isFastlyEqual(int& startExp, INTERP_KERNEL::NormalizedCellType gt, const char *pflName) const;
+    bool isFastlyEqual(int& startExp, INTERP_KERNEL::NormalizedCellType gt, const std::string& pflName) const;
     bool operator==(const MEDFileField1TSStructItem2& other) const throw(INTERP_KERNEL::Exception);
     bool isCellSupportEqual(const MEDFileField1TSStructItem2& other, const MEDFileFieldGlobsReal *globs) const;
     bool isNodeSupportEqual(const MEDFileField1TSStructItem2& other, const MEDFileFieldGlobsReal *globs) const;