]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESHDS/SMESHDS_SubMesh.hxx
Salome HOME
0020200: EDF SMESH 983: changing algo of a mesh and switching back to original algo...
[modules/smesh.git] / src / SMESHDS / SMESHDS_SubMesh.hxx
index 7b2eaa4169ada04d6018cbd49e6cd976d36bbbde..f9ce541fade7d97f10101fbda9f5197398d9e7a2 100644 (file)
@@ -65,9 +65,14 @@ class SMESHDS_EXPORT SMESHDS_SubMesh
   void Clear();
 
  private:
-  //const SMDS_Mesh * myMesh;
-  std::set<const SMDS_MeshElement*> myElements;
-  std::set<const SMDS_MeshNode*>    myNodes;
-  std::set<const SMESHDS_SubMesh*>  mySubMeshes;
+  struct TIDCompare { // to have nodes and elements sorted by ID
+    bool operator () (const SMDS_MeshElement* e1, const SMDS_MeshElement* e2) const
+    { return e1->GetID() < e2->GetID(); }
+  };
+  typedef std::set<const SMDS_MeshElement*, TIDCompare > TElemSet;
+  typedef std::set<const SMDS_MeshNode*   , TIDCompare>  TNodeSet;
+  TElemSet myElements;
+  TNodeSet myNodes;
+  std::set<const SMESHDS_SubMesh*> mySubMeshes;
 };
 #endif