]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
cartesian_algo.py nearly OK with container under valgrind po/pv58
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 2 Mar 2020 11:29:01 +0000 (12:29 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 2 Mar 2020 11:29:01 +0000 (12:29 +0100)
src/SMDS/SMDS_UnstructuredGrid.cxx

index e06cf3ba2ca20b4b94634662f4fcf245ffd87049..059799f97f0819309a9f3480a3710fc6daea2c00 100644 (file)
@@ -246,10 +246,11 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<int>& idNodesOldToNew, int n
   // --- create new compacted Connectivity, Locations and Types
 
   int newConnectivitySize = this->Connectivity->GetNumberOfConnectivityEntries();
+  vtkIdTypeArray *tmp((vtkIdTypeArray *)(this->Connectivity->GetOffsetsArray()));
   if ( newCellSize != oldCellSize )
     for ( int i = 0; i < oldCellSize - 1; ++i )
       if ( this->Types->GetValue( i ) == VTK_EMPTY_CELL )
-        newConnectivitySize -= this->CellLocations->GetValue( i+1 ) - this->CellLocations->GetValue( i );
+        newConnectivitySize -= tmp->GetValue( i+1 ) - tmp->GetValue( i );
 
   vtkCellArray *newConnectivity = vtkCellArray::New();
   newConnectivity->Initialize();