Salome HOME
Merge branch 'master' of salome:modules/med
[tools/medcoupling.git] / src / MEDLoader / MEDFileFieldOverView.hxx
index 0cc6f2bf454728a492d20666ec550b1b8d3950f8..b3b0436c56ab47cbe65ac2148fe6217402756053 100644 (file)
@@ -82,6 +82,7 @@ namespace ParaMEDMEM
     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;
@@ -122,9 +123,9 @@ namespace ParaMEDMEM
     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];
-    static const unsigned char HEXA27_PERM_ARRAY[27];
+    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;
@@ -147,8 +148,6 @@ namespace ParaMEDMEM
     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:
-    //! this boolean will desappear shortly. It is always equal to true except for the case where a partial cartesian mesh leads to a unstructured mesh.
-    bool _is_holding_a_ref_already_held;
     std::vector< MEDCouplingAutoRefCountObjectPtr<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.
     MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> _coords;
@@ -160,15 +159,21 @@ namespace ParaMEDMEM
     void selectPartOfNodes(const DataArrayInt *pflNodes);
     virtual std::vector<int> getNodeGridStructure() const = 0;
   protected:
-    MEDStructuredMeshMultiLev(const MEDFileStructuredMesh *m);
     MEDStructuredMeshMultiLev(const MEDStructuredMeshMultiLev& other);
     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);
     void dealWithImplicitUnstructuredMesh(const MEDFileMesh *m);
   protected:
+    void moveFaceToCell() const;
     bool prepareForImplicitUnstructuredMeshCase(MEDMeshMultiLev *&ret) const;
+  private:
+    void initStdFieldOfIntegers(const MEDFileStructuredMesh *m);
   protected:
     bool _is_internal;
+    MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _face_fam_ids;
+    bool _face_fam_ids_nocpy;
+    MEDCouplingAutoRefCountObjectPtr<DataArrayInt> _face_num_ids;
+    bool _face_num_ids_nocpy;
   };
 
   class MEDCMeshMultiLev : public MEDStructuredMeshMultiLev