From 33b631f7dea10bcef6fd02995330f6755b0245d2 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Mon, 2 Mar 2020 12:29:01 +0100 Subject: [PATCH] cartesian_algo.py nearly OK with container under valgrind --- src/SMDS/SMDS_UnstructuredGrid.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SMDS/SMDS_UnstructuredGrid.cxx b/src/SMDS/SMDS_UnstructuredGrid.cxx index e06cf3ba2..059799f97 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.cxx +++ b/src/SMDS/SMDS_UnstructuredGrid.cxx @@ -246,10 +246,11 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector& 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(); -- 2.39.2