diff --git a/applications/solvers/electromagnetics/magneticFoam/createFields.H b/applications/solvers/electromagnetics/magneticFoam/createFields.H index 1a5b7095a9..a3712c19aa 100644 --- a/applications/solvers/electromagnetics/magneticFoam/createFields.H +++ b/applications/solvers/electromagnetics/magneticFoam/createFields.H @@ -63,8 +63,7 @@ << exit(FatalIOError); } - const labelList& faces = - mesh.faceZones()[magnetZonei]; + const labelList& faces = mesh.faceZones()[magnetZonei]; const scalar muri = magnets[i].mur(); const scalar Mri = magnets[i].Mr().value(); diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H index dd2f6416ee..0c8c1bd115 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H @@ -1,4 +1,4 @@ - Info << "Reading field p\n" << endl; + Info<< "Reading field p\n" << endl; volScalarField p ( IOobject @@ -12,7 +12,7 @@ mesh ); - Info << "Reading field U\n" << endl; + Info<< "Reading field U\n" << endl; volVectorField U ( IOobject @@ -34,7 +34,7 @@ setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); - Info << "Reading field pa\n" << endl; + Info<< "Reading field pa\n" << endl; volScalarField pa ( IOobject @@ -48,7 +48,7 @@ mesh ); - Info << "Reading field Ua\n" << endl; + Info<< "Reading field Ua\n" << endl; volVectorField Ua ( IOobject @@ -84,10 +84,8 @@ dimensionedScalar lambda(laminarTransport.lookup("lambda")); dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax")); - const labelList& inletCells = - mesh.boundary()[mesh.boundaryMesh().findPatchID("inlet")].faceCells(); - //const labelList& outletCells = - // mesh.boundary()[mesh.boundaryMesh().findPatchID("outlet")].faceCells(); + const labelList& inletCells = mesh.boundary()["inlet"].faceCells(); + //const labelList& outletCells = mesh.boundary()["outlet"].faceCells(); volScalarField alpha ( diff --git a/applications/test/primitivePatch/testPrimitivePatch.C b/applications/test/primitivePatch/testPrimitivePatch.C index e2336530e6..f85b65435b 100644 --- a/applications/test/primitivePatch/testPrimitivePatch.C +++ b/applications/test/primitivePatch/testPrimitivePatch.C @@ -220,10 +220,7 @@ int main(int argc, char *argv[]) # include "createPolyMesh.H" const word patchName = args[1]; - - label patchI = mesh.boundaryMesh().findPatchID(patchName); - - const polyPatch& patch = mesh.boundaryMesh()[patchI]; + const polyPatch& patch = mesh.boundaryMesh()[patchName]; Info<< "Patch:" << patch.name() << endl; diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/README.txt b/applications/utilities/mesh/conversion/fluentMeshToFoam/README.txt index 1dcfe05a8e..43c0963746 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/README.txt +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/README.txt @@ -20,8 +20,7 @@ Notes for fluentMeshToFoam with zone preservation with the cellZones(), faceZones() and pointZones() member functions - Example (Members from polyMesh.H and ZoneMesh.H): - label thisCellZoneID = mesh.cellZones().findZoneID("thisZoneName"); - const labelList& thisCellZone = mesh.cellZones()[thisCellZoneID]; + const labelList& thisCellZone = mesh.cellZones()["thisZoneName"]; - Zone integrity is preserved during mesh modification and decompomposition. diff --git a/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H b/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H index c8a25abeec..fa25d815ea 100644 --- a/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H +++ b/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H @@ -27,10 +27,7 @@ // Master patch const word masterPatchName(mergePatchPairs[pairI].first()); const polyPatch& masterPatch = - mesh.boundaryMesh() - [ - mesh.boundaryMesh().findPatchID(masterPatchName) - ]; + mesh.boundaryMesh()[masterPatchName]; labelList isf(masterPatch.size()); @@ -51,10 +48,7 @@ // Slave patch const word slavePatchName(mergePatchPairs[pairI].second()); const polyPatch& slavePatch = - mesh.boundaryMesh() - [ - mesh.boundaryMesh().findPatchID(slavePatchName) - ]; + mesh.boundaryMesh()[slavePatchName]; labelList osf(slavePatch.size()); diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C index d325f159f9..1d0ce53e73 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C @@ -123,7 +123,7 @@ void createDummyFvMeshFiles(const polyMesh& mesh, const word& regionName) label findPatchID(const polyBoundaryMesh& patches, const word& name) { - label patchID = patches.findPatchID(name); + const label patchID = patches.findPatchID(name); if (patchID == -1) { diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C index 2a5aef33d1..6a3b7dd7ea 100644 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -849,8 +849,7 @@ int main(int argc, char *argv[]) nExtrudeFaces = 0; forAll(zoneNames, i) { - label zoneI = faceZones.findZoneID(zoneNames[i]); - const faceZone& fz = faceZones[zoneI]; + const faceZone& fz = faceZones[zoneNames[i]]; forAll(fz, j) { extrudeTopPatchID[nExtrudeFaces] = interRegionTopPatch[i]; diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index 97a7571807..22720cbf65 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -107,7 +107,7 @@ void modifyOrAddFace label findPatchID(const polyMesh& mesh, const word& name) { - label patchI = mesh.boundaryMesh().findPatchID(name); + const label patchI = mesh.boundaryMesh().findPatchID(name); if (patchI == -1) { diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 1cd681b5f5..21df0de62a 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -678,17 +678,17 @@ int main(int argc, char *argv[]) { const dictionary& dict = patchSources[addedI]; - word patchName(dict.lookup("name")); - + const word patchName(dict.lookup("name")); label destPatchI = patches.findPatchID(patchName); if (destPatchI == -1) { - FatalErrorIn(args.executable()) << "patch " << patchName - << " not added. Problem." << abort(FatalError); + FatalErrorIn(args.executable()) + << "patch " << patchName << " not added. Problem." + << abort(FatalError); } - word sourceType(dict.lookup("constructFrom")); + const word sourceType(dict.lookup("constructFrom")); if (sourceType == "patches") { @@ -716,7 +716,7 @@ int main(int argc, char *argv[]) } else if (sourceType == "set") { - word setName(dict.lookup("set")); + const word setName(dict.lookup("set")); faceSet faces(mesh, setName); diff --git a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C index 49de532ee1..dfff8d4779 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C +++ b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C @@ -85,12 +85,12 @@ label findEdge(const primitiveMesh& mesh, const label v0, const label v1) // Checks whether patch present void checkPatch(const polyBoundaryMesh& bMesh, const word& name) { - label patchI = bMesh.findPatchID(name); + const label patchI = bMesh.findPatchID(name); if (patchI == -1) { FatalErrorIn("checkPatch(const polyBoundaryMesh&, const word&)") - << "Cannot find patch " << name << endl + << "Cannot find patch " << name << nl << "It should be present but of zero size" << endl << "Valid patches are " << bMesh.names() << exit(FatalError); diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C index 05c0246473..733cef024b 100644 --- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C +++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C @@ -170,7 +170,7 @@ label addCellZone(const polyMesh& mesh, const word& name) // Checks whether patch present void checkPatch(const polyBoundaryMesh& bMesh, const word& name) { - label patchI = bMesh.findPatchID(name); + const label patchI = bMesh.findPatchID(name); if (patchI == -1) { @@ -312,11 +312,7 @@ int main(int argc, char *argv[]) // Create and add face zones and mesh modifiers // Master patch - const polyPatch& masterPatch = - mesh.boundaryMesh() - [ - mesh.boundaryMesh().findPatchID(masterPatchName) - ]; + const polyPatch& masterPatch = mesh.boundaryMesh()[masterPatchName]; // Make list of masterPatch faces labelList isf(masterPatch.size()); @@ -373,11 +369,7 @@ int main(int argc, char *argv[]) ); // Slave patch - const polyPatch& slavePatch = - mesh.boundaryMesh() - [ - mesh.boundaryMesh().findPatchID(slavePatchName) - ]; + const polyPatch& slavePatch = mesh.boundaryMesh()[slavePatchName]; labelList osf(slavePatch.size()); diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C index 7a19700ebd..36ce46e454 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C @@ -55,7 +55,7 @@ void Foam::domainDecomposition::distributeCells() forAll(pNames, i) { - label patchI = patches.findPatchID(pNames[i]); + const label patchI = patches.findPatchID(pNames[i]); if (patchI == -1) { diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C index 855c0d2b3e..96884fae24 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C @@ -328,7 +328,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh VTK_POLYHEDRON, nodeCount, uniqueNodeIds.data(), - faceCount, + nFaces, faceLabels.data() ); #else diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C index 28fd075179..009e28329e 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C @@ -236,7 +236,7 @@ Foam::channelIndex::channelIndex forAll(patchNames, i) { - label patchI = patches.findPatchID(patchNames[i]); + const label patchI = patches.findPatchID(patchNames[i]); if (patchI == -1) { @@ -254,7 +254,7 @@ Foam::channelIndex::channelIndex forAll(patchNames, i) { - const polyPatch& pp = patches[patches.findPatchID(patchNames[i])]; + const polyPatch& pp = patches[patchNames[i]]; forAll(pp, j) { diff --git a/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C b/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C index 2875818005..55c6ae2963 100644 --- a/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C +++ b/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C @@ -65,8 +65,8 @@ int main(int argc, char *argv[]) { mesh.readUpdate(); - label patchi = mesh.boundaryMesh().findPatchID(patchName); - if (patchi < 0) + const label patchI = mesh.boundaryMesh().findPatchID(patchName); + if (patchI < 0) { FatalError << "Unable to find patch " << patchName << nl @@ -78,20 +78,20 @@ int main(int argc, char *argv[]) Info<< " Reading volScalarField " << fieldName << endl; volScalarField field(fieldHeader, mesh); - scalar area = gSum(mesh.magSf().boundaryField()[patchi]); + scalar area = gSum(mesh.magSf().boundaryField()[patchI]); scalar sumField = 0; if (area > 0) { sumField = gSum ( - mesh.magSf().boundaryField()[patchi] - * field.boundaryField()[patchi] + mesh.magSf().boundaryField()[patchI] + * field.boundaryField()[patchI] ) / area; } Info<< " Average of " << fieldName << " over patch " - << patchName << '[' << patchi << ']' << " = " + << patchName << '[' << patchI << ']' << " = " << sumField << endl; } else diff --git a/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C b/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C index 06eef0339c..9dbe43a8b3 100644 --- a/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C +++ b/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C @@ -67,8 +67,8 @@ int main(int argc, char *argv[]) { mesh.readUpdate(); - label patchi = mesh.boundaryMesh().findPatchID(patchName); - if (patchi < 0) + const label patchI = mesh.boundaryMesh().findPatchID(patchName); + if (patchI < 0) { FatalError << "Unable to find patch " << patchName << nl @@ -76,16 +76,16 @@ int main(int argc, char *argv[]) } // Give patch area - if (isA(mesh.boundaryMesh()[patchi])) + if (isA(mesh.boundaryMesh()[patchI])) { Info<< " Cyclic patch vector area: " << nl; - label nFaces = mesh.boundaryMesh()[patchi].size(); + label nFaces = mesh.boundaryMesh()[patchI].size(); vector sum1 = vector::zero; vector sum2 = vector::zero; for (label i=0; i()); reduce(sum2, sumOp()); @@ -94,16 +94,16 @@ int main(int argc, char *argv[]) << " - total = " << (sum1 + sum2) << ", " << mag(sum1 + sum2) << endl; Info<< " Cyclic patch area magnitude = " - << gSum(mesh.magSf().boundaryField()[patchi])/2.0 << endl; + << gSum(mesh.magSf().boundaryField()[patchI])/2.0 << endl; } else { Info<< " Area vector of patch " - << patchName << '[' << patchi << ']' << " = " - << gSum(mesh.Sf().boundaryField()[patchi]) << endl; + << patchName << '[' << patchI << ']' << " = " + << gSum(mesh.Sf().boundaryField()[patchI]) << endl; Info<< " Area magnitude of patch " - << patchName << '[' << patchi << ']' << " = " - << gSum(mesh.magSf().boundaryField()[patchi]) << endl; + << patchName << '[' << patchI << ']' << " = " + << gSum(mesh.magSf().boundaryField()[patchI]) << endl; } // Read field and calc integral @@ -116,21 +116,21 @@ int main(int argc, char *argv[]) Info<< " Integral of " << fieldName << " over vector area of patch " - << patchName << '[' << patchi << ']' << " = " + << patchName << '[' << patchI << ']' << " = " << gSum ( - mesh.Sf().boundaryField()[patchi] - *field.boundaryField()[patchi] + mesh.Sf().boundaryField()[patchI] + *field.boundaryField()[patchI] ) << nl; Info<< " Integral of " << fieldName << " over area magnitude of patch " - << patchName << '[' << patchi << ']' << " = " + << patchName << '[' << patchI << ']' << " = " << gSum ( - mesh.magSf().boundaryField()[patchi] - *field.boundaryField()[patchi] + mesh.magSf().boundaryField()[patchI] + *field.boundaryField()[patchI] ) << nl; } @@ -143,10 +143,10 @@ int main(int argc, char *argv[]) << fieldName << endl; surfaceScalarField field(fieldHeader, mesh); - scalar sumField = gSum(field.boundaryField()[patchi]); + scalar sumField = gSum(field.boundaryField()[patchI]); Info<< " Integral of " << fieldName << " over patch " - << patchName << '[' << patchi << ']' << " = " + << patchName << '[' << patchI << ']' << " = " << sumField << nl; } else diff --git a/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C b/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C index f797213a1b..14fd9525a5 100644 --- a/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C +++ b/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) forAll(patchNames, patchNameI) { const word& patchName = patchNames[patchNameI]; - label patchI = bMesh.findPatchID(patchName); + const label patchI = bMesh.findPatchID(patchName); if (patchI == -1) { diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index 1c351ab61d..f23a05879f 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -120,9 +120,9 @@ Foam::polyBoundaryMesh::~polyBoundaryMesh() void Foam::polyBoundaryMesh::clearGeom() { - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).clearGeom(); + operator[](patchI).clearGeom(); } } @@ -132,9 +132,9 @@ void Foam::polyBoundaryMesh::clearAddressing() neighbourEdgesPtr_.clear(); patchIDPtr_.clear(); - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).clearAddressing(); + operator[](patchI).clearAddressing(); } } @@ -151,16 +151,16 @@ void Foam::polyBoundaryMesh::calcGeometry() || Pstream::defaultCommsType == Pstream::nonBlocking ) { - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).initGeometry(pBufs); + operator[](patchI).initGeometry(pBufs); } pBufs.finishedSends(); - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).calcGeometry(pBufs); + operator[](patchI).calcGeometry(pBufs); } } else if (Pstream::defaultCommsType == Pstream::scheduled) @@ -172,15 +172,15 @@ void Foam::polyBoundaryMesh::calcGeometry() forAll(patchSchedule, patchEvali) { - label patchi = patchSchedule[patchEvali].patch; + const label patchI = patchSchedule[patchEvali].patch; if (patchSchedule[patchEvali].init) { - operator[](patchi).initGeometry(pBufs); + operator[](patchI).initGeometry(pBufs); } else { - operator[](patchi).calcGeometry(pBufs); + operator[](patchI).calcGeometry(pBufs); } } } @@ -204,15 +204,15 @@ Foam::polyBoundaryMesh::neighbourEdges() const // Initialize. label nEdgePairs = 0; - forAll(*this, patchi) + forAll(*this, patchI) { - const polyPatch& pp = operator[](patchi); + const polyPatch& pp = operator[](patchI); - neighbourEdges[patchi].setSize(pp.nEdges() - pp.nInternalEdges()); + neighbourEdges[patchI].setSize(pp.nEdges() - pp.nInternalEdges()); - forAll(neighbourEdges[patchi], i) + forAll(neighbourEdges[patchI], i) { - labelPair& edgeInfo = neighbourEdges[patchi][i]; + labelPair& edgeInfo = neighbourEdges[patchI][i]; edgeInfo[0] = -1; edgeInfo[1] = -1; @@ -225,9 +225,9 @@ Foam::polyBoundaryMesh::neighbourEdges() const // point addressing) to patch + relative edge index. HashTable > pointsToEdge(nEdgePairs); - forAll(*this, patchi) + forAll(*this, patchI) { - const polyPatch& pp = operator[](patchi); + const polyPatch& pp = operator[](patchI); const edgeList& edges = pp.edges(); @@ -256,7 +256,7 @@ Foam::polyBoundaryMesh::neighbourEdges() const meshEdge, labelPair ( - patchi, + patchI, edgei - pp.nInternalEdges() ) ); @@ -266,11 +266,11 @@ Foam::polyBoundaryMesh::neighbourEdges() const // Second occurrence. Store. const labelPair& edgeInfo = fnd(); - neighbourEdges[patchi][edgei - pp.nInternalEdges()] = + neighbourEdges[patchI][edgei - pp.nInternalEdges()] = edgeInfo; neighbourEdges[edgeInfo[0]][edgeInfo[1]] - = labelPair(patchi, edgei - pp.nInternalEdges()); + = labelPair(patchI, edgei - pp.nInternalEdges()); // Found all two occurrences of this edge so remove from // hash to save space. Note that this will give lots of @@ -288,11 +288,11 @@ Foam::polyBoundaryMesh::neighbourEdges() const << abort(FatalError); } - forAll(*this, patchi) + forAll(*this, patchI) { - const polyPatch& pp = operator[](patchi); + const polyPatch& pp = operator[](patchI); - const labelPairList& nbrEdges = neighbourEdges[patchi]; + const labelPairList& nbrEdges = neighbourEdges[patchI]; forAll(nbrEdges, i) { @@ -409,8 +409,7 @@ Foam::label Foam::polyBoundaryMesh::findPatchID(const word& patchName) const // Patch not found if (debug) { - Pout<< "label polyBoundaryMesh::findPatchID(const word& " - << "patchName) const" + Pout<< "label polyBoundaryMesh::findPatchID(const word&) const" << "Patch named " << patchName << " not found. " << "List of available patch names: " << names() << endl; } @@ -641,16 +640,16 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p) || Pstream::defaultCommsType == Pstream::nonBlocking ) { - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).initMovePoints(pBufs, p); + operator[](patchI).initMovePoints(pBufs, p); } pBufs.finishedSends(); - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).movePoints(pBufs, p); + operator[](patchI).movePoints(pBufs, p); } } else if (Pstream::defaultCommsType == Pstream::scheduled) @@ -662,15 +661,15 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p) forAll(patchSchedule, patchEvali) { - label patchi = patchSchedule[patchEvali].patch; + const label patchI = patchSchedule[patchEvali].patch; if (patchSchedule[patchEvali].init) { - operator[](patchi).initMovePoints(pBufs, p); + operator[](patchI).initMovePoints(pBufs, p); } else { - operator[](patchi).movePoints(pBufs, p); + operator[](patchI).movePoints(pBufs, p); } } } @@ -690,16 +689,16 @@ void Foam::polyBoundaryMesh::updateMesh() || Pstream::defaultCommsType == Pstream::nonBlocking ) { - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).initUpdateMesh(pBufs); + operator[](patchI).initUpdateMesh(pBufs); } pBufs.finishedSends(); - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).updateMesh(pBufs); + operator[](patchI).updateMesh(pBufs); } } else if (Pstream::defaultCommsType == Pstream::scheduled) @@ -711,15 +710,15 @@ void Foam::polyBoundaryMesh::updateMesh() forAll(patchSchedule, patchEvali) { - label patchi = patchSchedule[patchEvali].patch; + const label patchI = patchSchedule[patchEvali].patch; if (patchSchedule[patchEvali].init) { - operator[](patchi).initUpdateMesh(pBufs); + operator[](patchI).initUpdateMesh(pBufs); } else { - operator[](patchi).updateMesh(pBufs); + operator[](patchI).updateMesh(pBufs); } } } @@ -734,9 +733,9 @@ void Foam::polyBoundaryMesh::reorder(const UList