Salome HOME
#18963 Minimize compiler warnings
[modules/smesh.git] / src / SMDS / SMDS_Mesh.hxx
index 38952f78cb5bcb17d540b1952418f3fc98078ff5..7e54f5efe14bf57d60576005a045fe91e57af0ed 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -66,8 +66,12 @@ public:
   virtual SMDS_ElemIteratorPtr elementGeomIterator(SMDSAbs_GeometryType type) const;
   virtual SMDS_ElemIteratorPtr elementEntityIterator(SMDSAbs_EntityType type) const;
 
-  virtual SMDS_NodeIteratorPtr shapeNodesIterator   (int shapeID, size_t nbElemsToReturn=-1) const;
-  virtual SMDS_ElemIteratorPtr shapeElementsIterator(int shapeID, size_t nbElemsToReturn=-1) const;
+  virtual SMDS_NodeIteratorPtr shapeNodesIterator   (int                  shapeID,
+                                                     size_t               nbElemsToReturn=-1,
+                                                     const SMDS_MeshNode* sm1stNode=0) const;
+  virtual SMDS_ElemIteratorPtr shapeElementsIterator(int                     shapeID,
+                                                     size_t                  nbElemsToReturn=-1,
+                                                     const SMDS_MeshElement* sm1stElem=0) const;
 
   SMDSAbs_ElementType GetElementType( const int id, const bool iselem ) const;
 
@@ -609,12 +613,16 @@ public:
   bool ChangeElementNodes(const SMDS_MeshElement * elem,
                           const SMDS_MeshNode    * nodes[],
                           const int                nbnodes);
+  bool ChangePolyhedronNodes(const SMDS_MeshElement *                 elem,
+                             const std::vector<const SMDS_MeshNode*>& nodes,
+                             const std::vector<int>&                  quantities);
 
   //virtual void Renumber (const bool isNodes, const int startID = 1, const int deltaID = 1);
   // Renumber all nodes or elements.
 
   virtual void CompactMesh();
-  bool IsCompacted();
+  virtual bool IsCompacted();
+  virtual bool HasNumerationHoles();
 
   template<class ELEMTYPE>
     static const ELEMTYPE* DownCast( const SMDS_MeshElement* e )
@@ -668,15 +676,15 @@ public:
 
   /*!
    * \brief Raise an exception if free memory (ram+swap) too low
-    * \param doNotRaise - if true, suppres exception, just return free memory size
+    * \param doNotRaise - if true, suppress exception, just return free memory size
     * \retval int - amount of available memory in MB or negative number in failure case
    */
-  static int CheckMemory(const bool doNotRaise=false) throw (std::bad_alloc);
+  static int CheckMemory(const bool doNotRaise=false);
 
-  int MaxNodeID() const;
-  int MinNodeID() const;
-  int MaxElementID() const;
-  int MinElementID() const;
+  virtual int MaxNodeID() const;
+  virtual int MinNodeID() const;
+  virtual int MaxElementID() const;
+  virtual int MinElementID() const;
 
   const SMDS_MeshInfo& GetMeshInfo() const { return myInfo; }
 
@@ -703,7 +711,7 @@ public:
   void Modified();
   vtkMTimeType GetMTime() const;
 
-protected:
+ protected:
   SMDS_Mesh(SMDS_Mesh * parent);
 
   void addChildrenWithNodes(std::set<const SMDS_MeshElement*>& setOfChildren,
@@ -720,6 +728,11 @@ protected:
     else if (z < zmin) zmin = z;
   }
 
+  void updateInverseElements( const SMDS_MeshElement *        element,
+                              const SMDS_MeshNode* const*     nodes,
+                              const int                       nbnodes,
+                              std::set<const SMDS_MeshNode*>& oldNodes );
+
   void setNbShapes( size_t nbShapes );