Salome HOME
Fix regressions of tests
authoreap <eap@opencascade.com>
Thu, 12 Apr 2018 11:36:22 +0000 (14:36 +0300)
committereap <eap@opencascade.com>
Thu, 12 Apr 2018 11:36:22 +0000 (14:36 +0300)
mostly connected to 23418: [CEA] Mesh: Minimization of memory usage of SMESH

src/SMDS/SMDS_ElementFactory.hxx
src/SMDS/SMDS_MeshCell.cxx
src/SMESH/SMESH_MeshEditor.cxx

index 3dbc1ab..18c3d94 100644 (file)
@@ -352,7 +352,8 @@ typedef _Range< bool > _UsedRange;    // range of used elements
 typedef _RangeSet< _ShapeIDRange > TSubIDRangeSet;
 typedef _RangeSet< _UsedRange >    TUsedRangeSet;
 typedef boost::dynamic_bitset<>    TBitSet;
-typedef float                       TParam;
+//typedef float                       TParam;
+typedef double                     TParam;
 
 //------------------------------------------------------------------------------------
 /*!
index 5407af6..4aaeed2 100644 (file)
@@ -422,12 +422,15 @@ namespace
 
 void SMDS_MeshCell::InitStaticMembers()
 {
-  initCellProps();
-  initVtkTypes();
-  initToVtkInterlaces();
-  initReverseInterlaces();
-  initQuadInterlace();
-  initFromVtkInterlaces();
+  if ( theCellProps.empty() )
+  {
+    initCellProps();
+    initVtkTypes();
+    initToVtkInterlaces();
+    initReverseInterlaces();
+    initQuadInterlace();
+    initFromVtkInterlaces();
+  }
 }
 
 void SMDS_MeshCell::init( SMDSAbs_EntityType theEntity, int theNbNodes, ... )
index e9dbc5a..d06ce73 100644 (file)
@@ -7168,8 +7168,11 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes,
     const SMDS_MeshNode* nToKeep = nnIt->second;
     TNodeNodeMap::iterator nnIt_i = nodeNodeMap.find( nToKeep );
     while ( nnIt_i != nodeNodeMap.end() && nnIt_i->second != nnIt->second )
+    {
       nToKeep = nnIt_i->second;
-    nnIt->second = nToKeep;
+      nnIt->second = nToKeep;
+      nnIt_i = nodeNodeMap.find( nToKeep );
+    }
   }
 
   if ( theAvoidMakingHoles )
@@ -8526,6 +8529,7 @@ SMESH_MeshEditor::SewFreeBorder (const SMDS_MeshNode* theBordFirstNode,
   for ( ; groupIt != nodeGroupsToMerge.end(); groupIt++ )
   {
     const list<const SMDS_MeshNode*>& nodes = *groupIt;
+    if ( nodes.front()->IsNull() ) continue;
     SMDS_ElemIteratorPtr segIt = nodes.front()->GetInverseElementIterator( SMDSAbs_Edge );
     while ( segIt->more() )
       segments.insert( segIt->next() );