------------------------------------------------------------------------------
| 1315 | |
| 1316 | //------------------------------------------------------------------------------ |
| 1317 | void vtkExodusIIReaderPrivate::AddPointArray( |
| 1318 | vtkDataArray* src, BlockSetInfoType* bsinfop, vtkUnstructuredGrid* output) |
| 1319 | { |
| 1320 | vtkPointData* pd = output->GetPointData(); |
| 1321 | if (this->SqueezePoints) |
| 1322 | { |
| 1323 | // subset the array using PointMap |
| 1324 | vtkDataArray* dest = vtkDataArray::CreateDataArray(src->GetDataType()); |
| 1325 | dest->SetName(src->GetName()); |
| 1326 | dest->SetNumberOfComponents(src->GetNumberOfComponents()); |
| 1327 | dest->SetNumberOfTuples(bsinfop->NextSqueezePoint); |
| 1328 | std::map<vtkIdType, vtkIdType>::iterator it, itEnd; |
| 1329 | // |
| 1330 | // I moved the end condition of the loop out of the for(;;) loop. |
| 1331 | // Assuming it doesn't change within the loop itself! |
| 1332 | // The reason is that the code was making the call every loop. |
| 1333 | // |
| 1334 | itEnd = bsinfop->PointMap.end(); |
| 1335 | for (it = bsinfop->PointMap.begin(); it != itEnd; ++it) |
| 1336 | { |
| 1337 | pd->CopyTuple(src, dest, it->first, it->second); |
| 1338 | } |
| 1339 | pd->AddArray(dest); |
| 1340 | dest->FastDelete(); |
| 1341 | } |
| 1342 | else |
| 1343 | { |
| 1344 | pd->AddArray(src); |
| 1345 | } |
| 1346 | } |
| 1347 | |
| 1348 | //------------------------------------------------------------------------------ |
| 1349 | void vtkExodusIIReaderPrivate::InsertSetNodeCopies( |
no test coverage detected