From 7c80ada340a393d183ecf4bdc20bba5a34553c62 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Tue, 12 Oct 2010 18:46:57 +0100 Subject: [PATCH 1/9] Fixed bug in usage of dynamic list --- .../directTopoChange/directTopoChange.C | 36 ++++++++++--------- .../repatchPolyTopoChanger.H | 4 +-- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/dynamicMesh/directTopoChange/directTopoChange/directTopoChange.C b/src/dynamicMesh/directTopoChange/directTopoChange/directTopoChange.C index b0aa049a2..fe3e727d7 100644 --- a/src/dynamicMesh/directTopoChange/directTopoChange/directTopoChange.C +++ b/src/dynamicMesh/directTopoChange/directTopoChange/directTopoChange.C @@ -577,7 +577,7 @@ Foam::label Foam::directTopoChange::getCellOrder // Now we have new-to-old in newOrder. newOrder.setSize(cellInOrder); - // Invert to get old-to-new. Make sure removed (i.e. unmapped) cells are -1. + // Invert to get old-to-new. Make sure removed (i.e. unmapped) cells are -1 oldToNew = invert(cellCellAddressing.size(), newOrder); return cellInOrder; @@ -904,7 +904,7 @@ void Foam::directTopoChange::compact << " at position " << faceI << endl << "Probably face has not been adapted for" << " removed points." << abort(FatalError); - } + } localPointMap[pointI] = newPointI++; } } @@ -1487,7 +1487,8 @@ void Foam::directTopoChange::resetZones { if (newZoneAddr[i] < pointMap_.size()) { - curPzRnb[i] = oldZone.whichPoint(pointMap_[newZoneAddr[i]]); + curPzRnb[i] = + oldZone.whichPoint(pointMap_[newZoneAddr[i]]); } else { @@ -1719,13 +1720,13 @@ void Foam::directTopoChange::calcFaceZonePointMap curFzPointRnb.setSize(newZoneMeshPoints.size()); - if( zoneI < oldFaceZoneMeshPointMaps.size() ) + if( zoneI < oldFaceZoneMeshPointMaps.size() ) { - //HR 22.11.09: cannot take reference to zero element of + //HR 22.11.09: cannot take reference to zero element of // oldFaceZoneMeshPointMaps. It may be empty. Hence this // if-statement needs to move out of the loop - const Map