Salome HOME
23418: [OCC] Mesh: Minimization of memory usage of SMESH
[modules/smesh.git] / src / SMESH / SMESH_Gen.cxx
index bd5654c89588eb1bd05ddde3ae963e978e7cd8eb..f87162e45de947a63c8c93497a4f68bead3d03e5 100644 (file)
@@ -20,7 +20,7 @@
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//  SMESH SMESH : implementaion of SMESH idl descriptions
+//  SMESH SMESH : implementation of SMESH idl descriptions
 //  File   : SMESH_Gen.cxx
 //  Author : Paul RASCLE, EDF
 //  Module : SMESH
@@ -54,9 +54,6 @@
 
 using namespace std;
 
-//#include <vtkDebugLeaks.h>
-
-
 //=============================================================================
 /*!
  *  Constructor
@@ -68,9 +65,7 @@ SMESH_Gen::SMESH_Gen()
   _localId = 0;
   _hypId   = 0;
   _segmentation = _nbSegments = 10;
-  SMDS_Mesh::_meshList.clear();
   _compute_canceled = false;
-  //vtkDebugLeaks::SetExitError(0);
 }
 
 namespace
@@ -121,7 +116,7 @@ SMESH_Mesh* SMESH_Gen::CreateMesh(int theStudyId, bool theIsEmbeddedMode)
 {
   Unexpect aCatch(SalomeException);
 
-  // Get studyContext, create it if it does'nt exist, with a SMESHDS_Document
+  // Get studyContext, create it if it doesn't exist, with a SMESHDS_Document
   StudyContextStruct *aStudyContext = GetStudyContext(theStudyId);
 
   // create a new SMESH_mesh object
@@ -407,8 +402,10 @@ bool SMESH_Gen::Compute(SMESH_Mesh &          aMesh,
   }
 
   if ( aCompactMesh )
-    aMesh.GetMeshDS()->compactMesh();
-
+  {
+    aMesh.GetMeshDS()->Modified();
+    aMesh.GetMeshDS()->CompactMesh();
+  }
   return ret;
 }
 
@@ -675,7 +672,7 @@ static bool checkConformIgnoredAlgos(SMESH_Mesh&               aMesh,
           checkConform = false; // no more check conformity
           INFOS( "ERROR: Local <" << algo->GetName() <<
                 "> would produce not conform mesh: "
-                "<Not Conform Mesh Allowed> hypotesis is missing");
+                "<Not Conform Mesh Allowed> hypothesis is missing");
           theErrors.push_back( SMESH_Gen::TAlgoStateError() );
           theErrors.back().Set( SMESH_Hypothesis::HYP_NOTCONFORM, algo, false );
         }
@@ -1151,7 +1148,7 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_subMesh * aSubMesh,
 
 StudyContextStruct *SMESH_Gen::GetStudyContext(int studyId)
 {
-  // Get studyContext, create it if it does'nt exist, with a SMESHDS_Document
+  // Get studyContext, create it if it doesn't exist, with a SMESHDS_Document
 
   if (_mapStudyContext.find(studyId) == _mapStudyContext.end())
   {