]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Optimize cleanSubMesh( SMESH_subMesh * subMesh ) a bit
authoreap <eap@opencascade.com>
Thu, 8 Aug 2013 12:38:25 +0000 (12:38 +0000)
committereap <eap@opencascade.com>
Thu, 8 Aug 2013 12:38:25 +0000 (12:38 +0000)
src/SMESH/SMESH_subMesh.cxx

index 483495be5fa4cafabcbf9182920034dcb1f6882c..cf05b50bc4defa46c123074ca2ac5310520ad652 100644 (file)
@@ -1381,7 +1381,7 @@ static void cleanSubMesh( SMESH_subMesh * subMesh )
         const SMDS_MeshElement * elt = ite->next();
         //MESSAGE( " RM elt: "<<elt->GetID()<<" ( "<<elt->NbNodes()<<" )" );
         //meshDS->RemoveElement(elt);
-        meshDS->RemoveFreeElement(elt, subMeshDS);
+        meshDS->RemoveFreeElement(elt, 0);
       }
 
       SMDS_NodeIteratorPtr itn = subMeshDS->GetNodes();
@@ -1389,10 +1389,11 @@ static void cleanSubMesh( SMESH_subMesh * subMesh )
         const SMDS_MeshNode * node = itn->next();
         //MESSAGE( " RM node: "<<node->GetID());
         if ( node->NbInverseElements() == 0 )
-          meshDS->RemoveFreeNode(node, subMeshDS);
+          meshDS->RemoveFreeNode(node, 0);
         else // for StdMeshers_CompositeSegment_1D: node in one submesh, edge in another
           meshDS->RemoveNode(node);
       }
+      subMeshDS->Clear();
     }
   }
 }