diff --git a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C index 037e3a18b2..356617bd60 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C +++ b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C @@ -148,7 +148,7 @@ void Foam::cellSplitter::setRefinement ) { addedPoints_.clear(); - addedPoints_.resize(cellToMidPoint.size()); + addedPoints_.reserve(cellToMidPoint.size()); // @@ -184,7 +184,7 @@ void Foam::cellSplitter::setRefinement // Add cells (first one is modified original cell) // - Map cellToCells(cellToMidPoint.size()); + Map cellToCells(2*cellToMidPoint.size()); forAllConstIters(cellToMidPoint, iter) { diff --git a/applications/utilities/mesh/conversion/ensightToFoam/ensightMeshReader.C b/applications/utilities/mesh/conversion/ensightToFoam/ensightMeshReader.C index 39c0f2e7e6..91be645d68 100644 --- a/applications/utilities/mesh/conversion/ensightToFoam/ensightMeshReader.C +++ b/applications/utilities/mesh/conversion/ensightToFoam/ensightMeshReader.C @@ -102,7 +102,7 @@ void Foam::fileFormats::ensightMeshReader::readIDs foamToElem.resize(sz+nShapes); if (doRead) { - elemToFoam.resize(sz+nShapes); + elemToFoam.reserve(elemToFoam.size()+nShapes); for (label shapei = 0; shapei < nShapes; shapei++) { label elemi; diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index 0fdc03b2c7..f46d9c2b86 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -76,14 +76,14 @@ label nCells = 0; bool hangingNodes = false; -pointField points(0); -faceList faces(0); -labelList owner(0); -labelList neighbour(0); +pointField points; +faceList faces; +labelList owner; +labelList neighbour; // Group type and name -Map groupType(128); -Map groupName(128); +Map groupType; +Map groupName; // Point groups DynamicList