Salome HOME
End of auto indentation with Eclipse. And one bug found.
[modules/med.git] / src / MEDLoader / MEDFileFieldOverView.hxx
index 6ec36a1f3b5363125c52a2bb98441dd4c7351fd9..84dfed4830924630b084fca77299b3ea7f8733e2 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -54,10 +54,13 @@ namespace ParaMEDMEM
     std::vector<const BigMemoryObject *> getDirectChildren() const;
     const MEDFileMesh *getTheMesh() const { return _mesh; }
     int getNumberOfNodes() const { return _nb_nodes; }
+    bool doesManageGeoType(INTERP_KERNEL::NormalizedCellType t) const;
     int getNumberOfElemsOfGeoType(INTERP_KERNEL::NormalizedCellType t) const;
     int getLevelOfGeoType(INTERP_KERNEL::NormalizedCellType t) const;
     int getNumberOfLevs() const;
     int getNumberOfGeoTypesInLev(int relativeLev) const;
+    // non const methods
+    void appendIfImplicitType(INTERP_KERNEL::NormalizedCellType t);
   private:
     MEDFileMeshStruct(const MEDFileMesh *mesh);
   private:
@@ -66,9 +69,9 @@ namespace ParaMEDMEM
     int _nb_nodes;
     std::vector< std::vector<int> > _geo_types_distrib;
   }; 
-  
+
   class MEDFileField1TSStructItem;
-  
+
   class MEDMeshMultiLev : public RefCountObject
   {
   public:
@@ -99,10 +102,11 @@ namespace ParaMEDMEM
     DataArray *constructDataArray(const MEDFileField1TSStructItem& fst, const MEDFileFieldGlobsReal *globs, const DataArray *vals) const;
     virtual void appendVertices(const DataArrayInt *verticesToAdd, DataArrayInt *nr);
   protected:
-    MEDMeshMultiLev();
+    MEDMeshMultiLev(const MEDFileMesh *mesh);
     MEDMeshMultiLev(const MEDMeshMultiLev& other);
-    MEDMeshMultiLev(int nbNodes, const std::vector<INTERP_KERNEL::NormalizedCellType>& gts, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& nbEntities);
+    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< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > _pfls;
     std::vector< INTERP_KERNEL::NormalizedCellType > _geo_types;
     std::vector<int> _nb_entities;
@@ -120,10 +124,11 @@ namespace ParaMEDMEM
   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];
   };
-  
+
   class MEDStructuredMeshMultiLev;
-  
+
   class MEDUMeshMultiLev : public MEDMeshMultiLev
   {
   public:
@@ -153,14 +158,17 @@ namespace ParaMEDMEM
     void selectPartOfNodes(const DataArrayInt *pflNodes);
     virtual std::vector<int> getNodeGridStructure() const = 0;
   protected:
-    MEDStructuredMeshMultiLev();
+    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:
+    bool prepareForImplicitUnstructuredMeshCase(MEDMeshMultiLev *&ret) const;
   protected:
     bool _is_internal;
   };
-  
+
   class MEDCMeshMultiLev : public MEDStructuredMeshMultiLev
   {
   public:
@@ -215,7 +223,7 @@ namespace ParaMEDMEM
     //! 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 std::string& pflName) const;
-    bool operator==(const MEDFileField1TSStructItem2& other) const throw(INTERP_KERNEL::Exception);
+    bool operator==(const MEDFileField1TSStructItem2& other) const;
     bool isCellSupportEqual(const MEDFileField1TSStructItem2& other, const MEDFileFieldGlobsReal *globs) const;
     bool isNodeSupportEqual(const MEDFileField1TSStructItem2& other, const MEDFileFieldGlobsReal *globs) const;
     static MEDFileField1TSStructItem2 BuildAggregationOf(const std::vector<const MEDFileField1TSStructItem2 *>& objs, const MEDFileFieldGlobsReal *globs);
@@ -235,14 +243,14 @@ namespace ParaMEDMEM
     MEDFileField1TSStructItem() { }
     MEDFileField1TSStructItem(TypeOfField a, const std::vector< MEDFileField1TSStructItem2 >& b);
     void checkWithMeshStruct(const MEDFileMeshStruct *mst, const MEDFileFieldGlobsReal *globs);
-    bool operator==(const MEDFileField1TSStructItem& other) const throw(INTERP_KERNEL::Exception);
+    bool operator==(const MEDFileField1TSStructItem& other) const;
     MEDLOADER_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
     MEDLOADER_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
     bool isEntityCell() const;
     bool isComputed() const { return _computed; }
     TypeOfField getType() const { return _type; }
     std::size_t getNumberOfItems() const { return _items.size(); }
-    const MEDFileField1TSStructItem2& operator[](std::size_t i) const throw(INTERP_KERNEL::Exception);
+    const MEDFileField1TSStructItem2& operator[](std::size_t i) const;
     //
     bool isCellSupportEqual(const MEDFileField1TSStructItem& other, const MEDFileFieldGlobsReal *globs) const;
     bool isNodeSupportEqual(const MEDFileField1TSStructItem& other, const MEDFileFieldGlobsReal *globs) const;