diff --git a/applications/test/fieldMapping/Test-fieldMapping.C b/applications/test/fieldMapping/Test-fieldMapping.C index 41af9c79231cafcf614d708e0a547182ebe61105..061290cf8c668d49381135341813da3db0dc3a0d 100644 --- a/applications/test/fieldMapping/Test-fieldMapping.C +++ b/applications/test/fieldMapping/Test-fieldMapping.C @@ -163,11 +163,11 @@ int main(int argc, char *argv[]) } // Remove face - label candidateFaceI = rndGen.integer(0, mesh.nInternalFaces()-1); - Info<< "Wanting to delete face " << mesh.faceCentres()[candidateFaceI] + label candidateFacei = rndGen.integer(0, mesh.nInternalFaces()-1); + Info<< "Wanting to delete face " << mesh.faceCentres()[candidateFacei] << nl << endl; - labelList candidates(1, candidateFaceI); + labelList candidates(1, candidateFacei); // Get compatible set of faces and connected sets of cells. diff --git a/applications/test/globalIndex/Test-globalIndex.C b/applications/test/globalIndex/Test-globalIndex.C index 0a93b9756cbf5f90f825162ddee771d6152a4ed5..0834534952b6a327428804c85e8d847df11886f4 100644 --- a/applications/test/globalIndex/Test-globalIndex.C +++ b/applications/test/globalIndex/Test-globalIndex.C @@ -69,23 +69,23 @@ int main(int argc, char *argv[]) for (label celli = 0; celli < mesh.nCells(); celli++) { // to global index - label globalCellI = globalNumbering.toGlobal(celli); + label globalCelli = globalNumbering.toGlobal(celli); // and back - label procI = globalNumbering.whichProcID(globalCellI); - label localCellI = globalNumbering.toLocal(globalCellI); + label proci = globalNumbering.whichProcID(globalCelli); + label localCelli = globalNumbering.toLocal(globalCelli); - if (procI != Pstream::myProcNo() || localCellI != celli) + if (proci != Pstream::myProcNo() || localCelli != celli) { FatalErrorInFunction - << "Problem. celli:" << celli << " localCellI:" << localCellI - << " procI:" << procI << abort(FatalError); + << "Problem. celli:" << celli << " localCelli:" << localCelli + << " proci:" << proci << abort(FatalError); } - if (!globalNumbering.isLocal(globalCellI)) + if (!globalNumbering.isLocal(globalCelli)) { FatalErrorInFunction - << "Problem. celli:" << celli << " globalCellI:" << globalCellI + << "Problem. celli:" << celli << " globalCelli:" << globalCelli << " not local" << abort(FatalError); } } @@ -104,30 +104,30 @@ int main(int argc, char *argv[]) { // We already checked that toGlobal(0) maps back correctly to myProcNo // so now check that the index one before maps to the previous processor - label prevProcCellI = globalNumbering.toGlobal(0)-1; - label procI = globalNumbering.whichProcID(prevProcCellI); + label prevProcCelli = globalNumbering.toGlobal(0)-1; + label proci = globalNumbering.whichProcID(prevProcCelli); - if (procI != Pstream::myProcNo()-1) + if (proci != Pstream::myProcNo()-1) { FatalErrorInFunction - << "Problem. global:" << prevProcCellI + << "Problem. global:" << prevProcCelli << " expected on processor:" << Pstream::myProcNo()-1 - << " but is calculated to be on procI:" << procI + << " but is calculated to be on proci:" << proci << abort(FatalError); } - if (globalNumbering.isLocal(prevProcCellI)) + if (globalNumbering.isLocal(prevProcCelli)) { FatalErrorInFunction - << "Problem. globalCellI:" << prevProcCellI + << "Problem. globalCelli:" << prevProcCelli << " calculated as local" << abort(FatalError); } - if (!globalNumbering.isLocal(procI, prevProcCellI)) + if (!globalNumbering.isLocal(proci, prevProcCelli)) { FatalErrorInFunction - << "Problem. globalCellI:" << prevProcCellI - << " not calculated as local on processor:" << procI + << "Problem. globalCelli:" << prevProcCelli + << " not calculated as local on processor:" << proci << abort(FatalError); } } @@ -135,30 +135,30 @@ int main(int argc, char *argv[]) if (Pstream::myProcNo() < Pstream::nProcs()-1) { - label nextProcCellI = globalNumbering.toGlobal(mesh.nCells()-1)+1; - label procI = globalNumbering.whichProcID(nextProcCellI); + label nextProcCelli = globalNumbering.toGlobal(mesh.nCells()-1)+1; + label proci = globalNumbering.whichProcID(nextProcCelli); - if (procI != Pstream::myProcNo()+1) + if (proci != Pstream::myProcNo()+1) { FatalErrorInFunction - << "Problem. global:" << nextProcCellI + << "Problem. global:" << nextProcCelli << " expected on processor:" << Pstream::myProcNo()+1 - << " but is calculated to be on procI:" << procI + << " but is calculated to be on proci:" << proci << abort(FatalError); } - if (globalNumbering.isLocal(nextProcCellI)) + if (globalNumbering.isLocal(nextProcCelli)) { FatalErrorInFunction - << "Problem. globalCellI:" << nextProcCellI + << "Problem. globalCelli:" << nextProcCelli << " calculated as local" << abort(FatalError); } - if (!globalNumbering.isLocal(procI, nextProcCellI)) + if (!globalNumbering.isLocal(proci, nextProcCelli)) { FatalErrorInFunction - << "Problem. globalCellI:" << nextProcCellI - << " not calculated as local on processor:" << procI + << "Problem. globalCelli:" << nextProcCelli + << " not calculated as local on processor:" << proci << abort(FatalError); } } diff --git a/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C b/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C index 88c0a24571cf5f0836d28b03de5d52a875e8a7f3..eb37bd07f5223fc78bea2e887a37c24b13172494 100644 --- a/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C +++ b/applications/test/parallel-nonBlocking/Test-parallel-nonBlocking.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -151,9 +151,9 @@ int main(int argc, char *argv[]) { PstreamBuffers pBufs(Pstream::nonBlocking); - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { - UOPstream toProc(procI, pBufs); + UOPstream toProc(proci, pBufs); toProc << Pstream::myProcNo(); } @@ -161,17 +161,17 @@ int main(int argc, char *argv[]) pBufs.finishedSends(); // Consume - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { - UIPstream fromProc(procI, pBufs); + UIPstream fromProc(proci, pBufs); label data; fromProc >> data; - if (data != procI) + if (data != proci) { FatalErrorInFunction - << "From processor " << procI << " received " << data - << " but expected " << procI + << "From processor " << proci << " received " << data + << " but expected " << proci << exit(FatalError); } } diff --git a/applications/test/parallel/Test-parallel.C b/applications/test/parallel/Test-parallel.C index 62d6150ce4fdcfa57bb172bedcc7d51eeae1961f..a9fe2b6673770e81ac6d3aed80968ac3795b0b21 100644 --- a/applications/test/parallel/Test-parallel.C +++ b/applications/test/parallel/Test-parallel.C @@ -76,21 +76,21 @@ int main(int argc, char *argv[]) labelList nSend(Pstream::nProcs(), 0); forAll(complexData, i) { - label procI = complexData[i].first(); - nSend[procI]++; + label proci = complexData[i].first(); + nSend[proci]++; } // Collect items to be sent labelListList sendMap(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - sendMap[procI].setSize(nSend[procI]); + sendMap[proci].setSize(nSend[proci]); } nSend = 0; forAll(complexData, i) { - label procI = complexData[i].first(); - sendMap[procI][nSend[procI]++] = i; + label proci = complexData[i].first(); + sendMap[proci][nSend[proci]++] = i; } // Sync how many to send @@ -99,9 +99,9 @@ int main(int argc, char *argv[]) // Collect items to be received labelListList recvMap(Pstream::nProcs()); - forAll(recvMap, procI) + forAll(recvMap, proci) { - recvMap[procI].setSize(nRecv[procI]); + recvMap[proci].setSize(nRecv[proci]); } label constructSize = 0; @@ -111,13 +111,13 @@ int main(int argc, char *argv[]) recvMap[Pstream::myProcNo()][i] = constructSize++; } // Construct from other processors - forAll(recvMap, procI) + forAll(recvMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - forAll(recvMap[procI], i) + forAll(recvMap[proci], i) { - recvMap[procI][i] = constructSize++; + recvMap[proci][i] = constructSize++; } } } diff --git a/applications/test/patchRegion/Test-patchRegion.C b/applications/test/patchRegion/Test-patchRegion.C index 44099ec8a6fb6526e2c95200c6ec292144c6ad7f..cc56487c12b41d50530bca64b35248832887e692 100644 --- a/applications/test/patchRegion/Test-patchRegion.C +++ b/applications/test/patchRegion/Test-patchRegion.C @@ -80,14 +80,14 @@ int main(int argc, char *argv[]) { const labelList& fEdges = patch.faceEdges()[facei]; - label globalFaceI = globalNumbering.toGlobal(facei); + label globalFacei = globalNumbering.toGlobal(facei); forAll(fEdges, i) { changedEdges.append(fEdges[i]); changedInfo.append ( - patchEdgeFaceRegions(labelPair(globalFaceI, globalFaceI)) + patchEdgeFaceRegions(labelPair(globalFacei, globalFacei)) ); } } diff --git a/applications/test/router/Test-processorRouter.C b/applications/test/router/Test-processorRouter.C index 62fd7f2a9d9b990205bfc03576564d23eea25931..f5411c062725cebea44b2fa71e6789727b0ec3f0 100644 --- a/applications/test/router/Test-processorRouter.C +++ b/applications/test/router/Test-processorRouter.C @@ -142,20 +142,20 @@ int main(int argc, char *argv[]) OFstream objFile(fName); // Write processors as single vertex in centre of mesh - forAll(meshCentres, procI) + forAll(meshCentres, proci) { - const point& pt = meshCentres[procI]; + const point& pt = meshCentres[proci]; objFile << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl; } // Write connections as lines between processors (duplicated) - forAll(connections, procI) + forAll(connections, proci) { - const labelList& nbs = connections[procI]; + const labelList& nbs = connections[proci]; forAll(nbs, nbI) { - objFile << "l " << procI + 1 << ' ' << nbs[nbI] + 1 << endl; + objFile << "l " << proci + 1 << ' ' << nbs[nbI] + 1 << endl; } } @@ -196,9 +196,9 @@ int main(int argc, char *argv[]) OFstream objFile(fName); - forAll(meshCentres, procI) + forAll(meshCentres, proci) { - const point& pt = meshCentres[procI]; + const point& pt = meshCentres[proci]; objFile << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl; diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C index fe03257a591477a41a17677982d330b3b3b1fbee..d44a23c6d187849f1588e0f9399201a99fd61b5a 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C @@ -71,7 +71,7 @@ void modifyOrAddFace const label facei, const label own, const bool flipFaceFlux, - const label newPatchI, + const label newPatchi, const label zoneID, const bool zoneFlip, @@ -90,7 +90,7 @@ void modifyOrAddFace own, // owner -1, // neighbour flipFaceFlux, // face flip - newPatchI, // patch for face + newPatchi, // patch for face false, // remove from zone zoneID, // zone for face zoneFlip // face flip in zone @@ -112,7 +112,7 @@ void modifyOrAddFace -1, // master edge facei, // master face flipFaceFlux, // face flip - newPatchI, // patch for face + newPatchi, // patch for face zoneID, // zone for face zoneFlip // face flip in zone ) @@ -160,9 +160,9 @@ void subsetVolFields label newStart = fld.patch().patch().start(); - label oldPatchI = subsetter.patchMap()[patchi]; + label oldPatchi = subsetter.patchMap()[patchi]; - if (oldPatchI == -1) + if (oldPatchi == -1) { // New patch. Reset whole value. fld = exposedValue; @@ -171,17 +171,17 @@ void subsetVolFields { // Reset those faces that originate from different patch // or internal faces. - label oldSize = volField.boundaryField()[oldPatchI].size(); + label oldSize = volField.boundaryField()[oldPatchi].size(); label oldStart = volField.boundaryField() [ - oldPatchI + oldPatchi ].patch().patch().start(); forAll(fld, j) { - label oldFaceI = subsetter.faceMap()[newStart+j]; + label oldFacei = subsetter.faceMap()[newStart+j]; - if (oldFaceI < oldStart || oldFaceI >= oldStart+oldSize) + if (oldFacei < oldStart || oldFacei >= oldStart+oldSize) { fld[j] = exposedValue; } @@ -233,9 +233,9 @@ void subsetSurfaceFields label newStart = fld.patch().patch().start(); - label oldPatchI = subsetter.patchMap()[patchi]; + label oldPatchi = subsetter.patchMap()[patchi]; - if (oldPatchI == -1) + if (oldPatchi == -1) { // New patch. Reset whole value. fld = exposedValue; @@ -244,17 +244,17 @@ void subsetSurfaceFields { // Reset those faces that originate from different patch // or internal faces. - label oldSize = volField.boundaryField()[oldPatchI].size(); + label oldSize = volField.boundaryField()[oldPatchi].size(); label oldStart = volField.boundaryField() [ - oldPatchI + oldPatchi ].patch().patch().start(); forAll(fld, j) { - label oldFaceI = subsetter.faceMap()[newStart+j]; + label oldFacei = subsetter.faceMap()[newStart+j]; - if (oldFaceI < oldStart || oldFaceI >= oldStart+oldSize) + if (oldFacei < oldStart || oldFacei >= oldStart+oldSize) { fld[j] = exposedValue; } @@ -706,7 +706,7 @@ int main(int argc, char *argv[]) } // Exposed faces patch - label defaultPatchI = findPatch(mesh.boundaryMesh(), defaultPatch); + label defaultPatchi = findPatch(mesh.boundaryMesh(), defaultPatch); // @@ -725,7 +725,7 @@ int main(int argc, char *argv[]) blockedCells.invert(mesh.nCells()); // Create subsetted mesh. - subsetter.setLargeCellSubset(blockedCells, defaultPatchI, true); + subsetter.setLargeCellSubset(blockedCells, defaultPatchi, true); } @@ -783,7 +783,7 @@ int main(int argc, char *argv[]) ( subsetter, objects, - defaultPatchI, + defaultPatchi, scalar(Zero), volScalarField::typeName, scalarFlds @@ -795,7 +795,7 @@ int main(int argc, char *argv[]) ( subsetter, objects, - defaultPatchI, + defaultPatchi, vector(Zero), volVectorField::typeName, vectorFlds @@ -813,7 +813,7 @@ int main(int argc, char *argv[]) ( subsetter, objects, - defaultPatchI, + defaultPatchi, sphericalTensor(Zero), volSphericalTensorField::typeName, sphericalTensorFlds @@ -825,7 +825,7 @@ int main(int argc, char *argv[]) ( subsetter, objects, - defaultPatchI, + defaultPatchi, symmTensor(Zero), volSymmTensorField::typeName, symmTensorFlds @@ -837,7 +837,7 @@ int main(int argc, char *argv[]) ( subsetter, objects, - defaultPatchI, + defaultPatchi, tensor(Zero), volTensorField::typeName, tensorFlds @@ -851,7 +851,7 @@ int main(int argc, char *argv[]) ( subsetter, objects, - defaultPatchI, + defaultPatchi, scalar(Zero), surfaceScalarField::typeName, surfScalarFlds @@ -863,7 +863,7 @@ int main(int argc, char *argv[]) ( subsetter, objects, - defaultPatchI, + defaultPatchi, vector(Zero), surfaceVectorField::typeName, surfVectorFlds @@ -881,7 +881,7 @@ int main(int argc, char *argv[]) ( subsetter, objects, - defaultPatchI, + defaultPatchi, sphericalTensor(Zero), surfaceSphericalTensorField::typeName, surfSphericalTensorFlds @@ -901,7 +901,7 @@ int main(int argc, char *argv[]) ( subsetter, objects, - defaultPatchI, + defaultPatchi, symmTensor(Zero), surfaceSymmTensorField::typeName, surfSymmTensorFlds @@ -913,7 +913,7 @@ int main(int argc, char *argv[]) ( subsetter, objects, - defaultPatchI, + defaultPatchi, tensor(Zero), surfaceTensorField::typeName, surfTensorFlds diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C b/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C index 98a15db2a4cf24abb66e72e827c8a6c0cf11adee..c1dea77d1fda62fc845a52802be0372cc1da766b 100644 --- a/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C +++ b/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C @@ -458,15 +458,15 @@ void doRefinement const labelListList& addedCells = multiRef.addedCells(); - forAll(addedCells, oldCellI) + forAll(addedCells, oldCelli) { - const labelList& added = addedCells[oldCellI]; + const labelList& added = addedCells[oldCelli]; if (added.size()) { // Give all cells resulting from split the refinement level // of the master. - label masterLevel = ++refLevel[oldCellI]; + label masterLevel = ++refLevel[oldCelli]; forAll(added, i) { @@ -629,7 +629,7 @@ int main(int argc, char *argv[]) #include "createPolyMesh.H" // If nessecary add oldInternalFaces patch - label newPatchI = addPatch(mesh, "oldInternalFaces"); + label newPatchi = addPatch(mesh, "oldInternalFaces"); // @@ -854,7 +854,7 @@ int main(int argc, char *argv[]) { // Subset mesh to remove inside cells altogether. Updates cutCells, // refLevel. - subsetMesh(mesh, writeMesh, newPatchI, inside, cutCells, refLevel); + subsetMesh(mesh, writeMesh, newPatchi, inside, cutCells, refLevel); } diff --git a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C index 1ad700d8d9dc1d100800d6d8d31f9f120648bdec..95af972536e6e7366496e5cbe8bbd75ad4e0be0b 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C +++ b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C @@ -208,7 +208,7 @@ void Foam::cellSplitter::setRefinement // Add other pyramids for (label i = 1; i < cFaces.size(); i++) { - label addedCellI = + label addedCelli = meshMod.setAction ( polyAddCell @@ -221,7 +221,7 @@ void Foam::cellSplitter::setRefinement ) ); - newCells[i] = addedCellI; + newCells[i] = addedCelli; } cellToCells.insert(celli, newCells); @@ -469,17 +469,17 @@ void Foam::cellSplitter::updateMesh(const mapPolyMesh& morphMap) forAllConstIter(Map<label>, addedPoints_, iter) { - label oldCellI = iter.key(); + label oldCelli = iter.key(); - label newCellI = morphMap.reverseCellMap()[oldCellI]; + label newCelli = morphMap.reverseCellMap()[oldCelli]; label oldPointI = iter(); label newPointI = morphMap.reversePointMap()[oldPointI]; - if (newCellI >= 0 && newPointI >= 0) + if (newCelli >= 0 && newPointI >= 0) { - newAddedPoints.insert(newCellI, newPointI); + newAddedPoints.insert(newCelli, newPointI); } } diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index 5792f825a79311717ae5f8c8d89d83e0bd7f7698..1fc2063b4b31ec75b8b59a2b6a6511cea75dbab9 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C @@ -223,9 +223,9 @@ label findFace scalar almostMinDist = GREAT; label almostMinI = -1; - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { - pointHit pHit(pp[patchFaceI].nearestPoint(nearPoint, points)); + pointHit pHit(pp[patchFacei].nearestPoint(nearPoint, points)); if (pHit.hit()) { @@ -235,12 +235,12 @@ label findFace almostMinI = minI; minDist = pHit.distance(); - minI = patchFaceI + mesh.nInternalFaces(); + minI = patchFacei + mesh.nInternalFaces(); } else if (pHit.distance() < almostMinDist) { almostMinDist = pHit.distance(); - almostMinI = patchFaceI + mesh.nInternalFaces(); + almostMinI = patchFacei + mesh.nInternalFaces(); } } } diff --git a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C index ba5b7f854826ff36b6a6f5d3e1b26cbe798409f6..ee2ffdcfa639c580b6f26c288515f0fd1c601596 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C +++ b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -120,9 +120,9 @@ int main(int argc, char *argv[]) const labelList& pCells = mesh.pointCells()[meshPointI]; - forAll(pCells, pCellI) + forAll(pCells, pCelli) { - cutCells.insert(pCells[pCellI]); + cutCells.insert(pCells[pCelli]); } } } diff --git a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C index 18c3ac6b8b40b2ab3220fd5714f8d6db654d4954..9f58c3bcce57bf4353b2dab713be0efc73c91a0d 100644 --- a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C +++ b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C @@ -65,7 +65,7 @@ labelList getInternalFaceOrder labelList oldToNew(owner.size(), -1); // First unassigned face - label newFaceI = 0; + label newFacei = 0; forAll(cells, celli) { @@ -77,20 +77,20 @@ labelList getInternalFaceOrder { label facei = cFaces[i]; - label nbrCellI = neighbour[facei]; + label nbrCelli = neighbour[facei]; - if (nbrCellI != -1) + if (nbrCelli != -1) { // Internal face. Get cell on other side. - if (nbrCellI == celli) + if (nbrCelli == celli) { - nbrCellI = owner[facei]; + nbrCelli = owner[facei]; } - if (celli < nbrCellI) + if (celli < nbrCelli) { - // CellI is master - nbr[i] = nbrCellI; + // Celli is master + nbr[i] = nbrCelli; } else { @@ -111,13 +111,13 @@ labelList getInternalFaceOrder { if (nbr[i] != -1) { - oldToNew[cFaces[nbr.indices()[i]]] = newFaceI++; + oldToNew[cFaces[nbr.indices()[i]]] = newFacei++; } } } // Keep boundary faces in same order. - for (label facei = newFaceI; facei < owner.size(); facei++) + for (label facei = newFacei; facei < owner.size(); facei++) { oldToNew[facei] = facei; } @@ -285,7 +285,7 @@ void ReadProblem ) { // Index of foam patch - label foamPatchI = -1; + label foamPatchi = -1; // Read prostar id @@ -311,7 +311,7 @@ void ReadProblem if (prostarToFoamPatch.found(prostarI)) { - foamPatchI = prostarToFoamPatch[prostarI]; + foamPatchi = prostarToFoamPatch[prostarI]; // Read boundary type @@ -325,7 +325,7 @@ void ReadProblem char* s = new char[size + 1]; CCMIOReadOptstr(NULL, boundary, "BoundaryType", &size, s); s[size] = '\0'; - foamPatchTypes[foamPatchI] = string::validate<word>(string(s)); + foamPatchTypes[foamPatchi] = string::validate<word>(string(s)); delete [] s; } @@ -347,7 +347,7 @@ void ReadProblem char* name = new char[size + 1]; CCMIOReadOptstr(NULL, boundary, "BoundaryName", &size, name); name[size] = '\0'; - foamPatchNames[foamPatchI] = + foamPatchNames[foamPatchi] = string::validate<word>(string(name)); delete [] name; } @@ -360,22 +360,22 @@ void ReadProblem char* name = new char[size + 1]; CCMIOReadOptstr(NULL, boundary, "Label", &size, name); name[size] = '\0'; - foamPatchNames[foamPatchI] = + foamPatchNames[foamPatchi] = string::validate<word>(string(name)); delete [] name; } else { - foamPatchNames[foamPatchI] = - foamPatchTypes[foamPatchI] - + Foam::name(foamPatchI); - Pout<< "Made up name:" << foamPatchNames[foamPatchI] + foamPatchNames[foamPatchi] = + foamPatchTypes[foamPatchi] + + Foam::name(foamPatchi); + Pout<< "Made up name:" << foamPatchNames[foamPatchi] << endl; } - Pout<< "Read patch:" << foamPatchI - << " name:" << foamPatchNames[foamPatchI] - << " foamPatchTypes:" << foamPatchTypes[foamPatchI] + Pout<< "Read patch:" << foamPatchi + << " name:" << foamPatchNames[foamPatchi] + << " foamPatchTypes:" << foamPatchTypes[foamPatchi] << endl; } @@ -557,12 +557,12 @@ void ReadCells for (unsigned int i = 0; i < nFaces; i++) { - label foamFaceI = foamPatchStarts[regionI] + i; + label foamFacei = foamPatchStarts[regionI] + i; - foamFaceMap[foamFaceI] = mapData[i]; - foamOwner[foamFaceI] = faceCells[i]; - foamNeighbour[foamFaceI] = -1; - face& f = foamFaces[foamFaceI]; + foamFaceMap[foamFacei] = mapData[i]; + foamOwner[foamFacei] = faceCells[i]; + foamNeighbour[foamFacei] = -1; + face& f = foamFaces[foamFacei]; f.setSize(faces[pos++]); forAll(f, fp) @@ -812,8 +812,8 @@ int main(int argc, char *argv[]) // Renumber cell labels { - label maxCCMCellI = max(foamCellMap); - labelList toFoamCells(invert(maxCCMCellI+1, foamCellMap)); + label maxCCMCelli = max(foamCellMap); + labelList toFoamCells(invert(maxCCMCelli+1, foamCellMap)); inplaceRenumber(toFoamCells, foamOwner); inplaceRenumber(toFoamCells, foamNeighbour); @@ -929,16 +929,16 @@ int main(int argc, char *argv[]) // Create patches. Use patch types to determine what Foam types to generate. List<polyPatch*> newPatches(foamPatchNames.size()); - label meshFaceI = foamPatchStarts[0]; + label meshFacei = foamPatchStarts[0]; forAll(newPatches, patchi) { const word& patchName = foamPatchNames[patchi]; const word& patchType = foamPatchTypes[patchi]; - Pout<< "Patch:" << patchName << " start at:" << meshFaceI + Pout<< "Patch:" << patchName << " start at:" << meshFacei << " size:" << foamPatchSizes[patchi] - << " end at:" << meshFaceI+foamPatchSizes[patchi] + << " end at:" << meshFacei+foamPatchSizes[patchi] << endl; if (patchType == "wall") @@ -948,7 +948,7 @@ int main(int argc, char *argv[]) ( patchName, foamPatchSizes[patchi], - meshFaceI, + meshFacei, patchi, mesh.boundaryMesh(), patchType @@ -961,7 +961,7 @@ int main(int argc, char *argv[]) ( patchName, foamPatchSizes[patchi], - meshFaceI, + meshFacei, patchi, mesh.boundaryMesh(), patchType @@ -975,7 +975,7 @@ int main(int argc, char *argv[]) ( patchName, foamPatchSizes[patchi], - meshFaceI, + meshFacei, patchi, mesh.boundaryMesh(), patchType @@ -990,20 +990,20 @@ int main(int argc, char *argv[]) ( patchName, foamPatchSizes[patchi], - meshFaceI, + meshFacei, patchi, mesh.boundaryMesh(), word::null ); } - meshFaceI += foamPatchSizes[patchi]; + meshFacei += foamPatchSizes[patchi]; } - if (meshFaceI != foamOwner.size()) + if (meshFacei != foamOwner.size()) { FatalErrorInFunction - << "meshFaceI:" << meshFaceI + << "meshFacei:" << meshFacei << " nFaces:" << foamOwner.size() << abort(FatalError); } diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C index d5a4a338cfd8cabc490e99adae73db6c0dcee354..f78d63906a589264a942c105a37f59acebefcd05 100644 --- a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C +++ b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C @@ -550,16 +550,16 @@ int main(int argc, char *argv[]) { labelListList curBlockCells = blocks[blockI].blockCells(); - forAll(curBlockCells, blockCellI) + forAll(curBlockCells, blockCelli) { - labelList cellPoints(curBlockCells[blockCellI].size()); + labelList cellPoints(curBlockCells[blockCelli].size()); forAll(cellPoints, pointI) { cellPoints[pointI] = pointMergeList [ - curBlockCells[blockCellI][pointI] + curBlockCells[blockCelli][pointI] + blockOffsets[blockI] ]; } @@ -587,11 +587,11 @@ int main(int argc, char *argv[]) // Check if this name has been already created label existingPatch = -1; - for (label oldPatchI = 0; oldPatchI < nCreatedPatches; oldPatchI++) + for (label oldPatchi = 0; oldPatchi < nCreatedPatches; oldPatchi++) { - if (patchNames[oldPatchI] == cfxPatchNames[patchi]) + if (patchNames[oldPatchi] == cfxPatchNames[patchi]) { - existingPatch = oldPatchI; + existingPatch = oldPatchi; break; } } diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/create3DCellShape.C b/applications/utilities/mesh/conversion/fluentMeshToFoam/create3DCellShape.C index 65c017a2969df3ecb7b1ee5bd189b382448e76aa..95073724f14b6f0fbdbe699628c6ea8f31684799 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/create3DCellShape.C +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/create3DCellShape.C @@ -144,16 +144,16 @@ cellShape create3DCellShape bool found = false; - forAll(localFaces, meshFaceI) + forAll(localFaces, meshFacei) { - if (localFaces[meshFaceI].size() == firstModelFace.size()) + if (localFaces[meshFacei].size() == firstModelFace.size()) { // Match. Insert points into the pointLabels found = true; - const labelList& curMeshFace = localFaces[meshFaceI]; + const labelList& curMeshFace = localFaces[meshFacei]; - meshFaceUsed[meshFaceI] = true; + meshFaceUsed[meshFacei] = true; forAll(curMeshFace, pointI) { @@ -173,26 +173,26 @@ cellShape create3DCellShape << abort(FatalError); } - for (label modelFaceI = 1; modelFaceI < modelFaces.size(); modelFaceI++) + for (label modelFacei = 1; modelFacei < modelFaces.size(); modelFacei++) { // get the next model face const labelList& curModelFace = modelFaces - [faceMatchingOrder[fluentCellModelID][modelFaceI]]; + [faceMatchingOrder[fluentCellModelID][modelFacei]]; found = false; // Loop through mesh faces until a match is found - forAll(localFaces, meshFaceI) + forAll(localFaces, meshFacei) { if ( - !meshFaceUsed[meshFaceI] - && localFaces[meshFaceI].size() == curModelFace.size() + !meshFaceUsed[meshFacei] + && localFaces[meshFacei].size() == curModelFace.size() ) { // A possible match. A mesh face will be rotated, so make a copy - labelList meshFaceLabels = localFaces[meshFaceI]; + labelList meshFaceLabels = localFaces[meshFacei]; for ( @@ -231,7 +231,7 @@ cellShape create3DCellShape meshFaceLabels[pointI]; } - meshFaceUsed[meshFaceI] = true; + meshFaceUsed[meshFacei] = true; break; } @@ -258,7 +258,7 @@ cellShape create3DCellShape // A model face is not matched. Shape detection failed FatalErrorInFunction << "Cannot find match for face " - << modelFaceI + << modelFacei << ".\nModel: " << curModel.name() << " model face: " << curModelFace << " Mesh faces: " << localFaces << "Matched points: " << pointLabels diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C index 305287fd3fa1a5067318a70154a6c099846a923f..be76eb48612e0a6fd75e56cf63fd80f712a828a1 100644 --- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C +++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C @@ -949,23 +949,23 @@ int main(int argc, char *argv[]) const face& f = pFaces[i]; // Find face in pp using all vertices of f. - label patchFaceI = findFace(pp, f); + label patchFacei = findFace(pp, f); - if (patchFaceI != -1) + if (patchFacei != -1) { - label meshFaceI = pp.start() + patchFaceI; + label meshFacei = pp.start() + patchFacei; - repatcher.changePatchID(meshFaceI, patchi); + repatcher.changePatchID(meshFacei, patchi); } else { // Maybe internal face? If so add to faceZone with same index // - might be useful. - label meshFaceI = findInternalFace(mesh, f); + label meshFacei = findInternalFace(mesh, f); - if (meshFaceI != -1) + if (meshFacei != -1) { - zoneFaces[patchi].append(meshFaceI); + zoneFaces[patchi].append(meshFacei); } else { @@ -1103,22 +1103,22 @@ int main(int argc, char *argv[]) if (mesh.boundaryMesh()[defaultPatchID].size() == 0) { List<polyPatch*> newPatchPtrList((mesh.boundaryMesh().size() - 1)); - label newPatchI = 0; + label newPatchi = 0; forAll(mesh.boundaryMesh(), patchi) { if (patchi != defaultPatchID) { const polyPatch& patch = mesh.boundaryMesh()[patchi]; - newPatchPtrList[newPatchI] = patch.clone + newPatchPtrList[newPatchi] = patch.clone ( mesh.boundaryMesh(), - newPatchI, + newPatchi, patch.size(), patch.start() ).ptr(); - newPatchI++; + newPatchi++; } } repatcher.changePatches(newPatchPtrList); diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C index 451827676717d6eed9806ddc730f9044a764a128..73eb8f00beff6ca24fb27b98b6bba564d5234cbe 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C @@ -816,21 +816,21 @@ int main(int argc, char *argv[]) // Renumber vertex numbers on boundaryFaces - forAll(boundaryFaces, bFaceI) + forAll(boundaryFaces, bFacei) { - labelList foamVerts(renumber(unvToFoam, boundaryFaces[bFaceI])); + labelList foamVerts(renumber(unvToFoam, boundaryFaces[bFacei])); if (findIndex(foamVerts, -1) != -1) { FatalErrorInFunction - << "Boundary face " << bFaceI - << " unv vertices " << boundaryFaces[bFaceI] + << "Boundary face " << bFacei + << " unv vertices " << boundaryFaces[bFacei] << " has some undefined vertices " << foamVerts << abort(FatalError); } // Bit nasty: replace vertex list. - boundaryFaces[bFaceI].transfer(foamVerts); + boundaryFaces[bFacei].transfer(foamVerts); } @@ -1021,13 +1021,13 @@ int main(int argc, char *argv[]) { if (boundaryFaceToIndex.found(faceIndices[i])) { - label bFaceI = boundaryFaceToIndex[faceIndices[i]]; + label bFacei = boundaryFaceToIndex[faceIndices[i]]; - if (own[bFaceI] != -1 && nei[bFaceI] == -1) + if (own[bFacei] != -1 && nei[bFacei] == -1) { - patchFaces[cnt] = boundaryFaces[bFaceI]; + patchFaces[cnt] = boundaryFaces[bFacei]; cnt++; - if (alreadyOnBoundary.found(bFaceI)) + if (alreadyOnBoundary.found(bFacei)) { duplicateFaces = true; } @@ -1100,8 +1100,8 @@ int main(int argc, char *argv[]) forAll(patchFaces, i) { - label bFaceI = boundaryFaceToIndex[faceIndices[i]]; - alreadyOnBoundary.insert(bFaceI); + label bFacei = boundaryFaceToIndex[faceIndices[i]]; + alreadyOnBoundary.insert(bFacei); } } } diff --git a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C index 891af306e10ac1e93d1490357b9a7d8c55c4cfde..e32ebfa6ca0b788f487aece0a021ab4603ae4083 100644 --- a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C +++ b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -207,16 +207,16 @@ int main(int argc, char *argv[]) { labelListList curBlockCells = blocks[blockI].blockCells(); - forAll(curBlockCells, blockCellI) + forAll(curBlockCells, blockCelli) { - labelList cellPoints(curBlockCells[blockCellI].size()); + labelList cellPoints(curBlockCells[blockCelli].size()); forAll(cellPoints, pointI) { cellPoints[pointI] = oldToNew [ - curBlockCells[blockCellI][pointI] + curBlockCells[blockCelli][pointI] + blockOffsets[blockI] ]; } diff --git a/applications/utilities/mesh/conversion/sammToFoam/createBoundaryFaces.C b/applications/utilities/mesh/conversion/sammToFoam/createBoundaryFaces.C index a264dcfb38ca3213f81457aec6900c6b57c4cafe..9e05ffdf0089938af54e47a8d309b22012625fa1 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/createBoundaryFaces.C +++ b/applications/utilities/mesh/conversion/sammToFoam/createBoundaryFaces.C @@ -93,16 +93,16 @@ void Foam::sammMesh::createBoundaryFaces() const faceList& curCellFaces = cellFaces_[facePointCells[celli]]; - forAll(curCellFaces, cellFaceI) + forAll(curCellFaces, cellFacei) { - if (sammEqualFace(curCellFaces[cellFaceI], curFace)) + if (sammEqualFace(curCellFaces[cellFacei], curFace)) { // Found the cell face corresponding to this face found = true; // Set boundary face to the corresponding cell face // which guarantees it is outward-pointing - curFace = curCellFaces[cellFaceI]; + curFace = curCellFaces[cellFacei]; } if (found) break; } diff --git a/applications/utilities/mesh/conversion/sammToFoam/createPolyBoundary.C b/applications/utilities/mesh/conversion/sammToFoam/createPolyBoundary.C index 95d838a8955e7d10d7ed01665c64ae7ee3d102b5..96f1236b13d566cfcd151a95d7da750956a7e066 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/createPolyBoundary.C +++ b/applications/utilities/mesh/conversion/sammToFoam/createPolyBoundary.C @@ -69,9 +69,9 @@ void Foam::sammMesh::createPolyBoundary() const faceList& curCellFaces = cellFaces_[facePointCells[celli]]; - forAll(curCellFaces, cellFaceI) + forAll(curCellFaces, cellFacei) { - if (curCellFaces[cellFaceI] == curFace) + if (curCellFaces[cellFacei] == curFace) { // Found the cell face corresponding to this face found = true; @@ -79,7 +79,7 @@ void Foam::sammMesh::createPolyBoundary() // Debugging if ( - cellPolys_[facePointCells[celli]][cellFaceI] + cellPolys_[facePointCells[celli]][cellFacei] != -1 ) { @@ -89,7 +89,7 @@ void Foam::sammMesh::createPolyBoundary() << abort(FatalError); } - cellPolys_[facePointCells[celli]][cellFaceI] = + cellPolys_[facePointCells[celli]][cellFacei] = nCreatedFaces; nBoundaryFacesFound++; diff --git a/applications/utilities/mesh/conversion/sammToFoam/createPolyCells.C b/applications/utilities/mesh/conversion/sammToFoam/createPolyCells.C index ad7c306e4b99c445fbb147032b4f37b40b8ceb54..8a83fb620b0f3a640006b0497eb2f8a1598f2174 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/createPolyCells.C +++ b/applications/utilities/mesh/conversion/sammToFoam/createPolyCells.C @@ -114,16 +114,16 @@ void Foam::sammMesh::createPolyCells() // get the list of search faces const faceList& searchFaces = cellFaces_[curNei]; - forAll(searchFaces, neiFaceI) + forAll(searchFaces, neiFacei) { - if (searchFaces[neiFaceI] == curFace) + if (searchFaces[neiFacei] == curFace) { // match!! found = true; // Record the neighbour cell and face neiCells[facei] = curNei; - faceOfNeiCell[facei] = neiFaceI; + faceOfNeiCell[facei] = neiFacei; nNeighbours++; break; diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C b/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C index 7956f17ac6846ff30f4d413800d40db8890237dd..ea7e2f564561e90408d56cbff08473fa93e28a7d 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C @@ -129,16 +129,16 @@ void Foam::starMesh::markBoundaryFaces() const faceList& curCellFaces = cellFaces_[curCellIndex]; - forAll(curCellFaces, cellFaceI) + forAll(curCellFaces, cellFacei) { - if (starEqualFace(curFace, curCellFaces[cellFaceI])) + if (starEqualFace(curFace, curCellFaces[cellFacei])) { // Found the cell face corresponding to this face found = true; // Set boundary face to the corresponding cell face curBoundaryCellIDs[facei] = curCellIndex; - curBoundaryCellFaceIDs[facei] = cellFaceI; + curBoundaryCellFaceIDs[facei] = cellFacei; } if (found) break; } diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C b/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C index 25ab3bda4f8b3ec514e0f3c1de31d6e1a26e544a..9eff237ea5ec17d4f3946ede0bde8941efba810c 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C @@ -69,9 +69,9 @@ void Foam::starMesh::createPolyBoundary() const faceList& curCellFaces = cellFaces_[facePointCells[celli]]; - forAll(curCellFaces, cellFaceI) + forAll(curCellFaces, cellFacei) { - if (curCellFaces[cellFaceI] == curFace) + if (curCellFaces[cellFacei] == curFace) { // Found the cell face corresponding to this face found = true; @@ -79,13 +79,13 @@ void Foam::starMesh::createPolyBoundary() // Debugging if ( - cellPolys_[facePointCells[celli]][cellFaceI] + cellPolys_[facePointCells[celli]][cellFacei] != -1 ) { if ( - cellPolys_[facePointCells[celli]][cellFaceI] + cellPolys_[facePointCells[celli]][cellFacei] > nInternalFaces_ ) { @@ -94,24 +94,24 @@ void Foam::starMesh::createPolyBoundary() << "\nProbably multiple definitions " << "of a single boundary face. " << endl << "Other boundary face: " - << curCellFaces[cellFaceI] + << curCellFaces[cellFacei] << endl; Info<< "PROSTAR Command: vset,news,vlis"; - forAll(curCellFaces[cellFaceI], spI) + forAll(curCellFaces[cellFacei], spI) { // check if the point is given by STAR // or created locally if ( - curCellFaces[cellFaceI][spI] > -1 - && curCellFaces[cellFaceI][spI] + curCellFaces[cellFacei][spI] > -1 + && curCellFaces[cellFacei][spI] < starPointID_.size() ) { Info<< "," << starPointID_ - [curCellFaces[cellFaceI][spI]]; + [curCellFaces[cellFacei][spI]]; } else { @@ -128,24 +128,24 @@ void Foam::starMesh::createPolyBoundary() << "boundary face on a previously " << "matched internal face. " << endl << "Internal face: " - << curCellFaces[cellFaceI] + << curCellFaces[cellFacei] << endl; Info<< "PROSTAR Command: vset,news,vlis"; - forAll(curCellFaces[cellFaceI], spI) + forAll(curCellFaces[cellFacei], spI) { // check if the point is given by STAR // or created locally if ( - curCellFaces[cellFaceI][spI] > -1 - && curCellFaces[cellFaceI][spI] + curCellFaces[cellFacei][spI] > -1 + && curCellFaces[cellFacei][spI] < starPointID_.size() ) { Info<< "," << starPointID_ - [curCellFaces[cellFaceI][spI]]; + [curCellFaces[cellFacei][spI]]; } else { @@ -157,7 +157,7 @@ void Foam::starMesh::createPolyBoundary() } } - cellPolys_[facePointCells[celli]][cellFaceI] = + cellPolys_[facePointCells[celli]][cellFacei] = nCreatedFaces; nBoundaryFacesFound++; diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createPolyCells.C b/applications/utilities/mesh/conversion/star3ToFoam/createPolyCells.C index 61d8915dc4af572c93249077afa55cafd893683e..246896047d71cd51e2bffa3b2abd08b3453084ad 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/createPolyCells.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/createPolyCells.C @@ -114,16 +114,16 @@ void Foam::starMesh::createPolyCells() // get the list of search faces const faceList& searchFaces = cellFaces_[curNei]; - forAll(searchFaces, neiFaceI) + forAll(searchFaces, neiFacei) { - if (searchFaces[neiFaceI] == curFace) + if (searchFaces[neiFacei] == curFace) { // match!! found = true; // Record the neighbour cell and face neiCells[facei] = curNei; - faceOfNeiCell[facei] = neiFaceI; + faceOfNeiCell[facei] = neiFacei; nNeighbours++; break; diff --git a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C index b6c694b7bd09a2a0496184f4ec654ae0fa8b2b0d..37843d6c945e8b95fb85fc7a849f77db6a055f94 100644 --- a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C +++ b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C @@ -406,9 +406,9 @@ int main(int argc, char *argv[]) { IStringStream faceLine(line); - label tetGenFaceI, dummy, region; + label tetGenFacei, dummy, region; - faceLine >> tetGenFaceI; + faceLine >> tetGenFacei; // Read face and reverse orientation (Foam needs outwards // pointing) diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C index 62bf51eb9e54c58d7bc2d9ce2eb5ecb5c02521d3..f3e6d75dd76fea1c791da0024dd18c94795c758b 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C @@ -183,11 +183,11 @@ void updateFaceLabels(const mapPolyMesh& map, labelList& faceLabels) forAll(faceLabels, i) { - label oldFaceI = faceLabels[i]; + label oldFacei = faceLabels[i]; - if (reverseMap[oldFaceI] >= 0) + if (reverseMap[oldFacei] >= 0) { - newFaceLabels[newI++] = reverseMap[oldFaceI]; + newFaceLabels[newI++] = reverseMap[oldFacei]; } } newFaceLabels.setSize(newI); @@ -203,11 +203,11 @@ void updateCellSet(const mapPolyMesh& map, labelHashSet& cellLabels) forAll(cellLabels, i) { - label oldCellI = cellLabels[i]; + label oldCelli = cellLabels[i]; - if (reverseMap[oldCellI] >= 0) + if (reverseMap[oldCelli] >= 0) { - newCellLabels.insert(reverseMap[oldCellI]); + newCellLabels.insert(reverseMap[oldCelli]); } } cellLabels.transfer(newCellLabels); @@ -224,8 +224,8 @@ void changeFrontBackPatches { const polyBoundaryMesh& patches = mesh.boundaryMesh(); - label frontPatchI = findPatchID(patches, frontPatchName); - label backPatchI = findPatchID(patches, backPatchName); + label frontPatchi = findPatchID(patches, frontPatchName); + label backPatchi = findPatchID(patches, backPatchName); DynamicList<polyPatch*> newPatches(patches.size()); @@ -233,7 +233,7 @@ void changeFrontBackPatches { const polyPatch& pp(patches[patchi]); - if (patchi == frontPatchI || patchi == backPatchI) + if (patchi == frontPatchi || patchi == backPatchi) { newPatches.append ( @@ -395,28 +395,28 @@ int main(int argc, char *argv[]) polyTopoChange meshMod(mesh); forAll(meshFaces, i) { - label meshFaceI = meshFaces[i]; + label meshFacei = meshFaces[i]; - label patchi = patches.whichPatch(meshFaceI); - label own = mesh.faceOwner()[meshFaceI]; + label patchi = patches.whichPatch(meshFacei); + label own = mesh.faceOwner()[meshFacei]; label nei = -1; if (patchi == -1) { - nei = mesh.faceNeighbour()[meshFaceI]; + nei = mesh.faceNeighbour()[meshFacei]; } - label zoneI = mesh.faceZones().whichZone(meshFaceI); + label zoneI = mesh.faceZones().whichZone(meshFacei); bool zoneFlip = false; if (zoneI != -1) { - label index = mesh.faceZones()[zoneI].whichFace(meshFaceI); + label index = mesh.faceZones()[zoneI].whichFace(meshFacei); zoneFlip = mesh.faceZones()[zoneI].flipMap()[index]; } meshMod.modifyFace ( - mesh.faces()[meshFaceI].reverseFace(), // modified face - meshFaceI, // label of face + mesh.faces()[meshFacei].reverseFace(), // modified face + meshFacei, // label of face own, // owner nei, // neighbour true, // face flip @@ -538,11 +538,11 @@ int main(int argc, char *argv[]) patchi++ ) { - label nbrProcI = patchToNbrProc[patchi]; + label nbrProci = patchToNbrProc[patchi]; Pout<< "Adding patch " << patchi << " between " << Pstream::myProcNo() - << " and " << nbrProcI + << " and " << nbrProci << endl; newPatches.append @@ -554,7 +554,7 @@ int main(int argc, char *argv[]) patchi, // index mesh.boundaryMesh(),// polyBoundaryMesh Pstream::myProcNo(),// myProcNo - nbrProcI // neighbProcNo + nbrProci // neighbProcNo ) ); } @@ -688,10 +688,10 @@ int main(int argc, char *argv[]) const labelListList& layerFaces = layerExtrude.layerFaces(); backPatchFaces.setSize(layerFaces.size()); frontPatchFaces.setSize(layerFaces.size()); - forAll(backPatchFaces, patchFaceI) + forAll(backPatchFaces, patchFacei) { - backPatchFaces[patchFaceI] = layerFaces[patchFaceI].first(); - frontPatchFaces[patchFaceI] = layerFaces[patchFaceI].last(); + backPatchFaces[patchFacei] = layerFaces[patchFacei].first(); + frontPatchFaces[patchFacei] = layerFaces[patchFacei].last(); } diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index c4f6aea5bbee42b8f6c2c9632e65978a90c515b4..ab406ee1e3eb0e074b520bc2ab1e4564204175ac 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -185,11 +185,11 @@ label addPatch patchi = newPatches.size(); - label startFaceI = 0; + label startFacei = 0; if (patchi > 0) { const polyPatch& pp = *newPatches.last(); - startFaceI = pp.start()+pp.size(); + startFacei = pp.start()+pp.size(); } @@ -200,7 +200,7 @@ label addPatch PatchType::typeName, patchName, 0, // size - startFaceI, // nFaces + startFacei, // nFaces patchi, patches ).ptr() @@ -240,17 +240,17 @@ label addPatch patchi = newPatches.size(); - label startFaceI = 0; + label startFacei = 0; if (patchi > 0) { const polyPatch& pp = *newPatches.last(); - startFaceI = pp.start()+pp.size(); + startFacei = pp.start()+pp.size(); } dictionary patchDict(dict); patchDict.set("type", PatchType::typeName); patchDict.set("nFaces", 0); - patchDict.set("startFace", startFaceI); + patchDict.set("startFace", startFacei); newPatches.append ( @@ -873,9 +873,9 @@ void addCoupledPatches { forAll(eFaces, i) { - label procI = procID[eFaces[i]]; - minProcID[edgeI] = min(minProcID[edgeI], procI); - maxProcID[edgeI] = max(maxProcID[edgeI], procI); + label proci = procID[eFaces[i]]; + minProcID[edgeI] = min(minProcID[edgeI], proci); + maxProcID[edgeI] = max(maxProcID[edgeI], proci); } } } @@ -915,14 +915,14 @@ void addCoupledPatches ) { // coupled boundary edge. Find matching patch. - label nbrProcI = minProcID[edgeI]; - if (nbrProcI == Pstream::myProcNo()) + label nbrProci = minProcID[edgeI]; + if (nbrProci == Pstream::myProcNo()) { - nbrProcI = maxProcID[edgeI]; + nbrProci = maxProcID[edgeI]; } - if (nbrProcI == Pstream::myProcNo()) + if (nbrProci == Pstream::myProcNo()) { // Cyclic patch since both procs the same. This cyclic should // already exist in newPatches so no adding necessary. @@ -938,13 +938,13 @@ void addCoupledPatches { const polyBoundaryMesh& patches = mesh.boundaryMesh(); - label newPatchI = findPatchID + label newPatchi = findPatchID ( newPatches, patches[patches.whichPatch(facei)].name() ); - sidePatchID[edgeI] = newPatchI; + sidePatchID[edgeI] = newPatchi; } else { @@ -958,7 +958,7 @@ void addCoupledPatches // Processor patch word name ( - processorPolyPatch::newName(Pstream::myProcNo(), nbrProcI) + processorPolyPatch::newName(Pstream::myProcNo(), nbrProci) ); sidePatchID[edgeI] = findPatchID(newPatches, name); @@ -967,7 +967,7 @@ void addCoupledPatches { dictionary patchDict; patchDict.add("myProcNo", Pstream::myProcNo()); - patchDict.add("neighbProcNo", nbrProcI); + patchDict.add("neighbProcNo", nbrProci); sidePatchID[edgeI] = addPatch<processorPolyPatch> ( @@ -1154,9 +1154,9 @@ tmp<pointField> calcOffset forAll(fc, i) { - label meshFaceI = pp.start()+i; - label patchFaceI = mag(extruder.faceToFaceMap()[meshFaceI])-1; - point patchFc = extrudePatch[patchFaceI].centre + label meshFacei = pp.start()+i; + label patchFacei = mag(extruder.faceToFaceMap()[meshFacei])-1; + point patchFc = extrudePatch[patchFacei].centre ( extrudePatch.points() ); @@ -1310,7 +1310,7 @@ void extrudeGeometricProperties if (extruder.faceToFaceMap()[facei] != 0) { // 'horizontal' face - label patchFaceI = mag(extruder.faceToFaceMap()[facei])-1; + label patchFacei = mag(extruder.faceToFaceMap()[facei])-1; label celli = regionMesh.faceOwner()[facei]; if (regionMesh.isInternalFace(facei)) @@ -1335,8 +1335,8 @@ void extrudeGeometricProperties // Recalculate based on extrusion model faceCentres[facei] = model ( - patchFaceCentres[patchFaceI], - extrudePatch.faceNormals()[patchFaceI], + patchFaceCentres[patchFacei], + extrudePatch.faceNormals()[patchFacei], layerI ); } @@ -1387,7 +1387,7 @@ void extrudeGeometricProperties forAll(extruder.cellToFaceMap(), celli) { - label patchFaceI = extruder.cellToFaceMap()[celli]; + label patchFacei = extruder.cellToFaceMap()[celli]; // Calculate layer from cell numbering (see createShellMesh) label layerI = (celli % model.nLayers()); @@ -1395,14 +1395,14 @@ void extrudeGeometricProperties // Recalculate based on extrusion model point pt0 = model ( - patchFaceCentres[patchFaceI], - extrudePatch.faceNormals()[patchFaceI], + patchFaceCentres[patchFacei], + extrudePatch.faceNormals()[patchFacei], layerI ); point pt1 = model ( - patchFaceCentres[patchFaceI], - extrudePatch.faceNormals()[patchFaceI], + patchFaceCentres[patchFacei], + extrudePatch.faceNormals()[patchFacei], layerI+1 ); @@ -1960,13 +1960,13 @@ int main(int argc, char *argv[]) { if (!isA<processorPolyPatch>(patches[patchi])) { - label newPatchI = regionPatches.size(); + label newPatchi = regionPatches.size(); regionPatches.append ( patches[patchi].clone ( patches, - newPatchI, + newPatchi, 0, // size 0 // start ).ptr() @@ -2240,12 +2240,12 @@ int main(int argc, char *argv[]) if (facei != -1) { - label newPatchI = findPatchID + label newPatchi = findPatchID ( regionPatches, patches[patches.whichPatch(facei)].name() ); - ePatches.setSize(eFaces.size(), newPatchI); + ePatches.setSize(eFaces.size(), newPatchi); } else { @@ -2683,20 +2683,20 @@ int main(int argc, char *argv[]) polyTopoChange meshMod(mesh); // Modify faces to be in bottom (= always coupled) patch - forAll(extrudeMeshFaces, zoneFaceI) + forAll(extrudeMeshFaces, zoneFacei) { - label meshFaceI = extrudeMeshFaces[zoneFaceI]; - label zoneI = zoneID[zoneFaceI]; - bool flip = zoneFlipMap[zoneFaceI]; - const face& f = mesh.faces()[meshFaceI]; + label meshFacei = extrudeMeshFaces[zoneFacei]; + label zoneI = zoneID[zoneFacei]; + bool flip = zoneFlipMap[zoneFacei]; + const face& f = mesh.faces()[meshFacei]; if (!flip) { meshMod.modifyFace ( f, // modified face - meshFaceI, // label of face being modified - mesh.faceOwner()[meshFaceI],// owner + meshFacei, // label of face being modified + mesh.faceOwner()[meshFacei],// owner -1, // neighbour false, // face flip interMeshBottomPatch[zoneI],// patch for face @@ -2704,13 +2704,13 @@ int main(int argc, char *argv[]) flip // face flip in zone ); } - else if (mesh.isInternalFace(meshFaceI)) + else if (mesh.isInternalFace(meshFacei)) { meshMod.modifyFace ( f.reverseFace(), // modified face - meshFaceI, // label of modified face - mesh.faceNeighbour()[meshFaceI],// owner + meshFacei, // label of modified face + mesh.faceNeighbour()[meshFacei],// owner -1, // neighbour true, // face flip interMeshBottomPatch[zoneI], // patch for face @@ -2722,20 +2722,20 @@ int main(int argc, char *argv[]) if (zoneShadowNames.size() > 0) //if there is a top faceZone specified { - forAll(extrudeMeshFaces, zoneFaceI) + forAll(extrudeMeshFaces, zoneFacei) { - label meshFaceI = extrudeMeshShadowFaces[zoneFaceI]; - label zoneI = zoneShadowID[zoneFaceI]; - bool flip = zoneShadowFlipMap[zoneFaceI]; - const face& f = mesh.faces()[meshFaceI]; + label meshFacei = extrudeMeshShadowFaces[zoneFacei]; + label zoneI = zoneShadowID[zoneFacei]; + bool flip = zoneShadowFlipMap[zoneFacei]; + const face& f = mesh.faces()[meshFacei]; if (!flip) { meshMod.modifyFace ( f, // modified face - meshFaceI, // face being modified - mesh.faceOwner()[meshFaceI],// owner + meshFacei, // face being modified + mesh.faceOwner()[meshFacei],// owner -1, // neighbour false, // face flip interMeshTopPatch[zoneI], // patch for face @@ -2743,13 +2743,13 @@ int main(int argc, char *argv[]) flip // face flip in zone ); } - else if (mesh.isInternalFace(meshFaceI)) + else if (mesh.isInternalFace(meshFacei)) { meshMod.modifyFace ( f.reverseFace(), // modified face - meshFaceI, // label modified face - mesh.faceNeighbour()[meshFaceI],// owner + meshFacei, // label modified face + mesh.faceNeighbour()[meshFacei],// owner -1, // neighbour true, // face flip interMeshTopPatch[zoneI], // patch for face @@ -2762,25 +2762,25 @@ int main(int argc, char *argv[]) else { // Add faces (using same points) to be in top patch - forAll(extrudeMeshFaces, zoneFaceI) + forAll(extrudeMeshFaces, zoneFacei) { - label meshFaceI = extrudeMeshFaces[zoneFaceI]; - label zoneI = zoneID[zoneFaceI]; - bool flip = zoneFlipMap[zoneFaceI]; - const face& f = mesh.faces()[meshFaceI]; + label meshFacei = extrudeMeshFaces[zoneFacei]; + label zoneI = zoneID[zoneFacei]; + bool flip = zoneFlipMap[zoneFacei]; + const face& f = mesh.faces()[meshFacei]; if (!flip) { - if (mesh.isInternalFace(meshFaceI)) + if (mesh.isInternalFace(meshFacei)) { meshMod.addFace ( f.reverseFace(), // modified face - mesh.faceNeighbour()[meshFaceI],// owner + mesh.faceNeighbour()[meshFacei],// owner -1, // neighbour -1, // master point -1, // master edge - meshFaceI, // master face + meshFacei, // master face true, // flip flux interMeshTopPatch[zoneI], // patch for face -1, // zone for face @@ -2793,11 +2793,11 @@ int main(int argc, char *argv[]) meshMod.addFace ( f, // face - mesh.faceOwner()[meshFaceI], // owner + mesh.faceOwner()[meshFacei], // owner -1, // neighbour -1, // master point -1, // master edge - meshFaceI, // master face + meshFacei, // master face false, // flip flux interMeshTopPatch[zoneI], // patch for face -1, // zone for face diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C index 57a019dc3a65a4b12f19eb61875274d1826023e4..cc8c11735767dc7a539e65bac7efb86fe0a9100c 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C @@ -92,8 +92,8 @@ Foam::extrude2DMesh::extrude2DMesh model_(model), modelType_(dict.lookup("extrudeModel")), patchType_(dict.lookup("patchType")), - frontPatchI_(-1), - backPatchI_(-1) + frontPatchi_(-1), + backPatchi_(-1) { check2D(); } @@ -111,8 +111,8 @@ void Foam::extrude2DMesh::addFrontBackPatches() { const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - frontPatchI_ = patches.findPatchID("front"); - backPatchI_ = patches.findPatchID("back"); + frontPatchi_ = patches.findPatchID("front"); + backPatchi_ = patches.findPatchID("back"); // Add patch. List<polyPatch*> newPatches(patches.size() + 2); @@ -131,59 +131,59 @@ void Foam::extrude2DMesh::addFrontBackPatches() ).ptr(); } - if (frontPatchI_ == -1) + if (frontPatchi_ == -1) { - frontPatchI_ = patches.size(); + frontPatchi_ = patches.size(); - newPatches[frontPatchI_] = + newPatches[frontPatchi_] = polyPatch::New ( patchType_, "front", 0, mesh_.nFaces(), - frontPatchI_, + frontPatchi_, patches ).ptr(); -// newPatches[frontPatchI_] = polyPatch::New +// newPatches[frontPatchi_] = polyPatch::New // ( // "front", // patchDict_, -// frontPatchI_, +// frontPatchi_, // patches // ).ptr(); - Info<< "Adding patch " << newPatches[frontPatchI_]->name() - << " at index " << frontPatchI_ + Info<< "Adding patch " << newPatches[frontPatchi_]->name() + << " at index " << frontPatchi_ << " for front faces." << nl << endl; } - if (backPatchI_ == -1) + if (backPatchi_ == -1) { - backPatchI_ = patches.size() + 1; + backPatchi_ = patches.size() + 1; - newPatches[backPatchI_] = + newPatches[backPatchi_] = polyPatch::New ( patchType_, "back", 0, mesh_.nFaces(), - backPatchI_, + backPatchi_, patches ).ptr(); -// newPatches[frontPatchI_] = polyPatch::New +// newPatches[frontPatchi_] = polyPatch::New // ( // "back", // patchDict_, -// backPatchI_, +// backPatchi_, // patches // ).ptr(); - Info<< "Adding patch " << newPatches[backPatchI_]->name() - << " at index " << backPatchI_ + Info<< "Adding patch " << newPatches[backPatchi_]->name() + << " at index " << backPatchi_ << " for back faces." << nl << endl; } @@ -330,10 +330,10 @@ void Foam::extrude2DMesh::setRefinement label currentLayerOffset = layer*mesh_.nPoints(); label nextLayerOffset = currentLayerOffset + mesh_.nPoints(); - label startFaceI = patches[patchi].start(); - label endFaceI = startFaceI + patches[patchi].size(); + label startFacei = patches[patchi].start(); + label endFacei = startFacei + patches[patchi].size(); - for (label facei = startFaceI; facei < endFaceI; facei++) + for (label facei = startFacei; facei < endFacei; facei++) { label zoneID = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; @@ -386,12 +386,12 @@ void Foam::extrude2DMesh::setRefinement face frontFace(cFaces.size()); // Make a loop out of faces. - label nextFaceI = cFaces[0]; + label nextFacei = cFaces[0]; - const face& f = faces[nextFaceI]; + const face& f = faces[nextFacei]; label nextPointI; - if (mesh_.faceOwner()[nextFaceI] == celli) + if (mesh_.faceOwner()[nextFacei] == celli) { frontFace[0] = f[0]; nextPointI = f[1]; @@ -408,23 +408,23 @@ void Foam::extrude2DMesh::setRefinement frontFace[i] = nextPointI; // Find face containing pointI - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; - if (facei != nextFaceI) + label facei = cFaces[cFacei]; + if (facei != nextFacei) { const face& f = faces[facei]; if (f[0] == nextPointI) { nextPointI = f[1]; - nextFaceI = facei; + nextFacei = facei; break; } else if (f[1] == nextPointI) { nextPointI = f[0]; - nextFaceI = facei; + nextFacei = facei; break; } } @@ -482,12 +482,12 @@ void Foam::extrude2DMesh::setRefinement face frontFace(cFaces.size()); // Make a loop out of faces. - label nextFaceI = cFaces[0]; + label nextFacei = cFaces[0]; - const face& f = faces[nextFaceI]; + const face& f = faces[nextFacei]; label nextPointI; - if (mesh_.faceOwner()[nextFaceI] == celli) + if (mesh_.faceOwner()[nextFacei] == celli) { frontFace[0] = f[0]; nextPointI = f[1]; @@ -504,23 +504,23 @@ void Foam::extrude2DMesh::setRefinement frontFace[i] = nextPointI; // Find face containing pointI - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; - if (facei != nextFaceI) + label facei = cFaces[cFacei]; + if (facei != nextFacei) { const face& f = faces[facei]; if (f[0] == nextPointI) { nextPointI = f[1]; - nextFaceI = facei; + nextFacei = facei; break; } else if (f[1] == nextPointI) { nextPointI = f[0]; - nextFaceI = facei; + nextFacei = facei; break; } } @@ -537,7 +537,7 @@ void Foam::extrude2DMesh::setRefinement -1, // masterEdgeID nFaces++, // masterFaceID false, // flipFaceFlux - backPatchI_, // patchID + backPatchi_, // patchID -1, // zoneID false // zoneFlip ); @@ -567,7 +567,7 @@ void Foam::extrude2DMesh::setRefinement -1, // masterEdgeID nFaces++, // masterFaceID false, // flipFaceFlux - frontPatchI_, // patchID + frontPatchi_, // patchID -1, // zoneID false // zoneFlip ); diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H index 20b07dae87134a6b51686561dc5c65042ebacb34..99d69412c963752725d2d60972ac7f8930fd5b6f 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -76,8 +76,8 @@ class extrude2DMesh const word patchType_; - label frontPatchI_; - label backPatchI_; + label frontPatchi_; + label backPatchi_; // Private Member Functions @@ -128,14 +128,14 @@ public: void distribute(const mapDistributePolyMesh&) {} - label frontPatchI() const + label frontPatchi() const { - return frontPatchI_; + return frontPatchi_; } - label backPatchI() const + label backPatchi() const { - return backPatchI_; + return backPatchi_; } }; diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C index 32a7091c1783970f66ceb25597715034787e412c..15bc659154e8dee2103ba6f351c44befcadeee46 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C @@ -101,7 +101,7 @@ Foam::labelList Foam::patchToPoly2DMesh::internalFaceOrder() labelList oldToNew(owner_.size(), -1); - label newFaceI = 0; + label newFacei = 0; forAll(faceEdges, facei) { @@ -115,17 +115,17 @@ Foam::labelList Foam::patchToPoly2DMesh::internalFaceOrder() { // Internal edge. Get the face on other side. - label nbrFaceI = neighbour_[fEdges[feI]]; + label nbrFacei = neighbour_[fEdges[feI]]; - if (nbrFaceI == facei) + if (nbrFacei == facei) { - nbrFaceI = owner_[fEdges[feI]]; + nbrFacei = owner_[fEdges[feI]]; } - if (facei < nbrFaceI) + if (facei < nbrFacei) { // facei is master - nbr[feI] = nbrFaceI; + nbr[feI] = nbrFacei; } } } @@ -136,7 +136,7 @@ Foam::labelList Foam::patchToPoly2DMesh::internalFaceOrder() { if (nbr[i] != -1) { - oldToNew[fEdges[nbr.indices()[i]]] = newFaceI++; + oldToNew[fEdges[nbr.indices()[i]]] = newFacei++; } } } @@ -183,12 +183,12 @@ void Foam::patchToPoly2DMesh::addPatchFacesToOwner() for ( - label bFaceI = nInternalEdges; - bFaceI < faces_.size(); - ++bFaceI + label bFacei = nInternalEdges; + bFacei < faces_.size(); + ++bFacei ) { - const face& e = faces_[bFaceI]; + const face& e = faces_[bFacei]; bool matched = false; @@ -209,14 +209,14 @@ void Foam::patchToPoly2DMesh::addPatchFacesToOwner() label fp = findIndex(f, e[0]); - newOwner[bFaceI] = owner_[bEdgeI]; + newOwner[bFacei] = owner_[bEdgeI]; if (f.nextLabel(fp) != e[1]) { Info<< "Flipping" << endl; - faces_[bFaceI][0] = e[1]; - faces_[bFaceI][1] = e[0]; + faces_[bFacei][0] = e[1]; + faces_[bFacei][1] = e[0]; } nMatched++; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C index a698561822aca0958d3b75166cb0820ad1bc2249..7c6fb584f1d585f6a0aa04e9187a687bcf7a314a 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C @@ -51,28 +51,28 @@ Foam::DistributedDelaunayMesh<Triangulation>::buildMap forAll(toProc, i) { - label procI = toProc[i]; + label proci = toProc[i]; - nSend[procI]++; + nSend[proci]++; } // 2. Size sendMap labelListList sendMap(Pstream::nProcs()); - forAll(nSend, procI) + forAll(nSend, proci) { - sendMap[procI].setSize(nSend[procI]); + sendMap[proci].setSize(nSend[proci]); - nSend[procI] = 0; + nSend[proci] = 0; } // 3. Fill sendMap forAll(toProc, i) { - label procI = toProc[i]; + label proci = toProc[i]; - sendMap[procI][nSend[procI]++] = i; + sendMap[proci][nSend[proci]++] = i; } // 4. Send over how many I need to receive @@ -93,17 +93,17 @@ Foam::DistributedDelaunayMesh<Triangulation>::buildMap label constructSize = constructMap[Pstream::myProcNo()].size(); - forAll(constructMap, procI) + forAll(constructMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - label nRecv = recvSizes[procI]; + label nRecv = recvSizes[proci]; - constructMap[procI].setSize(nRecv); + constructMap[proci].setSize(nRecv); for (label i = 0; i < nRecv; i++) { - constructMap[procI][i] = constructSize++; + constructMap[proci][i] = constructSize++; } } } @@ -201,16 +201,16 @@ Foam::labelList Foam::DistributedDelaunayMesh<Triangulation>::overlapProcessors { DynamicList<label> toProc(Pstream::nProcs()); - forAll(allBackgroundMeshBounds_(), procI) + forAll(allBackgroundMeshBounds_(), proci) { // Test against the bounding box of the processor if ( - !isLocal(procI) - && allBackgroundMeshBounds_()[procI].overlaps(centre, radiusSqr) + !isLocal(proci) + && allBackgroundMeshBounds_()[proci].overlaps(centre, radiusSqr) ) { - toProc.append(procI); + toProc.append(proci); } } @@ -366,9 +366,9 @@ void Foam::DistributedDelaunayMesh<Triangulation>::findProcessorBoundaryCells if (cellToCheck.found(cit->cellIndex())) { // Get the neighbours and check them - for (label adjCellI = 0; adjCellI < 4; ++adjCellI) + for (label adjCelli = 0; adjCelli < 4; ++adjCelli) { - Cell_handle citNeighbor = cit->neighbor(adjCellI); + Cell_handle citNeighbor = cit->neighbor(adjCelli); // Ignore if has far point or previously visited if @@ -432,7 +432,7 @@ void Foam::DistributedDelaunayMesh<Triangulation>::markVerticesToRefer forAll(citOverlaps, cOI) { - label procI = citOverlaps[cOI]; + label proci = citOverlaps[cOI]; for (int i = 0; i < 4; i++) { @@ -451,11 +451,11 @@ void Foam::DistributedDelaunayMesh<Triangulation>::markVerticesToRefer // Using the hashSet to ensure that each vertex is only // referred once to each processor. // Do not refer a vertex to its own processor. - if (vProcIndex != procI) + if (vProcIndex != proci) { - if (referralVertices[procI].insert(procIndexPair)) + if (referralVertices[proci].insert(procIndexPair)) { - targetProcessor.append(procI); + targetProcessor.append(proci); parallelInfluenceVertices.append ( @@ -501,9 +501,9 @@ Foam::label Foam::DistributedDelaunayMesh<Triangulation>::referVertices pointMap.distribute(parallelVertices); - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { - const labelList& constructMap = pointMap.constructMap()[procI]; + const labelList& constructMap = pointMap.constructMap()[proci]; if (constructMap.size()) { @@ -841,11 +841,11 @@ void Foam::DistributedDelaunayMesh<Triangulation>::sync(const boundBox& bb) /Pstream::nProcs(); PtrList<labelPairHashSet> referralVertices(Pstream::nProcs()); - forAll(referralVertices, procI) + forAll(referralVertices, proci) { - if (!isLocal(procI)) + if (!isLocal(proci)) { - referralVertices.set(procI, new labelPairHashSet(nApproxReferred)); + referralVertices.set(proci, new labelPairHashSet(nApproxReferred)); } } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/PrintTable/PrintTable.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/PrintTable/PrintTable.C index 3e64caa717103e9943f923c96166dd9e076518a0..abedb2c9052fd742de47d5ef5e45d28f8056b0d4 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/PrintTable/PrintTable.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/PrintTable/PrintTable.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -86,9 +86,9 @@ void Foam::PrintTable<KeyType, DataType>::print List<label> largestProcSize(Pstream::nProcs(), 0); - forAll(procData, procI) + forAll(procData, proci) { - const HashTableData& procIData = procData[procI]; + const HashTableData& procIData = procData[proci]; for ( @@ -108,7 +108,7 @@ void Foam::PrintTable<KeyType, DataType>::print HashTable<DataType, label>& key = combinedTable[iter.key()]; - key.insert(procI, iter()); + key.insert(proci, iter()); for ( @@ -145,11 +145,11 @@ void Foam::PrintTable<KeyType, DataType>::print os.width(largestKeyLength); os << indent << "# Proc"; - forAll(procData, procI) + forAll(procData, proci) { os << tab; os.width(largestDataLength); - os << procI; + os << proci; } if (printSum) diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C index 16dab7f3e455078dd59e290b48d0bd9adbfb2786..ba4d55a22bacb2e1e27624a8a3ece0e07c9bae37 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C @@ -56,28 +56,28 @@ Foam::autoPtr<Foam::mapDistribute> Foam::backgroundMeshDecomposition::buildMap forAll(toProc, i) { - label procI = toProc[i]; + label proci = toProc[i]; - nSend[procI]++; + nSend[proci]++; } // 2. Size sendMap labelListList sendMap(Pstream::nProcs()); - forAll(nSend, procI) + forAll(nSend, proci) { - sendMap[procI].setSize(nSend[procI]); + sendMap[proci].setSize(nSend[proci]); - nSend[procI] = 0; + nSend[proci] = 0; } // 3. Fill sendMap forAll(toProc, i) { - label procI = toProc[i]; + label proci = toProc[i]; - sendMap[procI][nSend[procI]++] = i; + sendMap[proci][nSend[proci]++] = i; } // 4. Send over how many I need to receive @@ -98,17 +98,17 @@ Foam::autoPtr<Foam::mapDistribute> Foam::backgroundMeshDecomposition::buildMap label constructSize = constructMap[Pstream::myProcNo()].size(); - forAll(constructMap, procI) + forAll(constructMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - label nRecv = recvSizes[procI]; + label nRecv = recvSizes[proci]; - constructMap[procI].setSize(nRecv); + constructMap[proci].setSize(nRecv); for (label i = 0; i < nRecv; i++) { - constructMap[procI][i] = constructSize++; + constructMap[proci][i] = constructSize++; } } } @@ -259,17 +259,17 @@ void Foam::backgroundMeshDecomposition::initialRefinement() List<volumeType> newVolumeStatus(cellMap.size()); - forAll(cellMap, newCellI) + forAll(cellMap, newCelli) { - label oldCellI = cellMap[newCellI]; + label oldCelli = cellMap[newCelli]; - if (oldCellI == -1) + if (oldCelli == -1) { - newVolumeStatus[newCellI] = volumeType::UNKNOWN; + newVolumeStatus[newCelli] = volumeType::UNKNOWN; } else { - newVolumeStatus[newCellI] = volumeStatus[oldCellI]; + newVolumeStatus[newCelli] = volumeStatus[oldCelli]; } } @@ -369,17 +369,17 @@ void Foam::backgroundMeshDecomposition::initialRefinement() List<volumeType> newVolumeStatus(cellMap.size()); - forAll(cellMap, newCellI) + forAll(cellMap, newCelli) { - label oldCellI = cellMap[newCellI]; + label oldCelli = cellMap[newCelli]; - if (oldCellI == -1) + if (oldCelli == -1) { - newVolumeStatus[newCellI] = volumeType::UNKNOWN; + newVolumeStatus[newCelli] = volumeType::UNKNOWN; } else { - newVolumeStatus[newCellI] = volumeStatus[oldCellI]; + newVolumeStatus[newCelli] = volumeStatus[oldCelli]; } } @@ -474,29 +474,29 @@ void Foam::backgroundMeshDecomposition::printMeshData // globalIndex globalBoundaryFaces(mesh.nFaces()-mesh.nInternalFaces()); - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { - Info<< "Processor " << procI << " " - << "Number of cells = " << globalCells.localSize(procI) + Info<< "Processor " << proci << " " + << "Number of cells = " << globalCells.localSize(proci) << endl; // label nProcFaces = 0; - // const labelList& nei = patchNeiProcNo[procI]; + // const labelList& nei = patchNeiProcNo[proci]; - // forAll(patchNeiProcNo[procI], i) + // forAll(patchNeiProcNo[proci], i) // { // Info<< " Number of faces shared with processor " - // << patchNeiProcNo[procI][i] << " = " << patchSize[procI][i] + // << patchNeiProcNo[proci][i] << " = " << patchSize[proci][i] // << endl; - // nProcFaces += patchSize[procI][i]; + // nProcFaces += patchSize[proci][i]; // } // Info<< " Number of processor patches = " << nei.size() << nl // << " Number of processor faces = " << nProcFaces << nl // << " Number of boundary faces = " - // << globalBoundaryFaces.localSize(procI) << endl; + // << globalBoundaryFaces.localSize(proci) << endl; } } @@ -721,10 +721,10 @@ void Foam::backgroundMeshDecomposition::buildPatchAndTree() point bbMin(GREAT, GREAT, GREAT); point bbMax(-GREAT, -GREAT, -GREAT); - forAll(allBackgroundMeshBounds_, procI) + forAll(allBackgroundMeshBounds_, proci) { - bbMin = min(bbMin, allBackgroundMeshBounds_[procI].min()); - bbMax = max(bbMax, allBackgroundMeshBounds_[procI].max()); + bbMin = min(bbMin, allBackgroundMeshBounds_[proci].min()); + bbMax = max(bbMax, allBackgroundMeshBounds_[proci].max()); } globalBackgroundBounds_ = treeBoundBox(bbMin, bbMax); @@ -1119,13 +1119,13 @@ Foam::labelList Foam::backgroundMeshDecomposition::processorNearestPosition label nCandidates = 0; - forAll(allBackgroundMeshBounds_, procI) + forAll(allBackgroundMeshBounds_, proci) { // Candidate points may lie just outside a processor box, increase // test range by using overlaps rather than contains - if (allBackgroundMeshBounds_[procI].overlaps(pt, sqr(SMALL*100))) + if (allBackgroundMeshBounds_[proci].overlaps(pt, sqr(SMALL*100))) { - toCandidateProc.append(procI); + toCandidateProc.append(proci); testPoints.append(pt); nCandidates++; @@ -1242,17 +1242,17 @@ Foam::backgroundMeshDecomposition::intersectsProcessors label nCandidates = 0; - forAll(allBackgroundMeshBounds_, procI) + forAll(allBackgroundMeshBounds_, proci) { // It is assumed that the sphere in question overlaps the source // processor, so don't test it, unless includeOwnProcessor is true if ( - (includeOwnProcessor || procI != Pstream::myProcNo()) - && allBackgroundMeshBounds_[procI].intersects(s, e, p) + (includeOwnProcessor || proci != Pstream::myProcNo()) + && allBackgroundMeshBounds_[proci].intersects(s, e, p) ) { - toCandidateProc.append(procI); + toCandidateProc.append(proci); testStarts.append(s); testEnds.append(e); @@ -1336,7 +1336,7 @@ bool Foam::backgroundMeshDecomposition::overlapsOtherProcessors const scalar& radiusSqr ) const { - forAll(allBackgroundMeshBounds_, procI) + forAll(allBackgroundMeshBounds_, proci) { if (bFTreePtr_().findNearest(centre, radiusSqr).hit()) { @@ -1356,19 +1356,19 @@ Foam::labelList Foam::backgroundMeshDecomposition::overlapProcessors { DynamicList<label> toProc(Pstream::nProcs()); - forAll(allBackgroundMeshBounds_, procI) + forAll(allBackgroundMeshBounds_, proci) { // Test against the bounding box of the processor if ( - procI != Pstream::myProcNo() - && allBackgroundMeshBounds_[procI].overlaps(centre, radiusSqr) + proci != Pstream::myProcNo() + && allBackgroundMeshBounds_[proci].overlaps(centre, radiusSqr) ) { // Expensive test // if (bFTreePtr_().findNearest(centre, radiusSqr).hit()) { - toProc.append(procI); + toProc.append(proci); } } } @@ -1400,19 +1400,19 @@ Foam::labelList Foam::backgroundMeshDecomposition::overlapProcessors // // label nCandidates = 0; // -// forAll(allBackgroundMeshBounds_, procI) +// forAll(allBackgroundMeshBounds_, proci) // { // // It is assumed that the sphere in question overlaps the source // // processor, so don't test it, unless includeOwnProcessor is true // if // ( -// (includeOwnProcessor || procI != Pstream::myProcNo()) -// && allBackgroundMeshBounds_[procI].overlaps(c, rSqr) +// (includeOwnProcessor || proci != Pstream::myProcNo()) +// && allBackgroundMeshBounds_[proci].overlaps(c, rSqr) // ) // { // if (bFTreePtr_().findNearest(c, rSqr).hit()) // { -// toCandidateProc.append(procI); +// toCandidateProc.append(proci); // testCentres.append(c); // testRadiusSqrs.append(rSqr); // @@ -1525,17 +1525,17 @@ Foam::labelList Foam::backgroundMeshDecomposition::overlapProcessors // // label nCandidates = 0; // -// forAll(allBackgroundMeshBounds_, procI) +// forAll(allBackgroundMeshBounds_, proci) // { // // It is assumed that the sphere in question overlaps the source // // processor, so don't test it, unless includeOwnProcessor is true // if // ( -// (includeOwnProcessor || procI != Pstream::myProcNo()) -// && allBackgroundMeshBounds_[procI].overlaps(cc, rSqr) +// (includeOwnProcessor || proci != Pstream::myProcNo()) +// && allBackgroundMeshBounds_[proci].overlaps(cc, rSqr) // ) // { -// toCandidateProc.append(procI); +// toCandidateProc.append(proci); // // nCandidates++; // } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecompositionTemplates.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecompositionTemplates.C index 5851c7e807d87f380beebd10fcdd68dc183caf77..8e49b9613316abf9ecbd2619c7ec3067b1ce14e3 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecompositionTemplates.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecompositionTemplates.C @@ -64,11 +64,11 @@ Foam::labelList Foam::backgroundMeshDecomposition::processorPosition label nCandidates = 0; - forAll(allBackgroundMeshBounds_, procI) + forAll(allBackgroundMeshBounds_, proci) { - if (allBackgroundMeshBounds_[procI].contains(pt)) + if (allBackgroundMeshBounds_[proci].contains(pt)) { - toCandidateProc.append(procI); + toCandidateProc.append(proci); testPoints.append(pt); nCandidates++; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index eea0bfd6cc1b93fde105b662b756760551c166ca..b99b4c3252b86e28595a32a491d6e1d85782ecc6 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -1595,13 +1595,13 @@ Foam::label Foam::conformalVoronoiMesh::createPatchInfo Pstream::gatherList(procUsedList); Pstream::scatterList(procUsedList); - forAll(procUsedList, procI) + forAll(procUsedList, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - if (procUsedList[procI][Pstream::myProcNo()]) + if (procUsedList[proci][Pstream::myProcNo()]) { - procUsed[procI] = true; + procUsed[proci] = true; } } } @@ -1762,7 +1762,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches labelPairPairDynListList procPatchSortingIndex(nPatches); - label dualFaceI = 0; + label dualFacei = 0; if (foamyHexMeshControls().guardFeaturePoints()) { @@ -2029,11 +2029,11 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches } // internal face - faces[dualFaceI] = newDualFace; - owner[dualFaceI] = own; - neighbour[dualFaceI] = nei; + faces[dualFacei] = newDualFace; + owner[dualFacei] = own; + neighbour[dualFacei] = nei; - dualFaceI++; + dualFacei++; } else if ( @@ -2293,11 +2293,11 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches // else { // internal face - faces[dualFaceI] = newDualFace; - owner[dualFaceI] = own; - neighbour[dualFaceI] = nei; + faces[dualFacei] = newDualFace; + owner[dualFacei] = own; + neighbour[dualFacei] = nei; - dualFaceI++; + dualFacei++; } } } @@ -2313,7 +2313,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches << endl; } - label nInternalFaces = dualFaceI; + label nInternalFaces = dualFacei; faces.setSize(nInternalFaces); owner.setSize(nInternalFaces); diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index 74245d7cfc676f2d97396faa7ed0713813270dad..894652dc9d950cde6b302b954d5c171d3a1547e1 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -408,13 +408,13 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation() if (Pstream::parRun()) { - forAll(referralVertices, procI) + forAll(referralVertices, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { referralVertices.set ( - procI, + proci, new labelPairHashSet(number_of_vertices()/Pstream::nProcs()) ); } @@ -700,16 +700,16 @@ Foam::label Foam::conformalVoronoiMesh::synchroniseSurfaceTrees label nStoppedInsertion = 0; // Do the nearness tests here - for (label procI = 0; procI < Pstream::nProcs(); ++procI) + for (label proci = 0; proci < Pstream::nProcs(); ++proci) { // Skip own points - if (procI >= Pstream::myProcNo()) + if (proci >= Pstream::myProcNo()) { continue; } const pointIndexHitAndFeatureList& otherSurfEdges = - procSurfLocations[procI]; + procSurfLocations[proci]; forAll(otherSurfEdges, peI) { @@ -725,9 +725,9 @@ Foam::label Foam::conformalVoronoiMesh::synchroniseSurfaceTrees { nStoppedInsertion++; - if (!hits[procI].found(peI)) + if (!hits[proci].found(peI)) { - hits[procI].insert(peI); + hits[proci].insert(peI); } } } @@ -792,15 +792,15 @@ Foam::label Foam::conformalVoronoiMesh::synchroniseEdgeTrees label nStoppedInsertion = 0; // Do the nearness tests here - for (label procI = 0; procI < Pstream::nProcs(); ++procI) + for (label proci = 0; proci < Pstream::nProcs(); ++proci) { // Skip own points - if (procI >= Pstream::myProcNo()) + if (proci >= Pstream::myProcNo()) { continue; } - pointIndexHitAndFeatureList& otherProcEdges = procEdgeLocations[procI]; + pointIndexHitAndFeatureList& otherProcEdges = procEdgeLocations[proci]; forAll(otherProcEdges, peI) { @@ -812,7 +812,7 @@ Foam::label Foam::conformalVoronoiMesh::synchroniseEdgeTrees if (nearest.hit()) { // Pout<< "Not inserting " << peI << " " << pt << " " -// << nearest.rawPoint() << " on proc " << procI +// << nearest.rawPoint() << " on proc " << proci // << ", near edge = " << nearest // << " near ftPt = "<< info // << " " << featureEdgeExclusionDistanceSqr(pt) @@ -820,9 +820,9 @@ Foam::label Foam::conformalVoronoiMesh::synchroniseEdgeTrees nStoppedInsertion++; - if (!hits[procI].found(peI)) + if (!hits[proci].found(peI)) { - hits[procI].insert(peI); + hits[proci].insert(peI); } } } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index 4625e54928d5d4721e88e02a1f0ea00c8dc72d19..573b48984e719f1a2f0e79116db67fb7a3acb51d 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -250,8 +250,8 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance) // // // Vertex might be used by multiple faces. Which one to // // use? For now last one wins. -// label dualFaceI = dualPatchStarts[patchi]+i; -// vertexToDualAddressing[vertI] = -dualFaceI-1; +// label dualFacei = dualPatchStarts[patchi]+i; +// vertexToDualAddressing[vertI] = -dualFacei-1; // } // } // @@ -498,19 +498,19 @@ void Foam::conformalVoronoiMesh::checkProcessorPatchesMatch { bool allMatch = true; - forAll(procPatchSizes, procI) + forAll(procPatchSizes, proci) { - const labelList& patchSizes = procPatchSizes[procI]; + const labelList& patchSizes = procPatchSizes[proci]; forAll(patchSizes, patchi) { - if (patchSizes[patchi] != procPatchSizes[patchi][procI]) + if (patchSizes[patchi] != procPatchSizes[patchi][proci]) { allMatch = false; - Info<< indent << "Patches " << procI << " and " << patchi + Info<< indent << "Patches " << proci << " and " << patchi << " have different sizes: " << patchSizes[patchi] - << " and " << procPatchSizes[patchi][procI] << endl; + << " and " << procPatchSizes[patchi][proci] << endl; } } } @@ -708,18 +708,18 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches if (changed) { // Merge patch face reordering into mesh face reordering table - forAll(patchFaceRotation, patchFaceI) + forAll(patchFaceRotation, patchFacei) { - rotation[patchFaceI + patchStartFace] - = patchFaceRotation[patchFaceI]; + rotation[patchFacei + patchStartFace] + = patchFaceRotation[patchFacei]; } - forAll(patchFaceMap, patchFaceI) + forAll(patchFaceMap, patchFacei) { - if (patchFaceMap[patchFaceI] != patchFaceI) + if (patchFaceMap[patchFacei] != patchFacei) { - faceMap[patchFaceI + patchStartFace] - = patchFaceMap[patchFaceI] + patchStartFace; + faceMap[patchFacei + patchStartFace] + = patchFaceMap[patchFacei] + patchStartFace; } } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C index 05d4c5e58061ee3318becdd39540819b8c66462b..997c94c1571f0208c61ed772a83af27d867762da 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C @@ -57,14 +57,14 @@ void Foam::conformalVoronoiMesh::calcNeighbourCellCentres const labelUList& faceCells = pp.faceCells(); - label bFaceI = pp.start() - mesh.nInternalFaces(); + label bFacei = pp.start() - mesh.nInternalFaces(); if (pp.coupled()) { forAll(faceCells, i) { - neiCc[bFaceI] = cellCentres[faceCells[i]]; - bFaceI++; + neiCc[bFacei] = cellCentres[faceCells[i]]; + bFacei++; } } } @@ -329,14 +329,14 @@ void Foam::conformalVoronoiMesh::calcFaceZones const labelUList& faceCells = pp.faceCells(); - label bFaceI = pp.start() - mesh.nInternalFaces(); + label bFacei = pp.start() - mesh.nInternalFaces(); if (pp.coupled()) { forAll(faceCells, i) { - neiFaceOwner[bFaceI] = cellToSurface[faceCells[i]]; - bFaceI++; + neiFaceOwner[bFacei] = cellToSurface[faceCells[i]]; + bFacei++; } } } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C index bea71b9b5c60c5a91d8089c41a6faa7740addb6f..14c935cbab1b38e9d9d368bb2b0f7eddb4c0e228 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -127,15 +127,15 @@ List<Vb::Point> pointFile::initialPoints() const { bool foundAlready = false; - forAll(allProcPt, procI) + forAll(allProcPt, proci) { // If a processor with a lower index has found this point // to insert already, defer to it and don't insert. if (foundAlready) { - allProcPt[procI][ptI] = false; + allProcPt[proci][ptI] = false; } - else if (allProcPt[procI][ptI]) + else if (allProcPt[proci][ptI]) { foundAlready = true; } diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C index 107aa9fefb8b996ba5f414888d2b4b9d6ae5507a..18b2bf7da4378b9878749e915dff330b66a47353 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C @@ -127,32 +127,32 @@ void printMeshData(const polyMesh& mesh) label totProcPatches = 0; label maxProcFaces = 0; - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { Info<< endl - << "Processor " << procI << nl - << " Number of cells = " << globalCells.localSize(procI) + << "Processor " << proci << nl + << " Number of cells = " << globalCells.localSize(proci) << endl; label nProcFaces = 0; - const labelList& nei = patchNeiProcNo[procI]; + const labelList& nei = patchNeiProcNo[proci]; - forAll(patchNeiProcNo[procI], i) + forAll(patchNeiProcNo[proci], i) { Info<< " Number of faces shared with processor " - << patchNeiProcNo[procI][i] << " = " << patchSize[procI][i] + << patchNeiProcNo[proci][i] << " = " << patchSize[proci][i] << endl; - nProcFaces += patchSize[procI][i]; + nProcFaces += patchSize[proci][i]; } Info<< " Number of processor patches = " << nei.size() << nl << " Number of processor faces = " << nProcFaces << nl << " Number of boundary faces = " - << globalBoundaryFaces.localSize(procI) << endl; + << globalBoundaryFaces.localSize(proci) << endl; - maxProcCells = max(maxProcCells, globalCells.localSize(procI)); + maxProcCells = max(maxProcCells, globalCells.localSize(proci)); totProcFaces += nProcFaces; totProcPatches += nei.size(); maxProcPatches = max(maxProcPatches, nei.size()); diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C index f1785027c6ea2826264465269c933ab9e55a4d00..e5bca4dd69cb1ea528dc3548185954d5c212fe73 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C @@ -352,29 +352,29 @@ Foam::shortEdgeFilter2D::filter() bool flagDegenerateFace = false; const labelList& pFaces = ms_.pointFaces()[startVertex]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - const face& f = ms_.localFaces()[pFaces[pFaceI]]; + const face& f = ms_.localFaces()[pFaces[pFacei]]; forAll(f, fp) { // If the edge is part of this face... if (f[fp] == endVertex) { // If deleting vertex would create a triangle, don't! - if (newFaceVertexCount[pFaces[pFaceI]] < 4) + if (newFaceVertexCount[pFaces[pFacei]] < 4) { flagDegenerateFace = true; } else { - newFaceVertexCount[pFaces[pFaceI]]--; + newFaceVertexCount[pFaces[pFacei]]--; } } // If the edge is not part of this face... else { // Deleting vertex of a triangle... - if (newFaceVertexCount[pFaces[pFaceI]] < 3) + if (newFaceVertexCount[pFaces[pFacei]] < 3) { flagDegenerateFace = true; } @@ -450,7 +450,7 @@ Foam::shortEdgeFilter2D::filter() // Need a new faceList faceList newFaces(faces.size()); - label newFaceI = 0; + label newFacei = 0; labelList newFace; label newFaceSize = 0; @@ -521,7 +521,7 @@ Foam::shortEdgeFilter2D::filter() if (newFace.size() > 2) { - newFaces[newFaceI++] = face(newFace); + newFaces[newFacei++] = face(newFace); } else { @@ -531,7 +531,7 @@ Foam::shortEdgeFilter2D::filter() } } - newFaces.setSize(newFaceI); + newFaces.setSize(newFacei); MeshedSurface<face> fMesh ( diff --git a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C index 9021e771c02e002341e28c20ec95e44a23a587fc..459a33112ef748da089e39f9e326318a8fb9275a 100644 --- a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C +++ b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C @@ -120,16 +120,16 @@ int main(int argc, char *argv[]) // // Current patch number. - label newPatchI = bMesh.patches().size(); + label newPatchi = bMesh.patches().size(); label suffix = 0; while (true) { // Find first unset face. - label unsetFaceI = findIndex(patchIDs, -1); + label unsetFacei = findIndex(patchIDs, -1); - if (unsetFaceI == -1) + if (unsetFacei == -1) { // All faces have patchID set. Exit. break; @@ -148,10 +148,10 @@ int main(int argc, char *argv[]) bMesh.changePatchType(patchName, "patch"); - // Fill visited with all faces reachable from unsetFaceI. + // Fill visited with all faces reachable from unsetFacei. boolList visited(bMesh.mesh().size()); - bMesh.markFaces(markedEdges, unsetFaceI, visited); + bMesh.markFaces(markedEdges, unsetFacei, visited); // Assign all visited faces to current patch @@ -163,14 +163,14 @@ int main(int argc, char *argv[]) { nVisited++; - patchIDs[facei] = newPatchI; + patchIDs[facei] = newPatchi; } } Info<< "Assigned " << nVisited << " faces to patch " << patchName << endl << endl; - newPatchI++; + newPatchi++; } @@ -180,41 +180,41 @@ int main(int argc, char *argv[]) // Create new list of patches with old ones first List<polyPatch*> newPatchPtrList(patches.size()); - newPatchI = 0; + newPatchi = 0; // Copy old patches forAll(mesh.boundaryMesh(), patchi) { const polyPatch& patch = mesh.boundaryMesh()[patchi]; - newPatchPtrList[newPatchI] = + newPatchPtrList[newPatchi] = patch.clone ( mesh.boundaryMesh(), - newPatchI, + newPatchi, patch.size(), patch.start() ).ptr(); - newPatchI++; + newPatchi++; } // Add new ones with empty size. - for (label patchi = newPatchI; patchi < patches.size(); patchi++) + for (label patchi = newPatchi; patchi < patches.size(); patchi++) { const boundaryPatch& bp = patches[patchi]; - newPatchPtrList[newPatchI] = polyPatch::New + newPatchPtrList[newPatchi] = polyPatch::New ( polyPatch::typeName, bp.name(), 0, mesh.nFaces(), - newPatchI, + newPatchi, mesh.boundaryMesh() ).ptr(); - newPatchI++; + newPatchi++; } if (!overwrite) @@ -236,9 +236,9 @@ int main(int argc, char *argv[]) forAll(patchIDs, facei) { - label meshFaceI = meshFace[facei]; + label meshFacei = meshFace[facei]; - polyMeshRepatcher.changePatchID(meshFaceI, patchIDs[facei]); + polyMeshRepatcher.changePatchID(meshFacei, patchIDs[facei]); } polyMeshRepatcher.repatch(); diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index 17e308c69b606f78068422d622ce887d9bc9de71..655b43a1b2ffdb658e9f13a2704c22d463a23042 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -84,9 +84,9 @@ bool Foam::checkWedges } // Find opposite - label oppositePatchI = findOppositeWedge(mesh, pp); + label oppositePatchi = findOppositeWedge(mesh, pp); - if (oppositePatchI == -1) + if (oppositePatchi == -1) { if (report) { @@ -97,7 +97,7 @@ bool Foam::checkWedges } const wedgePolyPatch& opp = - refCast<const wedgePolyPatch>(patches[oppositePatchI]); + refCast<const wedgePolyPatch>(patches[oppositePatchi]); if (mag(opp.axis() & pp.axis()) < (1-1e-3)) @@ -351,13 +351,13 @@ bool Foam::checkCoupledPoints forAll(cpp, i) { - label bFaceI = cpp.start() + i - mesh.nInternalFaces(); + label bFacei = cpp.start() + i - mesh.nInternalFaces(); const face& f = cpp[i]; - nbrPoints[bFaceI].setSize(f.size()); + nbrPoints[bFacei].setSize(f.size()); forAll(f, fp) { const point& p0 = p[f[fp]]; - nbrPoints[bFaceI][fp] = p0; + nbrPoints[bFacei][fp] = p0; } } } @@ -397,15 +397,15 @@ bool Foam::checkCoupledPoints forAll(cpp, i) { - label bFaceI = cpp.start() + i - mesh.nInternalFaces(); + label bFacei = cpp.start() + i - mesh.nInternalFaces(); const face& f = cpp[i]; - if (f.size() != nbrPoints[bFaceI].size()) + if (f.size() != nbrPoints[bFacei].size()) { FatalErrorInFunction << "Local face size : " << f.size() << " does not equal neighbour face size : " - << nbrPoints[bFaceI].size() + << nbrPoints[bFacei].size() << abort(FatalError); } @@ -413,7 +413,7 @@ bool Foam::checkCoupledPoints forAll(f, j) { const point& p0 = p[f[fp]]; - scalar d = mag(p0 - nbrPoints[bFaceI][j]); + scalar d = mag(p0 - nbrPoints[bFacei][j]); if (d > smallDist[i]) { diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index cd8b2e260ac69a9040720a674b116a5053ae8927..59b81d8e0c0fa3d5fbad68f56d0d2dc8da09d696 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -113,7 +113,7 @@ void modifyOrAddFace const label facei, const label own, const bool flipFaceFlux, - const label newPatchI, + const label newPatchi, const label zoneID, const bool zoneFlip, @@ -132,7 +132,7 @@ void modifyOrAddFace own, // owner -1, // neighbour flipFaceFlux, // face flip - newPatchI, // patch for face + newPatchi, // patch for face false, // remove from zone zoneID, // zone for face zoneFlip // face flip in zone @@ -154,7 +154,7 @@ void modifyOrAddFace -1, // master edge facei, // master face flipFaceFlux, // face flip - newPatchI, // patch for face + newPatchi, // patch for face zoneID, // zone for face zoneFlip // face flip in zone ) @@ -186,11 +186,11 @@ void createFaces for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - label zoneFaceI = fZone.whichFace(facei); + label zoneFacei = fZone.whichFace(facei); - if (zoneFaceI != -1) + if (zoneFacei != -1) { - if (!fZone.flipMap()[zoneFaceI]) + if (!fZone.flipMap()[zoneFacei]) { // Use owner side of face modifyOrAddFace @@ -236,11 +236,11 @@ void createFaces for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - label zoneFaceI = fZone.whichFace(facei); + label zoneFacei = fZone.whichFace(facei); - if (zoneFaceI != -1) + if (zoneFacei != -1) { - if (!fZone.flipMap()[zoneFaceI]) + if (!fZone.flipMap()[zoneFacei]) { // Use neighbour side of face modifyOrAddFace @@ -294,9 +294,9 @@ void createFaces { const polyPatch& pp = pbm[patchi]; - label newPatchI = newMasterPatches[i]; + label newPatchi = newMasterPatches[i]; - if (pp.coupled() && pbm[newPatchI].coupled()) + if (pp.coupled() && pbm[newPatchi].coupled()) { // Do not allow coupled faces to be moved to different // coupled patches. @@ -307,9 +307,9 @@ void createFaces { label facei = pp.start()+i; - label zoneFaceI = fZone.whichFace(facei); + label zoneFacei = fZone.whichFace(facei); - if (zoneFaceI != -1) + if (zoneFacei != -1) { if (patchWarned.insert(patchi)) { @@ -318,7 +318,7 @@ void createFaces << pp.name() << ") in faceZone " << fZone.name() << " to convert to baffle patch " - << pbm[newPatchI].name() + << pbm[newPatchi].name() << endl << " Run with -internalFacesOnly option" << " if you don't wish to convert" @@ -332,9 +332,9 @@ void createFaces facei, // label of face mesh.faceOwner()[facei], // owner false, // face flip - newPatchI, // patch for face + newPatchi, // patch for face fZone.index(), // zone for face - fZone.flipMap()[zoneFaceI], // face flip in zone + fZone.flipMap()[zoneFacei], // face flip in zone modifiedFace // modify or add ); nModified++; diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index a3138490b7e99075255206a3c94ae992b46fdeb3..72dca889f6cf2a88a2c8b3e50b7960d13cc8d865 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -555,7 +555,7 @@ int main(int argc, char *argv[]) // Old and new patches. DynamicList<polyPatch*> allPatches(patches.size()+patchSources.size()); - label startFaceI = mesh.nInternalFaces(); + label startFacei = mesh.nInternalFaces(); // Copy old patches. forAll(patches, patchi) @@ -571,10 +571,10 @@ int main(int argc, char *argv[]) patches, patchi, pp.size(), - startFaceI + startFacei ).ptr() ); - startFaceI += pp.size(); + startFacei += pp.size(); } } @@ -584,20 +584,20 @@ int main(int argc, char *argv[]) word patchName(dict.lookup("name")); - label destPatchI = patches.findPatchID(patchName); + label destPatchi = patches.findPatchID(patchName); - if (destPatchI == -1) + if (destPatchi == -1) { dictionary patchDict(dict.subDict("patchInfo")); - destPatchI = allPatches.size(); + destPatchi = allPatches.size(); Info<< "Adding new patch " << patchName - << " as patch " << destPatchI + << " as patch " << destPatchi << " from " << patchDict << endl; patchDict.set("nFaces", 0); - patchDict.set("startFace", startFaceI); + patchDict.set("startFace", startFacei); // Add an empty patch. allPatches.append @@ -606,7 +606,7 @@ int main(int argc, char *argv[]) ( patchName, patchDict, - destPatchI, + destPatchi, patches ).ptr() ); @@ -632,10 +632,10 @@ int main(int argc, char *argv[]) patches, patchi, pp.size(), - startFaceI + startFacei ).ptr() ); - startFaceI += pp.size(); + startFacei += pp.size(); } } @@ -659,9 +659,9 @@ int main(int argc, char *argv[]) const dictionary& dict = patchSources[addedI]; const word patchName(dict.lookup("name")); - label destPatchI = patches.findPatchID(patchName); + label destPatchi = patches.findPatchID(patchName); - if (destPatchI == -1) + if (destPatchi == -1) { FatalErrorInFunction << "patch " << patchName << " not added. Problem." @@ -686,7 +686,7 @@ int main(int argc, char *argv[]) const polyPatch& pp = patches[iter.key()]; Info<< "Moving faces from patch " << pp.name() - << " to patch " << destPatchI << endl; + << " to patch " << destPatchi << endl; forAll(pp, i) { @@ -694,7 +694,7 @@ int main(int argc, char *argv[]) ( mesh, pp.start() + i, - destPatchI, + destPatchi, meshMod ); } @@ -732,7 +732,7 @@ int main(int argc, char *argv[]) ( mesh, facei, - destPatchI, + destPatchi, meshMod ); } diff --git a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C index c2c7f9bb0650a81f8065f02e266e7555bba27225..e94d12b9ace2e283762706904356f44fa4d5ae89 100644 --- a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C +++ b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C @@ -76,16 +76,16 @@ void insertDuplicateMerge const labelList& faceOwner = mesh.faceOwner(); const faceZoneMesh& faceZones = mesh.faceZones(); - forAll(duplicates, bFaceI) + forAll(duplicates, bFacei) { - label otherFaceI = duplicates[bFaceI]; + label otherFacei = duplicates[bFacei]; - if (otherFaceI != -1 && otherFaceI > bFaceI) + if (otherFacei != -1 && otherFacei > bFacei) { // Two duplicate faces. Merge. - label face0 = mesh.nInternalFaces() + bFaceI; - label face1 = mesh.nInternalFaces() + otherFaceI; + label face0 = mesh.nInternalFaces() + bFacei; + label face1 = mesh.nInternalFaces() + otherFacei; label own0 = faceOwner[face0]; label own1 = faceOwner[face1]; @@ -166,11 +166,11 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces) // Check that none are on processor patches const polyBoundaryMesh& patches = mesh.boundaryMesh(); - forAll(duplicates, bFaceI) + forAll(duplicates, bFacei) { - if (duplicates[bFaceI] != -1) + if (duplicates[bFacei] != -1) { - label facei = mesh.nInternalFaces() + bFaceI; + label facei = mesh.nInternalFaces() + bFacei; label patchi = patches.whichPatch(facei); if (isA<processorPolyPatch>(patches[patchi])) @@ -196,14 +196,14 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces) (mesh.nFaces() - mesh.nInternalFaces())/256 ); - forAll(duplicates, bFaceI) + forAll(duplicates, bFacei) { - label otherFaceI = duplicates[bFaceI]; + label otherFacei = duplicates[bFacei]; - if (otherFaceI != -1 && otherFaceI > bFaceI) + if (otherFacei != -1 && otherFacei > bFacei) { - duplicateSet.insert(mesh.nInternalFaces() + bFaceI); - duplicateSet.insert(mesh.nInternalFaces() + otherFaceI); + duplicateSet.insert(mesh.nInternalFaces() + bFacei); + duplicateSet.insert(mesh.nInternalFaces() + otherFacei); } } diff --git a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C index 43cb570e65ffefbc3ac6d16e0ac1d93bbd39e014..1b7bb6aef843dae384dde050feed72fa10d17b75 100644 --- a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C +++ b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C @@ -101,14 +101,14 @@ int main(int argc, char *argv[]) forAll(faceLabels, facei) { - const label meshFaceI = faceLabels[facei]; - const label patchi = bm.whichPatch(meshFaceI); + const label meshFacei = faceLabels[facei]; + const label patchi = bm.whichPatch(meshFacei); if ( patchi != -1 && bm[patchi].coupled() - && !isMasterFace[meshFaceI] + && !isMasterFace[meshFacei] ) { // Slave side. Mark so doesn't get visited. @@ -127,9 +127,9 @@ int main(int argc, char *argv[]) forAll(faceLabels, facei) { - const label meshFaceI = faceLabels[facei]; + const label meshFacei = faceLabels[facei]; - if (isMasterFace[meshFaceI]) + if (isMasterFace[meshFacei]) { const labelList& fEdges = patch.faceEdges()[facei]; forAll(fEdges, fEdgeI) @@ -183,59 +183,59 @@ int main(int argc, char *argv[]) while (true) { // Pick an unset face - label unsetFaceI = labelMax; + label unsetFacei = labelMax; forAll(allFaceInfo, facei) { if (allFaceInfo[facei] == orientedSurface::UNVISITED) { - unsetFaceI = globalFaces.toGlobal(facei); + unsetFacei = globalFaces.toGlobal(facei); break; } } - reduce(unsetFaceI, minOp<label>()); + reduce(unsetFacei, minOp<label>()); - if (unsetFaceI == labelMax) + if (unsetFacei == labelMax) { break; } - label procI = globalFaces.whichProcID(unsetFaceI); - label seedFaceI = globalFaces.toLocal(procI, unsetFaceI); - Info<< "Seeding from processor " << procI << " face " << seedFaceI + label proci = globalFaces.whichProcID(unsetFacei); + label seedFacei = globalFaces.toLocal(proci, unsetFacei); + Info<< "Seeding from processor " << proci << " face " << seedFacei << endl; - if (procI == Pstream::myProcNo()) + if (proci == Pstream::myProcNo()) { // Determine orientation of seedFace - vector d = outsidePoint-patch.faceCentres()[seedFaceI]; - const vector& fn = patch.faceNormals()[seedFaceI]; + vector d = outsidePoint-patch.faceCentres()[seedFacei]; + const vector& fn = patch.faceNormals()[seedFacei]; // Set information to correct orientation - patchFaceOrientation& faceInfo = allFaceInfo[seedFaceI]; + patchFaceOrientation& faceInfo = allFaceInfo[seedFacei]; faceInfo = orientedSurface::NOFLIP; if ((fn&d) < 0) { faceInfo.flip(); - Pout<< "Face " << seedFaceI << " at " - << patch.faceCentres()[seedFaceI] + Pout<< "Face " << seedFacei << " at " + << patch.faceCentres()[seedFacei] << " with normal " << fn << " needs to be flipped." << endl; } else { - Pout<< "Face " << seedFaceI << " at " - << patch.faceCentres()[seedFaceI] + Pout<< "Face " << seedFacei << " at " + << patch.faceCentres()[seedFacei] << " with normal " << fn << " points in positive direction (cos = " << (fn&d)/mag(d) << ")" << endl; } - const labelList& fEdges = patch.faceEdges()[seedFaceI]; + const labelList& fEdges = patch.faceEdges()[seedFacei]; forAll(fEdges, fEdgeI) { label edgeI = fEdges[fEdgeI]; @@ -249,7 +249,7 @@ int main(int argc, char *argv[]) mesh, patch, edgeI, - seedFaceI, + seedFacei, faceInfo, tol, dummyTrackData @@ -300,10 +300,10 @@ int main(int argc, char *argv[]) forAll(faceLabels, i) { - const label meshFaceI = faceLabels[i]; - if (!mesh.isInternalFace(meshFaceI)) + const label meshFacei = faceLabels[i]; + if (!mesh.isInternalFace(meshFacei)) { - neiStatus[meshFaceI-mesh.nInternalFaces()] = + neiStatus[meshFacei-mesh.nInternalFaces()] = allFaceInfo[i].flipStatus(); } } @@ -311,31 +311,31 @@ int main(int argc, char *argv[]) forAll(faceLabels, i) { - const label meshFaceI = faceLabels[i]; - const label patchi = bm.whichPatch(meshFaceI); + const label meshFacei = faceLabels[i]; + const label patchi = bm.whichPatch(meshFacei); if ( patchi != -1 && bm[patchi].coupled() - && !isMasterFace[meshFaceI] + && !isMasterFace[meshFacei] ) { // Slave side. Take flipped from neighbour - label bFaceI = meshFaceI-mesh.nInternalFaces(); + label bFacei = meshFacei-mesh.nInternalFaces(); - if (neiStatus[bFaceI] == orientedSurface::NOFLIP) + if (neiStatus[bFacei] == orientedSurface::NOFLIP) { allFaceInfo[i] = orientedSurface::FLIP; } - else if (neiStatus[bFaceI] == orientedSurface::FLIP) + else if (neiStatus[bFacei] == orientedSurface::FLIP) { allFaceInfo[i] = orientedSurface::NOFLIP; } else { FatalErrorInFunction - << "Incorrect status for face " << meshFaceI + << "Incorrect status for face " << meshFacei << abort(FatalError); } } diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C index f6f4666fda60af5bac7730497dcfe37ddabd4b86..9104b092c154c991d1446ef97fe5719f693cccb0 100644 --- a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C +++ b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C @@ -199,7 +199,7 @@ Foam::label Foam::meshDualiser::addInternalFace ( const label masterPointI, const label masterEdgeI, - const label masterFaceI, + const label masterFacei, const bool edgeOrder, const label dualCell0, @@ -240,30 +240,30 @@ Foam::label Foam::meshDualiser::addInternalFace label zoneID = -1; bool zoneFlip = false; - if (masterFaceI != -1) + if (masterFacei != -1) { - zoneID = mesh_.faceZones().whichZone(masterFaceI); + zoneID = mesh_.faceZones().whichZone(masterFacei); if (zoneID != -1) { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(masterFaceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(masterFacei)]; } } - label dualFaceI; + label dualFacei; if (dualCell0 < dualCell1) { - dualFaceI = meshMod.addFace + dualFacei = meshMod.addFace ( newFace, dualCell0, // own dualCell1, // nei masterPointI, // masterPointID masterEdgeI, // masterEdgeID - masterFaceI, // masterFaceID + masterFacei, // masterFaceID false, // flipFaceFlux -1, // patchID zoneID, // zoneID @@ -273,7 +273,7 @@ Foam::label Foam::meshDualiser::addInternalFace //pointField dualPoints(meshMod.points()); //vector n(newFace.normal(dualPoints)); //n /= mag(n); - //Pout<< "Generated internal dualFace:" << dualFaceI + //Pout<< "Generated internal dualFace:" << dualFacei // << " verts:" << newFace // << " points:" << UIndirectList<point>(meshMod.points(), newFace)() // << " n:" << n @@ -283,14 +283,14 @@ Foam::label Foam::meshDualiser::addInternalFace } else { - dualFaceI = meshMod.addFace + dualFacei = meshMod.addFace ( newFace, dualCell1, // own dualCell0, // nei masterPointI, // masterPointID masterEdgeI, // masterEdgeID - masterFaceI, // masterFaceID + masterFacei, // masterFaceID false, // flipFaceFlux -1, // patchID zoneID, // zoneID @@ -300,7 +300,7 @@ Foam::label Foam::meshDualiser::addInternalFace //pointField dualPoints(meshMod.points()); //vector n(newFace.normal(dualPoints)); //n /= mag(n); - //Pout<< "Generated internal dualFace:" << dualFaceI + //Pout<< "Generated internal dualFace:" << dualFacei // << " verts:" << newFace // << " points:" << UIndirectList<point>(meshMod.points(), newFace)() // << " n:" << n @@ -308,7 +308,7 @@ Foam::label Foam::meshDualiser::addInternalFace // << " dualneigbour:" << dualCell0 // << endl; } - return dualFaceI; + return dualFacei; } @@ -316,9 +316,9 @@ Foam::label Foam::meshDualiser::addBoundaryFace ( const label masterPointI, const label masterEdgeI, - const label masterFaceI, + const label masterFacei, - const label dualCellI, + const label dualCelli, const label patchi, const DynamicList<label>& verts, polyTopoChange& meshMod @@ -328,26 +328,26 @@ Foam::label Foam::meshDualiser::addBoundaryFace label zoneID = -1; bool zoneFlip = false; - if (masterFaceI != -1) + if (masterFacei != -1) { - zoneID = mesh_.faceZones().whichZone(masterFaceI); + zoneID = mesh_.faceZones().whichZone(masterFacei); if (zoneID != -1) { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(masterFaceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(masterFacei)]; } } - label dualFaceI = meshMod.addFace + label dualFacei = meshMod.addFace ( newFace, - dualCellI, // own + dualCelli, // own -1, // nei masterPointI, // masterPointID masterEdgeI, // masterEdgeID - masterFaceI, // masterFaceID + masterFacei, // masterFaceID false, // flipFaceFlux patchi, // patchID zoneID, // zoneID @@ -357,13 +357,13 @@ Foam::label Foam::meshDualiser::addBoundaryFace //pointField dualPoints(meshMod.points()); //vector n(newFace.normal(dualPoints)); //n /= mag(n); - //Pout<< "Generated boundary dualFace:" << dualFaceI + //Pout<< "Generated boundary dualFace:" << dualFacei // << " verts:" << newFace // << " points:" << UIndirectList<point>(meshMod.points(), newFace)() // << " n:" << n - // << " on dualowner:" << dualCellI + // << " on dualowner:" << dualCelli // << endl; - return dualFaceI; + return dualFacei; } @@ -376,7 +376,7 @@ void Foam::meshDualiser::createFacesAroundEdge const bool splitFace, const PackedBoolList& isBoundaryEdge, const label edgeI, - const label startFaceI, + const label startFacei, polyTopoChange& meshMod, boolList& doneEFaces ) const @@ -386,7 +386,7 @@ void Foam::meshDualiser::createFacesAroundEdge label fp = edgeFaceCirculator::getMinIndex ( - mesh_.faces()[startFaceI], + mesh_.faces()[startFacei], e[0], e[1] ); @@ -394,7 +394,7 @@ void Foam::meshDualiser::createFacesAroundEdge edgeFaceCirculator ie ( mesh_, - startFaceI, // face + startFacei, // face true, // ownerSide fp, // fp isBoundaryEdge.get(edgeI) == 1 // isBoundaryEdge @@ -475,7 +475,7 @@ void Foam::meshDualiser::createFacesAroundEdge ( -1, // masterPointI edgeI, // masterEdgeI - -1, // masterFaceI + -1, // masterFacei edgeOrder, currentDualCell0, currentDualCell1, @@ -527,7 +527,7 @@ void Foam::meshDualiser::createFacesAroundEdge ( -1, // masterPointI edgeI, // masterEdgeI - -1, // masterFaceI + -1, // masterFacei edgeOrder, currentDualCell0, currentDualCell1, @@ -621,7 +621,7 @@ void Foam::meshDualiser::createFaceFromInternalFace ( -1, // masterPointI -1, // masterEdgeI - facei, // masterFaceI + facei, // masterFacei true, // edgeOrder, currentDualCell0, currentDualCell1, @@ -642,7 +642,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint ( const label patchi, const label patchPointI, - const label startFaceI, + const label startFacei, polyTopoChange& meshMod, boolList& donePFaces // pFaces visited ) const @@ -660,7 +660,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint // pointFaces. // Starting face - label facei = startFaceI; + label facei = startFacei; DynamicList<label> verts(4); @@ -678,7 +678,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint // Insert face centre verts.append(faceToDualPoint_[facei]); - label dualCellI = findDualCell(own[facei], pointI); + label dualCelli = findDualCell(own[facei], pointI); // Get the edge before the patchPointI const face& f = mesh_.faces()[facei]; @@ -721,7 +721,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint } // Check if different cell. - if (dualCellI != findDualCell(own[facei], pointI)) + if (dualCelli != findDualCell(own[facei], pointI)) { FatalErrorInFunction << "Different dual cells but no feature edge" @@ -733,7 +733,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint verts.shrink(); - label dualCellI = findDualCell(own[facei], pointI); + label dualCelli = findDualCell(own[facei], pointI); //Bit dodgy: create dualface from the last face (instead of from // the central point). This will also use the original faceZone to @@ -744,8 +744,8 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint //pointI, // masterPointI -1, // masterPointI -1, // masterEdgeI - facei, // masterFaceI - dualCellI, + facei, // masterFacei + dualCelli, patchi, verts, meshMod @@ -753,7 +753,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint } else { - label facei = startFaceI; + label facei = startFacei; // Storage for face DynamicList<label> verts(mesh_.faces()[facei].size()); @@ -798,7 +798,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint ( -1, // masterPointI -1, // masterEdgeI - facei, // masterFaceI + facei, // masterFacei findDualCell(own[facei], pointI), patchi, verts.shrink(), @@ -831,7 +831,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint } while ( - facei != startFaceI + facei != startFacei && facei >= pp.start() && facei < pp.start()+pp.size() ); @@ -843,7 +843,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint ( -1, // masterPointI -1, // masterEdgeI - startFaceI, // masterFaceI + startFacei, // masterFacei findDualCell(own[facei], pointI), patchi, verts.shrink(), @@ -1070,22 +1070,22 @@ void Foam::meshDualiser::setRefinement pointToDualCells_[pointI].setSize(pCells.size()); - forAll(pCells, pCellI) + forAll(pCells, pCelli) { - pointToDualCells_[pointI][pCellI] = meshMod.addCell + pointToDualCells_[pointI][pCelli] = meshMod.addCell ( pointI, //masterPointID -1, //masterEdgeID -1, //masterFaceID -1, //masterCellID - mesh_.cellZones().whichZone(pCells[pCellI]) //zoneID + mesh_.cellZones().whichZone(pCells[pCelli]) //zoneID ); if (dualCcStr.valid()) { meshTools::writeOBJ ( dualCcStr(), - 0.5*(mesh_.points()[pointI]+cellCentres[pCells[pCellI]]) + 0.5*(mesh_.points()[pointI]+cellCentres[pCells[pCelli]]) ); } } @@ -1299,13 +1299,13 @@ void Foam::meshDualiser::setRefinement // happen for non-manifold edges where a single edge can // become multiple faces. - label startFaceI = eFaces[i]; + label startFacei = eFaces[i]; //Pout<< "Walking edge:" << edgeI // << " points:" << mesh_.points()[e[0]] // << mesh_.points()[e[1]] - // << " startFace:" << startFaceI - // << " at:" << mesh_.faceCentres()[startFaceI] + // << " startFace:" << startFacei + // << " at:" << mesh_.faceCentres()[startFacei] // << endl; createFacesAroundEdge @@ -1313,7 +1313,7 @@ void Foam::meshDualiser::setRefinement splitFace, isBoundaryEdge, edgeI, - startFaceI, + startFacei, meshMod, doneEFaces ); @@ -1407,20 +1407,20 @@ void Foam::meshDualiser::setRefinement if (!donePFaces[i]) { // Starting face - label startFaceI = pp.start()+pFaces[i]; + label startFacei = pp.start()+pFaces[i]; //Pout<< "Walking around point:" << pointI // << " coord:" << mesh_.points()[pointI] // << " on patch:" << patchi - // << " startFace:" << startFaceI - // << " at:" << mesh_.faceCentres()[startFaceI] + // << " startFace:" << startFacei + // << " at:" << mesh_.faceCentres()[startFacei] // << endl; createFacesAroundBoundaryPoint ( patchi, patchPointI, - startFaceI, + startFacei, meshMod, donePFaces // pFaces visited ); diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.H b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.H index 4e769001eaaecf7718349d16e3c82235bc3fe445..85946671ea2f77930eb61d5eee0f5479f3d50dc5 100644 --- a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.H +++ b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.H @@ -117,7 +117,7 @@ class meshDualiser ( const label masterPointI, const label masterEdgeI, - const label masterFaceI, + const label masterFacei, const bool edgeOrder, const label dualCell0, @@ -131,9 +131,9 @@ class meshDualiser ( const label masterPointI, const label masterEdgeI, - const label masterFaceI, + const label masterFacei, - const label dualCellI, + const label dualCelli, const label patchI, const DynamicList<label>& verts, polyTopoChange& meshMod @@ -145,7 +145,7 @@ class meshDualiser const bool splitFace, const PackedBoolList&, const label edgeI, - const label startFaceI, + const label startFacei, polyTopoChange&, boolList& doneEFaces ) const; @@ -163,7 +163,7 @@ class meshDualiser ( const label patchI, const label patchPointI, - const label startFaceI, + const label startFacei, polyTopoChange&, boolList& donePFaces // pFaces visited ) const; diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C index 94627d7070cbdc0478a52938523bd7b2464a929d..debcd9f09ab7fab2778300b06ce4e2a96e9936ec 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C @@ -329,9 +329,9 @@ int main(int argc, char *argv[]) // Create cellSet with added cells for easy inspection cellSet newCells(mesh, "refinedCells", refCells.size()); - forAll(oldToNew, oldCellI) + forAll(oldToNew, oldCelli) { - const labelList& added = oldToNew[oldCellI]; + const labelList& added = oldToNew[oldCelli]; forAll(added, i) { @@ -372,21 +372,21 @@ int main(int argc, char *argv[]) + oldTimeName; - forAll(oldToNew, oldCellI) + forAll(oldToNew, oldCelli) { - const labelList& added = oldToNew[oldCellI]; + const labelList& added = oldToNew[oldCelli]; if (added.size()) { forAll(added, i) { - newToOld[added[i]] = oldCellI; + newToOld[added[i]] = oldCelli; } } else { // Unrefined cell - newToOld[oldCellI] = oldCellI; + newToOld[oldCelli] = oldCelli; } } diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index b2318817c7d41f29c20a6e3301b476f48f1e550d..4904e3b385dd55e6903a164febc9c4dd267c445d 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -174,16 +174,16 @@ labelList getFaceOrder labelList oldToNewFace(mesh.nFaces(), -1); - label newFaceI = 0; + label newFacei = 0; labelList nbr; labelList order; - forAll(cellOrder, newCellI) + forAll(cellOrder, newCelli) { - label oldCellI = cellOrder[newCellI]; + label oldCelli = cellOrder[newCelli]; - const cell& cFaces = mesh.cells()[oldCellI]; + const cell& cFaces = mesh.cells()[oldCelli]; // Neighbouring cells nbr.setSize(cFaces.size()); @@ -195,16 +195,16 @@ labelList getFaceOrder if (mesh.isInternalFace(facei)) { // Internal face. Get cell on other side. - label nbrCellI = reverseCellOrder[mesh.faceNeighbour()[facei]]; - if (nbrCellI == newCellI) + label nbrCelli = reverseCellOrder[mesh.faceNeighbour()[facei]]; + if (nbrCelli == newCelli) { - nbrCellI = reverseCellOrder[mesh.faceOwner()[facei]]; + nbrCelli = reverseCellOrder[mesh.faceOwner()[facei]]; } - if (newCellI < nbrCellI) + if (newCelli < nbrCelli) { - // CellI is master - nbr[i] = nbrCellI; + // Celli is master + nbr[i] = nbrCelli; } else { @@ -227,13 +227,13 @@ labelList getFaceOrder label index = order[i]; if (nbr[index] != -1) { - oldToNewFace[cFaces[index]] = newFaceI++; + oldToNewFace[cFaces[index]] = newFacei++; } } } // Leave patch faces intact. - for (label facei = newFaceI; facei < mesh.nFaces(); facei++) + for (label facei = newFacei; facei < mesh.nFaces(); facei++) { oldToNewFace[facei] = facei; } @@ -267,20 +267,20 @@ labelList getRegionFaceOrder labelList oldToNewFace(mesh.nFaces(), -1); - label newFaceI = 0; + label newFacei = 0; label prevRegion = -1; - forAll(cellOrder, newCellI) + forAll(cellOrder, newCelli) { - label oldCellI = cellOrder[newCellI]; + label oldCelli = cellOrder[newCelli]; - if (cellToRegion[oldCellI] != prevRegion) + if (cellToRegion[oldCelli] != prevRegion) { - prevRegion = cellToRegion[oldCellI]; + prevRegion = cellToRegion[oldCelli]; } - const cell& cFaces = mesh.cells()[oldCellI]; + const cell& cFaces = mesh.cells()[oldCelli]; SortableList<label> nbr(cFaces.size()); @@ -291,21 +291,21 @@ labelList getRegionFaceOrder if (mesh.isInternalFace(facei)) { // Internal face. Get cell on other side. - label nbrCellI = reverseCellOrder[mesh.faceNeighbour()[facei]]; - if (nbrCellI == newCellI) + label nbrCelli = reverseCellOrder[mesh.faceNeighbour()[facei]]; + if (nbrCelli == newCelli) { - nbrCellI = reverseCellOrder[mesh.faceOwner()[facei]]; + nbrCelli = reverseCellOrder[mesh.faceOwner()[facei]]; } - if (cellToRegion[oldCellI] != cellToRegion[cellOrder[nbrCellI]]) + if (cellToRegion[oldCelli] != cellToRegion[cellOrder[nbrCelli]]) { // Treat like external face. Do later. nbr[i] = -1; } - else if (newCellI < nbrCellI) + else if (newCelli < nbrCelli) { - // CellI is master - nbr[i] = nbrCellI; + // Celli is master + nbr[i] = nbrCelli; } else { @@ -326,7 +326,7 @@ labelList getRegionFaceOrder { if (nbr[i] != -1) { - oldToNewFace[cFaces[nbr.indices()[i]]] = newFaceI++; + oldToNewFace[cFaces[nbr.indices()[i]]] = newFacei++; } } } @@ -367,12 +367,12 @@ labelList getRegionFaceOrder prevKey = key; } - oldToNewFace[sortKey.indices()[i]] = newFaceI++; + oldToNewFace[sortKey.indices()[i]] = newFacei++; } } // Leave patch faces intact. - for (label facei = newFaceI; facei < mesh.nFaces(); facei++) + for (label facei = newFacei; facei < mesh.nFaces(); facei++) { oldToNewFace[facei] = facei; } @@ -477,8 +477,8 @@ autoPtr<mapPolyMesh> reorderMesh boolList newFlipMap(fZone.size()); forAll(fZone, i) { - label oldFaceI = fZone[i]; - newAddressing[i] = reverseFaceOrder[oldFaceI]; + label oldFacei = fZone[i]; + newAddressing[i] = reverseFaceOrder[oldFacei]; if (flipFaceFlux.found(newAddressing[i])) { newFlipMap[i] = !fZone.flipMap()[i]; @@ -999,8 +999,8 @@ int main(int argc, char *argv[]) label sortedI = mesh.nCells(); forAllReverse(order, i) { - label origCellI = bndCells[order[i]]; - newReverseCellOrder[origCellI] = --sortedI; + label origCelli = bndCells[order[i]]; + newReverseCellOrder[origCelli] = --sortedI; } Info<< "Ordered all " << nBndCells << " cells with a coupled face" @@ -1009,12 +1009,12 @@ int main(int argc, char *argv[]) // Compact sortedI = 0; - forAll(cellOrder, newCellI) + forAll(cellOrder, newCelli) { - label origCellI = cellOrder[newCellI]; - if (newReverseCellOrder[origCellI] == -1) + label origCelli = cellOrder[newCelli]; + if (newReverseCellOrder[origCelli] == -1) { - newReverseCellOrder[origCellI] = sortedI++; + newReverseCellOrder[origCelli] = sortedI++; } } @@ -1106,14 +1106,14 @@ int main(int argc, char *argv[]) forAllConstIter(labelHashSet, fff, iter) { label facei = iter.key(); - label masterFaceI = faceProcAddressing[facei]; + label masterFacei = faceProcAddressing[facei]; - faceProcAddressing[facei] = -masterFaceI; + faceProcAddressing[facei] = -masterFacei; - if (masterFaceI == 0) + if (masterFacei == 0) { FatalErrorInFunction - << " masterFaceI:" << masterFaceI << exit(FatalError); + << " masterFacei:" << masterFacei << exit(FatalError); } } } diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index 12457a85179a5a81990bb7e92b85725031bfab61..0feb0c3b7203542635caa779332a1a18ad245600 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -81,13 +81,13 @@ void writeVTK faceList setFaces(currentSet.size()); labelList faceValues(currentSet.size()); - label setFaceI = 0; + label setFacei = 0; forAllConstIter(topoSet, currentSet, iter) { - setFaces[setFaceI] = mesh.faces()[iter.key()]; - faceValues[setFaceI] = iter.key(); - setFaceI++; + setFaces[setFacei] = mesh.faces()[iter.key()]; + faceValues[setFacei] = iter.key(); + setFacei++; } primitiveFacePatch fp(setFaces, mesh.points()); @@ -120,14 +120,14 @@ void writeVTK if (mesh.isInternalFace(facei)) { - label otherCellI = mesh.faceOwner()[facei]; + label otherCelli = mesh.faceOwner()[facei]; - if (otherCellI == celli) + if (otherCelli == celli) { - otherCellI = mesh.faceNeighbour()[facei]; + otherCelli = mesh.faceNeighbour()[facei]; } - if (!currentSet.found(otherCellI)) + if (!currentSet.found(otherCelli)) { cellFaces.insert(facei, celli); } @@ -141,13 +141,13 @@ void writeVTK faceList setFaces(cellFaces.size()); labelList faceValues(cellFaces.size()); - label setFaceI = 0; + label setFacei = 0; forAllConstIter(Map<label>, cellFaces, iter) { - setFaces[setFaceI] = mesh.faces()[iter.key()]; - faceValues[setFaceI] = iter(); // Cell ID - setFaceI++; + setFaces[setFacei] = mesh.faces()[iter.key()]; + faceValues[setFacei] = iter(); // Cell ID + setFacei++; } primitiveFacePatch fp(setFaces, mesh.points()); diff --git a/applications/utilities/mesh/manipulation/splitMesh/regionSide.C b/applications/utilities/mesh/manipulation/splitMesh/regionSide.C index 207dcaf3e7440c363f37a27ea8a158703bd76877..62ac9fda1d5cedab0caf9d99d436ca5dac23f786 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/regionSide.C +++ b/applications/utilities/mesh/manipulation/splitMesh/regionSide.C @@ -159,41 +159,41 @@ void Foam::regionSide::visitConnectedFaces // we hit face on faceSet. // Find face reachable from edge - label otherFaceI = otherFace(mesh, celli, facei, edgeI); + label otherFacei = otherFace(mesh, celli, facei, edgeI); - if (mesh.isInternalFace(otherFaceI)) + if (mesh.isInternalFace(otherFacei)) { - label otherCellI = celli; + label otherCelli = celli; // Keep on crossing faces/cells until back on face on // surface - while (!region.found(otherFaceI)) + while (!region.found(otherFacei)) { - visitedFace.insert(otherFaceI); + visitedFace.insert(otherFacei); if (debug) { Info<< "visitConnectedFaces : celli:" << celli - << " found insideEdgeFace:" << otherFaceI + << " found insideEdgeFace:" << otherFacei << endl; } - // Cross otherFaceI into neighbouring cell - otherCellI = + // Cross otherFacei into neighbouring cell + otherCelli = meshTools::otherCell ( mesh, - otherCellI, - otherFaceI + otherCelli, + otherFacei ); - otherFaceI = + otherFacei = otherFace ( mesh, - otherCellI, - otherFaceI, + otherCelli, + otherFacei, edgeI ); } @@ -203,8 +203,8 @@ void Foam::regionSide::visitConnectedFaces mesh, region, fenceEdges, - otherCellI, - otherFaceI, + otherCelli, + otherFacei, visitedFace ); } @@ -223,25 +223,25 @@ void Foam::regionSide::walkPointConnectedFaces const primitiveMesh& mesh, const labelHashSet& regionEdges, const label regionPointI, - const label startFaceI, + const label startFacei, const label startEdgeI, labelHashSet& visitedEdges ) { // Mark as visited - insidePointFaces_.insert(startFaceI); + insidePointFaces_.insert(startFacei); if (debug) { Info<< "walkPointConnectedFaces : regionPointI:" << regionPointI - << " facei:" << startFaceI + << " facei:" << startFacei << " edgeI:" << startEdgeI << " verts:" << mesh.edges()[startEdgeI] << endl; } // Cross facei i.e. get edge not startEdgeI which uses regionPointI - label edgeI = otherEdge(mesh, startFaceI, startEdgeI, regionPointI); + label edgeI = otherEdge(mesh, startFacei, startEdgeI, regionPointI); if (!regionEdges.found(edgeI)) { @@ -263,9 +263,9 @@ void Foam::regionSide::walkPointConnectedFaces const labelList& eFaces = mesh.edgeFaces()[edgeI]; - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - label facei = eFaces[eFaceI]; + label facei = eFaces[eFacei]; walkPointConnectedFaces ( @@ -353,7 +353,7 @@ void Foam::regionSide::walkAllPointConnectedFaces label edgeI = fEdges[fEdgeI]; // Get the face 'perpendicular' to facei on region. - label otherFaceI = otherFace(mesh, celli, facei, edgeI); + label otherFacei = otherFace(mesh, celli, facei, edgeI); // Edge const edge& e = mesh.edges()[edgeI]; @@ -365,14 +365,14 @@ void Foam::regionSide::walkAllPointConnectedFaces visitedPoint.insert(e.start()); - //edgeI = otherEdge(mesh, otherFaceI, edgeI, e.start()); + //edgeI = otherEdge(mesh, otherFacei, edgeI, e.start()); walkPointConnectedFaces ( mesh, regionEdges, e.start(), - otherFaceI, + otherFacei, edgeI, visitedEdges ); @@ -384,14 +384,14 @@ void Foam::regionSide::walkAllPointConnectedFaces visitedPoint.insert(e.end()); - //edgeI = otherEdge(mesh, otherFaceI, edgeI, e.end()); + //edgeI = otherEdge(mesh, otherFacei, edgeI, e.end()); walkPointConnectedFaces ( mesh, regionEdges, e.end(), - otherFaceI, + otherFacei, edgeI, visitedEdges ); @@ -409,8 +409,8 @@ Foam::regionSide::regionSide const primitiveMesh& mesh, const labelHashSet& region, // faces of region const labelHashSet& fenceEdges, // outside edges - const label startCellI, - const label startFaceI + const label startCelli, + const label startFacei ) : sideOwner_(region.size()), @@ -427,8 +427,8 @@ Foam::regionSide::regionSide mesh, region, fenceEdges, - startCellI, - startFaceI, + startCelli, + startFacei, visitedFace ); diff --git a/applications/utilities/mesh/manipulation/splitMesh/regionSide.H b/applications/utilities/mesh/manipulation/splitMesh/regionSide.H index e63197cb183d658a94e6ca956b9ac0564536d5b6..376db67951ee6e0dcc006d0f10a4d9a0db64e23a 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/regionSide.H +++ b/applications/utilities/mesh/manipulation/splitMesh/regionSide.H @@ -102,7 +102,7 @@ class regionSide const primitiveMesh& mesh, const labelHashSet& regionEdges, const label regionPointI, - const label startFaceI, + const label startFacei, const label startEdgeI, labelHashSet& visitedEdges ); @@ -128,7 +128,7 @@ public: ( const primitiveMesh& mesh, const label celli, - const label excludeFaceI, + const label excludeFacei, const label edgeI ); diff --git a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C index b7ad4319b3a896a8f02c55aa65e6d301bec8d2db..e3ff521e79fac5b3426add7f40bd440f5e5a7baf 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C +++ b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C @@ -200,15 +200,15 @@ int main(int argc, char *argv[]) } // Find sides reachable from 0th face of faceSet - label startFaceI = faces[0]; + label startFacei = faces[0]; regionSide regionInfo ( mesh, facesSet, fenceEdges, - mesh.faceOwner()[startFaceI], - startFaceI + mesh.faceOwner()[startFacei], + startFacei ); // Determine flip state for all faces in faceSet diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index a468dd38a5e77ec0e66758f6abc4bf2aa566018a..4bce1fdd9bdbce1bd81f155daae7930543b846fc 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -972,19 +972,19 @@ void createAndWriteRegion { // face + turning index. (see decomposePar) // Is the face pointing in the same direction? - label oldFaceI = map().faceMap()[facei]; + label oldFacei = map().faceMap()[facei]; if ( map().cellMap()[newMesh().faceOwner()[facei]] - == mesh.faceOwner()[oldFaceI] + == mesh.faceOwner()[oldFacei] ) { - faceProcAddressing[facei] = oldFaceI+1; + faceProcAddressing[facei] = oldFacei+1; } else { - faceProcAddressing[facei] = -(oldFaceI+1); + faceProcAddressing[facei] = -(oldFacei+1); } } Info<< "Writing map " << faceProcAddressing.name() @@ -1261,15 +1261,15 @@ void matchRegions Pstream::gatherList(zoneNames); Pstream::scatterList(zoneNames); - forAll(zoneNames, procI) + forAll(zoneNames, proci) { - if (zoneNames[procI] != zoneNames[0]) + if (zoneNames[proci] != zoneNames[0]) { FatalErrorInFunction << "cellZones not synchronised across processors." << endl << "Master has cellZones " << zoneNames[0] << endl - << "Processor " << procI - << " has cellZones " << zoneNames[procI] + << "Processor " << proci + << " has cellZones " << zoneNames[proci] << exit(FatalError); } } @@ -1561,14 +1561,14 @@ int main(int argc, char *argv[]) << " This requires all" << " cells to be in one and only one cellZone." << nl << endl; - label unzonedCellI = findIndex(zoneID, -1); - if (unzonedCellI != -1) + label unzonedCelli = findIndex(zoneID, -1); + if (unzonedCelli != -1) { FatalErrorInFunction << "For the cellZonesOnly option all cells " << "have to be in a cellZone." << endl - << "Cell " << unzonedCellI - << " at" << mesh.cellCentres()[unzonedCellI] + << "Cell " << unzonedCelli + << " at" << mesh.cellCentres()[unzonedCelli] << " is not in a cellZone. There might be more unzoned cells." << exit(FatalError); } @@ -1610,14 +1610,14 @@ int main(int argc, char *argv[]) labelList newNeiZoneID(mesh.nFaces()-mesh.nInternalFaces()); getZoneID(mesh, newCellZones, newZoneID, newNeiZoneID); - label unzonedCellI = findIndex(newZoneID, -1); - if (unzonedCellI != -1) + label unzonedCelli = findIndex(newZoneID, -1); + if (unzonedCelli != -1) { FatalErrorInFunction << "For the cellZonesFileOnly option all cells " << "have to be in a cellZone." << endl - << "Cell " << unzonedCellI - << " at" << mesh.cellCentres()[unzonedCellI] + << "Cell " << unzonedCelli + << " at" << mesh.cellCentres()[unzonedCelli] << " is not in a cellZone. There might be more unzoned cells." << exit(FatalError); } diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 1e5db003e8ab4011163a9da15d003641a475119f..bb3c80ab7782d15313114308f8316ad160c866dc 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -102,18 +102,18 @@ Usage const labelIOList& procAddressing ( const PtrList<fvMesh>& procMeshList, - const label procI, + const label proci, const word& name, PtrList<labelIOList>& procAddressingList ) { - const fvMesh& procMesh = procMeshList[procI]; + const fvMesh& procMesh = procMeshList[proci]; - if (!procAddressingList.set(procI)) + if (!procAddressingList.set(proci)) { procAddressingList.set ( - procI, + proci, new labelIOList ( IOobject @@ -129,7 +129,7 @@ const labelIOList& procAddressing ) ); } - return procAddressingList[procI]; + return procAddressingList[proci]; } @@ -314,11 +314,11 @@ int main(int argc, char *argv[]) // remove existing processor dirs // reverse order to avoid gaps if someone interrupts the process - for (label procI = nProcs-1; procI >= 0; --procI) + for (label proci = nProcs-1; proci >= 0; --proci) { fileName procDir ( - runTime.path()/(word("processor") + name(procI)) + runTime.path()/(word("processor") + name(proci)) ); rmDir(procDir); @@ -794,27 +794,27 @@ int main(int argc, char *argv[]) Info<< endl; // split the fields over processors - for (label procI = 0; procI < mesh.nProcs(); procI++) + for (label proci = 0; proci < mesh.nProcs(); proci++) { - Info<< "Processor " << procI << ": field transfer" << endl; + Info<< "Processor " << proci << ": field transfer" << endl; // open the database - if (!processorDbList.set(procI)) + if (!processorDbList.set(proci)) { processorDbList.set ( - procI, + proci, new Time ( Time::controlDictName, args.rootPath(), args.caseName() - /fileName(word("processor") + name(procI)) + /fileName(word("processor") + name(proci)) ) ); } - Time& processorDb = processorDbList[procI]; + Time& processorDb = processorDbList[proci]; processorDb.setTime(runTime); @@ -830,11 +830,11 @@ int main(int argc, char *argv[]) } // read the mesh - if (!procMeshList.set(procI)) + if (!procMeshList.set(proci)) { procMeshList.set ( - procI, + proci, new fvMesh ( IOobject @@ -846,12 +846,12 @@ int main(int argc, char *argv[]) ) ); } - const fvMesh& procMesh = procMeshList[procI]; + const fvMesh& procMesh = procMeshList[proci]; const labelIOList& faceProcAddressing = procAddressing ( procMeshList, - procI, + proci, "faceProcAddressing", faceProcAddressingList ); @@ -859,7 +859,7 @@ int main(int argc, char *argv[]) const labelIOList& cellProcAddressing = procAddressing ( procMeshList, - procI, + proci, "cellProcAddressing", cellProcAddressingList ); @@ -867,7 +867,7 @@ int main(int argc, char *argv[]) const labelIOList& boundaryProcAddressing = procAddressing ( procMeshList, - procI, + proci, "boundaryProcAddressing", boundaryProcAddressingList ); @@ -875,11 +875,11 @@ int main(int argc, char *argv[]) // FV fields { - if (!fieldDecomposerList.set(procI)) + if (!fieldDecomposerList.set(proci)) { fieldDecomposerList.set ( - procI, + proci, new fvFieldDecomposer ( mesh, @@ -891,7 +891,7 @@ int main(int argc, char *argv[]) ); } const fvFieldDecomposer& fieldDecomposer = - fieldDecomposerList[procI]; + fieldDecomposerList[proci]; fieldDecomposer.decomposeFields(volScalarFields); fieldDecomposer.decomposeFields(volVectorFields); @@ -911,17 +911,17 @@ int main(int argc, char *argv[]) if (times.size() == 1) { // Clear cached decomposer - fieldDecomposerList.set(procI, NULL); + fieldDecomposerList.set(proci, NULL); } } // Dimensioned fields { - if (!dimFieldDecomposerList.set(procI)) + if (!dimFieldDecomposerList.set(proci)) { dimFieldDecomposerList.set ( - procI, + proci, new dimFieldDecomposer ( mesh, @@ -932,7 +932,7 @@ int main(int argc, char *argv[]) ); } const dimFieldDecomposer& dimDecomposer = - dimFieldDecomposerList[procI]; + dimFieldDecomposerList[proci]; dimDecomposer.decomposeFields(dimScalarFields); dimDecomposer.decomposeFields(dimVectorFields); @@ -942,7 +942,7 @@ int main(int argc, char *argv[]) if (times.size() == 1) { - dimFieldDecomposerList.set(procI, NULL); + dimFieldDecomposerList.set(proci, NULL); } } @@ -960,18 +960,18 @@ int main(int argc, char *argv[]) const labelIOList& pointProcAddressing = procAddressing ( procMeshList, - procI, + proci, "pointProcAddressing", pointProcAddressingList ); const pointMesh& procPMesh = pointMesh::New(procMesh); - if (!pointFieldDecomposerList.set(procI)) + if (!pointFieldDecomposerList.set(proci)) { pointFieldDecomposerList.set ( - procI, + proci, new pointFieldDecomposer ( pMesh, @@ -982,7 +982,7 @@ int main(int argc, char *argv[]) ); } const pointFieldDecomposer& pointDecomposer = - pointFieldDecomposerList[procI]; + pointFieldDecomposerList[proci]; pointDecomposer.decomposeFields(pointScalarFields); pointDecomposer.decomposeFields(pointVectorFields); @@ -993,8 +993,8 @@ int main(int argc, char *argv[]) if (times.size() == 1) { - pointProcAddressingList.set(procI, NULL); - pointFieldDecomposerList.set(procI, NULL); + pointProcAddressingList.set(proci, NULL); + pointFieldDecomposerList.set(proci, NULL); } } @@ -1118,11 +1118,11 @@ int main(int argc, char *argv[]) // times, otherwise it is just extra storage. if (times.size() == 1) { - boundaryProcAddressingList.set(procI, NULL); - cellProcAddressingList.set(procI, NULL); - faceProcAddressingList.set(procI, NULL); - procMeshList.set(procI, NULL); - processorDbList.set(procI, NULL); + boundaryProcAddressingList.set(proci, NULL); + cellProcAddressingList.set(proci, NULL); + faceProcAddressingList.set(proci, NULL); + procMeshList.set(proci, NULL); + processorDbList.set(proci, NULL); } } } diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index 90ebfc7d8eaebfdda9f30621574aa51713aaf800..0010965f848afcb61ef93facba1ff5067e50bb52 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C @@ -257,10 +257,10 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) // Write out the meshes - for (label procI = 0; procI < nProcs_; procI++) + for (label proci = 0; proci < nProcs_; proci++) { // Create processor points - const labelList& curPointLabels = procPointAddressing_[procI]; + const labelList& curPointLabels = procPointAddressing_[proci]; const pointField& meshPoints = points(); @@ -276,7 +276,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) } // Create processor faces - const labelList& curFaceLabels = procFaceAddressing_[procI]; + const labelList& curFaceLabels = procFaceAddressing_[proci]; const faceList& meshFaces = faces(); @@ -318,7 +318,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) } // Create processor cells - const labelList& curCellLabels = procCellAddressing_[procI]; + const labelList& curCellLabels = procCellAddressing_[proci]; const cellList& meshCells = cells(); @@ -332,9 +332,9 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) curCell.setSize(origCellLabels.size()); - forAll(origCellLabels, cellFaceI) + forAll(origCellLabels, cellFacei) { - curCell[cellFaceI] = faceLookup[origCellLabels[cellFaceI]]; + curCell[cellFacei] = faceLookup[origCellLabels[cellFacei]]; } } @@ -342,7 +342,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) fileName processorCasePath ( - time().caseName()/fileName(word("processor") + Foam::name(procI)) + time().caseName()/fileName(word("processor") + Foam::name(proci)) ); // make the processor directory @@ -418,33 +418,33 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) // Create processor boundary patches - const labelList& curPatchSizes = procPatchSize_[procI]; + const labelList& curPatchSizes = procPatchSize_[proci]; - const labelList& curPatchStarts = procPatchStartIndex_[procI]; + const labelList& curPatchStarts = procPatchStartIndex_[proci]; const labelList& curNeighbourProcessors = - procNeighbourProcessors_[procI]; + procNeighbourProcessors_[proci]; const labelList& curProcessorPatchSizes = - procProcessorPatchSize_[procI]; + procProcessorPatchSize_[proci]; const labelList& curProcessorPatchStarts = - procProcessorPatchStartIndex_[procI]; + procProcessorPatchStartIndex_[proci]; const labelListList& curSubPatchIDs = - procProcessorPatchSubPatchIDs_[procI]; + procProcessorPatchSubPatchIDs_[proci]; const labelListList& curSubStarts = - procProcessorPatchSubPatchStarts_[procI]; + procProcessorPatchSubPatchStarts_[proci]; const polyPatchList& meshPatches = boundaryMesh(); // Count the number of inter-proc patches label nInterProcPatches = 0; - forAll(curSubPatchIDs, procPatchI) + forAll(curSubPatchIDs, procPatchi) { - nInterProcPatches += curSubPatchIDs[procPatchI].size(); + nInterProcPatches += curSubPatchIDs[procPatchi].size(); } List<polyPatch*> procPatches @@ -484,12 +484,12 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) nPatches++; } - forAll(curProcessorPatchSizes, procPatchI) + forAll(curProcessorPatchSizes, procPatchi) { - const labelList& subPatchID = curSubPatchIDs[procPatchI]; - const labelList& subStarts = curSubStarts[procPatchI]; + const labelList& subPatchID = curSubPatchIDs[procPatchi]; + const labelList& subStarts = curSubStarts[procPatchi]; - label curStart = curProcessorPatchStarts[procPatchI]; + label curStart = curProcessorPatchStarts[procPatchi]; forAll(subPatchID, i) { @@ -497,7 +497,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) ( i < subPatchID.size()-1 ? subStarts[i+1] - subStarts[i] - : curProcessorPatchSizes[procPatchI] - subStarts[i] + : curProcessorPatchSizes[procPatchi] - subStarts[i] ); if (subPatchID[i] == -1) @@ -510,8 +510,8 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) curStart, nPatches, procMesh.boundaryMesh(), - procI, - curNeighbourProcessors[procPatchI] + proci, + curNeighbourProcessors[procPatchi] ); } else @@ -529,8 +529,8 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) curStart, nPatches, procMesh.boundaryMesh(), - procI, - curNeighbourProcessors[procPatchI], + proci, + curNeighbourProcessors[procPatchi], pcPatch.name(), pcPatch.transform() ); @@ -724,9 +724,9 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) forAll(curCellLabels, celli) { - label curCellI = curCellLabels[celli]; + label curCelli = curCellLabels[celli]; - label zoneI = cellToZone[curCellI]; + label zoneI = cellToZone[curCelli]; if (zoneI >= 0) { @@ -738,7 +738,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) // Multiple zones. Lookup. forAll(cz, zoneI) { - label index = cz[zoneI].whichCell(curCellI); + label index = cz[zoneI].whichCell(curCelli); if (index != -1) { @@ -859,7 +859,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) UIndirectList<label> ( cellLevelPtr(), - procCellAddressing_[procI] + procCellAddressing_[proci] )() ).write(); } @@ -879,7 +879,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) UIndirectList<label> ( pointLevelPtr(), - procPointAddressing_[procI] + procPointAddressing_[proci] )() ).write(); } @@ -905,7 +905,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) // Statistics Info<< endl - << "Processor " << procI << nl + << "Processor " << proci << nl << " Number of cells = " << procMesh.nCells() << endl; @@ -958,7 +958,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) IOobject::NO_READ, IOobject::NO_WRITE ), - procPointAddressing_[procI] + procPointAddressing_[proci] ); pointProcAddressing.write(); @@ -973,7 +973,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) IOobject::NO_READ, IOobject::NO_WRITE ), - procFaceAddressing_[procI] + procFaceAddressing_[proci] ); faceProcAddressing.write(); @@ -988,7 +988,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) IOobject::NO_READ, IOobject::NO_WRITE ), - procCellAddressing_[procI] + procCellAddressing_[proci] ); cellProcAddressing.write(); diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C index 0ca380934f3a8ebaedcfee79ecab560831b97d59..c4bf9d4f70ed6cfb940c0ba27220f044756b66bb 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C @@ -64,28 +64,28 @@ void Foam::domainDecomposition::addInterProcFace if (patchiter != nbrToInterPatch[ownerProc].end()) { // Existing interproc patch. Add to both sides. - label toNbrProcPatchI = patchiter(); - interPatchFaces[ownerProc][toNbrProcPatchI].append(ownerIndex); + label toNbrProcPatchi = patchiter(); + interPatchFaces[ownerProc][toNbrProcPatchi].append(ownerIndex); if (isInternalFace(facei)) { - label toOwnerProcPatchI = nbrToInterPatch[nbrProc][ownerProc]; - interPatchFaces[nbrProc][toOwnerProcPatchI].append(nbrIndex); + label toOwnerProcPatchi = nbrToInterPatch[nbrProc][ownerProc]; + interPatchFaces[nbrProc][toOwnerProcPatchi].append(nbrIndex); } } else { // Create new interproc patches. - label toNbrProcPatchI = nbrToInterPatch[ownerProc].size(); - nbrToInterPatch[ownerProc].insert(nbrProc, toNbrProcPatchI); + label toNbrProcPatchi = nbrToInterPatch[ownerProc].size(); + nbrToInterPatch[ownerProc].insert(nbrProc, toNbrProcPatchi); DynamicList<label> oneFace; oneFace.append(ownerIndex); interPatchFaces[ownerProc].append(oneFace); if (isInternalFace(facei)) { - label toOwnerProcPatchI = nbrToInterPatch[nbrProc].size(); - nbrToInterPatch[nbrProc].insert(ownerProc, toOwnerProcPatchI); + label toOwnerProcPatchi = nbrToInterPatch[nbrProc].size(); + nbrToInterPatch[nbrProc].insert(ownerProc, toOwnerProcPatchi); oneFace.clear(); oneFace.append(nbrIndex); interPatchFaces[nbrProc].append(oneFace); @@ -139,20 +139,20 @@ void Foam::domainDecomposition::decomposeMesh() // for all processors, set the size of start index and patch size // lists to the number of patches in the mesh - forAll(procPatchSize_, procI) + forAll(procPatchSize_, proci) { - procPatchSize_[procI].setSize(patches.size()); - procPatchStartIndex_[procI].setSize(patches.size()); + procPatchSize_[proci].setSize(patches.size()); + procPatchStartIndex_[proci].setSize(patches.size()); } forAll(patches, patchi) { // Reset size and start index for all processors - forAll(procPatchSize_, procI) + forAll(procPatchSize_, proci) { - procPatchSize_[procI][patchi] = 0; - procPatchStartIndex_[procI][patchi] = - procFaceAddressing_[procI].size(); + procPatchSize_[proci][patchi] = 0; + procPatchStartIndex_[proci][patchi] = + procFaceAddressing_[proci].size(); } const label patchStart = patches[patchi].start(); @@ -239,12 +239,12 @@ void Foam::domainDecomposition::decomposeMesh() // originating from internal faces this is always -1. List<labelListList> subPatchIDs(nProcs_); List<labelListList> subPatchStarts(nProcs_); - forAll(interPatchFaces, procI) + forAll(interPatchFaces, proci) { - label nInterfaces = interPatchFaces[procI].size(); + label nInterfaces = interPatchFaces[proci].size(); - subPatchIDs[procI].setSize(nInterfaces, labelList(1, label(-1))); - subPatchStarts[procI].setSize(nInterfaces, labelList(1, label(0))); + subPatchIDs[proci].setSize(nInterfaces, labelList(1, label(-1))); + subPatchStarts[proci].setSize(nInterfaces, labelList(1, label(0))); } @@ -318,63 +318,63 @@ void Foam::domainDecomposition::decomposeMesh() // Sort inter-proc patch by neighbour labelList order; - forAll(procNbrToInterPatch, procI) + forAll(procNbrToInterPatch, proci) { - label nInterfaces = procNbrToInterPatch[procI].size(); + label nInterfaces = procNbrToInterPatch[proci].size(); - procNeighbourProcessors_[procI].setSize(nInterfaces); - procProcessorPatchSize_[procI].setSize(nInterfaces); - procProcessorPatchStartIndex_[procI].setSize(nInterfaces); - procProcessorPatchSubPatchIDs_[procI].setSize(nInterfaces); - procProcessorPatchSubPatchStarts_[procI].setSize(nInterfaces); + procNeighbourProcessors_[proci].setSize(nInterfaces); + procProcessorPatchSize_[proci].setSize(nInterfaces); + procProcessorPatchStartIndex_[proci].setSize(nInterfaces); + procProcessorPatchSubPatchIDs_[proci].setSize(nInterfaces); + procProcessorPatchSubPatchStarts_[proci].setSize(nInterfaces); - //Info<< "Processor " << procI << endl; + //Info<< "Processor " << proci << endl; // Get sorted neighbour processors - const Map<label>& curNbrToInterPatch = procNbrToInterPatch[procI]; + const Map<label>& curNbrToInterPatch = procNbrToInterPatch[proci]; labelList nbrs = curNbrToInterPatch.toc(); sortedOrder(nbrs, order); DynamicList<DynamicList<label>>& curInterPatchFaces = - interPatchFaces[procI]; + interPatchFaces[proci]; forAll(nbrs, i) { const label nbrProc = nbrs[i]; const label interPatch = curNbrToInterPatch[nbrProc]; - procNeighbourProcessors_[procI][i] = nbrProc; - procProcessorPatchSize_[procI][i] = + procNeighbourProcessors_[proci][i] = nbrProc; + procProcessorPatchSize_[proci][i] = curInterPatchFaces[interPatch].size(); - procProcessorPatchStartIndex_[procI][i] = - procFaceAddressing_[procI].size(); + procProcessorPatchStartIndex_[proci][i] = + procFaceAddressing_[proci].size(); // Add size as last element to substarts and transfer append ( - subPatchStarts[procI][interPatch], + subPatchStarts[proci][interPatch], curInterPatchFaces[interPatch].size() ); - procProcessorPatchSubPatchIDs_[procI][i].transfer + procProcessorPatchSubPatchIDs_[proci][i].transfer ( - subPatchIDs[procI][interPatch] + subPatchIDs[proci][interPatch] ); - procProcessorPatchSubPatchStarts_[procI][i].transfer + procProcessorPatchSubPatchStarts_[proci][i].transfer ( - subPatchStarts[procI][interPatch] + subPatchStarts[proci][interPatch] ); //Info<< " nbr:" << nbrProc << endl; //Info<< " interpatch:" << interPatch << endl; - //Info<< " size:" << procProcessorPatchSize_[procI][i] << endl; - //Info<< " start:" << procProcessorPatchStartIndex_[procI][i] + //Info<< " size:" << procProcessorPatchSize_[proci][i] << endl; + //Info<< " start:" << procProcessorPatchStartIndex_[proci][i] // << endl; //Info<< " subPatches:" - // << procProcessorPatchSubPatchIDs_[procI][i] + // << procProcessorPatchSubPatchIDs_[proci][i] // << endl; //Info<< " subStarts:" - // << procProcessorPatchSubPatchStarts_[procI][i] << endl; + // << procProcessorPatchSubPatchStarts_[proci][i] << endl; // And add all the face labels for interPatch DynamicList<label>& interPatchFaces = @@ -382,55 +382,55 @@ void Foam::domainDecomposition::decomposeMesh() forAll(interPatchFaces, j) { - procFaceAddressing_[procI].append(interPatchFaces[j]); + procFaceAddressing_[proci].append(interPatchFaces[j]); } interPatchFaces.clearStorage(); } curInterPatchFaces.clearStorage(); - procFaceAddressing_[procI].shrink(); + procFaceAddressing_[proci].shrink(); } ////XXXXXXX //// Print a bit -// forAll(procPatchStartIndex_, procI) +// forAll(procPatchStartIndex_, proci) // { -// Info<< "Processor:" << procI << endl; +// Info<< "Processor:" << proci << endl; // -// Info<< " total faces:" << procFaceAddressing_[procI].size() +// Info<< " total faces:" << procFaceAddressing_[proci].size() // << endl; // -// const labelList& curProcPatchStartIndex = procPatchStartIndex_[procI]; +// const labelList& curProcPatchStartIndex = procPatchStartIndex_[proci]; // // forAll(curProcPatchStartIndex, patchi) // { // Info<< " patch:" << patchi // << "\tstart:" << curProcPatchStartIndex[patchi] -// << "\tsize:" << procPatchSize_[procI][patchi] +// << "\tsize:" << procPatchSize_[proci][patchi] // << endl; // } // } // Info<< endl; // -// forAll(procNeighbourProcessors_, procI) +// forAll(procNeighbourProcessors_, proci) // { -// Info<< "Processor " << procI << endl; +// Info<< "Processor " << proci << endl; // -// forAll(procNeighbourProcessors_[procI], i) +// forAll(procNeighbourProcessors_[proci], i) // { -// Info<< " nbr:" << procNeighbourProcessors_[procI][i] << endl; -// Info<< " size:" << procProcessorPatchSize_[procI][i] << endl; -// Info<< " start:" << procProcessorPatchStartIndex_[procI][i] +// Info<< " nbr:" << procNeighbourProcessors_[proci][i] << endl; +// Info<< " size:" << procProcessorPatchSize_[proci][i] << endl; +// Info<< " start:" << procProcessorPatchStartIndex_[proci][i] // << endl; // } // } // Info<< endl; // -// forAll(procFaceAddressing_, procI) +// forAll(procFaceAddressing_, proci) // { -// Info<< "Processor:" << procI << endl; +// Info<< "Processor:" << proci << endl; // -// Info<< " faces:" << procFaceAddressing_[procI] << endl; +// Info<< " faces:" << procFaceAddressing_[proci] << endl; // } @@ -441,12 +441,12 @@ void Foam::domainDecomposition::decomposeMesh() // used for the processor. Collect the list of used points for the // processor. - forAll(procPointAddressing_, procI) + forAll(procPointAddressing_, proci) { boolList pointLabels(nPoints(), false); // Get reference to list of used faces - const labelList& procFaceLabels = procFaceAddressing_[procI]; + const labelList& procFaceLabels = procFaceAddressing_[proci]; forAll(procFaceLabels, facei) { @@ -461,7 +461,7 @@ void Foam::domainDecomposition::decomposeMesh() } // Collect the used points - labelList& procPointLabels = procPointAddressing_[procI]; + labelList& procPointLabels = procPointAddressing_[proci]; procPointLabels.setSize(pointLabels.size()); diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionTemplates.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionTemplates.C index b12668ff1e3e5666ebf13daa5c7e5a37dbacc42c..2a3b27b357599e9856885ee77c730e3be0c3a210 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionTemplates.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionTemplates.C @@ -62,15 +62,15 @@ void Foam::domainDecomposition::processInterCyclics // Store old sizes. Used to detect which inter-proc patches // have been added to. labelListList oldInterfaceSizes(nProcs_); - forAll(oldInterfaceSizes, procI) + forAll(oldInterfaceSizes, proci) { - labelList& curOldSizes = oldInterfaceSizes[procI]; + labelList& curOldSizes = oldInterfaceSizes[proci]; - curOldSizes.setSize(interPatchFaces[procI].size()); + curOldSizes.setSize(interPatchFaces[proci].size()); forAll(curOldSizes, interI) { curOldSizes[interI] = - interPatchFaces[procI][interI].size(); + interPatchFaces[proci][interI].size(); } } @@ -94,28 +94,28 @@ void Foam::domainDecomposition::processInterCyclics } // 1. Check if any faces added to existing interfaces - forAll(oldInterfaceSizes, procI) + forAll(oldInterfaceSizes, proci) { - const labelList& curOldSizes = oldInterfaceSizes[procI]; + const labelList& curOldSizes = oldInterfaceSizes[proci]; forAll(curOldSizes, interI) { label oldSz = curOldSizes[interI]; - if (interPatchFaces[procI][interI].size() > oldSz) + if (interPatchFaces[proci][interI].size() > oldSz) { // Added faces to this interface. Add an entry - append(subPatchIDs[procI][interI], patchi); - append(subPatchStarts[procI][interI], oldSz); + append(subPatchIDs[proci][interI], patchi); + append(subPatchStarts[proci][interI], oldSz); } } } // 2. Any new interfaces - forAll(subPatchIDs, procI) + forAll(subPatchIDs, proci) { - label nIntfcs = interPatchFaces[procI].size(); - subPatchIDs[procI].setSize(nIntfcs, labelList(1, patchi)); - subPatchStarts[procI].setSize(nIntfcs, labelList(1, label(0))); + label nIntfcs = interPatchFaces[proci].size(); + subPatchIDs[proci].setSize(nIntfcs, labelList(1, patchi)); + subPatchStarts[proci].setSize(nIntfcs, labelList(1, label(0))); } } } diff --git a/applications/utilities/parallelProcessing/reconstructPar/checkFaceAddressingComp.H b/applications/utilities/parallelProcessing/reconstructPar/checkFaceAddressingComp.H index 014b30d3b82f58ef9193b4a78b36d2db74336d18..0c2378b349c58349dba3d3358129d125dc86e574 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/checkFaceAddressingComp.H +++ b/applications/utilities/parallelProcessing/reconstructPar/checkFaceAddressingComp.H @@ -8,9 +8,9 @@ PtrList<labelIOList>& faceProcAddressing = procMeshes.faceProcAddressing(); - forAll(faceProcAddressing, procI) + forAll(faceProcAddressing, proci) { - const labelList& curFaceAddr = faceProcAddressing[procI]; + const labelList& curFaceAddr = faceProcAddressing[proci]; forAll(curFaceAddr, facei) { @@ -33,16 +33,16 @@ << "the current version fo decomposePar" << endl; - forAll(faceProcAddressing, procI) + forAll(faceProcAddressing, proci) { - labelList& curFaceAddr = faceProcAddressing[procI]; + labelList& curFaceAddr = faceProcAddressing[proci]; forAll(curFaceAddr, facei) { curFaceAddr[facei] += sign(curFaceAddr[facei]); } - faceProcAddressing[procI].write(); + faceProcAddressing[proci].write(); } } } diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index cbe43b7ff5965367928a3456819503175b16dd41..95f8b038cd601d0d6736e659e0d576c4189cb94a 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -176,16 +176,16 @@ int main(int argc, char *argv[]) // Create the processor databases PtrList<Time> databases(nProcs); - forAll(databases, procI) + forAll(databases, proci) { databases.set ( - procI, + proci, new Time ( Time::controlDictName, args.rootPath(), - args.caseName()/fileName(word("processor") + name(procI)) + args.caseName()/fileName(word("processor") + name(proci)) ) ); } @@ -227,9 +227,9 @@ int main(int argc, char *argv[]) // Set all times on processor meshes equal to reconstructed mesh - forAll(databases, procI) + forAll(databases, proci) { - databases[procI].setTime(runTime); + databases[proci].setTime(runTime); } @@ -329,9 +329,9 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << endl << endl; // Set time for all databases - forAll(databases, procI) + forAll(databases, proci) { - databases[procI].setTime(timeDirs[timeI], timeI); + databases[proci].setTime(timeDirs[timeI], timeI); } // Check if any new meshes need to be read. @@ -470,12 +470,12 @@ int main(int argc, char *argv[]) const pointMesh& pMesh = pointMesh::New(mesh); PtrList<pointMesh> pMeshes(procMeshes.meshes().size()); - forAll(pMeshes, procI) + forAll(pMeshes, proci) { pMeshes.set ( - procI, - new pointMesh(procMeshes.meshes()[procI]) + proci, + new pointMesh(procMeshes.meshes()[proci]) ); } @@ -531,13 +531,13 @@ int main(int argc, char *argv[]) { HashTable<IOobjectList> cloudObjects; - forAll(databases, procI) + forAll(databases, proci) { fileNameList cloudDirs ( readDir ( - databases[procI].timePath() + databases[proci].timePath() / regionDir / cloud::prefix, fileName::DIRECTORY @@ -556,8 +556,8 @@ int main(int argc, char *argv[]) // Do local scan for valid cloud objects IOobjectList sprayObjs ( - procMeshes.meshes()[procI], - databases[procI].timeName(), + procMeshes.meshes()[proci], + databases[proci].timeName(), cloud::prefix/cloudDirs[i] ); @@ -709,9 +709,9 @@ int main(int argc, char *argv[]) HashTable<label> fSetNames; HashTable<label> pSetNames; - forAll(procMeshes.meshes(), procI) + forAll(procMeshes.meshes(), proci) { - const fvMesh& procMesh = procMeshes.meshes()[procI]; + const fvMesh& procMesh = procMeshes.meshes()[proci]; // Note: look at sets in current time only or between // mesh and current time?. For now current time. This will @@ -762,9 +762,9 @@ int main(int argc, char *argv[]) } // Load sets - forAll(procMeshes.meshes(), procI) + forAll(procMeshes.meshes(), proci) { - const fvMesh& procMesh = procMeshes.meshes()[procI]; + const fvMesh& procMesh = procMeshes.meshes()[proci]; IOobjectList objects ( @@ -775,7 +775,7 @@ int main(int argc, char *argv[]) // cellSets const labelList& cellMap = - procMeshes.cellProcAddressing()[procI]; + procMeshes.cellProcAddressing()[proci]; IOobjectList cSets(objects.lookupClass(cellSet::typeName)); forAllConstIter(IOobjectList, cSets, iter) @@ -802,7 +802,7 @@ int main(int argc, char *argv[]) // faceSets const labelList& faceMap = - procMeshes.faceProcAddressing()[procI]; + procMeshes.faceProcAddressing()[proci]; IOobjectList fSets(objects.lookupClass(faceSet::typeName)); forAllConstIter(IOobjectList, fSets, iter) @@ -828,7 +828,7 @@ int main(int argc, char *argv[]) } // pointSets const labelList& pointMap = - procMeshes.pointProcAddressing()[procI]; + procMeshes.pointProcAddressing()[proci]; IOobjectList pSets(objects.lookupClass(pointSet::typeName)); forAllConstIter(IOobjectList, pSets, iter) diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index 3f78c990970025f80e9f242759247fa8f0541abd..eb2ddf8746d7ebb6d8fe56c3ac7b30f3ba96d807 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -78,12 +78,12 @@ static void renumber // Determine which faces are coupled. Uses geometric merge distance. // Looks either at all boundaryFaces (fullMatch) or only at the -// procBoundaries for procI. Assumes that masterMesh contains already merged -// all the processors < procI. +// procBoundaries for proci. Assumes that masterMesh contains already merged +// all the processors < proci. autoPtr<faceCoupleInfo> determineCoupledFaces ( const bool fullMatch, - const label procI, + const label proci, const polyMesh& masterMesh, const polyMesh& meshToAdd, const scalar mergeDist @@ -105,11 +105,11 @@ autoPtr<faceCoupleInfo> determineCoupledFaces else { // Pick up all patches on masterMesh ending in "toDDD" where DDD is - // the processor number procI. + // the processor number proci. const polyBoundaryMesh& masterPatches = masterMesh.boundaryMesh(); - const string toProcString("to" + name(procI)); + const string toProcString("to" + name(proci)); DynamicList<label> masterFaces ( @@ -130,10 +130,10 @@ autoPtr<faceCoupleInfo> determineCoupledFaces ) ) { - label meshFaceI = pp.start(); + label meshFacei = pp.start(); forAll(pp, i) { - masterFaces.append(meshFaceI++); + masterFaces.append(meshFacei++); } } } @@ -141,7 +141,7 @@ autoPtr<faceCoupleInfo> determineCoupledFaces // Pick up all patches on meshToAdd ending in "procBoundaryDDDtoYYY" - // where DDD is the processor number procI and YYY is < procI. + // where DDD is the processor number proci and YYY is < proci. const polyBoundaryMesh& addPatches = meshToAdd.boundaryMesh(); @@ -159,11 +159,11 @@ autoPtr<faceCoupleInfo> determineCoupledFaces { bool isConnected = false; - for (label mergedProcI = 0; mergedProcI < procI; mergedProcI++) + for (label mergedProci = 0; mergedProci < proci; mergedProci++) { const word fromProcString ( - processorPolyPatch::newName(procI, mergedProcI) + processorPolyPatch::newName(proci, mergedProci) ); if (pp.name() == fromProcString) @@ -175,10 +175,10 @@ autoPtr<faceCoupleInfo> determineCoupledFaces if (isConnected) { - label meshFaceI = pp.start(); + label meshFacei = pp.start(); forAll(pp, i) { - addFaces.append(meshFaceI++); + addFaces.append(meshFacei++); } } } @@ -244,9 +244,9 @@ autoPtr<mapPolyMesh> mergeSharedPoints // for changed point numbering. // Adapt constructMaps for merged points. - forAll(pointProcAddressing, procI) + forAll(pointProcAddressing, proci) { - labelList& constructMap = pointProcAddressing[procI]; + labelList& constructMap = pointProcAddressing[proci]; forAll(constructMap, i) { @@ -285,21 +285,21 @@ boundBox procBounds { boundBox bb = boundBox::invertedBox; - forAll(databases, procI) + forAll(databases, proci) { fileName pointsInstance ( - databases[procI].findInstance + databases[proci].findInstance ( regionDir/polyMesh::meshSubDir, "points" ) ); - if (pointsInstance != databases[procI].timeName()) + if (pointsInstance != databases[proci].timeName()) { FatalErrorInFunction - << "Your time was specified as " << databases[procI].timeName() + << "Your time was specified as " << databases[proci].timeName() << " but there is no polyMesh/points in that time." << endl << "(there is a points file in " << pointsInstance << ")" << endl @@ -310,8 +310,8 @@ boundBox procBounds } Info<< "Reading points from " - << databases[procI].caseName() - << " for time = " << databases[procI].timeName() + << databases[proci].caseName() + << " for time = " << databases[proci].timeName() << nl << endl; pointIOField points @@ -319,13 +319,13 @@ boundBox procBounds IOobject ( "points", - databases[procI].findInstance + databases[proci].findInstance ( regionDir/polyMesh::meshSubDir, "points" ), regionDir/polyMesh::meshSubDir, - databases[procI], + databases[proci], IOobject::MUST_READ, IOobject::NO_WRITE, false @@ -366,10 +366,10 @@ void writeCellDistance masterMesh.nCells() ); - forAll(cellProcAddressing, procI) + forAll(cellProcAddressing, proci) { - const labelList& pCells = cellProcAddressing[procI]; - UIndirectList<label>(cellDecomposition, pCells) = procI; + const labelList& pCells = cellProcAddressing[proci]; + UIndirectList<label>(cellDecomposition, pCells) = proci; } cellDecomposition.write(); @@ -542,20 +542,20 @@ int main(int argc, char *argv[]) // Read all time databases PtrList<Time> databases(nProcs); - forAll(databases, procI) + forAll(databases, proci) { Info<< "Reading database " - << args.caseName()/fileName(word("processor") + name(procI)) + << args.caseName()/fileName(word("processor") + name(proci)) << endl; databases.set ( - procI, + proci, new Time ( Time::controlDictName, args.rootPath(), - args.caseName()/fileName(word("processor") + name(procI)) + args.caseName()/fileName(word("processor") + name(proci)) ) ); } @@ -577,9 +577,9 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; // Set time for all databases - forAll(databases, procI) + forAll(databases, proci) { - databases[procI].setTime(timeDirs[timeI], timeI); + databases[proci].setTime(timeDirs[timeI], timeI); } const fileName meshPath = @@ -636,11 +636,11 @@ int main(int argc, char *argv[]) xferCopy(cellList()) ); - for (label procI = 0; procI < nProcs; procI++) + for (label proci = 0; proci < nProcs; proci++) { Info<< "Reading mesh to add from " - << databases[procI].caseName() - << " for time = " << databases[procI].timeName() + << databases[proci].caseName() + << " for time = " << databases[proci].timeName() << nl << endl; fvMesh meshToAdd @@ -648,16 +648,16 @@ int main(int argc, char *argv[]) IOobject ( regionName, - databases[procI].timeName(), - databases[procI] + databases[proci].timeName(), + databases[proci] ) ); // Initialize its addressing - cellProcAddressing[procI] = identity(meshToAdd.nCells()); - faceProcAddressing[procI] = identity(meshToAdd.nFaces()); - pointProcAddressing[procI] = identity(meshToAdd.nPoints()); - boundaryProcAddressing[procI] = + cellProcAddressing[proci] = identity(meshToAdd.nCells()); + faceProcAddressing[proci] = identity(meshToAdd.nFaces()); + pointProcAddressing[proci] = identity(meshToAdd.nPoints()); + boundaryProcAddressing[proci] = identity(meshToAdd.boundaryMesh().size()); @@ -665,7 +665,7 @@ int main(int argc, char *argv[]) autoPtr<faceCoupleInfo> couples = determineCoupledFaces ( fullMatch, - procI, + proci, masterMesh, meshToAdd, mergeDist @@ -686,7 +686,7 @@ int main(int argc, char *argv[]) // item in masterMesh. // Processors that were already in masterMesh - for (label mergedI = 0; mergedI < procI; mergedI++) + for (label mergedI = 0; mergedI < proci; mergedI++) { renumber(map().oldCellMap(), cellProcAddressing[mergedI]); renumber(map().oldFaceMap(), faceProcAddressing[mergedI]); @@ -700,10 +700,10 @@ int main(int argc, char *argv[]) } // Added processor - renumber(map().addedCellMap(), cellProcAddressing[procI]); - renumber(map().addedFaceMap(), faceProcAddressing[procI]); - renumber(map().addedPointMap(), pointProcAddressing[procI]); - renumber(map().addedPatchMap(), boundaryProcAddressing[procI]); + renumber(map().addedCellMap(), cellProcAddressing[proci]); + renumber(map().addedFaceMap(), faceProcAddressing[proci]); + renumber(map().addedPointMap(), pointProcAddressing[proci]); + renumber(map().addedPatchMap(), boundaryProcAddressing[proci]); Info<< endl; } @@ -740,18 +740,18 @@ int main(int argc, char *argv[]) Info<< "Reconstructing the addressing from the processor meshes" << " to the newly reconstructed mesh" << nl << endl; - forAll(databases, procI) + forAll(databases, proci) { - Info<< "Reading processor " << procI << " mesh from " - << databases[procI].caseName() << endl; + Info<< "Reading processor " << proci << " mesh from " + << databases[proci].caseName() << endl; polyMesh procMesh ( IOobject ( regionName, - databases[procI].timeName(), - databases[procI] + databases[proci].timeName(), + databases[proci] ) ); @@ -759,7 +759,7 @@ int main(int argc, char *argv[]) // From processor point to reconstructed mesh point Info<< "Writing pointProcAddressing to " - << databases[procI].caseName() + << databases[proci].caseName() /procMesh.facesInstance() /polyMesh::meshSubDir << endl; @@ -776,14 +776,14 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE, false // Do not register ), - pointProcAddressing[procI] + pointProcAddressing[proci] ).write(); // From processor face to reconstructed mesh face Info<< "Writing faceProcAddressing to " - << databases[procI].caseName() + << databases[proci].caseName() /procMesh.facesInstance() /polyMesh::meshSubDir << endl; @@ -800,43 +800,43 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE, false // Do not register ), - faceProcAddressing[procI] + faceProcAddressing[proci] ); // Now add turning index to faceProcAddressing. // See reconstructPar for meaning of turning index. - forAll(faceProcAddr, procFaceI) + forAll(faceProcAddr, procFacei) { - label masterFaceI = faceProcAddr[procFaceI]; + label masterFacei = faceProcAddr[procFacei]; if ( - !procMesh.isInternalFace(procFaceI) - && masterFaceI < masterInternalFaces + !procMesh.isInternalFace(procFacei) + && masterFacei < masterInternalFaces ) { // proc face is now external but used to be internal face. // Check if we have owner or neighbour. - label procOwn = procMesh.faceOwner()[procFaceI]; - label masterOwn = masterOwner[masterFaceI]; + label procOwn = procMesh.faceOwner()[procFacei]; + label masterOwn = masterOwner[masterFacei]; - if (cellProcAddressing[procI][procOwn] == masterOwn) + if (cellProcAddressing[proci][procOwn] == masterOwn) { // No turning. Offset by 1. - faceProcAddr[procFaceI]++; + faceProcAddr[procFacei]++; } else { // Turned face. - faceProcAddr[procFaceI] = - -1 - faceProcAddr[procFaceI]; + faceProcAddr[procFacei] = + -1 - faceProcAddr[procFacei]; } } else { // No turning. Offset by 1. - faceProcAddr[procFaceI]++; + faceProcAddr[procFacei]++; } } @@ -846,7 +846,7 @@ int main(int argc, char *argv[]) // From processor cell to reconstructed mesh cell Info<< "Writing cellProcAddressing to " - << databases[procI].caseName() + << databases[proci].caseName() /procMesh.facesInstance() /polyMesh::meshSubDir << endl; @@ -863,7 +863,7 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE, false // Do not register ), - cellProcAddressing[procI] + cellProcAddressing[proci] ).write(); @@ -871,7 +871,7 @@ int main(int argc, char *argv[]) // From processor patch to reconstructed mesh patch Info<< "Writing boundaryProcAddressing to " - << databases[procI].caseName() + << databases[proci].caseName() /procMesh.facesInstance() /polyMesh::meshSubDir << endl; @@ -888,7 +888,7 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE, false // Do not register ), - boundaryProcAddressing[procI] + boundaryProcAddressing[proci] ).write(); Info<< endl; diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index be24d05a76ccfd6b728d5f8cacf89ccc3e5feedc..ef73afa2a5976b73738a343e95fb34d5ce62d1b4 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -150,32 +150,32 @@ void printMeshData(const polyMesh& mesh) label totProcPatches = 0; label maxProcFaces = 0; - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { Info<< endl - << "Processor " << procI << nl - << " Number of cells = " << globalCells.localSize(procI) + << "Processor " << proci << nl + << " Number of cells = " << globalCells.localSize(proci) << endl; label nProcFaces = 0; - const labelList& nei = patchNeiProcNo[procI]; + const labelList& nei = patchNeiProcNo[proci]; - forAll(patchNeiProcNo[procI], i) + forAll(patchNeiProcNo[proci], i) { Info<< " Number of faces shared with processor " - << patchNeiProcNo[procI][i] << " = " << patchSize[procI][i] + << patchNeiProcNo[proci][i] << " = " << patchSize[proci][i] << endl; - nProcFaces += patchSize[procI][i]; + nProcFaces += patchSize[proci][i]; } Info<< " Number of processor patches = " << nei.size() << nl << " Number of processor faces = " << nProcFaces << nl << " Number of boundary faces = " - << globalBoundaryFaces.localSize(procI) << endl; + << globalBoundaryFaces.localSize(proci) << endl; - maxProcCells = max(maxProcCells, globalCells.localSize(procI)); + maxProcCells = max(maxProcCells, globalCells.localSize(proci)); totProcFaces += nProcFaces; totProcPatches += nei.size(); maxProcPatches = max(maxProcPatches, nei.size()); @@ -298,11 +298,11 @@ void readFields tmp<GeoField> tsubfld = subsetterPtr().interpolate(fields[i]); // Send to all processors that don't have a mesh - for (label procI = 1; procI < Pstream::nProcs(); procI++) + for (label proci = 1; proci < Pstream::nProcs(); proci++) { - if (!haveMesh[procI]) + if (!haveMesh[proci]) { - OPstream toProc(Pstream::blocking, procI); + OPstream toProc(Pstream::blocking, proci); toProc<< tsubfld(); } } @@ -574,7 +574,7 @@ int main(int argc, char *argv[]) // Find last non-processor patch. const polyBoundaryMesh& patches = mesh.boundaryMesh(); - label nonProcI = -1; + label nonProci = -1; forAll(patches, patchi) { @@ -582,10 +582,10 @@ int main(int argc, char *argv[]) { break; } - nonProcI++; + nonProci++; } - if (nonProcI == -1) + if (nonProci == -1) { FatalErrorInFunction << "Cannot find non-processor patch on processor " @@ -596,7 +596,7 @@ int main(int argc, char *argv[]) // Subset 0 cells, no parallel comms. This is used to create zero-sized // fields. subsetterPtr.reset(new fvMeshSubset(mesh)); - subsetterPtr().setLargeCellSubset(labelHashSet(0), nonProcI, false); + subsetterPtr().setLargeCellSubset(labelHashSet(0), nonProci, false); } @@ -781,11 +781,11 @@ int main(int argc, char *argv[]) << " Take care when issuing these" << nl << "commands." << nl << endl; - forAll(nFaces, procI) + forAll(nFaces, proci) { - fileName procDir = "processor" + name(procI); + fileName procDir = "processor" + name(proci); - if (nFaces[procI] == 0) + if (nFaces[proci] == 0) { Info<< " rm -r " << procDir.c_str() << nl; } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C index 66f29bfed16d9be0739ed2337cfcf565ef8dafb5..1221193c1536c3cdd182f48ac0c9c7bb10f8b998 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C @@ -133,7 +133,7 @@ bool writePatchField ( const Field<Type>& pf, const label patchi, - const label ensightPatchI, + const label ensightPatchi, const faceSets& boundaryFaceSet, const ensightMesh::nFacePrimitives& nfp, ensightStream& ensightFile @@ -143,7 +143,7 @@ bool writePatchField { if (Pstream::master()) { - ensightFile.writePartHeader(ensightPatchI); + ensightFile.writePartHeader(ensightPatchi); } writeField @@ -197,7 +197,7 @@ void writePatchField const HashTable<ensightMesh::nFacePrimitives>& nPatchPrims = eMesh.nPatchPrims(); - label ensightPatchI = eMesh.patchPartOffset(); + label ensightPatchi = eMesh.patchPartOffset(); label patchi = -1; @@ -208,7 +208,7 @@ void writePatchField patchi = i; break; } - ensightPatchI++; + ensightPatchi++; } @@ -265,7 +265,7 @@ void writePatchField ( pf, patchi, - ensightPatchI, + ensightPatchi, boundaryFaceSets[patchi], nPatchPrims.find(patchName)(), ensightFile @@ -279,7 +279,7 @@ void writePatchField ( Field<Type>(), -1, - ensightPatchI, + ensightPatchi, nullFaceSets, nPatchPrims.find(patchName)(), ensightFile @@ -418,7 +418,7 @@ void ensightField ); } - label ensightPatchI = eMesh.patchPartOffset(); + label ensightPatchi = eMesh.patchPartOffset(); forAll(allPatchNames, patchi) { @@ -434,14 +434,14 @@ void ensightField ( vf.boundaryField()[patchi], patchi, - ensightPatchI, + ensightPatchi, boundaryFaceSets[patchi], nPatchPrims.find(patchName)(), ensightFile ) ) { - ensightPatchI++; + ensightPatchi++; } } } @@ -494,8 +494,8 @@ void ensightField { label patchi = mesh.boundaryMesh().whichPatch(facei); const polyPatch& pp = mesh.boundaryMesh()[patchi]; - label patchFaceI = pp.whichFace(facei); - Type value = sf.boundaryField()[patchi][patchFaceI]; + label patchFacei = pp.whichFace(facei); + Type value = sf.boundaryField()[patchi][patchFacei]; values[j] = value; ++j; } @@ -508,14 +508,14 @@ void ensightField ( values, zoneID, - ensightPatchI, + ensightPatchi, faceZoneFaceSets[zoneID], nFaceZonePrims.find(faceZoneName)(), ensightFile ) ) { - ensightPatchI++; + ensightPatchi++; } } } @@ -609,7 +609,7 @@ void ensightPointField } - label ensightPatchI = eMesh.patchPartOffset(); + label ensightPatchi = eMesh.patchPartOffset(); forAll(allPatchNames, patchi) { @@ -640,7 +640,7 @@ void ensightPointField if (Pstream::master()) { - ensightFile.writePartHeader(ensightPatchI); + ensightFile.writePartHeader(ensightPatchi); } writeField @@ -650,7 +650,7 @@ void ensightPointField ensightFile ); - ensightPatchI++; + ensightPatchi++; } } } @@ -684,7 +684,7 @@ void ensightPointField if (Pstream::master()) { - ensightFile.writePartHeader(ensightPatchI); + ensightFile.writePartHeader(ensightPatchi); } writeField @@ -698,7 +698,7 @@ void ensightPointField ensightFile ); - ensightPatchI++; + ensightPatchi++; } } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C index 7b99bb62b78853481415fef4d184739bd28f7598..b10b72e0068412b5ac37037a692aae928a87fc54 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C @@ -293,10 +293,10 @@ void Foam::ensightMesh::correct() && !refCast<const processorPolyPatch>(pp).owner() ) { - label bFaceI = pp.start()-mesh_.nInternalFaces(); + label bFacei = pp.start()-mesh_.nInternalFaces(); forAll(pp, i) { - boundaryFaceToBeIncluded_[bFaceI++] = 0; + boundaryFaceToBeIncluded_[bFacei++] = 0; } } } @@ -1136,7 +1136,7 @@ void Foam::ensightMesh::write } - label ensightPatchI = patchPartOffset_; + label ensightPatchi = patchPartOffset_; forAll(allPatchNames_, patchi) { @@ -1176,7 +1176,7 @@ void Foam::ensightMesh::write writeAllPoints ( - ensightPatchI++, + ensightPatchi++, patchName, uniquePoints, globalPointsPtr().size(), @@ -1281,7 +1281,7 @@ void Foam::ensightMesh::write writeAllPoints ( - ensightPatchI++, + ensightPatchi++, faceZoneName, uniquePoints, globalPointsPtr().size(), diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C index 3ffcdf530e23435e47c99dd5e1699b9c4462303a..9dfe7d4978f8ea4119622e800e0b6944bc404136 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C @@ -107,8 +107,8 @@ Foam::tmp<Field<Type>> Foam::tecplotWriter::getFaceField } else { - label localFaceI = facei - patches[patchi].start(); - fld[i] = sfld.boundaryField()[patchi][localFaceI]; + label localFacei = facei - patches[patchi].start(); + fld[i] = sfld.boundaryField()[patchi][localFacei]; } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C b/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C index 218bdfdcc382e41ade11a18a64a29acd2f9eccad..7ee8b33279beedb83eb2c3bebb967d38fb018408 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C @@ -107,15 +107,15 @@ void ReadAndMapFields else if (index < 0) { label facei = -index-1; - label bFaceI = facei - mesh.nInternalFaces(); - if (bFaceI >= 0) + label bFacei = facei - mesh.nInternalFaces(); + if (bFacei >= 0) { - label patchi = mesh.boundaryMesh().patchID()[bFaceI]; - label localFaceI = mesh.boundaryMesh()[patchi].whichFace + label patchi = mesh.boundaryMesh().patchID()[bFacei]; + label localFacei = mesh.boundaryMesh()[patchi].whichFace ( facei ); - fld[pointI] = readField.boundaryField()[patchi][localFaceI]; + fld[pointI] = readField.boundaryField()[patchi][localFacei]; } //else //{ diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.C index 2e58b413a4363f1b81202e1cd19165df16daa9b9..4db9f9c06938a851a387505af3adb8b6cbd24ab0 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.C @@ -137,11 +137,11 @@ void Foam::internalWriter::writeCellIDs() { cellId[labelI++] = cMap[celli]; } - forAll(superCells, superCellI) + forAll(superCells, superCelli) { - label origCellI = cMap[superCells[superCellI]]; + label origCelli = cMap[superCells[superCelli]]; - cellId[labelI++] = origCellI; + cellId[labelI++] = origCelli; } } else @@ -150,11 +150,11 @@ void Foam::internalWriter::writeCellIDs() { cellId[labelI++] = celli; } - forAll(superCells, superCellI) + forAll(superCells, superCelli) { - label origCellI = superCells[superCellI]; + label origCelli = superCells[superCelli]; - cellId[labelI++] = origCellI; + cellId[labelI++] = origCelli; } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C index ed3e7ca352dc53ebfef0ef8c3e7d62aba340e7f5..052e94203d3cc5a28179ecd661bcc5c0b621917e 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C @@ -51,8 +51,8 @@ Foam::tmp<Field<Type>> Foam::surfaceMeshWriter::getFaceField } else { - label localFaceI = facei - patches[patchi].start(); - fld[i] = sfld.boundaryField()[patchi][localFaceI]; + label localFacei = facei - patches[patchi].start(); + fld[i] = sfld.boundaryField()[patchi][localFacei]; } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.C index 1f40d276e556172ab3e5705c3d61ea78acd14044..a9b6418750375600f0232a054c00b195eff3856c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.C @@ -87,9 +87,9 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) { const cell& cFaces = mesh_.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh_.faces()[cFaces[cFaceI]]; + const face& f = mesh_.faces()[cFaces[cFacei]]; label nQuads = 0; label nTris = 0; @@ -120,7 +120,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) cellTypes_.setSize(cellShapes.size() + nAddCells); // Set counters for additional points and additional cells - label addPointI = 0, addCellI = 0; + label addPointI = 0, addCelli = 0; forAll(cellShapes, celli) { @@ -200,10 +200,10 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) bool substituteCell = true; const labelList& cFaces = mesh_.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh_.faces()[cFaces[cFaceI]]; - const bool isOwner = (owner[cFaces[cFaceI]] == celli); + const face& f = mesh_.faces()[cFaces[cFacei]]; + const bool isOwner = (owner[cFaces[cFacei]] == celli); // Number of triangles and quads in decomposition label nTris = 0; @@ -219,20 +219,20 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) forAll(quadFcs, quadI) { - label thisCellI; + label thisCelli; if (substituteCell) { - thisCellI = celli; + thisCelli = celli; substituteCell = false; } else { - thisCellI = mesh_.nCells() + addCellI; - superCells_[addCellI++] = celli; + thisCelli = mesh_.nCells() + addCelli; + superCells_[addCelli++] = celli; } - labelList& addVtkVerts = vertLabels_[thisCellI]; + labelList& addVtkVerts = vertLabels_[thisCelli]; addVtkVerts.setSize(5); @@ -261,26 +261,26 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) } addVtkVerts[4] = newVertexLabel; - cellTypes_[thisCellI] = VTK_PYRAMID; + cellTypes_[thisCelli] = VTK_PYRAMID; } forAll(triFcs, triI) { - label thisCellI; + label thisCelli; if (substituteCell) { - thisCellI = celli; + thisCelli = celli; substituteCell = false; } else { - thisCellI = mesh_.nCells() + addCellI; - superCells_[addCellI++] = celli; + thisCelli = mesh_.nCells() + addCelli; + superCells_[addCelli++] = celli; } - labelList& addVtkVerts = vertLabels_[thisCellI]; + labelList& addVtkVerts = vertLabels_[thisCelli]; const face& tri = triFcs[triI]; @@ -301,7 +301,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) } addVtkVerts[3] = newVertexLabel; - cellTypes_[thisCellI] = VTK_TETRA; + cellTypes_[thisCelli] = VTK_TETRA; } } @@ -318,9 +318,9 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) label nData = 1 + cFaces.size(); // count total number of face points - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh.faces()[cFaces[cFaceI]]; + const face& f = mesh.faces()[cFaces[cFacei]]; nData += f.size(); // space for the face labels } @@ -330,10 +330,10 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) vtkVerts[nData++] = cFaces.size(); // build face stream - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh.faces()[cFaces[cFaceI]]; - const bool isOwner = (owner[cFaces[cFaceI]] == celli); + const face& f = mesh.faces()[cFaces[cFacei]]; + const bool isOwner = (owner[cFaces[cFacei]] == celli); // number of labels for this face vtkVerts[nData++] = f.size(); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFaceSet.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFaceSet.C index 02c4aea945cc5eeea49be8c30038958fa9e66ef2..4ad78d96a0d7075f16dc73444283fd98729ed4bc 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFaceSet.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFaceSet.C @@ -61,13 +61,13 @@ void Foam::writeFaceSet faceList setFaces(set.size()); labelList setFaceLabels(set.size()); - label setFaceI = 0; + label setFacei = 0; forAllConstIter(faceSet, set, iter) { - setFaceLabels[setFaceI] = iter.key(); - setFaces[setFaceI] = faces[iter.key()]; - setFaceI++; + setFaceLabels[setFacei] = iter.key(); + setFaces[setFacei] = faces[iter.key()]; + setFacei++; } primitiveFacePatch fp(setFaces, vMesh.mesh().points()); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFunsTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFunsTemplates.C index b88b9b20f8c159ac8e669a236aea9d07edca647a..5f5ddd2630123b3342d117a8c1d70491e94dd340 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFunsTemplates.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFunsTemplates.C @@ -81,11 +81,11 @@ void Foam::writeFuns::write insert(vvf.internalField(), fField); - forAll(superCells, superCellI) + forAll(superCells, superCelli) { - label origCellI = superCells[superCellI]; + label origCelli = superCells[superCelli]; - insert(vvf[origCellI], fField); + insert(vvf[origCelli], fField); } write(os, binary, fField); } @@ -115,9 +115,9 @@ void Foam::writeFuns::write forAll(addPointCellLabels, api) { - label origCellI = addPointCellLabels[api]; + label origCelli = addPointCellLabels[api]; - insert(interpolatePointToCell(pvf, origCellI), fField); + insert(interpolatePointToCell(pvf, origCelli), fField); } write(os, binary, fField); } @@ -148,9 +148,9 @@ void Foam::writeFuns::write forAll(addPointCellLabels, api) { - label origCellI = addPointCellLabels[api]; + label origCelli = addPointCellLabels[api]; - insert(vvf[origCellI], fField); + insert(vvf[origCelli], fField); } write(os, binary, fField); } diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C index ad8bf9df78ea760bb24793d728bc2939edf8d6ef..3347be70cabd2b16b1b5b2ce977b149d0c19ec3b 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C @@ -99,9 +99,9 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh { const cell& cFaces = mesh.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh.faces()[cFaces[cFaceI]]; + const face& f = mesh.faces()[cFaces[cFacei]]; label nQuads = 0; label nTris = 0; @@ -158,7 +158,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh vtkmesh->Allocate(mesh.nCells() + nAddCells); // Set counters for additional points and additional cells - label addPointI = 0, addCellI = 0; + label addPointI = 0, addCelli = 0; // Create storage for points - needed for mapping from OpenFOAM to VTK // data types - max 'order' = hex = 8 points @@ -173,7 +173,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh const cellShape& cellShape = cellShapes[celli]; const cellModel& cellModel = cellShape.model(); - superCells[addCellI++] = celli; + superCells[addCelli++] = celli; if (cellModel == tet) { @@ -280,9 +280,9 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh vtkIdType nLabels = nFaces; // count size for face stream - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh.faces()[cFaces[cFaceI]]; + const face& f = mesh.faces()[cFaces[cFacei]]; nLabels += f.size(); } @@ -292,10 +292,10 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh faceStream.clear(); faceStream.reserve(nLabels + nFaces); - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh.faces()[cFaces[cFaceI]]; - const bool isOwner = (owner[cFaces[cFaceI]] == celli); + const face& f = mesh.faces()[cFaces[cFacei]]; + const bool isOwner = (owner[cFaces[cFacei]] == celli); const label nFacePoints = f.size(); // number of labels for this face @@ -327,9 +327,9 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh // establish unique node ids used HashSet<vtkIdType, Hash<label>> hashUniqId(2*256); - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh.faces()[cFaces[cFaceI]]; + const face& f = mesh.faces()[cFaces[cFacei]]; forAll(f, fp) { @@ -363,10 +363,10 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh bool substituteCell = true; const labelList& cFaces = mesh.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh.faces()[cFaces[cFaceI]]; - const bool isOwner = (owner[cFaces[cFaceI]] == celli); + const face& f = mesh.faces()[cFaces[cFacei]]; + const bool isOwner = (owner[cFaces[cFacei]] == celli); // Number of triangles and quads in decomposition label nTris = 0; @@ -388,7 +388,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh } else { - superCells[addCellI++] = celli; + superCells[addCelli++] = celli; } const face& quad = quadFcs[quadI]; @@ -431,7 +431,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh } else { - superCells[addCellI++] = celli; + superCells[addCelli++] = celli; } const face& tri = triFcs[triI]; diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshVolume.C index 8e77847e95714152a87183fdf738c1475afa39fa..d34656d3d73d761a3d8c9fa1d03dd01c1e0d0826 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshVolume.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshVolume.C @@ -99,9 +99,9 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh { const cell& cFaces = mesh.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh.faces()[cFaces[cFaceI]]; + const face& f = mesh.faces()[cFaces[cFacei]]; label nQuads = 0; label nTris = 0; @@ -158,7 +158,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh vtkmesh->Allocate(mesh.nCells() + nAddCells); // Set counters for additional points and additional cells - label addPointI = 0, addCellI = 0; + label addPointI = 0, addCelli = 0; // Create storage for points - needed for mapping from OpenFOAM to VTK // data types - max 'order' = hex = 8 points @@ -173,7 +173,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh const cellShape& cellShape = cellShapes[celli]; const cellModel& cellModel = cellShape.model(); - superCells[addCellI++] = celli; + superCells[addCelli++] = celli; if (cellModel == tet) { @@ -280,9 +280,9 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh vtkIdType nLabels = nFaces; // count size for face stream - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh.faces()[cFaces[cFaceI]]; + const face& f = mesh.faces()[cFaces[cFacei]]; nLabels += f.size(); } @@ -292,10 +292,10 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh faceStream.clear(); faceStream.reserve(nLabels + nFaces); - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh.faces()[cFaces[cFaceI]]; - const bool isOwner = (owner[cFaces[cFaceI]] == celli); + const face& f = mesh.faces()[cFaces[cFacei]]; + const bool isOwner = (owner[cFaces[cFacei]] == celli); const label nFacePoints = f.size(); // number of labels for this face @@ -327,9 +327,9 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh // establish unique node ids used HashSet<vtkIdType, Hash<label>> hashUniqId(2*256); - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh.faces()[cFaces[cFaceI]]; + const face& f = mesh.faces()[cFaces[cFacei]]; forAll(f, fp) { @@ -363,10 +363,10 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh bool substituteCell = true; const labelList& cFaces = mesh.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh.faces()[cFaces[cFaceI]]; - const bool isOwner = (owner[cFaces[cFaceI]] == celli); + const face& f = mesh.faces()[cFaces[cFacei]]; + const bool isOwner = (owner[cFaces[cFacei]] == celli); // Number of triangles and quads in decomposition label nTris = 0; @@ -388,7 +388,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh } else { - superCells[addCellI++] = celli; + superCells[addCelli++] = celli; } const face& quad = quadFcs[quadI]; @@ -431,7 +431,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh } else { - superCells[addCellI++] = celli; + superCells[addCelli++] = celli; } const face& tri = triFcs[triI]; diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C index 590306a3ea718e0ab4339e1e0667492d5a0fda93..b7f8654dacd0b9324ec238decfb3bf79202589fc 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C @@ -103,10 +103,10 @@ int main(int argc, char *argv[]) labelList numIds = maxIds + 1; Info<< nl << "Particle statistics:" << endl; - forAll(maxIds, procI) + forAll(maxIds, proci) { - Info<< " Found " << numIds[procI] << " particles originating" - << " from processor " << procI << endl; + Info<< " Found " << numIds[proci] << " particles originating" + << " from processor " << proci << endl; } Info<< nl << endl; @@ -169,13 +169,13 @@ int main(int argc, char *argv[]) Info<< " Constructing tracks" << nl << endl; if (Pstream::master()) { - forAll(allPositions, procI) + forAll(allPositions, proci) { - forAll(allPositions[procI], i) + forAll(allPositions[proci], i) { label globalId = - startIds[allOrigProcs[procI][i]] - + allOrigIds[procI][i]; + startIds[allOrigProcs[proci][i]] + + allOrigIds[proci][i]; if (globalId % sampleFrequency == 0) { @@ -184,7 +184,7 @@ int main(int argc, char *argv[]) { allTracks[trackId].append ( - allPositions[procI][i] + allPositions[proci][i] ); } } diff --git a/applications/utilities/postProcessing/miscellaneous/foamListTimes/foamListTimes.C b/applications/utilities/postProcessing/miscellaneous/foamListTimes/foamListTimes.C index 88be47e53dfd9a44652a168ccfbdaa6df16c0ead..9b21a00fee4bc02f06744e79de636e1fbc8c8de9 100644 --- a/applications/utilities/postProcessing/miscellaneous/foamListTimes/foamListTimes.C +++ b/applications/utilities/postProcessing/miscellaneous/foamListTimes/foamListTimes.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -88,16 +88,16 @@ int main(int argc, char *argv[]) // Create the processor databases databases.setSize(nProcs); - forAll(databases, procI) + forAll(databases, proci) { databases.set ( - procI, + proci, new Time ( Time::controlDictName, args.rootPath(), - args.caseName()/fileName(word("processor") + name(procI)) + args.caseName()/fileName(word("processor") + name(proci)) ) ); } @@ -128,11 +128,11 @@ int main(int argc, char *argv[]) { if (args.optionFound("processor")) { - for (label procI=0; procI<nProcs; procI++) + for (label proci=0; proci<nProcs; proci++) { fileName procPath ( - args.path()/(word("processor") + name(procI)) + args.path()/(word("processor") + name(proci)) ); forAll(timeDirs, timeI) diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C index ef4f7a57227f88d91f9d96d0fd2799a73a3e78c5..11fc19ac3e6144e028d76f52174a527810296dcb 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C @@ -109,9 +109,9 @@ void Foam::channelIndex::walkOppositeFaces { const cell& ownCell = cells[mesh.faceOwner()[facei]]; - label oppositeFaceI = ownCell.opposingFaceLabel(facei, faces); + label oppositeFacei = ownCell.opposingFaceLabel(facei, faces); - if (oppositeFaceI == -1) + if (oppositeFacei == -1) { FatalErrorInFunction << "Face:" << facei << " owner cell:" << ownCell @@ -119,10 +119,10 @@ void Foam::channelIndex::walkOppositeFaces } else { - if (!blockedFace[oppositeFaceI]) + if (!blockedFace[oppositeFacei]) { - blockedFace[oppositeFaceI] = true; - newFrontFaces.append(oppositeFaceI); + blockedFace[oppositeFacei] = true; + newFrontFaces.append(oppositeFacei); } } } @@ -131,9 +131,9 @@ void Foam::channelIndex::walkOppositeFaces { const cell& neiCell = mesh.cells()[mesh.faceNeighbour()[facei]]; - label oppositeFaceI = neiCell.opposingFaceLabel(facei, faces); + label oppositeFacei = neiCell.opposingFaceLabel(facei, faces); - if (oppositeFaceI == -1) + if (oppositeFacei == -1) { FatalErrorInFunction << "Face:" << facei << " neighbour cell:" << neiCell @@ -141,10 +141,10 @@ void Foam::channelIndex::walkOppositeFaces } else { - if (!blockedFace[oppositeFaceI]) + if (!blockedFace[oppositeFacei]) { - blockedFace[oppositeFaceI] = true; - newFrontFaces.append(oppositeFaceI); + blockedFace[oppositeFacei] = true; + newFrontFaces.append(oppositeFacei); } } } diff --git a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C index 3427026e936735fa1ea6b089bbe0ede9266e374e..5de3e18624ef9edd5fbb0e8b9843084aa953d833 100644 --- a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C +++ b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C @@ -118,8 +118,8 @@ void rewriteBoundary // Add new entries - label addedPatchI = nOldPatches; - label newPatchI = 0; + label addedPatchi = nOldPatches; + label newPatchi = 0; forAll(oldPatches, patchi) { const dictionary& patchDict = oldPatches[patchi].dict(); @@ -134,7 +134,7 @@ void rewriteBoundary if (patchDict.found("neighbourPatch")) { patches.set(patchi, oldPatches.set(patchi, NULL)); - oldToNew[patchi] = newPatchI++; + oldToNew[patchi] = newPatchi++; // Check if patches come from automatic conversion word oldName; @@ -182,7 +182,7 @@ void rewriteBoundary // Change entry on this side patches.set(patchi, oldPatches.set(patchi, NULL)); - oldToNew[patchi] = newPatchI++; + oldToNew[patchi] = newPatchi++; dictionary& thisPatchDict = patches[patchi].dict(); thisPatchDict.add("neighbourPatch", nbrName); thisPatchDict.set("nFaces", nFaces/2); @@ -191,7 +191,7 @@ void rewriteBoundary // Add entry on other side patches.set ( - addedPatchI, + addedPatchi, new dictionaryEntry ( nbrName, @@ -199,12 +199,12 @@ void rewriteBoundary patchDict ) ); - oldToNew[addedPatchI] = newPatchI++; - dictionary& nbrPatchDict = patches[addedPatchI].dict(); + oldToNew[addedPatchi] = newPatchi++; + dictionary& nbrPatchDict = patches[addedPatchi].dict(); nbrPatchDict.set("neighbourPatch", thisName); nbrPatchDict.set("nFaces", nFaces/2); nbrPatchDict.set("startFace", startFace+nFaces/2); - patches[addedPatchI].keyword() = nbrName; + patches[addedPatchi].keyword() = nbrName; Info<< "Replaced with patches" << nl << patches[patchi].keyword() << " with" << nl @@ -213,7 +213,7 @@ void rewriteBoundary << nl << " startFace : " << readLabel(thisPatchDict.lookup("startFace")) << nl - << patches[addedPatchI].keyword() << " with" << nl + << patches[addedPatchi].keyword() << " with" << nl << " nFaces : " << readLabel(nbrPatchDict.lookup("nFaces")) << nl @@ -221,13 +221,13 @@ void rewriteBoundary << readLabel(nbrPatchDict.lookup("startFace")) << nl << endl; - addedPatchI++; + addedPatchi++; } } else { patches.set(patchi, oldPatches.set(patchi, NULL)); - oldToNew[patchi] = newPatchI++; + oldToNew[patchi] = newPatchi++; } } diff --git a/applications/utilities/preProcessing/mapFields/mapFields.C b/applications/utilities/preProcessing/mapFields/mapFields.C index 2147dbfeb3f7a83de4454f828ff18618bb2dd041..16e70e88e8ed015a41cfcb564350403f547eddfa 100644 --- a/applications/utilities/preProcessing/mapFields/mapFields.C +++ b/applications/utilities/preProcessing/mapFields/mapFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -348,15 +348,15 @@ int main(int argc, char *argv[]) Info<< "Target mesh size: " << meshTarget.nCells() << endl; - for (int procI=0; procI<nProcs; procI++) + for (int proci=0; proci<nProcs; proci++) { - Info<< nl << "Source processor " << procI << endl; + Info<< nl << "Source processor " << proci << endl; Time runTimeSource ( Time::controlDictName, rootDirSource, - caseDirSource/fileName(word("processor") + name(procI)) + caseDirSource/fileName(word("processor") + name(proci)) ); #include "setTimeIndex.H" @@ -429,15 +429,15 @@ int main(int argc, char *argv[]) Info<< "Source mesh size: " << meshSource.nCells() << endl; - for (int procI=0; procI<nProcs; procI++) + for (int proci=0; proci<nProcs; proci++) { - Info<< nl << "Target processor " << procI << endl; + Info<< nl << "Target processor " << proci << endl; Time runTimeTarget ( Time::controlDictName, rootDirTarget, - caseDirTarget/fileName(word("processor") + name(procI)) + caseDirTarget/fileName(word("processor") + name(proci)) ); fvMesh meshTarget diff --git a/applications/utilities/preProcessing/mapFields/mapLagrangian.C b/applications/utilities/preProcessing/mapFields/mapLagrangian.C index 77a6ec3a4d51841111197dd0de31a59ddb11e4ee..ad80ba3d07c632dc2d8ffdcdbb64159c3fa3724b 100644 --- a/applications/utilities/preProcessing/mapFields/mapLagrangian.C +++ b/applications/utilities/preProcessing/mapFields/mapLagrangian.C @@ -40,12 +40,12 @@ static const scalar perturbFactor = 1e-6; static label findCell(const Cloud<passiveParticle>& cloud, const point& pt) { label celli = -1; - label tetFaceI = -1; + label tetFacei = -1; label tetPtI = -1; const polyMesh& mesh = cloud.pMesh(); - mesh.findCellFacePt(pt, celli, tetFaceI, tetPtI); + mesh.findCellFacePt(pt, celli, tetFacei, tetPtI); if (celli >= 0) { @@ -70,7 +70,7 @@ static label findCell(const Cloud<passiveParticle>& cloud, const point& pt) const point perturbPt = (1-perturbFactor)*pt+perturbFactor*cc; - mesh.findCellFacePt(perturbPt, celli, tetFaceI, tetPtI); + mesh.findCellFacePt(perturbPt, celli, tetFacei, tetPtI); return celli; } diff --git a/applications/utilities/preProcessing/mapFieldsPar/mapLagrangian.C b/applications/utilities/preProcessing/mapFieldsPar/mapLagrangian.C index c702b6fc01174d068c228707c9f6bd919599d691..c3fb39426fa00f9919df274f7c8111b0eabe76fa 100644 --- a/applications/utilities/preProcessing/mapFieldsPar/mapLagrangian.C +++ b/applications/utilities/preProcessing/mapFieldsPar/mapLagrangian.C @@ -40,12 +40,12 @@ static const scalar perturbFactor = 1e-6; static label findCell(const Cloud<passiveParticle>& cloud, const point& pt) { label celli = -1; - label tetFaceI = -1; + label tetFacei = -1; label tetPtI = -1; const polyMesh& mesh = cloud.pMesh(); - mesh.findCellFacePt(pt, celli, tetFaceI, tetPtI); + mesh.findCellFacePt(pt, celli, tetFacei, tetPtI); if (celli >= 0) { @@ -70,7 +70,7 @@ static label findCell(const Cloud<passiveParticle>& cloud, const point& pt) const point perturbPt = (1-perturbFactor)*pt+perturbFactor*cc; - mesh.findCellFacePt(perturbPt, celli, tetFaceI, tetPtI); + mesh.findCellFacePt(perturbPt, celli, tetFacei, tetPtI); return celli; } diff --git a/applications/utilities/preProcessing/setFields/setFields.C b/applications/utilities/preProcessing/setFields/setFields.C index 019cd0e67f2be63f3a688acd476e8f71a51b934e..12e66bad60b017422c25d87cc0111595e81bbe9e 100644 --- a/applications/utilities/preProcessing/setFields/setFields.C +++ b/applications/utilities/preProcessing/setFields/setFields.C @@ -267,9 +267,9 @@ bool setFaceFieldType } else { - label bFaceI = facei-mesh.nInternalFaces(); - allBoundaryValues[bFaceI] = value; - nChanged[mesh.boundaryMesh().patchID()[bFaceI]]++; + label bFacei = facei-mesh.nInternalFaces(); + allBoundaryValues[bFacei] = value; + nChanged[mesh.boundaryMesh().patchID()[bFacei]]++; } } diff --git a/applications/utilities/preProcessing/viewFactorsGen/shootRays.H b/applications/utilities/preProcessing/viewFactorsGen/shootRays.H index 20d1c5066d308df6c5fd0793e0ac36c735ba0b38..a9f9496cf284e044251e90b44116606de3ef46d6 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/shootRays.H +++ b/applications/utilities/preProcessing/viewFactorsGen/shootRays.H @@ -7,9 +7,9 @@ const label maxDynListLength viewFactorDict.lookupOrDefault<label>("maxDynListLength", 100000) ); -for (label procI = 0; procI < Pstream::nProcs(); procI++) +for (label proci = 0; proci < Pstream::nProcs(); proci++) { - // Shoot rays from me to procI. Note that even if processor has + // Shoot rays from me to proci. Note that even if processor has // 0 faces we still need to call findLine to keep calls synced. DynamicField<point> start(coarseMesh.nFaces()); @@ -25,9 +25,9 @@ for (label procI = 0; procI < Pstream::nProcs(); procI++) const vectorField& myArea = remoteCoarseSf[Pstream::myProcNo()]; const labelField& myAgg = remoteCoarseAgg[Pstream::myProcNo()]; - const pointField& remoteArea = remoteCoarseSf[procI]; - const pointField& remoteFc = remoteCoarseCf[procI]; - const labelField& remoteAgg = remoteCoarseAgg[procI]; + const pointField& remoteArea = remoteCoarseSf[proci]; + const pointField& remoteFc = remoteCoarseCf[proci]; + const labelField& remoteAgg = remoteCoarseAgg[proci]; label i = 0; label j = 0; @@ -41,7 +41,7 @@ for (label procI = 0; procI < Pstream::nProcs(); procI++) for (; j < remoteFc.size(); j++) { - if (procI != Pstream::myProcNo() || i != j) + if (proci != Pstream::myProcNo() || i != j) { const point& remFc = remoteFc[j]; const vector& remA = remoteArea[j]; @@ -53,11 +53,11 @@ for (label procI = 0; procI < Pstream::nProcs(); procI++) { start.append(fc + 0.001*d); startIndex.append(i); - startAgg.append(globalNumbering.toGlobal(procI, fAgg)); + startAgg.append(globalNumbering.toGlobal(proci, fAgg)); end.append(fc + 0.999*d); - label globalI = globalNumbering.toGlobal(procI, j); + label globalI = globalNumbering.toGlobal(proci, j); endIndex.append(globalI); - endAgg.append(globalNumbering.toGlobal(procI, remAgg)); + endAgg.append(globalNumbering.toGlobal(proci, remAgg)); if (startIndex.size() > maxDynListLength) { FatalErrorInFunction diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C index 23ca4d734f2dc0ad4685087044317a9d27046490..0d4a4bca38ec8e37702efff8b39f5ce3ac4b2257 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C +++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C @@ -75,8 +75,8 @@ triSurface triangulate mesh.nFaces() - mesh.nInternalFaces() ); - label newPatchI = 0; - label localTriFaceI = 0; + label newPatchi = 0; + label localTriFacei = 0; forAllConstIter(labelHashSet, includePatches, iter) { @@ -86,9 +86,9 @@ triSurface triangulate label nTriTotal = 0; - forAll(patch, patchFaceI) + forAll(patch, patchFacei) { - const face& f = patch[patchFaceI]; + const face& f = patch[patchFacei]; faceList triFaces(f.nTriangles(points)); @@ -96,27 +96,27 @@ triSurface triangulate f.triangles(points, nTri, triFaces); - forAll(triFaces, triFaceI) + forAll(triFaces, triFacei) { - const face& f = triFaces[triFaceI]; + const face& f = triFaces[triFacei]; - triangles.append(labelledTri(f[0], f[1], f[2], newPatchI)); + triangles.append(labelledTri(f[0], f[1], f[2], newPatchi)); nTriTotal++; - triSurfaceToAgglom[localTriFaceI++] = globalNumbering.toGlobal + triSurfaceToAgglom[localTriFacei++] = globalNumbering.toGlobal ( Pstream::myProcNo(), - finalAgglom[patchi][patchFaceI] + finalAgglom[patchi][patchFacei] + coarsePatches[patchi].start() ); } } - newPatchI++; + newPatchi++; } - triSurfaceToAgglom.resize(localTriFaceI); + triSurfaceToAgglom.resize(localTriFacei); triangles.shrink(); @@ -131,20 +131,20 @@ triSurface triangulate ); // Add patch names to surface - surface.patches().setSize(newPatchI); + surface.patches().setSize(newPatchi); - newPatchI = 0; + newPatchi = 0; forAllConstIter(labelHashSet, includePatches, iter) { const label patchi = iter.key(); const polyPatch& patch = bMesh[patchi]; - surface.patches()[newPatchI].index() = patchi; - surface.patches()[newPatchI].name() = patch.name(); - surface.patches()[newPatchI].geometricType() = patch.type(); + surface.patches()[newPatchi].index() = patchi; + surface.patches()[newPatchi].name() = patch.name(); + surface.patches()[newPatchi].geometricType() = patch.type(); - newPatchI++; + newPatchi++; } return surface; @@ -222,7 +222,7 @@ scalar calculateViewFactorFij void insertMatrixElements ( const globalIndex& globalNumbering, - const label fromProcI, + const label fromProci, const labelListList& globalFaceFaces, const scalarListList& viewFactors, scalarSquareMatrix& matrix @@ -233,7 +233,7 @@ void insertMatrixElements const scalarList& vf = viewFactors[facei]; const labelList& globalFaces = globalFaceFaces[facei]; - label globalI = globalNumbering.toGlobal(fromProcI, facei); + label globalI = globalNumbering.toGlobal(fromProci, facei); forAll(globalFaces, i) { matrix[globalI][globalFaces[i]] = vf[i]; @@ -401,8 +401,8 @@ int main(int argc, char *argv[]) { point cf = coarseCf[facei]; - const label coarseFaceI = coarsePatchFace[facei]; - const labelList& fineFaces = coarseToFine[coarseFaceI]; + const label coarseFacei = coarsePatchFace[facei]; + const labelList& fineFaces = coarseToFine[coarseFacei]; const label agglomI = agglom[fineFaces[0]] + coarsePatches[patchID].start(); @@ -611,8 +611,8 @@ int main(int argc, char *argv[]) List<point>& fineCf = compactFineCf[compactI]; List<point>& fineSf = compactFineSf[compactI++]; - const label coarseFaceI = coarsePatchFace[coarseI]; - const labelList& fineFaces = coarseToFine[coarseFaceI]; + const label coarseFacei = coarsePatchFace[coarseI]; + const labelList& fineFaces = coarseToFine[coarseFacei]; fineCf.setSize(fineFaces.size()); fineSf.setSize(fineFaces.size()); @@ -620,12 +620,12 @@ int main(int argc, char *argv[]) fineCf = UIndirectList<point> ( mesh.Cf().boundaryField()[patchID], - coarseToFine[coarseFaceI] + coarseToFine[coarseFacei] ); fineSf = UIndirectList<point> ( mesh.Sf().boundaryField()[patchID], - coarseToFine[coarseFaceI] + coarseToFine[coarseFacei] ); } } @@ -688,20 +688,20 @@ int main(int argc, char *argv[]) if (mesh.nSolutionD() == 3) { - forAll(localCoarseSf, coarseFaceI) + forAll(localCoarseSf, coarseFacei) { - const List<point>& localFineSf = compactFineSf[coarseFaceI]; + const List<point>& localFineSf = compactFineSf[coarseFacei]; const vector Ai = sum(localFineSf); - const List<point>& localFineCf = compactFineCf[coarseFaceI]; - const label fromPatchId = compactPatchId[coarseFaceI]; + const List<point>& localFineCf = compactFineCf[coarseFacei]; + const label fromPatchId = compactPatchId[coarseFacei]; patchArea[fromPatchId] += mag(Ai); - const labelList& visCoarseFaces = visibleFaceFaces[coarseFaceI]; + const labelList& visCoarseFaces = visibleFaceFaces[coarseFacei]; - forAll(visCoarseFaces, visCoarseFaceI) + forAll(visCoarseFaces, visCoarseFacei) { - F[coarseFaceI].setSize(visCoarseFaces.size()); - label compactJ = visCoarseFaces[visCoarseFaceI]; + F[coarseFacei].setSize(visCoarseFaces.size()); + label compactJ = visCoarseFaces[visCoarseFacei]; const List<point>& remoteFineSj = compactFineSf[compactJ]; const List<point>& remoteFineCj = compactFineCf[compactJ]; @@ -729,7 +729,7 @@ int main(int argc, char *argv[]) Fij += dIntFij; } } - F[coarseFaceI][visCoarseFaceI] = Fij/mag(Ai); + F[coarseFacei][visCoarseFacei] = Fij/mag(Ai); sumViewFactorPatch[fromPatchId][toPatchId] += Fij; } } @@ -749,22 +749,22 @@ int main(int argc, char *argv[]) scalar wideBy2 = (box.span() & emptyDir)*2.0; - forAll(localCoarseSf, coarseFaceI) + forAll(localCoarseSf, coarseFacei) { - const vector& Ai = localCoarseSf[coarseFaceI]; - const vector& Ci = localCoarseCf[coarseFaceI]; + const vector& Ai = localCoarseSf[coarseFacei]; + const vector& Ci = localCoarseCf[coarseFacei]; vector Ain = Ai/mag(Ai); vector R1i = Ci + (mag(Ai)/wideBy2)*(Ain ^ emptyDir); vector R2i = Ci - (mag(Ai)/wideBy2)*(Ain ^ emptyDir) ; - const label fromPatchId = compactPatchId[coarseFaceI]; + const label fromPatchId = compactPatchId[coarseFacei]; patchArea[fromPatchId] += mag(Ai); - const labelList& visCoarseFaces = visibleFaceFaces[coarseFaceI]; - forAll(visCoarseFaces, visCoarseFaceI) + const labelList& visCoarseFaces = visibleFaceFaces[coarseFacei]; + forAll(visCoarseFaces, visCoarseFacei) { - F[coarseFaceI].setSize(visCoarseFaces.size()); - label compactJ = visCoarseFaces[visCoarseFaceI]; + F[coarseFacei].setSize(visCoarseFaces.size()); + label compactJ = visCoarseFaces[visCoarseFacei]; const vector& Aj = compactCoarseSf[compactJ]; const vector& Cj = compactCoarseCf[compactJ]; @@ -781,7 +781,7 @@ int main(int argc, char *argv[]) scalar Fij = mag((d1 + d2) - (s1 + s2))/(4.0*mag(Ai)/wideBy2); - F[coarseFaceI][visCoarseFaceI] = Fij; + F[coarseFacei][visCoarseFacei] = Fij; sumViewFactorPatch[fromPatchId][toPatchId] += Fij*mag(Ai); } } @@ -873,15 +873,15 @@ int main(int argc, char *argv[]) } - forAll(compactMap, procI) + forAll(compactMap, proci) { - const Map<label>& localToCompactMap = compactMap[procI]; + const Map<label>& localToCompactMap = compactMap[proci]; forAllConstIter(Map<label>, localToCompactMap, iter) { compactToGlobal[iter()] = globalNumbering.toGlobal ( - procI, + proci, iter.key() ); } diff --git a/applications/utilities/surface/surfaceAdd/surfaceAdd.C b/applications/utilities/surface/surfaceAdd/surfaceAdd.C index f86eac19e6c5dd286517bbc29353ea545ae0220b..9628d48fea4a1588981b77a219d889f00bc177e5 100644 --- a/applications/utilities/surface/surfaceAdd/surfaceAdd.C +++ b/applications/utilities/surface/surfaceAdd/surfaceAdd.C @@ -244,16 +244,16 @@ int main(int argc, char *argv[]) newPatches.setSize(nRegions1 + nRegions2); - label newPatchI = 0; + label newPatchi = 0; forAll(surface1.patches(), patchi) { - newPatches[newPatchI++] = surface1.patches()[patchi]; + newPatches[newPatchi++] = surface1.patches()[patchi]; } forAll(surface2.patches(), patchi) { - newPatches[newPatchI++] = surface2.patches()[patchi]; + newPatches[newPatchi++] = surface2.patches()[patchi]; } } diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C index 9a265fc113864d8496d32f19aa1450156ce1cec6..e763402fc92969f5575a22dc2b571836cfa21eaa 100644 --- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C +++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C @@ -83,15 +83,15 @@ bool validTri // Note: discards normal information - sides of baffle are merged. forAll(fFaces, i) { - label nbrFaceI = fFaces[i]; + label nbrFacei = fFaces[i]; - if (nbrFaceI <= facei) + if (nbrFacei <= facei) { // lower numbered faces already checked continue; } - const labelledTri& nbrF = surf[nbrFaceI]; + const labelledTri& nbrF = surf[nbrFacei]; if ( @@ -102,7 +102,7 @@ bool validTri { WarningInFunction << "triangle " << facei << " vertices " << f - << " has the same vertices as triangle " << nbrFaceI + << " has the same vertices as triangle " << nbrFacei << " vertices " << nbrF << " coords:" << f.points(surf.points()) << endl; @@ -534,9 +534,9 @@ int main(int argc, char *argv[]) if (myFaces.size() > 2) { - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - problemFaces.append(myFaces[myFaceI]); + problemFaces.append(myFaces[myFacei]); } nMultEdges++; diff --git a/applications/utilities/surface/surfaceClean/collapseBase.C b/applications/utilities/surface/surfaceClean/collapseBase.C index 72945ac9bbb7363d9a7cfcafa26c6ba27a615378..17152e6a91f41dd9175bcb9bc8f047d7cc2f9c12 100644 --- a/applications/utilities/surface/surfaceClean/collapseBase.C +++ b/applications/utilities/surface/surfaceClean/collapseBase.C @@ -405,28 +405,28 @@ static void markRegion forAll(eFaces, i) { - label nbrFaceI = eFaces[i]; + label nbrFacei = eFaces[i]; - if (faceToEdge[nbrFaceI] != -1) + if (faceToEdge[nbrFacei] != -1) { - if (collapseRegion[nbrFaceI] == -1) + if (collapseRegion[nbrFacei] == -1) { markRegion ( surf, faceToEdge, regionI, - nbrFaceI, + nbrFacei, collapseRegion ); } - else if (collapseRegion[nbrFaceI] != regionI) + else if (collapseRegion[nbrFacei] != regionI) { FatalErrorInFunction << "Edge:" << edgeI << " between face " << facei << " with region " << regionI - << " and face " << nbrFaceI - << " with region " << collapseRegion[nbrFaceI] + << " and face " << nbrFacei + << " with region " << collapseRegion[nbrFacei] << endl; } } diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C index f1894297f760f34d19a53bb61832ccd4d12291c4..84f00b698750453f01055ac287b6827a7266220c 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C @@ -752,9 +752,9 @@ surfaceFeatures::edgeStatus checkFlatRegionEdge DynamicList<Foam::vector> normals(2); DynamicList<labelList> bins(2); - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - const Foam::vector& n = surf.faceNormals()[eFaces[eFaceI]]; + const Foam::vector& n = surf.faceNormals()[eFaces[eFacei]]; // Find the normal in normals label index = -1; @@ -769,7 +769,7 @@ surfaceFeatures::edgeStatus checkFlatRegionEdge if (index != -1) { - bins[index].append(eFaceI); + bins[index].append(eFacei); } else if (normals.size() >= 2) { @@ -783,7 +783,7 @@ surfaceFeatures::edgeStatus checkFlatRegionEdge else { normals.append(n); - bins.append(labelList(1, eFaceI)); + bins.append(labelList(1, eFacei)); } } diff --git a/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C b/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C index 98495bd264c628649bc4dda65bf25082e8f203b2..0f46efa880b2c9ea74b9633f26ab0bee8b9d00e0 100644 --- a/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C +++ b/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C @@ -531,11 +531,11 @@ int main(int argc, char *argv[]) visitedFace[hitSurfI][facei] = true; - forAll(newFacesFromSplit, newFaceI) + forAll(newFacesFromSplit, newFacei) { - const labelledTri& fN = newFacesFromSplit[newFaceI]; + const labelledTri& fN = newFacesFromSplit[newFacei]; - if (newFaceI == 0) + if (newFacei == 0) { newFaces[hitSurfI][facei] = fN; } diff --git a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C index 3d829e89030c61d2cdf499cae0881e3b401c436e..91bd1c762e5eed203af71ee9d52ea08395b48a05 100644 --- a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C +++ b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C @@ -76,19 +76,19 @@ void writeProcStats Pstream::gatherList(nFaces); Pstream::scatterList(nFaces); - forAll(surfBb, procI) + forAll(surfBb, proci) { - const List<treeBoundBox>& bbs = meshBb[procI]; + const List<treeBoundBox>& bbs = meshBb[proci]; - Info<< "processor" << procI << nl + Info<< "processor" << proci << nl << "\tMesh bounds : " << bbs[0] << nl; for (label i = 1; i < bbs.size(); i++) { Info<< "\t " << bbs[i]<< nl; } - Info<< "\tSurface bounding box : " << surfBb[procI] << nl - << "\tTriangles : " << nFaces[procI] << nl - << "\tVertices : " << nPoints[procI] + Info<< "\tSurface bounding box : " << surfBb[proci] << nl + << "\tTriangles : " << nFaces[proci] << nl + << "\tVertices : " << nPoints[proci] << endl; } Info<< endl; diff --git a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C index fe899e6e399c9e19df5d807c23dd42eeb79ddf7d..3162b2a120996a5b397b3a18202c46a8e5476c03 100644 --- a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C +++ b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C @@ -357,7 +357,7 @@ void walkSplitLine const boolList& borderEdge, const labelList& borderPoint, - const label startFaceI, + const label startFacei, const label startEdgeI, // is border edge const label startPointI, // is border point @@ -365,7 +365,7 @@ void walkSplitLine Map<label>& faceToPoint ) { - label facei = startFaceI; + label facei = startFacei; label edgeI = startEdgeI; label pointI = startPointI; @@ -446,7 +446,7 @@ void walkSplitLine label sharedFace ( const triSurface& surf, - const label firstFaceI, + const label firstFacei, const label sharedEdgeI ) { @@ -454,7 +454,7 @@ label sharedFace const edge& e = surf.edges()[sharedEdgeI]; - const triSurface::FaceType& f = surf.localFaces()[firstFaceI]; + const triSurface::FaceType& f = surf.localFaces()[firstFacei]; label startIndex = findIndex(f, e.start()); @@ -467,16 +467,16 @@ label sharedFace const labelList& eFaces = surf.sortedEdgeFaces()[sharedEdgeI]; // Get position of face in sorted edge faces - label faceIndex = findIndex(eFaces, firstFaceI); + label faceIndex = findIndex(eFaces, firstFacei); if (edgeOrder) { - // Get face before firstFaceI + // Get face before firstFacei return eFaces[eFaces.rcIndex(faceIndex)]; } else { - // Get face after firstFaceI + // Get face after firstFacei return eFaces[eFaces.fcIndex(faceIndex)]; } } @@ -808,17 +808,17 @@ int main(int argc, char *argv[]) // Pick any face using edge to start from. const labelList& eFaces = surf.edgeFaces()[startEdgeI]; - label firstFaceI = eFaces[0]; + label firstFacei = eFaces[0]; // Find second face which is from same surface i.e. has outwards // pointing normal as well (actually bit more complex than this) - label secondFaceI = sharedFace(surf, firstFaceI, startEdgeI); + label secondFacei = sharedFace(surf, firstFacei, startEdgeI); Info<< "Starting local walk from:" << endl << " edge :" << startEdgeI << endl << " point:" << startPointI << endl - << " face0:" << firstFaceI << endl - << " face1:" << secondFaceI << endl + << " face0:" << firstFacei << endl + << " face1:" << secondFacei << endl << endl; // From face on border edge to edge. @@ -826,7 +826,7 @@ int main(int argc, char *argv[]) // From face connected to border point (but not border edge) to point. Map<label> faceToPoint(2*nBorderPoints); - faceToEdge.insert(firstFaceI, startEdgeI); + faceToEdge.insert(firstFacei, startEdgeI); walkSplitLine ( @@ -834,7 +834,7 @@ int main(int argc, char *argv[]) borderEdge, borderPoint, - firstFaceI, + firstFacei, startEdgeI, startPointI, @@ -842,7 +842,7 @@ int main(int argc, char *argv[]) faceToPoint ); - faceToEdge.insert(secondFaceI, startEdgeI); + faceToEdge.insert(secondFacei, startEdgeI); walkSplitLine ( @@ -850,7 +850,7 @@ int main(int argc, char *argv[]) borderEdge, borderPoint, - secondFaceI, + secondFacei, startEdgeI, startPointI, diff --git a/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C b/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C index b81d7c825b1c7e36928e8a266d0c871e9717bc4c..ce93675595b18e1f6f9db39a615d5b93a9546545 100644 --- a/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C +++ b/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C @@ -112,12 +112,12 @@ bool repatchFace { bool changed = false; - label bFaceI = facei - mesh.nInternalFaces(); + label bFacei = facei - mesh.nInternalFaces(); - if (nearest[bFaceI] != -1) + if (nearest[bFacei] != -1) { // Use boundary mesh one. - label bMeshPatchID = bMesh.whichPatch(nearest[bFaceI]); + label bMeshPatchID = bMesh.whichPatch(nearest[bFacei]); label patchID = surfToMeshPatch[bMeshPatchID]; @@ -255,11 +255,11 @@ int main(int argc, char *argv[]) // Dump unmatched faces to faceSet for debugging. faceSet unmatchedFaces(mesh, "unmatchedFaces", nearest.size()/100); - forAll(nearest, bFaceI) + forAll(nearest, bFacei) { - if (nearest[bFaceI] == -1) + if (nearest[bFacei] == -1) { - unmatchedFaces.insert(mesh.nInternalFaces() + bFaceI); + unmatchedFaces.insert(mesh.nInternalFaces() + bFacei); } } @@ -293,9 +293,9 @@ int main(int argc, char *argv[]) } else { - forAll(nearest, bFaceI) + forAll(nearest, bFacei) { - label facei = mesh.nInternalFaces() + bFaceI; + label facei = mesh.nInternalFaces() + bFacei; if (repatchFace(mesh, bMesh, nearest, patchMap, facei, meshMod)) { diff --git a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C index 6a6a21f93356ff1f8facd990b14c80d41bd590d7..6d6978b2980aeea4e53ffaeaf80c1729fe5b93a1 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C +++ b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C @@ -51,9 +51,9 @@ Foam::treeBoundBox Foam::treeDataCell::calcCellBb(const label celli) const const cell& cFaces = cells[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = faces[cFaces[cFaceI]]; + const face& f = faces[cFaces[cFacei]]; forAll(f, fp) { diff --git a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C index 67de1b2dc043bdd32e340a0499199e0a130aac1b..f06cd9770505f7b90ba3141204e4c7f0db0b01d8 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C +++ b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.C @@ -97,22 +97,22 @@ void Foam::ParSortableList<Type>::checkAndSend List<Type>& values, labelList& indices, const label bufSize, - const label destProcI + const label destProci ) const { - if (destProcI != Pstream::myProcNo()) + if (destProci != Pstream::myProcNo()) { values.setSize(bufSize); indices.setSize(bufSize); if (debug) { - Pout<< "Sending to " << destProcI << " elements:" << values + Pout<< "Sending to " << destProci << " elements:" << values << endl; } { - OPstream toSlave(Pstream::blocking, destProcI); + OPstream toSlave(Pstream::blocking, destProci); toSlave << values << indices; } } @@ -214,7 +214,7 @@ void Foam::ParSortableList<Type>::sort() // label pivotI = 1; - label destProcI = 0; + label destProci = 0; // Buffer for my own data. Keep original index together with value. labelList ownValues(sorted.size()); @@ -230,7 +230,7 @@ void Foam::ParSortableList<Type>::sort() { if ((pivotI < Pstream::nProcs()) && (sorted[sortedI] > pivots[pivotI])) { - checkAndSend(sendValues, sendIndices, sendI, destProcI); + checkAndSend(sendValues, sendIndices, sendI, destProci); // Reset buffer. sendValues.setSize(sorted.size()); @@ -238,10 +238,10 @@ void Foam::ParSortableList<Type>::sort() sendI = 0; pivotI++; - destProcI++; + destProci++; } - if (destProcI != Pstream::myProcNo()) + if (destProci != Pstream::myProcNo()) { sendValues[sendI] = sorted[sortedI]; sendIndices[sendI] = sorted.indices()[sortedI]; @@ -259,7 +259,7 @@ void Foam::ParSortableList<Type>::sort() // Handle trailing send buffer if (sendI != 0) { - checkAndSend(sendValues, sendIndices, sendI, destProcI); + checkAndSend(sendValues, sendIndices, sendI, destProci); } // Print ownValues @@ -283,9 +283,9 @@ void Foam::ParSortableList<Type>::sort() label combinedI = 0; - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { - if (procI == Pstream::myProcNo()) + if (proci == Pstream::myProcNo()) { if (debug & 2) { @@ -293,7 +293,7 @@ void Foam::ParSortableList<Type>::sort() } // Copy ownValues,ownIndices into combined buffer - copyInto(ownValues, ownIndices, procI, combinedI, combinedValues); + copyInto(ownValues, ownIndices, proci, combinedI, combinedValues); } else { @@ -303,16 +303,16 @@ void Foam::ParSortableList<Type>::sort() { if (debug) { - Pout<< "Receiving from " << procI << endl; + Pout<< "Receiving from " << proci << endl; } - IPstream fromSlave(Pstream::blocking, procI); + IPstream fromSlave(Pstream::blocking, proci); fromSlave >> recValues >> recIndices; if (debug & 2) { - Pout<< "Received from " << procI + Pout<< "Received from " << proci << " elements:" << recValues << endl; } } @@ -321,7 +321,7 @@ void Foam::ParSortableList<Type>::sort() { Pout<< "Copying starting at:" << combinedI << endl; } - copyInto(recValues, recIndices, procI, combinedI, combinedValues); + copyInto(recValues, recIndices, proci, combinedI, combinedValues); } } combinedValues.setSize(combinedI); diff --git a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.H b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.H index 9d7bdf71c4927a2b3e270f7a3b81c8acce7aa6af..3bf30225a449a86d119929d68de6dccf8ed348c2 100644 --- a/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.H +++ b/src/OpenFOAM/containers/Lists/SortableList/ParSortableList.H @@ -163,7 +163,7 @@ class ParSortableList List<Type>& values, labelList& indices, const label bufSize, - const label destProcI + const label destProci ) const; diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C index 73616e681aa65cf8be8a5d3a96dcec427104cba0..9be1dc5eb3ee01ba0322f24e204a8b591a5d4298 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.C @@ -62,14 +62,14 @@ Foam::PstreamBuffers::PstreamBuffers Foam::PstreamBuffers::~PstreamBuffers() { // Check that all data has been consumed. - forAll(recvBufPos_, procI) + forAll(recvBufPos_, proci) { - if (recvBufPos_[procI] < recvBuf_[procI].size()) + if (recvBufPos_[proci] < recvBuf_[proci].size()) { FatalErrorInFunction - << "Message from processor " << procI - << " not fully consumed. messageSize:" << recvBuf_[procI].size() - << " bytes of which only " << recvBufPos_[procI] + << "Message from processor " << proci + << " not fully consumed. messageSize:" << recvBuf_[proci].size() + << " bytes of which only " << recvBufPos_[proci] << " consumed." << Foam::abort(FatalError); } diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H index 16caa9d7209fca84efe79a189e7b316cd6acc63d..c6a0e33fb6cae9547efed2669cf165c70adb3aab 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/PstreamBuffers.H @@ -37,24 +37,24 @@ Description PstreamBuffers pBuffers(Pstream::nonBlocking); - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { someObject vals; - UOPstream str(procI, pBuffers); + UOPstream str(proci, pBuffers); str << vals; } } pBuffers.finishedSends(); // no-op for blocking - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - UIPstream str(procI, pBuffers); + UIPstream str(proci, pBuffers); someObject vals(str); } } diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H index 9c66b0852c5a59792e2587863e9794240199ef6d..6ecb7cd96368ba0faf7b9b801b22bbd9b53df02e 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstream.H @@ -490,7 +490,7 @@ public: static void abort(); //- Exchange label with all processors (in the communicator). - // sendData[procI] is the label to send to procI. + // sendData[proci] is the label to send to proci. // After return recvData contains the data from the other processors. static void allToAll ( diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/UPstreamCommsStruct.C b/src/OpenFOAM/db/IOstreams/Pstreams/UPstreamCommsStruct.C index e5412a4ae7bb6155a6504cfd01e2f9b7342d6e4f..10d8dd993ef6e059a28381aa98b11905eb5c8973 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/UPstreamCommsStruct.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/UPstreamCommsStruct.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -74,11 +74,11 @@ Foam::UPstream::commsStruct::commsStruct } label notI = 0; - forAll(inBelow, procI) + forAll(inBelow, proci) { - if ((procI != myProcID) && !inBelow[procI]) + if ((proci != myProcID) && !inBelow[proci]) { - allNotBelow_[notI++] = procI; + allNotBelow_[notI++] = proci; } } if (notI != allNotBelow_.size()) diff --git a/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C b/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C index 95ad2537a4bd84e43275d5f33922b37267f3642c..749527333d73f13bb373307ee88d24bc18d6fc98 100644 --- a/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C +++ b/src/OpenFOAM/db/IOstreams/Pstreams/exchange.C @@ -68,18 +68,18 @@ void Foam::Pstream::exchange // Set up receives // ~~~~~~~~~~~~~~~ - forAll(recvSizes, procI) + forAll(recvSizes, proci) { - label nRecv = recvSizes[procI]; + label nRecv = recvSizes[proci]; - if (procI != Pstream::myProcNo(comm) && nRecv > 0) + if (proci != Pstream::myProcNo(comm) && nRecv > 0) { - recvBufs[procI].setSize(nRecv); + recvBufs[proci].setSize(nRecv); UIPstream::read ( UPstream::nonBlocking, - procI, - reinterpret_cast<char*>(recvBufs[procI].begin()), + proci, + reinterpret_cast<char*>(recvBufs[proci].begin()), nRecv*sizeof(T), tag, comm @@ -91,18 +91,18 @@ void Foam::Pstream::exchange // Set up sends // ~~~~~~~~~~~~ - forAll(sendBufs, procI) + forAll(sendBufs, proci) { - if (procI != Pstream::myProcNo(comm) && sendBufs[procI].size() > 0) + if (proci != Pstream::myProcNo(comm) && sendBufs[proci].size() > 0) { if ( !UOPstream::write ( UPstream::nonBlocking, - procI, - reinterpret_cast<const char*>(sendBufs[procI].begin()), - sendBufs[procI].size()*sizeof(T), + proci, + reinterpret_cast<const char*>(sendBufs[proci].begin()), + sendBufs[proci].size()*sizeof(T), tag, comm ) @@ -110,8 +110,8 @@ void Foam::Pstream::exchange { FatalErrorInFunction << "Cannot send outgoing message. " - << "to:" << procI << " nBytes:" - << label(sendBufs[procI].size()*sizeof(T)) + << "to:" << proci << " nBytes:" + << label(sendBufs[proci].size()*sizeof(T)) << Foam::abort(FatalError); } } @@ -150,9 +150,9 @@ void Foam::Pstream::exchangeSizes } labelList sendSizes(sendBufs.size()); - forAll(sendBufs, procI) + forAll(sendBufs, proci) { - sendSizes[procI] = sendBufs[procI].size(); + sendSizes[proci] = sendBufs[proci].size(); } recvSizes.setSize(sendSizes.size()); allToAll(sendSizes, recvSizes, comm); diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index 973bc87648ee9801ba3f8fa64f88cbafb2341bff..385bfeec3c6bfc08126220bbf6255aff3a83282a 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -773,7 +773,7 @@ void Foam::argList::parse string slaveMachine; label slavePid; - label procI = 0; + label proci = 0; for ( int slave = Pstream::firstSlave(); @@ -784,7 +784,7 @@ void Foam::argList::parse IPstream fromSlave(Pstream::scheduled, slave); fromSlave >> slaveMachine >> slavePid; - slaveProcs[procI++] = slaveMachine + "." + name(slavePid); + slaveProcs[proci++] = slaveMachine + "." + name(slavePid); } } else diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C index 4c4ba4995f098cc0cb72e388b77a2e134b95fc15..bfae4ef0496186f529e76590d68edb8deff43acb 100644 --- a/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C +++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C @@ -68,7 +68,7 @@ Foam::nonBlockingGaussSeidelSmoother::nonBlockingGaussSeidelSmoother blockStart_ = nCells; - labelList startCellI(interfaceBouCoeffs.size(), -1); + labelList startCelli(interfaceBouCoeffs.size(), -1); forAll(interfaces, patchi) { if (interfaces.set(patchi)) diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C index 9d41b183b98bad93e05ac2bfea6a796a21689225..d29f76eb2b3657af9f01e04b259b9d86f4a2126e 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomerateLduAddressing.C @@ -506,17 +506,17 @@ void Foam::GAMGAgglomeration::procAgglomerateRestrictAddressing nCells_[levelIndex] = coarseCellOffsets.last(); // Renumber consecutively - for (label procI = 1; procI < procIDs.size(); procI++) + for (label proci = 1; proci < procIDs.size(); proci++) { SubList<label> procSlot ( procRestrictAddressing, - offsets[procI+1]-offsets[procI], - offsets[procI] + offsets[proci+1]-offsets[proci], + offsets[proci] ); forAll(procSlot, i) { - procSlot[i] += coarseCellOffsets[procI]; + procSlot[i] += coarseCellOffsets[proci]; } } @@ -548,15 +548,15 @@ void Foam::GAMGAgglomeration::combineLevels(const label curLevel) { if (prevFaceResAddr[i] >= 0) { - label fineFaceI = prevFaceResAddr[i]; - prevFaceResAddr[i] = curFaceResAddr[fineFaceI]; - prevFaceFlipMap[i] = curFaceFlipMap[fineFaceI]; + label fineFacei = prevFaceResAddr[i]; + prevFaceResAddr[i] = curFaceResAddr[fineFacei]; + prevFaceFlipMap[i] = curFaceFlipMap[fineFacei]; } else { - label fineFaceI = -prevFaceResAddr[i] - 1; - prevFaceResAddr[i] = -curResAddr[fineFaceI] - 1; - prevFaceFlipMap[i] = curFaceFlipMap[fineFaceI]; + label fineFacei = -prevFaceResAddr[i] - 1; + prevFaceResAddr[i] = -curResAddr[fineFacei] - 1; + prevFaceFlipMap[i] = curFaceFlipMap[fineFacei]; } } @@ -580,8 +580,8 @@ void Foam::GAMGAgglomeration::combineLevels(const label curLevel) labelList& prevResAddr = prevPatchFaceResAddr[inti]; forAll(prevResAddr, i) { - label fineFaceI = prevResAddr[i]; - prevResAddr[i] = curResAddr[fineFaceI]; + label fineFacei = prevResAddr[i]; + prevResAddr[i] = curResAddr[fineFacei]; } } @@ -680,18 +680,18 @@ void Foam::GAMGAgglomeration::calculateRegionMaster // Determine the master processors Map<label> agglomToMaster(procAgglomMap.size()); - forAll(procAgglomMap, procI) + forAll(procAgglomMap, proci) { - label coarseI = procAgglomMap[procI]; + label coarseI = procAgglomMap[proci]; Map<label>::iterator fnd = agglomToMaster.find(coarseI); if (fnd == agglomToMaster.end()) { - agglomToMaster.insert(coarseI, procI); + agglomToMaster.insert(coarseI, proci); } else { - fnd() = min(fnd(), procI); + fnd() = min(fnd(), proci); } } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/eagerGAMGProcAgglomeration/eagerGAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/eagerGAMGProcAgglomeration/eagerGAMGProcAgglomeration.C index 846a2e5b478557fb4ce0e2964870dba0ade59ee4..743c265971c4edbd0a812a69624ed8b1c1ee9f9c 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/eagerGAMGProcAgglomeration/eagerGAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/eagerGAMGProcAgglomeration/eagerGAMGProcAgglomeration.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,9 +107,9 @@ bool Foam::eagerGAMGProcAgglomeration::agglomerate() // processor labelList procAgglomMap(nProcs); - forAll(procAgglomMap, procI) + forAll(procAgglomMap, proci) { - procAgglomMap[procI] = procI/(1<<mergeLevels_); + procAgglomMap[proci] = proci/(1<<mergeLevels_); } // Master processor diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C index 47bd3ba08ea175998cd0a07edb69951a885a4037..a03966c1ee690dd268bdf3ddcb02679ccbebcfa1 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C @@ -95,16 +95,16 @@ Foam::procFacesGAMGProcAgglomeration::singleCellMesh DynamicList<label> nbrs; DynamicList<scalar> weights; - forAll(procFaces, procI) + forAll(procFaces, proci) { - const Map<label>& neighbours = procFaces[procI]; + const Map<label>& neighbours = procFaces[proci]; // Add all the higher processors nbrs.clear(); weights.clear(); forAllConstIter(Map<label>, neighbours, iter) { - if (iter.key() > procI) + if (iter.key() > proci) { nbrs.append(iter.key()); weights.append(iter()); @@ -112,7 +112,7 @@ Foam::procFacesGAMGProcAgglomeration::singleCellMesh sort(nbrs); forAll(nbrs, i) { - l.append(procI); + l.append(proci); u.append(nbrs[i]); weight.append(weights[i]); } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C index 06cb0c59b603ad6714d7563e5d6f86ff8ded140b..33b7d009299a4a2c43f3f49a715fe8eff2828b42 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C @@ -312,14 +312,14 @@ void Foam::GAMGSolver::gatherMatrices otherTransforms.setSize(procIDs.size()-1); otherRanks.setSize(procIDs.size()-1); - for (label procI = 1; procI < procIDs.size(); procI++) + for (label proci = 1; proci < procIDs.size(); proci++) { - label otherI = procI-1; + label otherI = proci-1; IPstream fromSlave ( Pstream::scheduled, - procIDs[procI], + procIDs[proci], 0, // bufSize Pstream::msgType(), meshComm @@ -570,22 +570,22 @@ void Foam::GAMGSolver::procAgglomerateMatrix } labelList nBounFaces(allMeshInterfaces.size()); - forAll(boundaryMap, procI) + forAll(boundaryMap, proci) { const FieldField<Field, scalar>& procBouCoeffs ( - (procI == 0) + (proci == 0) ? coarsestBouCoeffs - : otherBouCoeffs[procI-1] + : otherBouCoeffs[proci-1] ); const FieldField<Field, scalar>& procIntCoeffs ( - (procI == 0) + (proci == 0) ? coarsestIntCoeffs - : otherIntCoeffs[procI-1] + : otherIntCoeffs[proci-1] ); - const labelList& bMap = boundaryMap[procI]; + const labelList& bMap = boundaryMap[proci]; forAll(bMap, procIntI) { label allIntI = bMap[procIntI]; @@ -601,7 +601,7 @@ void Foam::GAMGSolver::procAgglomerateMatrix bool doTransform = false; int rank = -1; - if (procI == 0) + if (proci == 0) { const processorGAMGInterfaceField& procInt = refCast @@ -617,8 +617,8 @@ void Foam::GAMGSolver::procAgglomerateMatrix else { doTransform = - otherTransforms[procI-1][procIntI]; - rank = otherRanks[procI-1][procIntI]; + otherTransforms[proci-1][procIntI]; + rank = otherRanks[proci-1][procIntI]; } allPrimitiveInterfaces.set @@ -647,28 +647,28 @@ void Foam::GAMGSolver::procAgglomerateMatrix scalarField& allBou = allInterfaceBouCoeffs[allIntI]; scalarField& allInt = allInterfaceIntCoeffs[allIntI]; - const labelList& map = boundaryFaceMap[procI][procIntI]; + const labelList& map = boundaryFaceMap[proci][procIntI]; const scalarField& procBou = procBouCoeffs[procIntI]; const scalarField& procInt = procIntCoeffs[procIntI]; forAll(map, i) { - label allFaceI = map[i]; - if (allFaceI < 0) + label allFacei = map[i]; + if (allFacei < 0) { FatalErrorInFunction << "problem." << abort(FatalError); } - allBou[allFaceI] = procBou[i]; - allInt[allFaceI] = procInt[i]; + allBou[allFacei] = procBou[i]; + allInt[allFacei] = procInt[i]; } } else if (procBouCoeffs.set(procIntI)) { // Boundary has become internal face - const labelList& map = boundaryFaceMap[procI][procIntI]; + const labelList& map = boundaryFaceMap[proci][procIntI]; const scalarField& procBou = procBouCoeffs[procIntI]; const scalarField& procInt = procIntCoeffs[procIntI]; @@ -677,28 +677,28 @@ void Foam::GAMGSolver::procAgglomerateMatrix { if (map[i] >= 0) { - label allFaceI = map[i]; + label allFacei = map[i]; if (coarsestMatrix.hasUpper()) { - allMatrix.upper()[allFaceI] = -procBou[i]; + allMatrix.upper()[allFacei] = -procBou[i]; } if (coarsestMatrix.hasLower()) { - allMatrix.lower()[allFaceI] = -procInt[i]; + allMatrix.lower()[allFacei] = -procInt[i]; } } else { - label allFaceI = -map[i]-1; + label allFacei = -map[i]-1; if (coarsestMatrix.hasUpper()) { - allMatrix.upper()[allFaceI] = -procInt[i]; + allMatrix.upper()[allFacei] = -procInt[i]; } if (coarsestMatrix.hasLower()) { - allMatrix.lower()[allFaceI] = -procBou[i]; + allMatrix.lower()[allFacei] = -procBou[i]; } } } diff --git a/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.C b/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.C index 678194dd24327bdb6e17d670bfafc6e5801540bd..a7e9fbacd69e8ccc47e47aa41debbb238123e62d 100644 --- a/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.C +++ b/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.C @@ -72,11 +72,11 @@ Foam::labelList Foam::ProcessorTopology<Container, ProcPatch>::procNeighbours nNeighbours = 0; - forAll(isNeighbourProc, procI) + forAll(isNeighbourProc, proci) { - if (isNeighbourProc[procI]) + if (isNeighbourProc[proci]) { - neighbours[nNeighbours++] = procI; + neighbours[nNeighbours++] = proci; } } @@ -149,21 +149,21 @@ Foam::ProcessorTopology<Container, ProcPatch>::ProcessorTopology // to determine the schedule. Each processor pair stands for both // send and receive. label nComms = 0; - forAll(*this, procI) + forAll(*this, proci) { - nComms += operator[](procI).size(); + nComms += operator[](proci).size(); } DynamicList<labelPair> comms(nComms); - forAll(*this, procI) + forAll(*this, proci) { - const labelList& nbrs = operator[](procI); + const labelList& nbrs = operator[](proci); forAll(nbrs, i) { - if (procI < nbrs[i]) + if (proci < nbrs[i]) { - comms.append(labelPair(procI, nbrs[i])); + comms.append(labelPair(proci, nbrs[i])); } } } diff --git a/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.H b/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.H index 90923a88c222c52a8fc2cbb679ae489a95cdbd91..f8857a6b5c012ddb738e5186079649cdc55182bd 100644 --- a/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.H +++ b/src/OpenFOAM/meshes/ProcessorTopology/ProcessorTopology.H @@ -28,7 +28,7 @@ Description Determines processor-processor connection. After instantiation contains on all processors the processor-processor connection table. - *this[procI] gives the list of neighbouring processors. + *this[proci] gives the list of neighbouring processors. TODO: This does not currently correctly support multiple processor patches connecting two processors. diff --git a/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C b/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C index 67911ea21d734d107c729d9329a4814a4c7aa78a..fdf643f8e4324367e6b944abe2359575540db11b 100644 --- a/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C +++ b/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.C @@ -213,15 +213,15 @@ Foam::commSchedule::commSchedule // Print it OStringStream os; os << setw(3) << iter << " |"; - forAll(procToComm, procI) + forAll(procToComm, proci) { - if (procToComm[procI] == -1) + if (procToComm[proci] == -1) { os << " "; } else { - os << setw(3) << procToComm[procI]; + os << setw(3) << procToComm[proci]; } } Pout<< os.str().c_str() << endl; @@ -254,9 +254,9 @@ Foam::commSchedule::commSchedule nProcScheduled[twoProcs[1]]++; } // Allocate - forAll(procSchedule_, procI) + forAll(procSchedule_, proci) { - procSchedule_[procI].setSize(nProcScheduled[procI]); + procSchedule_[proci].setSize(nProcScheduled[proci]); } nProcScheduled = 0; // Fill @@ -276,17 +276,17 @@ Foam::commSchedule::commSchedule { Pout<< "commSchedule::commSchedule : Per processor:" << endl; - forAll(procSchedule_, procI) + forAll(procSchedule_, proci) { - const labelList& procComms = procSchedule_[procI]; + const labelList& procComms = procSchedule_[proci]; - Pout<< "Processor " << procI << " talks to processors:" << endl; + Pout<< "Processor " << proci << " talks to processors:" << endl; forAll(procComms, i) { const labelPair& twoProcs = comms[procComms[i]]; - label nbr = (twoProcs[1] == procI ? twoProcs[0] : twoProcs[1]); + label nbr = (twoProcs[1] == proci ? twoProcs[0] : twoProcs[1]); Pout<< " " << nbr << endl; } diff --git a/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.H b/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.H index bfeb62d63206e88b963de32f8b1a5d574ef8e474..8d626d59a1df28d6ff285c16d59a20e2888e4b72 100644 --- a/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.H +++ b/src/OpenFOAM/meshes/ProcessorTopology/commSchedule.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,7 +36,7 @@ Description After construction: - schedule() gives the order in which the input communication should occur - - procSchedule()[procI] gives per procI + - procSchedule()[proci] gives per proci Does not care whether 'talking' is first send, second receive or maybe full swap. This is all responsability of caller. See ProcessorTopology @@ -92,7 +92,7 @@ public: // determines an order for it such that any processor is only talking // to one other at a time. After construction: // - schedule is the order in which comms is done. - // - procSchedule[procI] is for procI the order in which comms is done. + // - procSchedule[proci] is for proci the order in which comms is done. commSchedule(const label nProcs, const List<labelPair>& comms); diff --git a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C index 37066914ec95a666014f180b5216aa6741c0fdd6..6a30d7f9b39c4c319501e39dccee1b075dc1a535 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C +++ b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C @@ -172,7 +172,7 @@ Foam::labelList Foam::lduPrimitiveMesh::upperTriOrder labelList order; labelList nbr; - label newFaceI = 0; + label newFacei = 0; for (label celli = 0; celli < nCells; celli++) { @@ -190,7 +190,7 @@ Foam::labelList Foam::lduPrimitiveMesh::upperTriOrder forAll(order, i) { label index = order[i]; - oldToNew[cellToFaces[startOfCell + index]] = newFaceI++; + oldToNew[cellToFaces[startOfCell + index]] = newFacei++; } } @@ -598,13 +598,13 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh const labelUList& u = procMesh.lduAddr().upperAddr(); // Add internal faces - label allFaceI = faceOffsets[procMeshI]; + label allFacei = faceOffsets[procMeshI]; forAll(l, facei) { - lowerAddr_[allFaceI] = cellOffsets[procMeshI]+l[facei]; - upperAddr_[allFaceI] = cellOffsets[procMeshI]+u[facei]; - allFaceI++; + lowerAddr_[allFacei] = cellOffsets[procMeshI]+l[facei]; + upperAddr_[allFacei] = cellOffsets[procMeshI]+u[facei]; + allFacei++; } @@ -646,14 +646,14 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh label nbrIntI = -1; forAll(elems, i) { - label procI = elems[i][0]; + label proci = elems[i][0]; label interfacei = elems[i][1]; const lduInterfacePtrsList interfaces = mesh ( myMesh, otherMeshes, - procI + proci ).interfaces(); const processorLduInterface& pldui = refCast<const processorLduInterface> @@ -712,13 +712,13 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh forAll(faceCells, pfI) { - lowerAddr_[allFaceI] = + lowerAddr_[allFacei] = cellOffsets[procMeshI]+faceCells[pfI]; - bfMap[pfI] = allFaceI; - upperAddr_[allFaceI] = + bfMap[pfI] = allFacei; + upperAddr_[allFacei] = cellOffsets[nbrProcMeshI]+nbrFaceCells[pfI]; - nbrBfMap[pfI] = (-allFaceI-1); - allFaceI++; + nbrBfMap[pfI] = (-allFacei-1); + allFacei++; } } } @@ -751,8 +751,8 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh } else { - label allFaceI = -map[i]-1; - map[i] = -oldToNew[allFaceI]-1; + label allFacei = -map[i]-1; + map[i] = -oldToNew[allFacei]-1; } } } @@ -761,15 +761,15 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh inplaceReorder(oldToNew, lowerAddr_); inplaceReorder(oldToNew, upperAddr_); - forAll(boundaryFaceMap, procI) + forAll(boundaryFaceMap, proci) { - const labelList& bMap = boundaryMap[procI]; + const labelList& bMap = boundaryMap[proci]; forAll(bMap, intI) { if (bMap[intI] == -1) { // Merged interface - labelList& bfMap = boundaryFaceMap[procI][intI]; + labelList& bfMap = boundaryFaceMap[proci][intI]; forAll(bfMap, i) { @@ -779,8 +779,8 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh } else { - label allFaceI = -bfMap[i]-1; - bfMap[i] = (-oldToNew[allFaceI]-1); + label allFacei = -bfMap[i]-1; + bfMap[i] = (-oldToNew[allFacei]-1); } } } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C index 06c9d3e4c2da5c54f2e05e900b69130af0bb5fd8..834853cfbbf9b8f1304590491bc5dafde80b12da 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C @@ -81,15 +81,15 @@ Foam::label Foam::cellMatcher::calcLocalFaces // Renumber face vertices and insert directly into localFaces_ label newVertI = 0; - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - label facei = myFaces[myFaceI]; + label facei = myFaces[myFacei]; const face& f = faces[facei]; - face& localFace = localFaces_[myFaceI]; + face& localFace = localFaces_[myFacei]; // Size of localFace - faceSize_[myFaceI] = f.size(); + faceSize_[myFacei] = f.size(); forAll(f, localVertI) { @@ -118,7 +118,7 @@ Foam::label Foam::cellMatcher::calcLocalFaces } // Create face from localvertex labels - faceMap_[myFaceI] = facei; + faceMap_[myFacei] = facei; } // Create local to global vertex mapping @@ -139,16 +139,16 @@ void Foam::cellMatcher::calcEdgeAddressing(const label numVert) { edgeFaces_ = -1; - forAll(localFaces_, localFaceI) + forAll(localFaces_, localFacei) { - const face& f = localFaces_[localFaceI]; + const face& f = localFaces_[localFacei]; - label prevVertI = faceSize_[localFaceI] - 1; + label prevVertI = faceSize_[localFacei] - 1; //forAll(f, fp) for ( label fp = 0; - fp < faceSize_[localFaceI]; + fp < faceSize_[localFacei]; fp++ ) { @@ -161,14 +161,14 @@ void Foam::cellMatcher::calcEdgeAddressing(const label numVert) if (edgeFaces_[key1] == -1) { // Entry key1 unoccupied. Store both permutations. - edgeFaces_[key1] = localFaceI; - edgeFaces_[key2] = localFaceI; + edgeFaces_[key1] = localFacei; + edgeFaces_[key2] = localFacei; } else if (edgeFaces_[key1+1] == -1) { // Entry key1+1 unoccupied - edgeFaces_[key1+1] = localFaceI; - edgeFaces_[key2+1] = localFaceI; + edgeFaces_[key1+1] = localFacei; + edgeFaces_[key2+1] = localFacei; } else { @@ -194,19 +194,19 @@ void Foam::cellMatcher::calcPointFaceIndex() faceIndices = -1; } - forAll(localFaces_, localFaceI) + forAll(localFaces_, localFacei) { - const face& f = localFaces_[localFaceI]; + const face& f = localFaces_[localFacei]; for ( label fp = 0; - fp < faceSize_[localFaceI]; + fp < faceSize_[localFacei]; fp++ ) { label vert = f[fp]; - pointFaceIndex_[vert][localFaceI] = fp; + pointFaceIndex_[vert][localFacei] = fp; } } } @@ -217,23 +217,23 @@ Foam::label Foam::cellMatcher::otherFace const label numVert, const label v0, const label v1, - const label localFaceI + const label localFacei ) const { label key = edgeKey(numVert, v0, v1); - if (edgeFaces_[key] == localFaceI) + if (edgeFaces_[key] == localFacei) { return edgeFaces_[key+1]; } - else if (edgeFaces_[key+1] == localFaceI) + else if (edgeFaces_[key+1] == localFacei) { return edgeFaces_[key]; } else { FatalErrorInFunction - << "edgeFaces_ does not contain:" << localFaceI + << "edgeFaces_ does not contain:" << localFacei << " for edge " << v0 << " " << v1 << " at key " << key << " edgeFaces_[key, key+1]:" << edgeFaces_[key] << " , " << edgeFaces_[key+1] diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H index f8aafaebaabf4c710c850cd8d65386aebb2c8512..1e19cc71274731f27f669b10ac677b4b7a13bd86 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H @@ -134,7 +134,7 @@ protected: //- Map from 'edge' to neighbouring faces labelList edgeFaces_; - //- pointFaceIndex[localVertI][localFaceI] is index in localFace + //- pointFaceIndex[localVertI][localFacei] is index in localFace // where localVertI is. labelListList pointFaceIndex_; @@ -163,13 +163,13 @@ protected: void calcPointFaceIndex(); //- Given start,end of edge lookup both faces sharing it and return - // face != localFaceI + // face != localFacei label otherFace ( const label numVert, const label v0, const label v1, - const label localFaceI + const label localFacei ) const; diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C index a6f03ba93688aaf738d33de2ed33e1b95941eb73..30994b0aa21b0de023b1d7c5b92fd25103344e64 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C @@ -261,9 +261,9 @@ bool Foam::hexMatcher::faceSizeMatch return false; } - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - label size = faces[myFaces[myFaceI]].size(); + label size = faces[myFaces[myFacei]].size(); if (size != 4) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C index ba9e9148b034b22709075852d8201bf322d35f07..20e00a09f4fa3e5c06fe726a6b6ae5eaa8832903 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C @@ -312,9 +312,9 @@ bool Foam::prismMatcher::faceSizeMatch label nTris = 0; label nQuads = 0; - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - label size = faces[myFaces[myFaceI]].size(); + label size = faces[myFaces[myFacei]].size(); if (size == 3) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C index 12e1b40eb9267bd8c6391ff4748161b0f0bcdb8d..d655570ad918826112ff79190a7b01a35d39c4f5 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C @@ -235,9 +235,9 @@ bool Foam::pyrMatcher::faceSizeMatch label nTris = 0; label nQuads = 0; - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - label size = faces[myFaces[myFaceI]].size(); + label size = faces[myFaces[myFacei]].size(); if (size == 3) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C index 360b909ac954e3cc91ec0de567538a4e2c287515..94c0a94f4f96d839cfcbf5302b3e953f37ec515c 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C @@ -202,9 +202,9 @@ bool Foam::tetMatcher::faceSizeMatch return false; } - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - label size = faces[myFaces[myFaceI]].size(); + label size = faces[myFaces[myFacei]].size(); if (size != 3) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C index b9421240ea658b9fbcc0dd6f2c615489b0a931b4..26acee92970f7c1e606b10faa525bdab0a83e4f3 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C @@ -240,9 +240,9 @@ bool Foam::tetWedgeMatcher::faceSizeMatch label nTris = 0; label nQuads = 0; - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - label size = faces[myFaces[myFaceI]].size(); + label size = faces[myFaces[myFacei]].size(); if (size == 3) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C index 3dc67372a4f0caa6a127e95e9ced1c1eef8c5839..0055bacf8f5d9266cf78643f3c76edfb08df8e6c 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C @@ -339,9 +339,9 @@ bool Foam::wedgeMatcher::faceSizeMatch label nTris = 0; label nQuads = 0; - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - label size = faces[myFaces[myFaceI]].size(); + label size = faces[myFaces[myFacei]].size(); if (size == 3) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeI.H b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeI.H index 6716231ff9889d5553a413ab565423bbc996ea4b..4cb5b6878c32ab9aa62cc7be486c24850c9db67c 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeI.H +++ b/src/OpenFOAM/meshes/meshShapes/cellShape/cellShapeI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -110,11 +110,11 @@ inline Foam::labelList Foam::cellShape::meshFaces forAll(cFaces, j) { - label meshFaceI = cFaces[j]; + label meshFacei = cFaces[j]; - if (allFaces[meshFaceI] == localF) + if (allFaces[meshFacei] == localF) { - modelToMesh[i] = meshFaceI; + modelToMesh[i] = meshFacei; break; } @@ -170,13 +170,13 @@ inline Foam::faceList Foam::cellShape::collapsedFaces() const faceList oldFaces(faces()); faceList newFaces(oldFaces.size()); - label newFaceI = 0; + label newFacei = 0; - forAll(oldFaces, oldFaceI) + forAll(oldFaces, oldFacei) { - const face& f = oldFaces[oldFaceI]; + const face& f = oldFaces[oldFacei]; - face& newF = newFaces[newFaceI]; + face& newF = newFaces[newFacei]; newF.setSize(f.size()); @@ -205,10 +205,10 @@ inline Foam::faceList Foam::cellShape::collapsedFaces() const // Size face and go to next one newF.setSize(newFp); - newFaceI++; + newFacei++; } } - newFaces.setSize(newFaceI); + newFaces.setSize(newFacei); return newFaces; } diff --git a/src/OpenFOAM/meshes/meshTools/matchPoints.C b/src/OpenFOAM/meshes/meshTools/matchPoints.C index 21291812e877de5ee09fcbb8533565233197f37a..7030ea649b2cba6d48c67263ae249ae268544a22 100644 --- a/src/OpenFOAM/meshes/meshTools/matchPoints.C +++ b/src/OpenFOAM/meshes/meshTools/matchPoints.C @@ -76,7 +76,7 @@ bool Foam::matchPoints // Go through range of equal mag and find nearest vector. scalar minDistSqr = VGREAT; - label minFaceI = -1; + label minFacei = -1; for ( @@ -95,11 +95,11 @@ bool Foam::matchPoints if (distSqr <= sqr(matchDist) && distSqr < minDistSqr) { minDistSqr = distSqr; - minFaceI = facei; + minFacei = facei; } } - if (minFaceI == -1) + if (minFacei == -1) { fullMatch = false; @@ -132,7 +132,7 @@ bool Foam::matchPoints } } - from0To1[face0I] = minFaceI; + from0To1[face0I] = minFacei; } return fullMatch; @@ -188,7 +188,7 @@ bool Foam::matchPoints // Go through range of equal mag and find nearest vector. scalar minDistSqr = VGREAT; scalar minDistNorm = 0; - label minFaceI = -1; + label minFacei = -1; for ( @@ -222,12 +222,12 @@ bool Foam::matchPoints { minDistNorm = distNorm; minDistSqr = distSqr; - minFaceI = facei; + minFacei = facei; } } } - if (minFaceI == -1) + if (minFacei == -1) { fullMatch = false; @@ -260,7 +260,7 @@ bool Foam::matchPoints } } - from0To1[face0I] = minFaceI; + from0To1[face0I] = minFacei; } return fullMatch; diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.C index b8dc8896ca395098ca28db7ed12f88030943c252..5430b5d83dbe1c62f7cc3d8bad476c16eb181786 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -47,10 +47,10 @@ Foam::globalIndex::globalIndex label offset = 0; offsets_[0] = 0; - for (label procI = 0; procI < Pstream::nProcs(comm); procI++) + for (label proci = 0; proci < Pstream::nProcs(comm); proci++) { label oldOffset = offset; - offset += localSizes[procI]; + offset += localSizes[proci]; if (offset < oldOffset) { @@ -60,7 +60,7 @@ Foam::globalIndex::globalIndex << "). Please recompile with larger datatype for label." << exit(FatalError); } - offsets_[procI+1] = offset; + offsets_[proci+1] = offset; } } @@ -76,10 +76,10 @@ Foam::globalIndex::globalIndex(const label localSize) label offset = 0; offsets_[0] = 0; - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { label oldOffset = offset; - offset += localSizes[procI]; + offset += localSizes[proci]; if (offset < oldOffset) { @@ -89,7 +89,7 @@ Foam::globalIndex::globalIndex(const label localSize) << "). Please recompile with larger datatype for label." << exit(FatalError); } - offsets_[procI+1] = offset; + offsets_[proci+1] = offset; } } diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H index 793c9324b6aae0db76afe03223af9f788824da01..5e2ff81d1efd073de440b2b5dcded610fa4abdf9 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H @@ -29,7 +29,7 @@ Description for processor + local index. E.g. globalIndex globalFaces(mesh.nFaces()); - label globalFaceI = globalFaces.toGlobal(facei); + label globalFacei = globalFaces.toGlobal(facei); SourceFiles @@ -65,7 +65,7 @@ class globalIndex { // Private data - //- Start of procI. Size is nProcs()+1. (so like CompactListList) + //- Start of proci. Size is nProcs()+1. (so like CompactListList) labelList offsets_; @@ -129,23 +129,23 @@ public: //- Global sum of localSizes inline label size() const; - //- Size of procI data - inline label localSize(const label procI) const; + //- Size of proci data + inline label localSize(const label proci) const; - //- From local to global on procI - inline label toGlobal(const label procI, const label i) const; + //- From local to global on proci + inline label toGlobal(const label proci, const label i) const; - //- Is on processor procI - inline bool isLocal(const label procI, const label i) const; + //- Is on processor proci + inline bool isLocal(const label proci, const label i) const; - //- From global to local on procI - inline label toLocal(const label procI, const label i) const; + //- From global to local on proci + inline label toLocal(const label proci, const label i) const; //- Which processor does global come from? Binary search. inline label whichProcID(const label i) const; - //- Start of procI data - inline label offset(const label procI) const; + //- Start of proci data + inline label offset(const label proci) const; // Other diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H index bd71c2c94704c5a2ace1262b3e357e19bc659e2a..3f75a6e9d5a9ce44bfac4d0143d700f00e934cdd 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndexI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,15 +45,15 @@ inline Foam::labelList& Foam::globalIndex::offsets() } -inline Foam::label Foam::globalIndex::offset(const label procI) const +inline Foam::label Foam::globalIndex::offset(const label proci) const { - return offsets_[procI]; + return offsets_[proci]; } -inline Foam::label Foam::globalIndex::localSize(const label procI) const +inline Foam::label Foam::globalIndex::localSize(const label proci) const { - return offsets_[procI+1] - offsets_[procI]; + return offsets_[proci+1] - offsets_[proci]; } @@ -71,11 +71,11 @@ inline Foam::label Foam::globalIndex::size() const inline Foam::label Foam::globalIndex::toGlobal ( - const label procI, + const label proci, const label i ) const { - return i + offsets_[procI]; + return i + offsets_[proci]; } @@ -86,9 +86,9 @@ inline Foam::label Foam::globalIndex::toGlobal(const label i) const //- Is on local processor -inline bool Foam::globalIndex::isLocal(const label procI, const label i) const +inline bool Foam::globalIndex::isLocal(const label proci, const label i) const { - return i >= offsets_[procI] && i < offsets_[procI+1]; + return i >= offsets_[proci] && i < offsets_[proci+1]; } @@ -98,16 +98,16 @@ inline bool Foam::globalIndex::isLocal(const label i) const } -inline Foam::label Foam::globalIndex::toLocal(const label procI, const label i) +inline Foam::label Foam::globalIndex::toLocal(const label proci, const label i) const { - label localI = i - offsets_[procI]; + label localI = i - offsets_[proci]; - if (localI < 0 || i >= offsets_[procI+1]) + if (localI < 0 || i >= offsets_[proci+1]) { FatalErrorInFunction << "Global " << i << " does not belong on processor " - << procI << endl << "Offsets:" << offsets_ + << proci << endl << "Offsets:" << offsets_ << abort(FatalError); } return localI; diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C index 9b98e1102a3158e2f25003efbdb832fd7e3cd4e8..32e23d91ec8e8c7cca7992f3ad6e45fa6d50204d 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C @@ -616,11 +616,11 @@ void Foam::globalMeshData::calcPointConnectivity ); // Add transform to connectivity const labelPair& n = myData[pTransformSlaves[i]]; - label procI = globalIndexAndTransform::processor(n); + label proci = globalIndexAndTransform::processor(n); label index = globalIndexAndTransform::index(n); pConnectivity[connI++] = globalIndexAndTransform::encode ( - procI, + proci, index, transformI ); @@ -767,11 +767,11 @@ void Foam::globalMeshData::calcGlobalPointEdges { // Add transform to connectivity const labelPair& n = otherData[j]; - label procI = globalIndexAndTransform::processor(n); + label proci = globalIndexAndTransform::processor(n); label index = globalIndexAndTransform::index(n); globalPPoints[sz++] = globalIndexAndTransform::encode ( - procI, + proci, index, transformI ); @@ -811,25 +811,25 @@ Foam::label Foam::globalMeshData::findTransform const label localPoint ) const { - const label remoteProcI = globalIndexAndTransform::processor(remotePoint); + const label remoteProci = globalIndexAndTransform::processor(remotePoint); const label remoteIndex = globalIndexAndTransform::index(remotePoint); label remoteTransformI = -1; label localTransformI = -1; forAll(info, i) { - label procI = globalIndexAndTransform::processor(info[i]); + label proci = globalIndexAndTransform::processor(info[i]); label pointI = globalIndexAndTransform::index(info[i]); label transformI = globalIndexAndTransform::transformIndex(info[i]); - if (procI == Pstream::myProcNo() && pointI == localPoint) + if (proci == Pstream::myProcNo() && pointI == localPoint) { localTransformI = transformI; //Pout<< "For local :" << localPoint // << " found transform:" << localTransformI // << endl; } - if (procI == remoteProcI && pointI == remoteIndex) + if (proci == remoteProci && pointI == remoteIndex) { remoteTransformI = transformI; //Pout<< "For remote:" << remotePoint @@ -960,13 +960,13 @@ void Foam::globalMeshData::calcGlobalEdgeSlaves() const if (transform0 == transform1) { - label procI = globalEdgeNumbers.whichProcID(pEdges0[i]); + label proci = globalEdgeNumbers.whichProcID(pEdges0[i]); eEdges.append ( globalIndexAndTransform::encode ( - procI, - globalEdgeNumbers.toLocal(procI, pEdges0[i]), + proci, + globalEdgeNumbers.toLocal(proci, pEdges0[i]), transform0 ) ); @@ -1016,7 +1016,7 @@ void Foam::globalMeshData::calcGlobalEdgeSlaves() const for (label i = 1; i < edgeInfo.size(); i++) { const labelPair& info = edgeInfo[i]; - label procI = globalIndexAndTransform::processor(info); + label proci = globalIndexAndTransform::processor(info); label index = globalIndexAndTransform::index(info); label transform = globalIndexAndTransform::transformIndex ( @@ -1027,7 +1027,7 @@ void Foam::globalMeshData::calcGlobalEdgeSlaves() const { eEdges[nonTransformI++] = globalEdgeNumbers.toGlobal ( - procI, + proci, index ); } @@ -1262,10 +1262,10 @@ void Foam::globalMeshData::calcPointBoundaryFaces ); if (iter != meshPointMap.end()) { - label bFaceI = + label bFacei = pp.start() + i - mesh_.nInternalFaces(); pointBoundaryFaces[iter()][nPointFaces[iter()]++] = - bFaceI; + bFacei; } } } @@ -1406,12 +1406,12 @@ void Foam::globalMeshData::calcGlobalPointBoundaryFaces() const // Check that same face not already present untransformed if (findIndex(untrafoFaces, slave)== -1) { - label procI = globalIndices.whichProcID(slave); - label facei = globalIndices.toLocal(procI, slave); + label proci = globalIndices.whichProcID(slave); + label facei = globalIndices.toLocal(proci, slave); myBFaces[n++] = globalIndexAndTransform::encode ( - procI, + proci, facei, transformI ); @@ -1478,7 +1478,7 @@ void Foam::globalMeshData::calcGlobalPointBoundaryCells() const // Create map of boundary cells and point-cell addressing // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - label bCellI = 0; + label bCelli = 0; Map<label> meshCellMap(4*coupledPatch().nPoints()); DynamicList<label> cellMap(meshCellMap.size()); @@ -1504,10 +1504,10 @@ void Foam::globalMeshData::calcGlobalPointBoundaryCells() const } else { - meshCellMap.insert(celli, bCellI); + meshCellMap.insert(celli, bCelli); cellMap.append(celli); - bCells[i] = bCellI; - bCellI++; + bCells[i] = bCelli; + bCelli++; } } } @@ -1635,11 +1635,11 @@ void Foam::globalMeshData::calcGlobalPointBoundaryCells() const // Check that same cell not already present untransformed if (findIndex(untrafoCells, slave)== -1) { - label procI = globalIndices.whichProcID(slave); - label celli = globalIndices.toLocal(procI, slave); + label proci = globalIndices.whichProcID(slave); + label celli = globalIndices.toLocal(proci, slave); myBCells[n++] = globalIndexAndTransform::encode ( - procI, + proci, celli, transformI ); diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C index 3baf270ee91b63eb18de79ef094c5d7e69d86251..caf5113ec61f2ef2e2c31934ce07ffdfdbb7f4f2 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C @@ -64,14 +64,14 @@ Foam::label Foam::globalPoints::findSamePoint const labelPair& info ) const { - const label procI = globalIndexAndTransform::processor(info); + const label proci = globalIndexAndTransform::processor(info); const label index = globalIndexAndTransform::index(info); forAll(allInfo, i) { if ( - globalIndexAndTransform::processor(allInfo[i]) == procI + globalIndexAndTransform::processor(allInfo[i]) == proci && globalIndexAndTransform::index(allInfo[i]) == index ) { @@ -146,11 +146,11 @@ void Foam::globalPoints::addToSend forAll(pFaces, i) { - label patchFaceI = pFaces[i]; + label patchFacei = pFaces[i]; - const face& f = pp[patchFaceI]; + const face& f = pp[patchFacei]; - patchFaces.append(patchFaceI); + patchFaces.append(patchFacei); indexInFace.append(findIndex(f, meshPointI)); // Add patch transformation @@ -356,18 +356,18 @@ void Foam::globalPoints::printProcPoint const labelPair& pointInfo ) const { - label procI = globalIndexAndTransform::processor(pointInfo); + label proci = globalIndexAndTransform::processor(pointInfo); label index = globalIndexAndTransform::index(pointInfo); label trafoI = globalIndexAndTransform::transformIndex(pointInfo); - Pout<< " proc:" << procI; + Pout<< " proc:" << proci; Pout<< " localpoint:"; Pout<< index; Pout<< " through transform:" << trafoI << " bits:" << globalTransforms_.decodeTransformIndex(trafoI); - if (procI == Pstream::myProcNo()) + if (proci == Pstream::myProcNo()) { label meshPointI = localToMeshPoint(patchToMeshPoint, index); Pout<< " at:" << mesh_.points()[meshPointI]; @@ -1035,7 +1035,7 @@ void Foam::globalPoints::calculateSharedPoints for (label i = 1; i < pointInfo.size(); i++) { const labelPair& info = pointInfo[i]; - label procI = globalIndexAndTransform::processor(info); + label proci = globalIndexAndTransform::processor(info); label index = globalIndexAndTransform::index(info); label transform = globalIndexAndTransform::transformIndex ( @@ -1046,7 +1046,7 @@ void Foam::globalPoints::calculateSharedPoints { pPoints[nonTransformI++] = globalIndices_.toGlobal ( - procI, + proci, index ); } diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C index 82cc8d5d575cee1febbed0eb60ab7f314fe465dd..9a9b20810cbb497f97a4eb5bb0d4aca6851c2b34 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C @@ -148,19 +148,19 @@ Foam::List<Foam::labelPair> Foam::mapDistribute::schedule HashSet<labelPair, labelPair::Hash<>> commsSet(Pstream::nProcs()); // Find what communication is required - forAll(subMap, procI) + forAll(subMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - if (subMap[procI].size()) + if (subMap[proci].size()) { - // I need to send to procI - commsSet.insert(labelPair(Pstream::myProcNo(), procI)); + // I need to send to proci + commsSet.insert(labelPair(Pstream::myProcNo(), proci)); } - if (constructMap[procI].size()) + if (constructMap[proci].size()) { - // I need to receive from procI - commsSet.insert(labelPair(procI, Pstream::myProcNo())); + // I need to receive from proci + commsSet.insert(labelPair(proci, Pstream::myProcNo())); } } } @@ -278,7 +278,7 @@ const Foam::List<Foam::labelPair>& Foam::mapDistribute::schedule() const void Foam::mapDistribute::checkReceivedSize ( - const label procI, + const label proci, const label expectedSize, const label receivedSize ) @@ -286,7 +286,7 @@ void Foam::mapDistribute::checkReceivedSize if (receivedSize != expectedSize) { FatalErrorInFunction - << "Expected from processor " << procI + << "Expected from processor " << proci << " " << expectedSize << " but received " << receivedSize << " elements." << abort(FatalError); @@ -299,11 +299,11 @@ void Foam::mapDistribute::printLayout(Ostream& os) const // Determine offsets of remote data. labelList minIndex(Pstream::nProcs(), labelMax); labelList maxIndex(Pstream::nProcs(), labelMin); - forAll(constructMap_, procI) + forAll(constructMap_, proci) { - const labelList& construct = constructMap_[procI]; - minIndex[procI] = min(minIndex[procI], min(construct)); - maxIndex[procI] = max(maxIndex[procI], max(construct)); + const labelList& construct = constructMap_[proci]; + minIndex[proci] = min(minIndex[proci], min(construct)); + maxIndex[proci] = max(maxIndex[proci], max(construct)); } label localSize; @@ -322,23 +322,23 @@ void Foam::mapDistribute::printLayout(Ostream& os) const << " size : " << localSize << endl; label offset = localSize; - forAll(minIndex, procI) + forAll(minIndex, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - if (constructMap_[procI].size() > 0) + if (constructMap_[proci].size() > 0) { - if (minIndex[procI] != offset) + if (minIndex[proci] != offset) { FatalErrorInFunction << "offset:" << offset - << " procI:" << procI - << " minIndex:" << minIndex[procI] + << " proci:" << proci + << " minIndex:" << minIndex[proci] << abort(FatalError); } - label size = maxIndex[procI]-minIndex[procI]+1; - os << "processor " << procI << ':' << endl + label size = maxIndex[proci]-minIndex[proci]+1; + os << "processor " << proci << ':' << endl << " start : " << offset << endl << " size : " << size << endl; @@ -376,17 +376,17 @@ void Foam::mapDistribute::calcCompactAddressing if (globalIndex != -1 && !globalNumbering.isLocal(globalIndex)) { - label procI = globalNumbering.whichProcID(globalIndex); - nNonLocal[procI]++; + label proci = globalNumbering.whichProcID(globalIndex); + nNonLocal[proci]++; } } - forAll(compactMap, procI) + forAll(compactMap, proci) { - compactMap[procI].clear(); - if (procI != Pstream::myProcNo()) + compactMap[proci].clear(); + if (proci != Pstream::myProcNo()) { - compactMap[procI].resize(2*nNonLocal[procI]); + compactMap[proci].resize(2*nNonLocal[proci]); } } @@ -398,10 +398,10 @@ void Foam::mapDistribute::calcCompactAddressing if (globalIndex != -1 && !globalNumbering.isLocal(globalIndex)) { - label procI = globalNumbering.whichProcID(globalIndex); - label index = globalNumbering.toLocal(procI, globalIndex); - label nCompact = compactMap[procI].size(); - compactMap[procI].insert(index, nCompact); + label proci = globalNumbering.whichProcID(globalIndex); + label index = globalNumbering.toLocal(proci, globalIndex); + label nCompact = compactMap[proci].size(); + compactMap[proci].insert(index, nCompact); } } } @@ -429,18 +429,18 @@ void Foam::mapDistribute::calcCompactAddressing if (globalIndex != -1 && !globalNumbering.isLocal(globalIndex)) { - label procI = globalNumbering.whichProcID(globalIndex); - nNonLocal[procI]++; + label proci = globalNumbering.whichProcID(globalIndex); + nNonLocal[proci]++; } } } - forAll(compactMap, procI) + forAll(compactMap, proci) { - compactMap[procI].clear(); - if (procI != Pstream::myProcNo()) + compactMap[proci].clear(); + if (proci != Pstream::myProcNo()) { - compactMap[procI].resize(2*nNonLocal[procI]); + compactMap[proci].resize(2*nNonLocal[proci]); } } @@ -456,10 +456,10 @@ void Foam::mapDistribute::calcCompactAddressing if (globalIndex != -1 && !globalNumbering.isLocal(globalIndex)) { - label procI = globalNumbering.whichProcID(globalIndex); - label index = globalNumbering.toLocal(procI, globalIndex); - label nCompact = compactMap[procI].size(); - compactMap[procI].insert(index, nCompact); + label proci = globalNumbering.whichProcID(globalIndex); + label index = globalNumbering.toLocal(proci, globalIndex); + label nCompact = compactMap[proci].size(); + compactMap[proci].insert(index, nCompact); } } } @@ -482,12 +482,12 @@ void Foam::mapDistribute::exchangeAddressing compactStart.setSize(Pstream::nProcs()); compactStart[Pstream::myProcNo()] = 0; constructSize_ = globalNumbering.localSize(); - forAll(compactStart, procI) + forAll(compactStart, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - compactStart[procI] = constructSize_; - constructSize_ += compactMap[procI].size(); + compactStart[proci] = constructSize_; + constructSize_ += compactMap[proci].size(); } } @@ -499,26 +499,26 @@ void Foam::mapDistribute::exchangeAddressing labelListList wantedRemoteElements(Pstream::nProcs()); // Compact addressing for received data constructMap_.setSize(Pstream::nProcs()); - forAll(compactMap, procI) + forAll(compactMap, proci) { - if (procI == Pstream::myProcNo()) + if (proci == Pstream::myProcNo()) { // All my own elements are used label nLocal = globalNumbering.localSize(); - wantedRemoteElements[procI] = identity(nLocal); - constructMap_[procI] = identity(nLocal); + wantedRemoteElements[proci] = identity(nLocal); + constructMap_[proci] = identity(nLocal); } else { - // Remote elements wanted from processor procI - labelList& remoteElem = wantedRemoteElements[procI]; - labelList& localElem = constructMap_[procI]; - remoteElem.setSize(compactMap[procI].size()); - localElem.setSize(compactMap[procI].size()); + // Remote elements wanted from processor proci + labelList& remoteElem = wantedRemoteElements[proci]; + labelList& localElem = constructMap_[proci]; + remoteElem.setSize(compactMap[proci].size()); + localElem.setSize(compactMap[proci].size()); label i = 0; - forAllIter(Map<label>, compactMap[procI], iter) + forAllIter(Map<label>, compactMap[proci], iter) { - const label compactI = compactStart[procI] + iter(); + const label compactI = compactStart[proci] + iter(); remoteElem[i] = iter.key(); localElem[i] = compactI; iter() = compactI; @@ -560,12 +560,12 @@ void Foam::mapDistribute::exchangeAddressing compactStart.setSize(Pstream::nProcs()); compactStart[Pstream::myProcNo()] = 0; constructSize_ = globalNumbering.localSize(); - forAll(compactStart, procI) + forAll(compactStart, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - compactStart[procI] = constructSize_; - constructSize_ += compactMap[procI].size(); + compactStart[proci] = constructSize_; + constructSize_ += compactMap[proci].size(); } } @@ -577,26 +577,26 @@ void Foam::mapDistribute::exchangeAddressing labelListList wantedRemoteElements(Pstream::nProcs()); // Compact addressing for received data constructMap_.setSize(Pstream::nProcs()); - forAll(compactMap, procI) + forAll(compactMap, proci) { - if (procI == Pstream::myProcNo()) + if (proci == Pstream::myProcNo()) { // All my own elements are used label nLocal = globalNumbering.localSize(); - wantedRemoteElements[procI] = identity(nLocal); - constructMap_[procI] = identity(nLocal); + wantedRemoteElements[proci] = identity(nLocal); + constructMap_[proci] = identity(nLocal); } else { - // Remote elements wanted from processor procI - labelList& remoteElem = wantedRemoteElements[procI]; - labelList& localElem = constructMap_[procI]; - remoteElem.setSize(compactMap[procI].size()); - localElem.setSize(compactMap[procI].size()); + // Remote elements wanted from processor proci + labelList& remoteElem = wantedRemoteElements[proci]; + labelList& localElem = constructMap_[proci]; + remoteElem.setSize(compactMap[proci].size()); + localElem.setSize(compactMap[proci].size()); label i = 0; - forAllIter(Map<label>, compactMap[procI], iter) + forAllIter(Map<label>, compactMap[proci], iter) { - const label compactI = compactStart[procI] + iter(); + const label compactI = compactStart[proci] + iter(); remoteElem[i] = iter.key(); localElem[i] = compactI; iter() = compactI; @@ -711,10 +711,10 @@ Foam::mapDistribute::mapDistribute subMap_.setSize(Pstream::nProcs()); constructMap_.setSize(Pstream::nProcs()); - forAll(nSend, procI) + forAll(nSend, proci) { - subMap_[procI].setSize(nSend[procI]); - constructMap_[procI].setSize(nRecv[procI]); + subMap_[proci].setSize(nSend[proci]); + constructMap_[proci].setSize(nRecv[proci]); } nSend = 0; nRecv = 0; @@ -762,11 +762,11 @@ Foam::mapDistribute::mapDistribute ); //// Sort remote elements needed (not really necessary) - //forAll(compactMap, procI) + //forAll(compactMap, proci) //{ - // if (procI != Pstream::myProcNo()) + // if (proci != Pstream::myProcNo()) // { - // Map<label>& globalMap = compactMap[procI]; + // Map<label>& globalMap = compactMap[proci]; // // SortableList<label> sorted(globalMap.toc().xfer()); // @@ -820,11 +820,11 @@ Foam::mapDistribute::mapDistribute ); //// Sort remote elements needed (not really necessary) - //forAll(compactMap, procI) + //forAll(compactMap, proci) //{ - // if (procI != Pstream::myProcNo()) + // if (proci != Pstream::myProcNo()) // { - // Map<label>& globalMap = compactMap[procI]; + // Map<label>& globalMap = compactMap[proci]; // // SortableList<label> sorted(globalMap.toc().xfer()); // @@ -884,12 +884,12 @@ Foam::mapDistribute::mapDistribute forAll(transformedElements, i) { labelPair elem = transformedElements[i]; - label procI = globalIndexAndTransform::processor(elem); - if (procI != Pstream::myProcNo()) + label proci = globalIndexAndTransform::processor(elem); + if (proci != Pstream::myProcNo()) { label index = globalIndexAndTransform::index(elem); - label nCompact = compactMap[procI].size(); - compactMap[procI].insert(index, nCompact); + label nCompact = compactMap[proci].size(); + compactMap[proci].insert(index, nCompact); } } @@ -935,16 +935,16 @@ Foam::mapDistribute::mapDistribute forAll(transformedElements, i) { labelPair elem = transformedElements[i]; - label procI = globalIndexAndTransform::processor(elem); + label proci = globalIndexAndTransform::processor(elem); label index = globalIndexAndTransform::index(elem); label trafoI = globalIndexAndTransform::transformIndex(elem); // Get compact index for untransformed element label rawElemI = ( - procI == Pstream::myProcNo() + proci == Pstream::myProcNo() ? index - : compactMap[procI][index] + : compactMap[proci][index] ); label& n = nPerTransform[trafoI]; @@ -993,12 +993,12 @@ Foam::mapDistribute::mapDistribute forAll(elems, i) { - label procI = globalIndexAndTransform::processor(elems[i]); - if (procI != Pstream::myProcNo()) + label proci = globalIndexAndTransform::processor(elems[i]); + if (proci != Pstream::myProcNo()) { label index = globalIndexAndTransform::index(elems[i]); - label nCompact = compactMap[procI].size(); - compactMap[procI].insert(index, nCompact); + label nCompact = compactMap[proci].size(); + compactMap[proci].insert(index, nCompact); } } } @@ -1053,16 +1053,16 @@ Foam::mapDistribute::mapDistribute forAll(elems, i) { - label procI = globalIndexAndTransform::processor(elems[i]); + label proci = globalIndexAndTransform::processor(elems[i]); label index = globalIndexAndTransform::index(elems[i]); label trafoI = globalIndexAndTransform::transformIndex(elems[i]); // Get compact index for untransformed element label rawElemI = ( - procI == Pstream::myProcNo() + proci == Pstream::myProcNo() ? index - : compactMap[procI][index] + : compactMap[proci][index] ); label& n = nPerTransform[trafoI]; @@ -1145,9 +1145,9 @@ Foam::label Foam::mapDistribute::renumber } else { - label procI = globalNumbering.whichProcID(globalI); - label index = globalNumbering.toLocal(procI, globalI); - return compactMap[procI][index]; + label proci = globalNumbering.whichProcID(globalI); + label index = globalNumbering.toLocal(proci, globalI); + return compactMap[proci][index]; } } diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H index 072fe3f6c8bfa518638e9d3bca1a64733d2f1578..b7b2299490b7011ebcdbc9b82695b2e802efe878 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.H @@ -50,7 +50,7 @@ Note: followed by used-only elements of proc0, proc2, proc3. The constructed mapDistribute sends the local elements from and receives the remote elements into their compact position. - compactMap[procI] is the position of elements from procI in the compact + compactMap[proci] is the position of elements from proci in the compact map. compactMap[myProcNo()] is empty since trivial addressing. It rewrites the input global indices into indices into the constructed @@ -181,7 +181,7 @@ class mapDistribute static void checkReceivedSize ( - const label procI, + const label proci, const label expectedSize, const label receivedSize ); @@ -413,7 +413,7 @@ public: //- Special variant that works with the info sorted into bins // according to local indices. E.g. think cellCells where - // cellCells[localCellI] is a list of global cells + // cellCells[localCelli] is a list of global cells mapDistribute ( const globalIndex&, diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPatchChange/mapPatchChange.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPatchChange/mapPatchChange.H index b14dd1757c9b41d91c3e834611f956a132736d2e..7de6f75d0076153cbf9cfaf8731efafd3e8ec73a 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPatchChange/mapPatchChange.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPatchChange/mapPatchChange.H @@ -126,11 +126,11 @@ public: // patches. label deletedI = 0; - forAll(oldToNew, oldPatchI) + forAll(oldToNew, oldPatchi) { - if (oldToNew[oldPatchI] == -1) + if (oldToNew[oldPatchi] == -1) { - oldToNew[deletedI++] = oldPatchI; + oldToNew[deletedI++] = oldPatchi; } } diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H index 1c91aee287103b063fa3a0ef3c760af6338711bf..cf20684fc496d005c93f7020058d4b7219b1fb3f 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H @@ -70,11 +70,11 @@ Description - unchanged: - faceMap[facei] contains old face label - - reverseFaceMap[oldFaceI] contains new face label + - reverseFaceMap[oldFacei] contains new face label - removed: - - reverseFaceMap[oldFaceI] contains -1 + - reverseFaceMap[oldFacei] contains -1 - merged into face: - - reverseFaceMap[oldFaceI] contains <-1 : -newFaceI-2 + - reverseFaceMap[oldFacei] contains <-1 : -newFacei-2 - faceMap[facei] contains the old master face label - facesFromFaces gives for facei all the old face labels (including the old master face!) @@ -102,11 +102,11 @@ Description - unchanged: - cellMap[celli] contains old cell label - - reverseCellMap[oldCellI] contains new cell label + - reverseCellMap[oldCelli] contains new cell label - removed: - - reverseCellMap[oldCellI] contains -1 + - reverseCellMap[oldCelli] contains -1 - merged into cell: - - reverseCellMap[oldCellI] contains <-1 : -newCellI-2 + - reverseCellMap[oldCelli] contains <-1 : -newCelli-2 - cellMap[celli] contains the old master cell label - cellsFromCells gives for celli all the old cell labels (including the old master cell!) @@ -499,9 +499,9 @@ public: } //- If face is removed return face (on new mesh) it merged into - label mergedFace(const label oldFaceI) const + label mergedFace(const label oldFacei) const { - label i = reverseFaceMap_[oldFaceI]; + label i = reverseFaceMap_[oldFacei]; if (i == -1) { @@ -514,7 +514,7 @@ public: else { FatalErrorInFunction - << "old face label " << oldFaceI + << "old face label " << oldFacei << " has reverseMap " << i << endl << "Only call mergedFace for removed faces." << abort(FatalError); @@ -530,9 +530,9 @@ public: } //- If cell is removed return cell (on new mesh) it merged into - label mergedCell(const label oldCellI) const + label mergedCell(const label oldCelli) const { - label i = reverseCellMap_[oldCellI]; + label i = reverseCellMap_[oldCelli]; if (i == -1) { @@ -545,7 +545,7 @@ public: else { FatalErrorInFunction - << "old cell label " << oldCellI + << "old cell label " << oldCelli << " has reverseMap " << i << endl << "Only call mergedCell for removed cells." << abort(FatalError); diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index 66a1c70019f9d06ba7ab4b79fa8a66a992fbf90b..9b14e0383338857ee7b5da9fa746fa892d9b7cac 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -414,10 +414,10 @@ const Foam::labelList& Foam::polyBoundaryMesh::patchID() const forAll(bm, patchi) { - label bFaceI = bm[patchi].start() - mesh_.nInternalFaces(); + label bFacei = bm[patchi].start() - mesh_.nInternalFaces(); forAll(bm[patchi], i) { - patchID[bFaceI++] = patchi; + patchID[bFacei++] = patchi; } } } @@ -872,13 +872,13 @@ bool Foam::polyBoundaryMesh::checkParallelSync(const bool report) const wordList names(bm.size()); wordList types(bm.size()); - label nonProcI = 0; + label nonProci = 0; forAll(bm, patchi) { if (!isA<processorPolyPatch>(bm[patchi])) { - if (nonProcI != patchi) + if (nonProci != patchi) { // There is processor patch in between normal patches. hasError = true; @@ -895,14 +895,14 @@ bool Foam::polyBoundaryMesh::checkParallelSync(const bool report) const } else { - names[nonProcI] = bm[patchi].name(); - types[nonProcI] = bm[patchi].type(); - nonProcI++; + names[nonProci] = bm[patchi].name(); + types[nonProci] = bm[patchi].type(); + nonProci++; } } } - names.setSize(nonProcI); - types.setSize(nonProcI); + names.setSize(nonProci); + types.setSize(nonProci); List<wordList> allNames(Pstream::nProcs()); allNames[Pstream::myProcNo()] = names; @@ -916,12 +916,12 @@ bool Foam::polyBoundaryMesh::checkParallelSync(const bool report) const // Have every processor check but only master print error. - for (label procI = 1; procI < allNames.size(); ++procI) + for (label proci = 1; proci < allNames.size(); ++proci) { if ( - (allNames[procI] != allNames[0]) - || (allTypes[procI] != allTypes[0]) + (allNames[proci] != allNames[0]) + || (allTypes[proci] != allTypes[0]) ) { hasError = true; @@ -931,9 +931,9 @@ bool Foam::polyBoundaryMesh::checkParallelSync(const bool report) const Info<< " ***Inconsistent patches across processors, " "processor 0 has patch names:" << allNames[0] << " patch types:" << allTypes[0] - << " processor " << procI << " has patch names:" - << allNames[procI] - << " patch types:" << allTypes[procI] + << " processor " << proci << " has patch names:" + << allNames[proci] + << " patch types:" << allTypes[proci] << endl; } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 53be08ccd931e0909cfc31a4d3cc98414c61920d..96f81efa0c90e9b730c9a07007eccd9d4d2b3923 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -1216,16 +1216,16 @@ void Foam::polyMesh::findCellFacePt if (info.hit()) { - label nearestCellI = tree.shapes().cellLabels()[info.index()]; + label nearestCelli = tree.shapes().cellLabels()[info.index()]; // Check the nearest cell to see if the point is inside. - findTetFacePt(nearestCellI, p, tetFacei, tetPti); + findTetFacePt(nearestCelli, p, tetFacei, tetPti); if (tetFacei != -1) { // Point was in the nearest cell - celli = nearestCellI; + celli = nearestCelli; return; } @@ -1237,9 +1237,9 @@ void Foam::polyMesh::findCellFacePt forAll(testCells, pCI) { - label testCellI = tree.shapes().cellLabels()[testCells[pCI]]; + label testCelli = tree.shapes().cellLabels()[testCells[pCI]]; - if (testCellI == nearestCellI) + if (testCelli == nearestCelli) { // Don't retest the nearest cell @@ -1247,13 +1247,13 @@ void Foam::polyMesh::findCellFacePt } // Check the test cell to see if the point is inside. - findTetFacePt(testCellI, p, tetFacei, tetPti); + findTetFacePt(testCelli, p, tetFacei, tetPti); if (tetFacei != -1) { // Point was in the test cell - celli = testCellI; + celli = testCelli; return; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.H b/src/OpenFOAM/meshes/polyMesh/polyMesh.H index 9ce9703810b04eb4c77bdaee420f1b06edc1ee6d..99dd28573c1bf6f67c41558043f01c391b7c11db 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.H @@ -685,7 +685,7 @@ public: ) const; //- Find the tetFacei and tetPti for point p in celli. - // tetFaceI and tetPtI are set to -1 if not found + // tetFacei and tetPtI are set to -1 if not found void findTetFacePt ( const label celli, diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C index 3ca9dd4a106a43dbc1b9c732cbe86c6272a9394a..7bdbd5c60243b41116e54096014055a2201a4359 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C @@ -70,12 +70,12 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceOrthogonality forAll(pp, i) { label facei = pp.start() + i; - label bFaceI = facei - mesh.nInternalFaces(); + label bFacei = facei - mesh.nInternalFaces(); ortho[facei] = primitiveMeshTools::faceOrthogonality ( cc[own[facei]], - neighbourCc[bFaceI], + neighbourCc[bFacei], areas[facei] ); } @@ -132,7 +132,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceSkewness forAll(pp, i) { label facei = pp.start() + i; - label bFaceI = facei - mesh.nInternalFaces(); + label bFacei = facei - mesh.nInternalFaces(); skew[facei] = primitiveMeshTools::faceSkewness ( @@ -143,7 +143,7 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceSkewness facei, cellCtrs[own[facei]], - neighbourCc[bFaceI] + neighbourCc[bFacei] ); } } @@ -212,13 +212,13 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceWeights forAll(pp, i) { label facei = pp.start() + i; - label bFaceI = facei - mesh.nInternalFaces(); + label bFacei = facei - mesh.nInternalFaces(); const point& fc = fCtrs[facei]; const vector& fa = fAreas[facei]; scalar dOwn = mag(fa & (fc-cellCtrs[own[facei]])); - scalar dNei = mag(fa & (neiCc[bFaceI]-fc)); + scalar dNei = mag(fa & (neiCc[bFacei]-fc)); weight[facei] = min(dNei,dOwn)/(dNei+dOwn+VSMALL); } @@ -265,10 +265,10 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::volRatio forAll(pp, i) { label facei = pp.start() + i; - label bFaceI = facei - mesh.nInternalFaces(); + label bFacei = facei - mesh.nInternalFaces(); scalar volOwn = vol[own[facei]]; - scalar volNei = neiVol[bFaceI]; + scalar volNei = neiVol[bFacei]; ratio[facei] = min(volOwn,volNei)/(max(volOwn, volNei)+VSMALL); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C index b2035c14fd6e1f7009967080f27a03446091940f..0348bf64ec67079afbd99162d86ad3e34d89d1bb 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C @@ -220,16 +220,16 @@ void Foam::polyMesh::setTopology // Get the list of search faces const faceList& searchFaces = cellsFaceShapes[curNei]; - forAll(searchFaces, neiFaceI) + forAll(searchFaces, neiFacei) { - if (searchFaces[neiFaceI] == curFace) + if (searchFaces[neiFacei] == curFace) { // Match!! found = true; // Record the neighbour cell and face neiCells[facei] = curNei; - faceOfNeiCell[facei] = neiFaceI; + faceOfNeiCell[facei] = neiFacei; nNeighbours++; break; @@ -315,11 +315,11 @@ void Foam::polyMesh::setTopology bool found = false; - forAll(facesOfCellInside, cellFaceI) + forAll(facesOfCellInside, cellFacei) { - if (face::sameVertices(facesOfCellInside[cellFaceI], curFace)) + if (face::sameVertices(facesOfCellInside[cellFacei], curFace)) { - if (cells[cellInside][cellFaceI] >= 0) + if (cells[cellInside][cellFacei] >= 0) { FatalErrorInFunction << "Trying to specify a boundary face " << curFace @@ -335,9 +335,9 @@ void Foam::polyMesh::setTopology found = true; // Set the patch face to corresponding cell-face - faces_[nFaces] = facesOfCellInside[cellFaceI]; + faces_[nFaces] = facesOfCellInside[cellFacei]; - cells[cellInside][cellFaceI] = nFaces; + cells[cellInside][cellFacei] = nFaces; break; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C index fca4f97b70aac077a050f3293f7e4259f1d0d0d3..ad06adccb304f61dd966077adf7e155cf60408a7 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C @@ -1025,10 +1025,10 @@ const Foam::edgeList& Foam::cyclicPolyPatch::coupledPoints() const // From local point to nbrPatch or -1. labelList coupledPoint(nPoints(), -1); - forAll(*this, patchFaceI) + forAll(*this, patchFacei) { - const face& fA = localFaces()[patchFaceI]; - const face& fB = nbrLocalFaces[patchFaceI]; + const face& fA = localFaces()[patchFacei]; + const face& fB = nbrLocalFaces[patchFacei]; forAll(fA, indexA) { @@ -1111,9 +1111,9 @@ const Foam::edgeList& Foam::cyclicPolyPatch::coupledEdges() const // Map from edge on A to points (in B indices) EdgeMap<label> edgeMap(nEdges()); - forAll(*this, patchFaceI) + forAll(*this, patchFacei) { - const labelList& fEdges = faceEdges()[patchFaceI]; + const labelList& fEdges = faceEdges()[patchFacei]; forAll(fEdges, i) { @@ -1146,9 +1146,9 @@ const Foam::edgeList& Foam::cyclicPolyPatch::coupledEdges() const edgeList& coupledEdges = *coupledEdgesPtr_; label coupleI = 0; - forAll(neighbPatch, patchFaceI) + forAll(neighbPatch, patchFacei) { - const labelList& fEdges = neighbPatch.faceEdges()[patchFaceI]; + const labelList& fEdges = neighbPatch.faceEdges()[patchFacei]; forAll(fEdges, i) { @@ -1284,9 +1284,9 @@ bool Foam::cyclicPolyPatch::order { // Do nothing (i.e. identical mapping, zero rotation). // See comment at top. - forAll(faceMap, patchFaceI) + forAll(faceMap, patchFacei) { - faceMap[patchFaceI] = patchFaceI; + faceMap[patchFacei] = patchFacei; } return false; @@ -1392,32 +1392,32 @@ bool Foam::cyclicPolyPatch::order // Set rotation. - forAll(faceMap, oldFaceI) + forAll(faceMap, oldFacei) { - // The face f will be at newFaceI (after morphing) and we want its + // The face f will be at newFacei (after morphing) and we want its // anchorPoint (= f[0]) to align with the anchorpoint for the // corresponding face on the other side. - label newFaceI = faceMap[oldFaceI]; + label newFacei = faceMap[oldFacei]; - const point& wantedAnchor = anchors0[newFaceI]; + const point& wantedAnchor = anchors0[newFacei]; - rotation[newFaceI] = getRotation + rotation[newFacei] = getRotation ( pp.points(), - pp[oldFaceI], + pp[oldFacei], wantedAnchor, - tols[oldFaceI] + tols[oldFacei] ); - if (rotation[newFaceI] == -1) + if (rotation[newFacei] == -1) { SeriousErrorInFunction << "in patch " << name() << " : " - << "Cannot find point on face " << pp[oldFaceI] + << "Cannot find point on face " << pp[oldFacei] << " with vertices " - << IndirectList<point>(pp.points(), pp[oldFaceI])() + << IndirectList<point>(pp.points(), pp[oldFacei])() << " that matches point " << wantedAnchor << " when matching the halves of processor patch " << name() << "Continuing with incorrect face ordering from now on!" diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C index beab754388b509fc8d0b8b80c507776949b5290a..7fdf0634754ceb3c1556e2f82ccad5217e122a32 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C @@ -448,51 +448,51 @@ bool Foam::oldCyclicPolyPatch::matchAnchors // Set faceMap such that half0 faces get first and corresponding half1 // faces last. - forAll(half0ToPatch, half0FaceI) + forAll(half0ToPatch, half0Facei) { // Label in original patch - label patchFaceI = half0ToPatch[half0FaceI]; + label patchFacei = half0ToPatch[half0Facei]; - faceMap[patchFaceI] = half0FaceI; + faceMap[patchFacei] = half0Facei; // No rotation - rotation[patchFaceI] = 0; + rotation[patchFacei] = 0; } bool fullMatch = true; - forAll(from1To0, half1FaceI) + forAll(from1To0, half1Facei) { - label patchFaceI = half1ToPatch[half1FaceI]; + label patchFacei = half1ToPatch[half1Facei]; // This face has to match the corresponding one on half0. - label half0FaceI = from1To0[half1FaceI]; + label half0Facei = from1To0[half1Facei]; - label newFaceI = half0FaceI + pp.size()/2; + label newFacei = half0Facei + pp.size()/2; - faceMap[patchFaceI] = newFaceI; + faceMap[patchFacei] = newFacei; - // Rotate patchFaceI such that its f[0] aligns with that of + // Rotate patchFacei such that its f[0] aligns with that of // the corresponding face - // (which after shuffling will be at position half0FaceI) + // (which after shuffling will be at position half0Facei) - const point& wantedAnchor = anchors0[half0FaceI]; + const point& wantedAnchor = anchors0[half0Facei]; - rotation[newFaceI] = getRotation + rotation[newFacei] = getRotation ( pp.points(), - half1Faces[half1FaceI], + half1Faces[half1Facei], wantedAnchor, - tols[half1FaceI] + tols[half1Facei] ); - if (rotation[newFaceI] == -1) + if (rotation[newFacei] == -1) { fullMatch = false; if (report) { - const face& f = half1Faces[half1FaceI]; + const face& f = half1Faces[half1Facei]; SeriousErrorInFunction << "Patch:" << name() << " : " << "Cannot find point on face " << f @@ -950,30 +950,30 @@ bool Foam::oldCyclicPolyPatch::order const face& f = pp.localFaces()[facei]; const labelList& pFaces = pp.pointFaces()[f[0]]; - label matchedFaceI = -1; + label matchedFacei = -1; forAll(pFaces, i) { - label otherFaceI = pFaces[i]; + label otherFacei = pFaces[i]; - if (otherFaceI > facei) + if (otherFacei > facei) { - const face& otherF = pp.localFaces()[otherFaceI]; + const face& otherF = pp.localFaces()[otherFacei]; // Note: might pick up two similar oriented faces // (but that is illegal anyway) if (f == otherF) { - matchedFaceI = otherFaceI; + matchedFacei = otherFacei; break; } } } - if (matchedFaceI != -1) + if (matchedFacei != -1) { half0ToPatch[baffleI] = facei; - half1ToPatch[baffleI] = matchedFaceI; + half1ToPatch[baffleI] = matchedFacei; baffleI++; } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C index ef54a15336899cdf31adbdaddb07eb23bb275d1c..2ca4c85b7445c1149ab6e3d6e98def92ee516067 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C @@ -748,9 +748,9 @@ bool Foam::processorPolyPatch::order { // Do nothing (i.e. identical mapping, zero rotation). // See comment at top. - forAll(faceMap, patchFaceI) + forAll(faceMap, patchFacei) { - faceMap[patchFaceI] = patchFaceI; + faceMap[patchFacei] = patchFacei; } if (transform() != COINCIDENTFULLMATCH) @@ -765,19 +765,19 @@ bool Foam::processorPolyPatch::order matchTolerance()*calcFaceTol(pp, pp.points(), pp.faceCentres()) ); - forAll(faceMap, patchFaceI) + forAll(faceMap, patchFacei) { - const point& wantedAnchor = anchors[patchFaceI]; + const point& wantedAnchor = anchors[patchFacei]; - rotation[patchFaceI] = getRotation + rotation[patchFacei] = getRotation ( ppPoints, - pp[patchFaceI], + pp[patchFacei], wantedAnchor, - tols[patchFaceI] + tols[patchFacei] ); - if (rotation[patchFaceI] > 0) + if (rotation[patchFacei] > 0) { change = true; } @@ -803,9 +803,9 @@ bool Foam::processorPolyPatch::order label nMatches = 0; - forAll(pp, lFaceI) + forAll(pp, lFacei) { - const face& localFace = localFaces[lFaceI]; + const face& localFace = localFaces[lFacei]; label faceRotation = -1; const scalar absTolSqr = sqr(SMALL); @@ -815,9 +815,9 @@ bool Foam::processorPolyPatch::order label closestFaceMatch = -1; label closestFaceRotation = -1; - forAll(masterFaces, mFaceI) + forAll(masterFaces, mFacei) { - const face& masterFace = masterFaces[mFaceI]; + const face& masterFace = masterFaces[mFacei]; faceRotation = matchFace ( @@ -837,7 +837,7 @@ bool Foam::processorPolyPatch::order ) { closestMatchDistSqr = matchDistSqr; - closestFaceMatch = mFaceI; + closestFaceMatch = mFacei; closestFaceRotation = faceRotation; } @@ -849,11 +849,11 @@ bool Foam::processorPolyPatch::order if (closestFaceRotation != -1 && closestMatchDistSqr == 0) { - faceMap[lFaceI] = closestFaceMatch; + faceMap[lFacei] = closestFaceMatch; - rotation[lFaceI] = closestFaceRotation; + rotation[lFacei] = closestFaceRotation; - if (lFaceI != closestFaceMatch || closestFaceRotation > 0) + if (lFacei != closestFaceMatch || closestFaceRotation > 0) { change = true; } @@ -979,19 +979,19 @@ bool Foam::processorPolyPatch::order faceMap2 ); - forAll(faceMap, oldFaceI) + forAll(faceMap, oldFacei) { - if (faceMap[oldFaceI] == -1) + if (faceMap[oldFacei] == -1) { - faceMap[oldFaceI] = faceMap2[oldFaceI]; + faceMap[oldFacei] = faceMap2[oldFacei]; } } matchedAll = true; - forAll(faceMap, oldFaceI) + forAll(faceMap, oldFacei) { - if (faceMap[oldFaceI] == -1) + if (faceMap[oldFacei] == -1) { matchedAll = false; } @@ -1026,11 +1026,11 @@ bool Foam::processorPolyPatch::order forAll(pp.faceCentres(), facei) { - label masterFaceI = faceMap[facei]; + label masterFacei = faceMap[facei]; - if (masterFaceI != -1) + if (masterFacei != -1) { - const point& c0 = masterCtrs[masterFaceI]; + const point& c0 = masterCtrs[masterFacei]; const point& c1 = pp.faceCentres()[facei]; writeOBJ(ccStr, c0, c1, vertI); } @@ -1055,32 +1055,32 @@ bool Foam::processorPolyPatch::order } // Set rotation. - forAll(faceMap, oldFaceI) + forAll(faceMap, oldFacei) { - // The face f will be at newFaceI (after morphing) and we want + // The face f will be at newFacei (after morphing) and we want // its anchorPoint (= f[0]) to align with the anchorpoint for // the corresponding face on the other side. - label newFaceI = faceMap[oldFaceI]; + label newFacei = faceMap[oldFacei]; - const point& wantedAnchor = masterAnchors[newFaceI]; + const point& wantedAnchor = masterAnchors[newFacei]; - rotation[newFaceI] = getRotation + rotation[newFacei] = getRotation ( pp.points(), - pp[oldFaceI], + pp[oldFacei], wantedAnchor, - tols[oldFaceI] + tols[oldFacei] ); - if (rotation[newFaceI] == -1) + if (rotation[newFacei] == -1) { SeriousErrorInFunction << "in patch " << name() << " : " - << "Cannot find point on face " << pp[oldFaceI] + << "Cannot find point on face " << pp[oldFacei] << " with vertices " - << UIndirectList<point>(pp.points(), pp[oldFaceI])() + << UIndirectList<point>(pp.points(), pp[oldFacei])() << " that matches point " << wantedAnchor << " when matching the halves of processor patch " << name() diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C index 4a85216479d8a20d6483993fd7af6c4a41a97237..6cf22e30013fe4895fd5e091cd31c5b59a2004ae 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C @@ -54,8 +54,8 @@ void Foam::syncTools::swapBoundaryCellPositions const labelUList& faceCells = pp.faceCells(); forAll(faceCells, i) { - label bFaceI = pp.start()+i-mesh.nInternalFaces(); - neighbourCellData[bFaceI] = cellData[faceCells[i]]; + label bFacei = pp.start()+i-mesh.nInternalFaces(); + neighbourCellData[bFacei] = cellData[faceCells[i]]; } } syncTools::swapBoundaryFacePositions(mesh, neighbourCellData); diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C index 0fc2cf3a56f96acc0659f56021918ccf45929685..d8d74926554f8270e5c6200eaeb93482d20ba4a8 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C @@ -1347,11 +1347,11 @@ void Foam::syncTools::syncBoundaryFaceList top(procPatch, nbrPatchInfo); - label bFaceI = procPatch.start()-mesh.nInternalFaces(); + label bFacei = procPatch.start()-mesh.nInternalFaces(); forAll(nbrPatchInfo, i) { - cop(faceValues[bFaceI++], nbrPatchInfo[i]); + cop(faceValues[bFacei++], nbrPatchInfo[i]); } } } @@ -1472,10 +1472,10 @@ void Foam::syncTools::syncFaceList forAll(procPatch, i) { unsigned int patchVal = patchInfo[i]; - label meshFaceI = procPatch.start()+i; - unsigned int faceVal = faceValues[meshFaceI]; + label meshFacei = procPatch.start()+i; + unsigned int faceVal = faceValues[meshFacei]; cop(faceVal, patchVal); - faceValues[meshFaceI] = faceVal; + faceValues[meshFacei] = faceVal; } } } @@ -1542,8 +1542,8 @@ void Foam::syncTools::swapBoundaryCellList const labelUList& faceCells = pp.faceCells(); forAll(faceCells, i) { - label bFaceI = pp.start()+i-mesh.nInternalFaces(); - neighbourCellData[bFaceI] = cellData[faceCells[i]]; + label bFacei = pp.start()+i-mesh.nInternalFaces(); + neighbourCellData[bFacei] = cellData[faceCells[i]]; } } syncTools::swapBoundaryFaceList(mesh, neighbourCellData); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C index 181ddec3cb7414e0d8d593ac90262c37a832fe4e..30145ce34a8c3b48ca1fe1b52dd68866e39e0e08 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C @@ -452,12 +452,12 @@ bool Foam::ZoneMesh<ZoneType, MeshType>::checkParallelSync // Have every processor check but only master print error. - for (label procI = 1; procI < allNames.size(); procI++) + for (label proci = 1; proci < allNames.size(); proci++) { if ( - (allNames[procI] != allNames[0]) - || (allTypes[procI] != allTypes[0]) + (allNames[proci] != allNames[0]) + || (allTypes[proci] != allTypes[0]) ) { hasError = true; @@ -467,9 +467,9 @@ bool Foam::ZoneMesh<ZoneType, MeshType>::checkParallelSync Info<< " ***Inconsistent zones across processors, " "processor 0 has zone names:" << allNames[0] << " zone types:" << allTypes[0] - << " processor " << procI << " has zone names:" - << allNames[procI] - << " zone types:" << allTypes[procI] + << " processor " << proci << " has zone names:" + << allNames[proci] + << " zone types:" << allTypes[proci] << endl; } } diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C index 5f236921d541a2c8ab052f7c4ad5f8012eb77b6b..00fbd050bdac9eefd37aeee268c13c85777df737 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C @@ -127,8 +127,8 @@ void Foam::faceZone::calcCellLayers() const forAll(mf, facei) { - label ownCellI = own[mf[facei]]; - label neiCellI = + label ownCelli = own[mf[facei]]; + label neiCelli = ( zoneMesh().mesh().isInternalFace(mf[facei]) ? nei[mf[facei]] @@ -138,13 +138,13 @@ void Foam::faceZone::calcCellLayers() const if (!faceFlip[facei]) { // Face is oriented correctly, no flip needed - mc[facei] = neiCellI; - sc[facei] = ownCellI; + mc[facei] = neiCelli; + sc[facei] = ownCelli; } else { - mc[facei] = ownCellI; - sc[facei] = neiCellI; + mc[facei] = ownCelli; + sc[facei] = neiCelli; } } } @@ -457,10 +457,10 @@ bool Foam::faceZone::checkParallelSync(const bool report) const if (patchi != -1 && bm[patchi].coupled()) { - const label bFaceI = facei-mesh.nInternalFaces(); + const label bFacei = facei-mesh.nInternalFaces(); // Check face in zone on both sides - if (myZoneFace[bFaceI] != neiZoneFace[bFaceI]) + if (myZoneFace[bFacei] != neiZoneFace[bFacei]) { hasError = true; @@ -480,7 +480,7 @@ bool Foam::faceZone::checkParallelSync(const bool report) const break; } } - else if (myZoneFlip[bFaceI] == neiZoneFlip[bFaceI]) + else if (myZoneFlip[bFacei] == neiZoneFlip[bFacei]) { // Flip state should be opposite. hasError = true; diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSearch.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSearch.C index 1058816c9657006027801b9f2aa9f00abfec789a..c2acf75f23ac477184ec3865ab1d92d482b493ee 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSearch.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSearch.C @@ -76,18 +76,18 @@ void Foam::PatchTools::markZone forAll(eFaceLst, j) { - label nbrFaceI = eFaceLst[j]; + label nbrFacei = eFaceLst[j]; - if (faceZone[nbrFaceI] == -1) + if (faceZone[nbrFacei] == -1) { - faceZone[nbrFaceI] = currentZone; - newChangedFaces.append(nbrFaceI); + faceZone[nbrFacei] = currentZone; + newChangedFaces.append(nbrFacei); } - else if (faceZone[nbrFaceI] != currentZone) + else if (faceZone[nbrFacei] != currentZone) { FatalErrorInFunction - << "Zones " << faceZone[nbrFaceI] - << " at face " << nbrFaceI + << "Zones " << faceZone[nbrFacei] + << " at face " << nbrFacei << " connects to zone " << currentZone << " at face " << facei << abort(FatalError); @@ -129,15 +129,15 @@ Foam::PatchTools::markZones faceZone = -1; label zoneI = 0; - for (label startFaceI = 0; startFaceI < faceZone.size();) + for (label startFacei = 0; startFacei < faceZone.size();) { // Find next non-visited face - for (; startFaceI < faceZone.size(); ++startFaceI) + for (; startFacei < faceZone.size(); ++startFacei) { - if (faceZone[startFaceI] == -1) + if (faceZone[startFacei] == -1) { - faceZone[startFaceI] = zoneI; - markZone(p, borderEdge, startFaceI, zoneI, faceZone); + faceZone[startFacei] = zoneI; + markZone(p, borderEdge, startFacei, zoneI, faceZone); zoneI++; break; } @@ -176,15 +176,15 @@ Foam::PatchTools::subsetMap boolList pointHad(pointMap.size(), false); - forAll(p, oldFaceI) + forAll(p, oldFacei) { - if (includeFaces[oldFaceI]) + if (includeFaces[oldFacei]) { // Store new faces compact - faceMap[facei++] = oldFaceI; + faceMap[facei++] = oldFacei; // Renumber labels for face - const Face& f = localFaces[oldFaceI]; + const Face& f = localFaces[oldFacei]; forAll(f, fp) { diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSortPoints.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSortPoints.C index cbdd9e881215d08b138b1c67dbd3f49b0e96e62f..165d98f325d36bff40f61d3a102227a011d1d198 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSortPoints.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSortPoints.C @@ -61,7 +61,7 @@ Foam::PatchTools::sortedPointEdges label edgeI = pEdges[0]; - label prevFaceI = edgeFaces[edgeI][0]; + label prevFacei = edgeFaces[edgeI][0]; newEdgeList.clear(); newEdgeList.setCapacity(nPointEdges); @@ -81,7 +81,7 @@ Foam::PatchTools::sortedPointEdges } label facei = eFaces[0]; - if (facei == prevFaceI) + if (facei == prevFacei) { facei = eFaces[1]; } @@ -105,7 +105,7 @@ Foam::PatchTools::sortedPointEdges } } - prevFaceI = facei; + prevFacei = facei; nVisitedEdges++; if (nVisitedEdges > nPointEdges) diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H index e01541b6ecfbe6026f25f832e8f4b4907605ec15..d2a5b4d0de5dbf1053d4124a1cb070e9c3a14f02 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatch.H @@ -226,7 +226,7 @@ private: ( const label pointI, const labelList& pFaces, - const label startFaceI, + const label startFacei, const label startEdgeI, boolList& pFacesHad ) const; diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchAddressing.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchAddressing.C index d389e5e4ad4f244d4224c7668f58db1e549f311d..bbfcad9f2dac66add314d93a4477d15b71d12b98 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchAddressing.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchAddressing.C @@ -152,10 +152,10 @@ calcAddressing() const const labelList& nbrFaces = pf[e.start()]; - forAll(nbrFaces, nbrFaceI) + forAll(nbrFaces, nbrFacei) { // set reference to the current neighbour - label curNei = nbrFaces[nbrFaceI]; + label curNei = nbrFaces[nbrFacei]; // Reject neighbours with the lower label if (curNei > facei) diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchCheck.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchCheck.C index 28452cd286afb996442fbb29b7c7d25d46f161cd..ba320a6db8e67353890832949fed31574fa28fd2 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchCheck.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchCheck.C @@ -45,12 +45,12 @@ visitPointRegion ( const label pointI, const labelList& pFaces, - const label startFaceI, + const label startFacei, const label startEdgeI, boolList& pFacesHad ) const { - label index = findIndex(pFaces, startFaceI); + label index = findIndex(pFaces, startFacei); if (!pFacesHad[index]) { @@ -58,7 +58,7 @@ visitPointRegion pFacesHad[index] = true; // Step to next edge on face which is still using pointI - const labelList& fEdges = faceEdges()[startFaceI]; + const labelList& fEdges = faceEdges()[startFacei]; label nextEdgeI = -1; @@ -80,7 +80,7 @@ visitPointRegion { FatalErrorInFunction << "Problem: cannot find edge out of " << fEdges - << "on face " << startFaceI << " that uses point " << pointI + << "on face " << startFacei << " that uses point " << pointI << " and is not edge " << startEdgeI << abort(FatalError); } @@ -89,7 +89,7 @@ visitPointRegion forAll(eFaces, i) { - if (eFaces[i] != startFaceI) + if (eFaces[i] != startFacei) { visitPointRegion ( diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCells.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCells.C index 71ca0f2ab3974f9a979942553f90e513a91d97f0..7203f638059490b2bf687e76e83641e304d337a0 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCells.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCells.C @@ -85,11 +85,11 @@ void Foam::primitiveMesh::calcCellCells() const forAll(nei, facei) { - label ownCellI = own[facei]; - label neiCellI = nei[facei]; + label ownCelli = own[facei]; + label neiCelli = nei[facei]; - cellCellAddr[ownCellI][ncc[ownCellI]++] = neiCellI; - cellCellAddr[neiCellI][ncc[neiCellI]++] = ownCellI; + cellCellAddr[ownCelli][ncc[ownCelli]++] = neiCelli; + cellCellAddr[neiCelli][ncc[neiCelli]++] = ownCelli; } } } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C index 86aba8004dbf47a7b3d58c996e3fe59407ff5bf8..913423c74ebe88d6b49371b75cc7eea79b263cb4 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C @@ -1023,17 +1023,17 @@ bool Foam::primitiveMesh::checkUpperTriangular } else { - label nbrCellI = nei[facei]; + label nbrCelli = nei[facei]; - if (nbrCellI == celli) + if (nbrCelli == celli) { - nbrCellI = own[facei]; + nbrCelli = own[facei]; } - if (celli < nbrCellI) + if (celli < nbrCelli) { // celli is master - nbr[i] = nbrCellI; + nbr[i] = nbrCelli; } else { @@ -1380,11 +1380,11 @@ bool Foam::primitiveMesh::checkDuplicateFaces forAllConstIter(Map<label>, nCommonPoints, iter) { - label nbFaceI = iter.key(); + label nbFacei = iter.key(); label nCommon = iter(); const face& curFace = faces()[facei]; - const face& nbFace = faces()[nbFaceI]; + const face& nbFace = faces()[nbFacei]; if (nCommon == nbFace.size() || nCommon == curFace.size()) { @@ -1400,7 +1400,7 @@ bool Foam::primitiveMesh::checkDuplicateFaces if (setPtr) { setPtr->insert(facei); - setPtr->insert(nbFaceI); + setPtr->insert(nbFacei); } } } @@ -1420,11 +1420,11 @@ bool Foam::primitiveMesh::checkCommonOrder forAllConstIter(Map<label>, nCommonPoints, iter) { - label nbFaceI = iter.key(); + label nbFacei = iter.key(); label nCommon = iter(); const face& curFace = faces()[facei]; - const face& nbFace = faces()[nbFaceI]; + const face& nbFace = faces()[nbFacei]; if ( @@ -1549,7 +1549,7 @@ bool Foam::primitiveMesh::checkCommonOrder if (setPtr) { setPtr->insert(facei); - setPtr->insert(nbFaceI); + setPtr->insert(nbFacei); } error = true; @@ -1604,18 +1604,18 @@ bool Foam::primitiveMesh::checkFaceFaces forAll(nbs, nbI) { - label nbFaceI = nbs[nbI]; + label nbFacei = nbs[nbI]; - if (facei < nbFaceI) + if (facei < nbFacei) { // Only check once for each combination of two faces. - Map<label>::iterator fnd = nCommonPoints.find(nbFaceI); + Map<label>::iterator fnd = nCommonPoints.find(nbFacei); if (fnd == nCommonPoints.end()) { // First common vertex found. - nCommonPoints.insert(nbFaceI, 1); + nCommonPoints.insert(nbFacei, 1); } else { diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdgeCells.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdgeCells.C index 7a595b2294aebaaff05b65600e6debcaa62d4da6..4323d22a4e2fb4fc94c424794c47def8938710fb 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdgeCells.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdgeCells.C @@ -81,40 +81,40 @@ const Foam::labelList& Foam::primitiveMesh::edgeCells label facei = eFaces[i]; { - label ownCellI = own[facei]; + label ownCelli = own[facei]; // Check if not already in storage forAll(storage, j) { - if (storage[j] == ownCellI) + if (storage[j] == ownCelli) { - ownCellI = -1; + ownCelli = -1; break; } } - if (ownCellI != -1) + if (ownCelli != -1) { - storage.append(ownCellI); + storage.append(ownCelli); } } if (isInternalFace(facei)) { - label neiCellI = nei[facei]; + label neiCelli = nei[facei]; forAll(storage, j) { - if (storage[j] == neiCellI) + if (storage[j] == neiCelli) { - neiCellI = -1; + neiCelli = -1; break; } } - if (neiCellI != -1) + if (neiCelli != -1) { - storage.append(neiCellI); + storage.append(neiCelli); } } } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C index d04c80b722dd9bc7c6dd037e21bc884bbe928dd2..ed2ac1d81be66de89b96d1350b18229b47d3b122 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C @@ -80,9 +80,9 @@ Foam::labelList Foam::patchZones::edgeToFace(const labelList& changedEdges) const labelList& eFaces = pp_.edgeFaces()[edgeI]; - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - label facei = eFaces[eFaceI]; + label facei = eFaces[eFacei]; if (operator[](facei) == -1) { diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C index 46226ad568d58c9c11b6dfbcc3ddba111b1deff1..f2551cfcd834d4708da3653dafa2e5d02c5408e9 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C @@ -102,14 +102,14 @@ Foam::label Foam::walkPatch::getNeighbour } else if (eFaces.size() == 2) { - label nbrFaceI = eFaces[0]; + label nbrFacei = eFaces[0]; - if (nbrFaceI == facei) + if (nbrFacei == facei) { - nbrFaceI = eFaces[1]; + nbrFacei = eFaces[1]; } - return nbrFaceI; + return nbrFacei; } else { diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C index e7e94487e499ccd80b8125ead58073707f4ec8fe..d97ea2b84c891a5acbe08f780b44524347e139f0 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C @@ -249,10 +249,10 @@ void Foam::globalIndexAndTransform::determineTransforms() label nextTrans = 0; - forAll(allTransforms, procI) + forAll(allTransforms, proci) { const List<vectorTensorTransform>& procTransVecs = - allTransforms[procI]; + allTransforms[proci]; forAll(procTransVecs, pSVI) { @@ -267,7 +267,7 @@ void Foam::globalIndexAndTransform::determineTransforms() transforms_, dummyMatch, transform, - allTols[procI][pSVI], + allTols[proci][pSVI], true ) == 0 ) diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.H b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.H index ccfb5d51c2a1882a9f82cb7d5f932cabfd8c7798..b274ff130258337bbffd890902e47201116af73d 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.H +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.H @@ -230,7 +230,7 @@ public: //- Encode index and bare index as components on given processor inline static labelPair encode ( - const label procI, + const label proci, const label index, const label transformIndex ); diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H index e97b330668af4855437fbf1a2b340f818b38b16d..d6aa055543d0da09c7236557d8919f7e9388ce7e 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H @@ -348,7 +348,7 @@ Foam::labelPair Foam::globalIndexAndTransform::encode Foam::labelPair Foam::globalIndexAndTransform::encode ( - const label procI, + const label proci, const label index, const label transformIndex ) @@ -362,10 +362,10 @@ Foam::labelPair Foam::globalIndexAndTransform::encode << abort(FatalError); } - if (procI > labelMax/base_) + if (proci > labelMax/base_) { FatalErrorInFunction - << "Overflow : encoding processor " << procI << " in base " << base_ + << "Overflow : encoding processor " << proci << " in base " << base_ << " exceeds capability of label (" << labelMax << "). Please recompile with larger datatype for label." << exit(FatalError); @@ -374,7 +374,7 @@ Foam::labelPair Foam::globalIndexAndTransform::encode return labelPair ( index, - transformIndex + procI*base_ + transformIndex + proci*base_ ); } diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C index 46dc30f3e5d9784f59eeea453d1f7e0cb027e7da..2bf7bf969c491cbb7266ee9ebee89e498ac4c3d4 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C @@ -138,9 +138,9 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs() scalarField& htc = *this; forAll(htc, facei) { - label faceCellI = patch().faceCells()[facei]; + label faceCelli = patch().faceCells()[facei]; - scalar Re = rhow[facei]*mag(Uc[faceCellI] - Uw[facei])*L_/muw[facei]; + scalar Re = rhow[facei]*mag(Uc[faceCelli] - Uw[facei])*L_/muw[facei]; if (Re < 5.0E+05) { diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C index 34f91c4552b61d0eddea8da9ec88eea9f1dcc6d8..9ab7aba693b60887f41ad6dd023d10ecd3c5f17e 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C @@ -200,12 +200,12 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::transferData if (Pstream::master()) { - forAll(values, procI) + forAll(values, proci) { - const Field<scalar>& magSf = magSfs[procI]; - const Field<scalar>& value = values[procI]; - const Field<scalar>& qDot = qDots[procI]; - const Field<scalar>& htc = htcs[procI]; + const Field<scalar>& magSf = magSfs[proci]; + const Field<scalar>& value = values[proci]; + const Field<scalar>& qDot = qDots[proci]; + const Field<scalar>& htc = htcs[proci]; forAll(magSf, facei) { diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C index f5940847c045f3f72546ff2557a580880290da7b..2cf9ed03d522b8cd6516ea4cbb7a4c88af0f4bc3 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C @@ -170,9 +170,9 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs() const mappedPatchBase& mpp = refCast<const mappedPatchBase>(patch().patch()); const polyMesh& nbrMesh = mpp.sampleMesh(); - const label samplePatchI = mpp.samplePolyPatch().index(); + const label samplePatchi = mpp.samplePolyPatch().index(); const fvPatch& nbrPatch = - refCast<const fvMesh>(nbrMesh).boundary()[samplePatchI]; + refCast<const fvMesh>(nbrMesh).boundary()[samplePatchi]; // Calculate the temperature by harmonic averaging // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C index 4fa51bc054d8e54ef1a7adfaef01f6a3bfe1e92e..72605f8b9fccb75b0cf9f0e70bfb9441d21400ab 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.C @@ -178,9 +178,9 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs() const mappedPatchBase& mpp = refCast<const mappedPatchBase>(patch().patch()); const polyMesh& nbrMesh = mpp.sampleMesh(); - const label samplePatchI = mpp.samplePolyPatch().index(); + const label samplePatchi = mpp.samplePolyPatch().index(); const fvPatch& nbrPatch = - refCast<const fvMesh>(nbrMesh).boundary()[samplePatchI]; + refCast<const fvMesh>(nbrMesh).boundary()[samplePatchi]; scalarField Tc(patchInternalField()); diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C index 6128271885b67ca1de215bdbd9147034785634f2..e91e4fde2b475977916d2229228ef96d310c7afb 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C @@ -239,9 +239,9 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() // Populate boundary values forAll(alphatw, facei) { - label faceCellI = patch().faceCells()[facei]; + label faceCelli = patch().faceCells()[facei]; - scalar uTau = Cmu25*sqrt(k[faceCellI]); + scalar uTau = Cmu25*sqrt(k[faceCelli]); scalar yPlus = uTau*y[facei]/(muw[facei]/rhow[facei]); diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C index 88228de2dcc0aa87b8c9bcb85c6cd26734d6fbd6..4fc4a08fb8bb350abfbc2230b8c958ef8759d9f4 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C @@ -236,10 +236,10 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() scalarField& alphatw = *this; forAll(alphatw, facei) { - label faceCellI = patch().faceCells()[facei]; + label faceCelli = patch().faceCells()[facei]; // y+ - scalar yPlus = Cmu25*sqrt(k[faceCellI])*y[facei]/nuw[facei]; + scalar yPlus = Cmu25*sqrt(k[faceCelli])*y[facei]/nuw[facei]; // Molecular-to-turbulent Prandtl number ratio scalar Prat = Pr/Prt_; diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C index c9790c6417f6b8de47c77afa3b0435c3924963a3..a81e954677c503e0a5d111d0bbdf3024c11a1de0 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C @@ -55,9 +55,9 @@ void Foam::LESModels::maxDeltaxyz::calcDelta() const labelList& cFaces = mesh.cells()[celli]; const point& centrevector = mesh.cellCentres()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; const point& facevector = mesh.faceCentres()[facei]; scalar tmp = mag(facevector - centrevector); if (tmp > deltaMaxTmp) diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C index 8b1643485864f737698a32135e4ffa4755c66cd9..c8a95cc048c48d4b9b260bb24dcd89cf22be362d 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C @@ -77,13 +77,13 @@ void Foam::LESModels::smoothDelta::setChangedFaces if (patch.coupled()) { - forAll(patch, patchFaceI) + forAll(patch, patchFacei) { - label meshFaceI = patch.start() + patchFaceI; + label meshFacei = patch.start() + patchFacei; - scalar ownDelta = delta[mesh.faceOwner()[meshFaceI]]; + scalar ownDelta = delta[mesh.faceOwner()[meshFacei]]; - changedFaces.append(meshFaceI); + changedFaces.append(meshFacei); changedFacesInfo.append(deltaData(ownDelta)); } } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H index bae48b7a82c62e0cfb823a929cb3aaf7de670b9a..5c21dd21df7547efff3b9c19633447b631d2141f 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -121,7 +121,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -132,7 +132,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -151,8 +151,8 @@ public: inline bool updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const deltaData& neighbourInfo, const scalar tol, TrackingData& td @@ -163,8 +163,8 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const deltaData& neighbourInfo, const scalar tol, TrackingData& td @@ -175,7 +175,7 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const deltaData& neighbourInfo, const scalar tol, TrackingData& td diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C index fce7258ca8bf25cc9fd3d81e1d3eb90424169b31..c5d141376c53a3bcd5f520eb37f3390f6ffd6030 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C @@ -204,18 +204,18 @@ void fWallFunctionFvPatchScalarField::updateCoeffs() // Set f wall values forAll(f, facei) { - label faceCellI = patch().faceCells()[facei]; + label faceCelli = patch().faceCells()[facei]; - scalar uTau = Cmu25*sqrt(k[faceCellI]); + scalar uTau = Cmu25*sqrt(k[faceCelli]); scalar yPlus = uTau*y[facei]/nuw[facei]; if (yPlus > yPlusLam_) { scalar N = 6.0; - scalar v2c = v2[faceCellI]; - scalar epsc = epsilon[faceCellI]; - scalar kc = k[faceCellI]; + scalar v2c = v2[faceCelli]; + scalar epsc = epsilon[faceCelli]; + scalar kc = k[faceCelli]; f[facei] = N*v2c*epsc/(sqr(kc) + ROOTVSMALL); f[facei] /= sqr(uTau) + ROOTVSMALL; diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C index 5e82db4ef78449d6d97215604521222a10af26f9..70236ec9eb243275b7bb3caa0b33862a54000386 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C @@ -193,9 +193,9 @@ void kLowReWallFunctionFvPatchScalarField::updateCoeffs() // Set k wall values forAll(kw, facei) { - label faceCellI = patch().faceCells()[facei]; + label faceCelli = patch().faceCells()[facei]; - scalar uTau = Cmu25*sqrt(k[faceCellI]); + scalar uTau = Cmu25*sqrt(k[faceCelli]); scalar yPlus = uTau*y[facei]/nuw[facei]; diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C index f74e476f91c316c8285a217a1286c2ae08c420a2..a80208cd35bf83cd70f856fa09dfa5658484d5df 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C @@ -61,9 +61,9 @@ tmp<scalarField> nutkAtmRoughWallFunctionFvPatchScalarField::calcNut() const forAll(nutw, facei) { - label faceCellI = patch().faceCells()[facei]; + label faceCelli = patch().faceCells()[facei]; - scalar uStar = Cmu25*sqrt(k[faceCellI]); + scalar uStar = Cmu25*sqrt(k[faceCelli]); scalar yPlus = uStar*y[facei]/nuw[facei]; scalar Edash = (y[facei] + z0_[facei])/z0_[facei]; diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C index 9147ef08bc573489bf540ad0bc59786705aae4e2..34144857c01366b1b3f8ba01021a1f069abb98e1 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C @@ -84,9 +84,9 @@ tmp<scalarField> nutkRoughWallFunctionFvPatchScalarField::calcNut() const forAll(nutw, facei) { - label faceCellI = patch().faceCells()[facei]; + label faceCelli = patch().faceCells()[facei]; - scalar uStar = Cmu25*sqrt(k[faceCellI]); + scalar uStar = Cmu25*sqrt(k[faceCelli]); scalar yPlus = uStar*y[facei]/nuw[facei]; scalar KsPlus = uStar*Ks_[facei]/nuw[facei]; diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C index 58036e4df3ba8d062d2924fdb3262f4af2e35d2d..264681538ce7c2edf46a420807898c54f456b1d4 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C @@ -63,9 +63,9 @@ tmp<scalarField> nutkWallFunctionFvPatchScalarField::calcNut() const forAll(nutw, facei) { - label faceCellI = patch().faceCells()[facei]; + label faceCelli = patch().faceCells()[facei]; - scalar yPlus = Cmu25*y[facei]*sqrt(k[faceCellI])/nuw[facei]; + scalar yPlus = Cmu25*y[facei]*sqrt(k[faceCelli])/nuw[facei]; if (yPlus > yPlusLam_) { diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C index ea4ad23d390be73693bf76549464a42d7a030300..d91f8491945445faaf89c4602a81c78e3cd13658 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C @@ -196,9 +196,9 @@ void v2WallFunctionFvPatchScalarField::updateCoeffs() // Set v2 wall values forAll(v2, facei) { - label faceCellI = patch().faceCells()[facei]; + label faceCelli = patch().faceCells()[facei]; - scalar uTau = Cmu25*sqrt(k[faceCellI]); + scalar uTau = Cmu25*sqrt(k[faceCelli]); scalar yPlus = uTau*y[facei]/nuw[facei]; diff --git a/src/conversion/ensight/part/ensightPartCells.C b/src/conversion/ensight/part/ensightPartCells.C index e7d48533f421cc2378b9979534da288ec767d07f..82ef148e036d746dccbbfe3ecad76ce6c43b7fd0 100644 --- a/src/conversion/ensight/part/ensightPartCells.C +++ b/src/conversion/ensight/part/ensightPartCells.C @@ -267,9 +267,9 @@ Foam::ensightPart::localPoints Foam::ensightPartCells::calcLocalPoints() const const label id = idList[i] + offset_; const labelUList& cFaces = mesh_.cells()[id]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh_.faces()[cFaces[cFaceI]]; + const face& f = mesh_.faces()[cFaces[cFacei]]; forAll(f, fp) { @@ -346,9 +346,9 @@ void Foam::ensightPartCells::writeConnectivity const label id = idList[i] + offset_; const labelUList& cFace = mesh_.cells()[id]; - forAll(cFace, cFaceI) + forAll(cFace, cFacei) { - const label faceId = cFace[cFaceI]; + const label faceId = cFace[cFacei]; const face& cf = meshFaces[faceId]; // convert global -> local index diff --git a/src/conversion/meshReader/createPolyBoundary.C b/src/conversion/meshReader/createPolyBoundary.C index 37989b5237cd39196be7772df693bf9cd14dc9a3..c9a98e8c52f0a4b6a8476b14e45e0241f49b3ad9 100644 --- a/src/conversion/meshReader/createPolyBoundary.C +++ b/src/conversion/meshReader/createPolyBoundary.C @@ -275,16 +275,16 @@ void Foam::meshReader::createPolyBoundary() { const labelList& curFaces = cellPolys_[celli]; - forAll(curFaces, cellFaceI) + forAll(curFaces, cellFacei) { - if (curFaces[cellFaceI] < 0) + if (curFaces[cellFacei] < 0) { // just report the first few if (nMissingFaces < 4) { - const face& thisFace = cFaces[celli][cellFaceI]; + const face& thisFace = cFaces[celli][cellFacei]; - Info<< " cell " << celli << " face " << cellFaceI + Info<< " cell " << celli << " face " << cellFacei << " (original cell " << origCellId_[celli] << ")" << " face: " << thisFace << endl; @@ -294,7 +294,7 @@ void Foam::meshReader::createPolyBoundary() Info<< " ..." << nl << endl; } - addPolyBoundaryFace(celli, cellFaceI, nCreatedFaces); + addPolyBoundaryFace(celli, cellFacei, nCreatedFaces); nMissingFaces++; nCreatedFaces++; } diff --git a/src/conversion/meshReader/createPolyCells.C b/src/conversion/meshReader/createPolyCells.C index 6c879701474ff31cb95c2f44de21029affb76af0..9da2efeee12d27078e7349a4b68bf8e5bd229d94 100644 --- a/src/conversion/meshReader/createPolyCells.C +++ b/src/conversion/meshReader/createPolyCells.C @@ -106,9 +106,9 @@ void Foam::meshReader::createPolyCells() // get the list of search faces const faceList& searchFaces = cFaces[curNei]; - forAll(searchFaces, neiFaceI) + forAll(searchFaces, neiFacei) { - int cmp = face::compare(curFace, searchFaces[neiFaceI]); + int cmp = face::compare(curFace, searchFaces[neiFacei]); if (cmp) { @@ -124,7 +124,7 @@ void Foam::meshReader::createPolyCells() #ifdef DEBUG_FACE_ORDERING Info<< "cmp " << cmp << " matched " << curFace - << " with " << searchFaces[neiFaceI] + << " with " << searchFaces[neiFacei] << endl; @@ -132,9 +132,9 @@ void Foam::meshReader::createPolyCells() << " (" << origCellId_[baffleOffset+baffleI] << ")" << " side " << side << " against cell " << curNei - << " face " << neiFaceI + << " face " << neiFacei << " curFace " << curFace[1] - << " neiFace " << searchFaces[neiFaceI][1] + << " neiFace " << searchFaces[neiFacei][1] << endl; #endif @@ -143,7 +143,7 @@ void Foam::meshReader::createPolyCells() baffleIds_[baffleI][side] = cellFaceIdentifier ( curNei, - neiFaceI + neiFacei ); nNeighbours++; @@ -246,20 +246,20 @@ void Foam::meshReader::createPolyCells() // get the list of search faces const faceList& searchFaces = cFaces[curNei]; - forAll(searchFaces, neiFaceI) + forAll(searchFaces, neiFacei) { - if (searchFaces[neiFaceI] == curFace) + if (searchFaces[neiFacei] == curFace) { // Record the neighbour cell and face neiCells[facei] = curNei; - faceOfNeiCell[facei] = neiFaceI; + faceOfNeiCell[facei] = neiFacei; nNeighbours++; #ifdef DEBUG_FACE_ORDERING Info<< " cell " << celli << " face " << facei << " point " << pointI << " nei " << curNei - << " neiFace " << neiFaceI + << " neiFace " << neiFacei << endl; #endif found = true; diff --git a/src/conversion/meshWriter/starcd/STARCDMeshWriter.C b/src/conversion/meshWriter/starcd/STARCDMeshWriter.C index afdc5a113c408960d47e294fd681eccd38888b8a..3c901264161345fea0c21a9aca90101fff7ba5d4 100644 --- a/src/conversion/meshWriter/starcd/STARCDMeshWriter.C +++ b/src/conversion/meshWriter/starcd/STARCDMeshWriter.C @@ -433,11 +433,11 @@ void Foam::meshWriters::STARCD::writeBoundary(const fileName& prefix) const if (faceLookupIndex.found(mapIndex)) { const faceList sFaces = shape.faces(); - forAll(sFaces, sFaceI) + forAll(sFaces, sFacei) { - if (faces[facei] == sFaces[sFaceI]) + if (faces[facei] == sFaces[sFacei]) { - cellFaceId = sFaceI; + cellFaceId = sFacei; break; } } diff --git a/src/conversion/polyDualMesh/polyDualMesh.C b/src/conversion/polyDualMesh/polyDualMesh.C index 379bd272964d51fdd81065351b1656244845117f..5eb90bd862fdfe91527bc072b8d3a5943c1e70ed 100644 --- a/src/conversion/polyDualMesh/polyDualMesh.C +++ b/src/conversion/polyDualMesh/polyDualMesh.C @@ -56,7 +56,7 @@ Foam::labelList Foam::polyDualMesh::getFaceOrder labelList oldToNew(faceOwner.size(), -1); // First unassigned face - label newFaceI = 0; + label newFacei = 0; forAll(cells, celli) { @@ -68,20 +68,20 @@ Foam::labelList Foam::polyDualMesh::getFaceOrder { label facei = cFaces[i]; - label nbrCellI = faceNeighbour[facei]; + label nbrCelli = faceNeighbour[facei]; - if (nbrCellI != -1) + if (nbrCelli != -1) { // Internal face. Get cell on other side. - if (nbrCellI == celli) + if (nbrCelli == celli) { - nbrCellI = faceOwner[facei]; + nbrCelli = faceOwner[facei]; } - if (celli < nbrCellI) + if (celli < nbrCelli) { - // CellI is master - nbr[i] = nbrCellI; + // Celli is master + nbr[i] = nbrCelli; } else { @@ -102,19 +102,19 @@ Foam::labelList Foam::polyDualMesh::getFaceOrder { if (nbr[i] != -1) { - oldToNew[cFaces[nbr.indices()[i]]] = newFaceI++; + oldToNew[cFaces[nbr.indices()[i]]] = newFacei++; } } } - nInternalFaces = newFaceI; + nInternalFaces = newFacei; Pout<< "nInternalFaces:" << nInternalFaces << endl; Pout<< "nFaces:" << faceOwner.size() << endl; Pout<< "nCells:" << cells.size() << endl; // Leave patch faces intact. - for (label facei = newFaceI; facei < faceOwner.size(); facei++) + for (label facei = newFacei; facei < faceOwner.size(); facei++) { oldToNew[facei] = facei; } @@ -926,23 +926,23 @@ void Foam::polyDualMesh::calcDual // We want to start walking from patchFaces[0] or patchFaces[1], // depending on which one uses owner,neighbour in the right order. - label startFaceI = -1; - label endFaceI = -1; + label startFacei = -1; + label endFacei = -1; label index = findIndex(f0, neighbour); if (f0.nextLabel(index) == owner) { - startFaceI = face0; - endFaceI = face1; + startFacei = face0; + endFacei = face1; } else { - startFaceI = face1; - endFaceI = face0; + startFacei = face1; + endFacei = face0; } - // Now walk from startFaceI to cell to face to cell etc. until endFaceI + // Now walk from startFacei to cell to face to cell etc. until endFacei DynamicList<label> dualFace; @@ -959,10 +959,10 @@ void Foam::polyDualMesh::calcDual } // Store dual vertex for starting face. - dualFace.append(mesh.nCells() + startFaceI - nIntFaces); + dualFace.append(mesh.nCells() + startFacei - nIntFaces); - label celli = mesh.faceOwner()[startFaceI]; - label facei = startFaceI; + label celli = mesh.faceOwner()[startFacei]; + label facei = startFacei; while (true) { @@ -983,7 +983,7 @@ void Foam::polyDualMesh::calcDual } // Cross face to other cell. - if (facei == endFaceI) + if (facei == endFacei) { break; } @@ -999,7 +999,7 @@ void Foam::polyDualMesh::calcDual } // Store dual vertex for endFace. - dualFace.append(mesh.nCells() + endFaceI - nIntFaces); + dualFace.append(mesh.nCells() + endFacei - nIntFaces); dynDualFaces.append(face(dualFace.shrink())); dynDualOwner.append(owner); @@ -1066,21 +1066,21 @@ void Foam::polyDualMesh::calcDual bool f0OrderOk = (f0.nextLabel(index) == owner); - label startFaceI = -1; + label startFacei = -1; if (f0OrderOk == (mesh.faceOwner()[face0] == celli)) { - startFaceI = face0; + startFacei = face0; } else { - startFaceI = face1; + startFacei = face1; } // Walk face-cell-face until starting face reached. DynamicList<label> dualFace(mesh.edgeCells()[edgeI].size()); - label facei = startFaceI; + label facei = startFacei; while (true) { @@ -1101,7 +1101,7 @@ void Foam::polyDualMesh::calcDual } // Cross face to other cell. - if (facei == startFaceI) + if (facei == startFacei) { break; } @@ -1153,9 +1153,9 @@ void Foam::polyDualMesh::calcDual { meshTools::writeOBJ(str, dualPoints[dualPointI]); } - forAll(dynDualFaces, dualFaceI) + forAll(dynDualFaces, dualFacei) { - const face& f = dynDualFaces[dualFaceI]; + const face& f = dynDualFaces[dualFacei]; str<< 'f'; forAll(f, fp) @@ -1219,9 +1219,9 @@ void Foam::polyDualMesh::calcDual { meshTools::writeOBJ(str, dualPoints[dualPointI]); } - forAll(dualFaces, dualFaceI) + forAll(dualFaces, dualFacei) { - const face& f = dualFaces[dualFaceI]; + const face& f = dualFaces[dualFacei]; str<< 'f'; forAll(f, fp) diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index 4b246e7c9bf2230bbf7ef1cf42af540789a39e59..2533334e037bbb15676929792530951d71f4c231 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -237,14 +237,14 @@ Foam::dynamicRefineFvMesh::refine // Check map. for (label facei = 0; facei < nInternalFaces(); facei++) { - label oldFaceI = map().faceMap()[facei]; + label oldFacei = map().faceMap()[facei]; - if (oldFaceI >= nInternalFaces()) + if (oldFacei >= nInternalFaces()) { FatalErrorInFunction << "New internal face:" << facei << " fc:" << faceCentres()[facei] - << " originates from boundary oldFace:" << oldFaceI + << " originates from boundary oldFace:" << oldFacei << abort(FatalError); } } @@ -286,22 +286,22 @@ Foam::dynamicRefineFvMesh::refine forAll(faceMap, facei) { - label oldFaceI = faceMap[facei]; + label oldFacei = faceMap[facei]; - if (oldFaceI >= 0) + if (oldFacei >= 0) { - label masterFaceI = reverseFaceMap[oldFaceI]; + label masterFacei = reverseFaceMap[oldFacei]; - if (masterFaceI < 0) + if (masterFacei < 0) { FatalErrorInFunction << "Problem: should not have removed faces" << " when refining." << nl << "face:" << facei << abort(FatalError); } - else if (masterFaceI != facei) + else if (masterFacei != facei) { - masterFaces.insert(masterFaceI); + masterFaces.insert(masterFacei); } } } @@ -369,14 +369,14 @@ Foam::dynamicRefineFvMesh::refine // Recalculate new internal faces. for (label facei = 0; facei < nInternalFaces(); facei++) { - label oldFaceI = faceMap[facei]; + label oldFacei = faceMap[facei]; - if (oldFaceI == -1) + if (oldFacei == -1) { // Inflated/appended phi[facei] = phiU[facei]; } - else if (reverseFaceMap[oldFaceI] != facei) + else if (reverseFaceMap[oldFacei] != facei) { // face-from-masterface phi[facei] = phiU[facei]; @@ -396,14 +396,14 @@ Foam::dynamicRefineFvMesh::refine forAll(patchPhi, i) { - label oldFaceI = faceMap[facei]; + label oldFacei = faceMap[facei]; - if (oldFaceI == -1) + if (oldFacei == -1) { // Inflated/appended patchPhi[i] = patchPhiU[i]; } - else if (reverseFaceMap[oldFaceI] != facei) + else if (reverseFaceMap[oldFacei] != facei) { // face-from-masterface patchPhi[i] = patchPhiU[i]; @@ -450,8 +450,8 @@ Foam::dynamicRefineFvMesh::refine forAll(newProtectedCell, celli) { - label oldCellI = map().cellMap()[celli]; - newProtectedCell.set(celli, protectedCell_.get(oldCellI)); + label oldCelli = map().cellMap()[celli]; + newProtectedCell.set(celli, protectedCell_.get(oldCelli)); } protectedCell_.transfer(newProtectedCell); } @@ -498,9 +498,9 @@ Foam::dynamicRefineFvMesh::unrefine const labelList& pFaces = pointFaces()[otherPointI]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - faceToSplitPoint.insert(pFaces[pFaceI], otherPointI); + faceToSplitPoint.insert(pFaces[pFacei], otherPointI); } } } @@ -589,13 +589,13 @@ Foam::dynamicRefineFvMesh::unrefine forAllConstIter(Map<label>, faceToSplitPoint, iter) { - label oldFaceI = iter.key(); + label oldFacei = iter.key(); label oldPointI = iter(); if (reversePointMap[oldPointI] < 0) { // midpoint was removed. See if face still exists. - label facei = reverseFaceMap[oldFaceI]; + label facei = reverseFaceMap[oldFacei]; if (facei >= 0) { @@ -630,10 +630,10 @@ Foam::dynamicRefineFvMesh::unrefine forAll(newProtectedCell, celli) { - label oldCellI = map().cellMap()[celli]; - if (oldCellI >= 0) + label oldCelli = map().cellMap()[celli]; + if (oldCelli >= 0) { - newProtectedCell.set(celli, protectedCell_.get(oldCellI)); + newProtectedCell.set(celli, protectedCell_.get(oldCelli)); } } protectedCell_.transfer(newProtectedCell); @@ -873,9 +873,9 @@ Foam::labelList Foam::dynamicRefineFvMesh::selectUnrefinePoints bool hasMarked = false; - forAll(pCells, pCellI) + forAll(pCells, pCelli) { - if (markedCell.get(pCells[pCellI])) + if (markedCell.get(pCells[pCelli])) { hasMarked = true; break; @@ -967,9 +967,9 @@ void Foam::dynamicRefineFvMesh::checkEightAnchorPoints { const labelList& pCells = pointCells(pointI); - forAll(pCells, pCellI) + forAll(pCells, pCelli) { - label celli = pCells[pCellI]; + label celli = pCells[pCelli]; if (pointLevel[pointI] <= cellLevel[celli]) { @@ -1139,9 +1139,9 @@ Foam::dynamicRefineFvMesh::dynamicRefineFvMesh(const IOobject& io) } else { - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - if (faces()[cFaces[cFaceI]].size() < 4) + if (faces()[cFaces[cFacei]].size() < 4) { if (protectedCell_.set(celli, 1)) { @@ -1324,19 +1324,19 @@ bool Foam::dynamicRefineFvMesh::update() forAll(cellMap, celli) { - label oldCellI = cellMap[celli]; + label oldCelli = cellMap[celli]; - if (oldCellI < 0) + if (oldCelli < 0) { newRefineCell.set(celli, 1); } - else if (reverseCellMap[oldCellI] != celli) + else if (reverseCellMap[oldCelli] != celli) { newRefineCell.set(celli, 1); } else { - newRefineCell.set(celli, refineCell.get(oldCellI)); + newRefineCell.set(celli, refineCell.get(oldCelli)); } } refineCell.transfer(newRefineCell); diff --git a/src/dynamicMesh/attachDetach/detachInterface.C b/src/dynamicMesh/attachDetach/detachInterface.C index 0bd48e4d14ab8bbf35b1d05ac5f20c5426992eeb..44eb11a25a4c976e3da8c75f61623cee412ccce6 100644 --- a/src/dynamicMesh/attachDetach/detachInterface.C +++ b/src/dynamicMesh/attachDetach/detachInterface.C @@ -212,7 +212,7 @@ void Foam::attachDetach::detachInterface ); // Add renumbered face into the slave patch - //label addedFaceI = + //label addedFacei = ref.setAction ( polyAddFace @@ -235,7 +235,7 @@ void Foam::attachDetach::detachInterface // << " fc:" << ref.faces()[curFaceID].centre(newPts) // << " next to cell: " << nei[curFaceID] // << " and adding face: " << newFace - // << " fc:" << ref.faces()[addedFaceI].centre(newPts) + // << " fc:" << ref.faces()[addedFacei].centre(newPts) // << " next to cell: " << own[curFaceID] << endl; //} } @@ -259,7 +259,7 @@ void Foam::attachDetach::detachInterface ); // Add renumbered face into the slave patch - //label addedFaceI = + //label addedFacei = ref.setAction ( polyAddFace @@ -282,7 +282,7 @@ void Foam::attachDetach::detachInterface // << " fc:" << ref.faces()[curFaceID].centre(newPts) // << " next to cell: " << own[curFaceID] // << " and adding face: " << newFace - // << " fc:" << ref.faces()[addedFaceI].centre(newPts) + // << " fc:" << ref.faces()[addedFacei].centre(newPts) // << " next to cell: " << nei[curFaceID] << endl; //} } diff --git a/src/dynamicMesh/boundaryMesh/boundaryMesh.C b/src/dynamicMesh/boundaryMesh/boundaryMesh.C index 125367be0b31694b90221a5e51407a80774d89f0..fda1cb6258a9d780064d975d7c8619b4ff136091 100644 --- a/src/dynamicMesh/boundaryMesh/boundaryMesh.C +++ b/src/dynamicMesh/boundaryMesh/boundaryMesh.C @@ -354,9 +354,9 @@ Foam::labelList Foam::boundaryMesh::edgeToFace const labelList& eFaces = mesh().edgeFaces()[edgeI]; - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - label facei = eFaces[eFaceI]; + label facei = eFaces[eFacei]; if (faceRegion[facei] == -1) { @@ -482,7 +482,7 @@ void Foam::boundaryMesh::read(const polyMesh& mesh) meshFace_.setSize(nBFaces); - label bFaceI = 0; + label bFacei = 0; // Collect all boundary faces. forAll(mesh.boundaryMesh(), patchi) @@ -497,19 +497,19 @@ void Foam::boundaryMesh::read(const polyMesh& mesh) pp.name(), patchi, pp.size(), - bFaceI, + bFacei, pp.type() ) ); // Collect all faces in global numbering. - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { - meshFace_[bFaceI] = pp.start() + patchFaceI; + meshFace_[bFacei] = pp.start() + patchFacei; - bFaces[bFaceI] = pp[patchFaceI]; + bFaces[bFacei] = pp[patchFacei]; - bFaceI++; + bFacei++; } } @@ -697,7 +697,7 @@ void Foam::boundaryMesh::readTriSurface(const fileName& fName) meshFace_.setSize(surf.size()); - label bFaceI = 0; + label bFacei = 0; // Current region number label surfRegion = regions[0]; @@ -708,7 +708,7 @@ void Foam::boundaryMesh::readTriSurface(const fileName& fName) // Index in bFaces of start of current patch - label startFaceI = 0; + label startFacei = 0; forAll(indices, indexI) { @@ -721,8 +721,8 @@ void Foam::boundaryMesh::readTriSurface(const fileName& fName) // Change of region. We now know the size of the previous one. boundaryPatch& bp = patches_[foamRegion]; - bp.size() = bFaceI - startFaceI; - bp.start() = startFaceI; + bp.size() = bFacei - startFacei; + bp.start() = startFacei; surfRegion = tri.region(); foamRegion = regionToBoundaryPatch[surfRegion]; @@ -731,19 +731,19 @@ void Foam::boundaryMesh::readTriSurface(const fileName& fName) << foamRegion << " with name " << patches_[foamRegion].name() << endl; - startFaceI = bFaceI; + startFacei = bFacei; } - meshFace_[bFaceI] = triI; + meshFace_[bFacei] = triI; - bFaces[bFaceI++] = face(tri); + bFaces[bFacei++] = face(tri); } // Final region boundaryPatch& bp = patches_[foamRegion]; - bp.size() = bFaceI - startFaceI; - bp.start() = startFaceI; + bp.size() = bFacei - startFacei; + bp.start() = startFacei; // // Construct single primitivePatch for all of boundary @@ -821,9 +821,9 @@ void Foam::boundaryMesh::writeTriSurface(const fileName& fName) const { const boundaryPatch& bp = patches_[patchi]; - forAll(bp, patchFaceI) + forAll(bp, patchFacei) { - label facei = bp.start() + patchFaceI; + label facei = bp.start() + patchFacei; label triVertI = 3*startTri[facei]; @@ -870,17 +870,17 @@ Foam::labelList Foam::boundaryMesh::getNearest DynamicList<label> leftFaces(mesh().size()/2); DynamicList<label> rightFaces(mesh().size()/2); - forAll(mesh(), bFaceI) + forAll(mesh(), bFacei) { - scalar sign = mesh().faceNormals()[bFaceI] & splitNormal_; + scalar sign = mesh().faceNormals()[bFacei] & splitNormal_; if (sign > -1e-5) { - rightFaces.append(bFaceI); + rightFaces.append(bFacei); } if (sign < 1e-5) { - leftFaces.append(bFaceI); + leftFaces.append(bFacei); } } @@ -976,32 +976,32 @@ Foam::labelList Foam::boundaryMesh::getNearest // Search nearest triangle centre for every polyMesh boundary face // - labelList nearestBFaceI(pMesh.nFaces() - pMesh.nInternalFaces()); + labelList nearestBFacei(pMesh.nFaces() - pMesh.nInternalFaces()); treeBoundBox tightest; const scalar searchDimSqr = magSqr(searchSpan); - forAll(nearestBFaceI, patchFaceI) + forAll(nearestBFacei, patchFacei) { - label meshFaceI = pMesh.nInternalFaces() + patchFaceI; + label meshFacei = pMesh.nInternalFaces() + patchFacei; - const point& ctr = pMesh.faceCentres()[meshFaceI]; + const point& ctr = pMesh.faceCentres()[meshFacei]; - if (debug && (patchFaceI % 1000) == 0) + if (debug && (patchFacei % 1000) == 0) { - Pout<< "getNearest : patchFace:" << patchFaceI - << " meshFaceI:" << meshFaceI << " ctr:" << ctr << endl; + Pout<< "getNearest : patchFace:" << patchFacei + << " meshFacei:" << meshFacei << " ctr:" << ctr << endl; } // Get normal from area vector - vector n = pMesh.faceAreas()[meshFaceI]; + vector n = pMesh.faceAreas()[meshFacei]; scalar area = mag(n); n /= area; scalar typDim = -GREAT; - const face& f = pMesh.faces()[meshFaceI]; + const face& f = pMesh.faces()[meshFacei]; forAll(f, fp) { @@ -1020,14 +1020,14 @@ Foam::labelList Foam::boundaryMesh::getNearest if (leftInfo.hit()) { // Found in both trees. Compare normals. - label rightFaceI = rightFaces[rightInfo.index()]; - label leftFaceI = leftFaces[leftInfo.index()]; + label rightFacei = rightFaces[rightInfo.index()]; + label leftFacei = leftFaces[leftInfo.index()]; label rightDist = mag(rightInfo.hitPoint()-ctr); label leftDist = mag(leftInfo.hitPoint()-ctr); - scalar rightSign = n & ns[rightFaceI]; - scalar leftSign = n & ns[leftFaceI]; + scalar rightSign = n & ns[rightFacei]; + scalar leftSign = n & ns[leftFacei]; if ( @@ -1038,11 +1038,11 @@ Foam::labelList Foam::boundaryMesh::getNearest // Both same sign. Choose nearest. if (rightDist < leftDist) { - nearestBFaceI[patchFaceI] = rightFaceI; + nearestBFacei[patchFacei] = rightFacei; } else { - nearestBFaceI[patchFaceI] = leftFaceI; + nearestBFacei[patchFacei] = leftFacei; } } else @@ -1061,11 +1061,11 @@ Foam::labelList Foam::boundaryMesh::getNearest // Different sign and nearby. Choosing matching normal if (rightSign > 0) { - nearestBFaceI[patchFaceI] = rightFaceI; + nearestBFacei[patchFacei] = rightFacei; } else { - nearestBFaceI[patchFaceI] = leftFaceI; + nearestBFacei[patchFacei] = leftFacei; } } else @@ -1073,11 +1073,11 @@ Foam::labelList Foam::boundaryMesh::getNearest // Different sign but faraway. Choosing nearest. if (rightDist < leftDist) { - nearestBFaceI[patchFaceI] = rightFaceI; + nearestBFacei[patchFacei] = rightFacei; } else { - nearestBFaceI[patchFaceI] = leftFaceI; + nearestBFacei[patchFacei] = leftFacei; } } } @@ -1086,8 +1086,8 @@ Foam::labelList Foam::boundaryMesh::getNearest { // Found in right but not in left. Choose right regardless if // correct sign. Note: do we want this? - label rightFaceI = rightFaces[rightInfo.index()]; - nearestBFaceI[patchFaceI] = rightFaceI; + label rightFacei = rightFaces[rightInfo.index()]; + nearestBFacei[patchFacei] = rightFacei; } } else @@ -1098,17 +1098,17 @@ Foam::labelList Foam::boundaryMesh::getNearest { // Found in left but not in right. Choose left regardless if // correct sign. Note: do we want this? - nearestBFaceI[patchFaceI] = leftFaces[leftInfo.index()]; + nearestBFacei[patchFacei] = leftFaces[leftInfo.index()]; } else { // No face found in left tree. - nearestBFaceI[patchFaceI] = -1; + nearestBFacei[patchFacei] = -1; } } } - return nearestBFaceI; + return nearestBFacei; } @@ -1132,28 +1132,28 @@ void Foam::boundaryMesh::patchify label nNewPatches = patches_.size(); - forAll(oldPatches, oldPatchI) + forAll(oldPatches, oldPatchi) { - const polyPatch& patch = oldPatches[oldPatchI]; - const label newPatchI = findPatchID(patch.name()); + const polyPatch& patch = oldPatches[oldPatchi]; + const label newPatchi = findPatchID(patch.name()); - if (newPatchI != -1) + if (newPatchi != -1) { - nameToIndex.insert(patch.name(), newPatchI); - indexToName.insert(newPatchI, patch.name()); + nameToIndex.insert(patch.name(), newPatchi); + indexToName.insert(newPatchi, patch.name()); } } // Include all boundaryPatches not yet in nameToIndex (i.e. not in old // patches) - forAll(patches_, bPatchI) + forAll(patches_, bPatchi) { - const boundaryPatch& bp = patches_[bPatchI]; + const boundaryPatch& bp = patches_[bPatchi]; if (!nameToIndex.found(bp.name())) { - nameToIndex.insert(bp.name(), bPatchI); - indexToName.insert(bPatchI, bp.name()); + nameToIndex.insert(bp.name(), bPatchi); + indexToName.insert(bPatchi, bp.name()); } } @@ -1165,21 +1165,21 @@ void Foam::boundaryMesh::patchify List<polyPatch*> newPatchPtrList(nNewPatches); - label meshFaceI = newMesh.nInternalFaces(); + label meshFacei = newMesh.nInternalFaces(); // First patch gets all non-coupled faces label facesToBeDone = newMesh.nFaces() - newMesh.nInternalFaces(); - forAll(patches_, bPatchI) + forAll(patches_, bPatchi) { - const boundaryPatch& bp = patches_[bPatchI]; + const boundaryPatch& bp = patches_[bPatchi]; - const label newPatchI = nameToIndex[bp.name()]; + const label newPatchi = nameToIndex[bp.name()]; // Find corresponding patch in polyMesh - const label oldPatchI = findPatchID(oldPatches, bp.name()); + const label oldPatchi = findPatchID(oldPatches, bp.name()); - if (oldPatchI == -1) + if (oldPatchi == -1) { // Newly created patch. Gets all or zero faces. if (debug) @@ -1188,17 +1188,17 @@ void Foam::boundaryMesh::patchify << " type:" << bp.physicalType() << endl; } - newPatchPtrList[newPatchI] = polyPatch::New + newPatchPtrList[newPatchi] = polyPatch::New ( bp.physicalType(), bp.name(), facesToBeDone, - meshFaceI, - newPatchI, + meshFacei, + newPatchi, newMesh.boundaryMesh() ).ptr(); - meshFaceI += facesToBeDone; + meshFacei += facesToBeDone; // first patch gets all boundary faces; all others get 0. facesToBeDone = 0; @@ -1206,7 +1206,7 @@ void Foam::boundaryMesh::patchify else { // Existing patch. Gets all or zero faces. - const polyPatch& oldPatch = oldPatches[oldPatchI]; + const polyPatch& oldPatch = oldPatches[oldPatchi]; if (debug) { @@ -1214,15 +1214,15 @@ void Foam::boundaryMesh::patchify << oldPatch.name() << endl; } - newPatchPtrList[newPatchI] = oldPatch.clone + newPatchPtrList[newPatchi] = oldPatch.clone ( newMesh.boundaryMesh(), - newPatchI, + newPatchi, facesToBeDone, - meshFaceI + meshFacei ).ptr(); - meshFaceI += facesToBeDone; + meshFacei += facesToBeDone; // first patch gets all boundary faces; all others get 0. facesToBeDone = 0; @@ -1266,9 +1266,9 @@ void Foam::boundaryMesh::patchify (newMesh.nFaces() - newMesh.nInternalFaces()) / nNewPatches; - forAll(patchFaces, newPatchI) + forAll(patchFaces, newPatchi) { - patchFaces[newPatchI].setCapacity(nAvgFaces); + patchFaces[newPatchi].setCapacity(nAvgFaces); } // @@ -1276,38 +1276,38 @@ void Foam::boundaryMesh::patchify // since will contain all faces. // - forAll(oldPatches, oldPatchI) + forAll(oldPatches, oldPatchi) { - const polyPatch& patch = oldPatches[oldPatchI]; + const polyPatch& patch = oldPatches[oldPatchi]; - forAll(patch, patchFaceI) + forAll(patch, patchFacei) { // Put face into region given by nearest boundary face - label meshFaceI = patch.start() + patchFaceI; + label meshFacei = patch.start() + patchFacei; - label bFaceI = meshFaceI - newMesh.nInternalFaces(); + label bFacei = meshFacei - newMesh.nInternalFaces(); - patchFaces[whichPatch(nearest[bFaceI])].append(meshFaceI); + patchFaces[whichPatch(nearest[bFacei])].append(meshFacei); } } - forAll(patchFaces, newPatchI) + forAll(patchFaces, newPatchi) { - patchFaces[newPatchI].shrink(); + patchFaces[newPatchi].shrink(); } // Change patch > 0. (since above we put all faces into the zeroth // patch) - for (label newPatchI = 1; newPatchI < patchFaces.size(); newPatchI++) + for (label newPatchi = 1; newPatchi < patchFaces.size(); newPatchi++) { - const labelList& pFaces = patchFaces[newPatchI]; + const labelList& pFaces = patchFaces[newPatchi]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - polyMeshRepatcher.changePatchID(pFaces[pFaceI], newPatchI); + polyMeshRepatcher.changePatchID(pFaces[pFacei], newPatchi); } } @@ -1606,33 +1606,33 @@ void Foam::boundaryMesh::addPatch(const word& patchName) void Foam::boundaryMesh::deletePatch(const word& patchName) { - const label delPatchI = findPatchID(patchName); + const label delPatchi = findPatchID(patchName); - if (delPatchI == -1) + if (delPatchi == -1) { FatalErrorInFunction << "Can't find patch named " << patchName << abort(FatalError); } - if (patches_[delPatchI].size()) + if (patches_[delPatchi].size()) { FatalErrorInFunction << "Trying to delete non-empty patch " << patchName - << endl << "Current size:" << patches_[delPatchI].size() + << endl << "Current size:" << patches_[delPatchi].size() << abort(FatalError); } PtrList<boundaryPatch> newPatches(patches_.size() - 1); - for (label patchi = 0; patchi < delPatchI; patchi++) + for (label patchi = 0; patchi < delPatchi; patchi++) { newPatches.set(patchi, patches_[patchi].clone()); } - // Move patches down, starting from delPatchI. + // Move patches down, starting from delPatchi. - for (label patchi = delPatchI + 1; patchi < patches_.size(); patchi++) + for (label patchi = delPatchi + 1; patchi < patches_.size(); patchi++) { newPatches.set(patchi - 1, patches_[patchi].clone()); } @@ -1839,7 +1839,7 @@ Foam::label Foam::boundaryMesh::getNTris(const label facei) const Foam::label Foam::boundaryMesh::getNTris ( - const label startFaceI, + const label startFacei, const label nFaces, labelList& nTris ) const @@ -1850,7 +1850,7 @@ Foam::label Foam::boundaryMesh::getNTris for (label i = 0; i < nFaces; i++) { - label faceNTris = getNTris(startFaceI + i); + label faceNTris = getNTris(startFacei + i); nTris[i] = faceNTris; @@ -1864,7 +1864,7 @@ Foam::label Foam::boundaryMesh::getNTris // consecutive vertices per triangle. void Foam::boundaryMesh::triangulate ( - const label startFaceI, + const label startFacei, const label nFaces, const label totalNTris, labelList& triVerts @@ -1877,7 +1877,7 @@ void Foam::boundaryMesh::triangulate for (label i = 0; i < nFaces; i++) { - label facei = startFaceI + i; + label facei = startFacei + i; const face& f = mesh()[facei]; @@ -1890,9 +1890,9 @@ void Foam::boundaryMesh::triangulate // Copy into triVerts - forAll(triFaces, triFaceI) + forAll(triFaces, triFacei) { - const face& triF = triFaces[triFaceI]; + const face& triF = triFaces[triFacei]; triVerts[vertI++] = triF[0]; triVerts[vertI++] = triF[1]; @@ -1905,11 +1905,11 @@ void Foam::boundaryMesh::triangulate // Number of local points in subset. Foam::label Foam::boundaryMesh::getNPoints ( - const label startFaceI, + const label startFacei, const label nFaces ) const { - SubList<face> patchFaces(mesh(), nFaces, startFaceI); + SubList<face> patchFaces(mesh(), nFaces, startFacei); primitivePatch patch(patchFaces, mesh().points()); @@ -1920,14 +1920,14 @@ Foam::label Foam::boundaryMesh::getNPoints // Triangulation of face subset in local coords. void Foam::boundaryMesh::triangulateLocal ( - const label startFaceI, + const label startFacei, const label nFaces, const label totalNTris, labelList& triVerts, labelList& localToGlobal ) const { - SubList<face> patchFaces(mesh(), nFaces, startFaceI); + SubList<face> patchFaces(mesh(), nFaces, startFacei); primitivePatch patch(patchFaces, mesh().points()); @@ -1953,9 +1953,9 @@ void Foam::boundaryMesh::triangulateLocal // Copy into triVerts - forAll(triFaces, triFaceI) + forAll(triFaces, triFacei) { - const face& triF = triFaces[triFaceI]; + const face& triF = triFaces[triFacei]; triVerts[vertI++] = triF[0]; triVerts[vertI++] = triF[1]; @@ -1968,7 +1968,7 @@ void Foam::boundaryMesh::triangulateLocal void Foam::boundaryMesh::markFaces ( const labelList& protectedEdges, - const label seedFaceI, + const label seedFacei, boolList& visited ) const { @@ -1983,8 +1983,8 @@ void Foam::boundaryMesh::markFaces // Initialize zone for all faces to -1 labelList currentZone(mesh().size(), -1); - // Mark with 0 all faces reachable from seedFaceI - markZone(protectedEdge, seedFaceI, 0, currentZone); + // Mark with 0 all faces reachable from seedFacei + markZone(protectedEdge, seedFacei, 0, currentZone); // Set in visited all reached ones. visited.setSize(mesh().size()); diff --git a/src/dynamicMesh/boundaryMesh/boundaryMesh.H b/src/dynamicMesh/boundaryMesh/boundaryMesh.H index e203b98cae9290c810fdc348b124568cac37387a..90e09ad6dc096295ca8e1e2f0d7d791a29bb4103 100644 --- a/src/dynamicMesh/boundaryMesh/boundaryMesh.H +++ b/src/dynamicMesh/boundaryMesh/boundaryMesh.H @@ -341,7 +341,7 @@ public: // of triangles, nTris is per face number of triangles. label getNTris ( - const label startFaceI, + const label startFacei, const label nFaces, labelList& nTris ) const; @@ -351,20 +351,20 @@ public: // triVerts is triangle vertices, three per triangle. void triangulate ( - const label startFaceI, + const label startFacei, const label nFaces, const label totalNTris, labelList& triVerts ) const; //- Number of points used in face subset. - label getNPoints(const label startFaceI, const label nFaces) const; + label getNPoints(const label startFacei, const label nFaces) const; //- Same as triangulate but in local vertex numbering. // (Map returned). void triangulateLocal ( - const label startFaceI, + const label startFacei, const label nFaces, const label totalNTris, labelList& triVerts, diff --git a/src/dynamicMesh/createShellMesh/createShellMesh.C b/src/dynamicMesh/createShellMesh/createShellMesh.C index d778f1509d3daad710626d2052b9cd226a67931d..fbbea89f0d140cd298f7e4bb83aab02c2e2ee525 100644 --- a/src/dynamicMesh/createShellMesh/createShellMesh.C +++ b/src/dynamicMesh/createShellMesh/createShellMesh.C @@ -744,23 +744,23 @@ void Foam::createShellMesh::setRefinement } - label minCellI = addedCells[nLayers*eFaces[0]+layerI]; - label maxCellI; + label minCelli = addedCells[nLayers*eFaces[0]+layerI]; + label maxCelli; label patchI; if (ePatches.size() == 0) { - maxCellI = addedCells[nLayers*eFaces[1]+layerI]; - if (minCellI > maxCellI) + maxCelli = addedCells[nLayers*eFaces[1]+layerI]; + if (minCelli > maxCelli) { // Swap - Swap(minCellI, maxCellI); + Swap(minCelli, maxCelli); newF = newF.reverseFace(); } patchI = -1; } else { - maxCellI = -1; + maxCelli = -1; patchI = ePatches[0]; } @@ -773,8 +773,8 @@ void Foam::createShellMesh::setRefinement // << " with new points:" << newF // << " locations:" // << UIndirectList<point>(meshMod.points(), newF) - // << " own:" << minCellI - // << " nei:" << maxCellI + // << " own:" << minCelli + // << " nei:" << maxCelli // << endl; //} @@ -783,8 +783,8 @@ void Foam::createShellMesh::setRefinement meshMod.addFace ( newF, // vertices - minCellI, // own - maxCellI, // nei + minCelli, // own + maxCelli, // nei -1, // masterPointID -1, // masterEdgeID faceToFaceMap.size(), // masterFaceID @@ -809,10 +809,10 @@ void Foam::createShellMesh::setRefinement for (label i = 1; i < ePatches.size(); i++) { // Extrude eFaces[i] - label minFaceI = eFaces[i]; + label minFacei = eFaces[i]; // Make face pointing in to eFaces[0] so out of new master face - const face& f = patch_.localFaces()[minFaceI]; + const face& f = patch_.localFaces()[minFacei]; const edge& e = patch_.edges()[edgeI]; label fp0 = findIndex(f, e[0]); @@ -827,8 +827,8 @@ void Foam::createShellMesh::setRefinement face newF(4); for (label layerI = 0; layerI < nLayers; layerI++) { - label region0 = pointRegions_[minFaceI][fp0]; - label region1 = pointRegions_[minFaceI][fp1]; + label region0 = pointRegions_[minFacei][fp0]; + label region1 = pointRegions_[minFacei][fp1]; if (layerI == 0) { @@ -863,7 +863,7 @@ void Foam::createShellMesh::setRefinement ////if (ePatches.size() == 0) //{ // Pout<< "Adding from MULTI face:" - // << patch_.faceCentres()[minFaceI] + // << patch_.faceCentres()[minFacei] // << " from edge:" // << patch_.localPoints()[f[fp0]] // << patch_.localPoints()[f[fp1]] @@ -878,7 +878,7 @@ void Foam::createShellMesh::setRefinement meshMod.addFace ( newF, // vertices - addedCells[nLayers*minFaceI+layerI], // own + addedCells[nLayers*minFacei+layerI], // own -1, // nei -1, // masterPointID -1, // masterEdgeID diff --git a/src/dynamicMesh/createShellMesh/createShellMesh.H b/src/dynamicMesh/createShellMesh/createShellMesh.H index 65edd65cd84b0d9dff43b0a72aab6ae03f0c32fc..8a4fe7a95c47a2d87bdf6564363cff366c23d0c7 100644 --- a/src/dynamicMesh/createShellMesh/createShellMesh.H +++ b/src/dynamicMesh/createShellMesh/createShellMesh.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -126,7 +126,7 @@ public: // Access //- From region cell to patch face. Consecutively added so - // cell at layerI is at patchFaceI*nLayers+layerI + // cell at layerI is at patchFacei*nLayers+layerI const labelList& cellToFaceMap() const { return cellToFaceMap_; diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C b/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C index f60ba6348750bdad7ff1ed8a57b19bd8a621364e..2f2575d782339f869a17d4101a6e7d6629ed5953 100644 --- a/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C +++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C @@ -46,11 +46,11 @@ Foam::labelList Foam::fvMeshAdder::calcPatchMap for (label i = 0; i < oldSize; i++) { - label newFaceI = oldToNew[oldStart+i]; + label newFacei = oldToNew[oldStart+i]; - if (newFaceI >= newStart && newFaceI < newStart+newSize) + if (newFacei >= newStart && newFacei < newStart+newSize) { - newToOld[newFaceI-newStart] = i; + newToOld[newFacei-newStart] = i; } } return newToOld; diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C index 5aa4a0ee87a7100c0176b9f6050adaf5a0cea81a..d8058674fa55dd08d880cd89cd2d0266f5dcbc12 100644 --- a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C +++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C @@ -71,34 +71,34 @@ void Foam::fvMeshAdder::MapVolField // Reorder old patches in order of new ones. Put removed patches at end. - label unusedPatchI = 0; + label unusedPatchi = 0; forAll(oldPatchMap, patchi) { - label newPatchI = oldPatchMap[patchi]; + label newPatchi = oldPatchMap[patchi]; - if (newPatchI != -1) + if (newPatchi != -1) { - unusedPatchI++; + unusedPatchi++; } } - label nUsedPatches = unusedPatchI; + label nUsedPatches = unusedPatchi; // Reorder list for patchFields labelList oldToNew(oldPatchMap.size()); forAll(oldPatchMap, patchi) { - label newPatchI = oldPatchMap[patchi]; + label newPatchi = oldPatchMap[patchi]; - if (newPatchI != -1) + if (newPatchi != -1) { - oldToNew[patchi] = newPatchI; + oldToNew[patchi] = newPatchi; } else { - oldToNew[patchi] = unusedPatchI++; + oldToNew[patchi] = unusedPatchi++; } } @@ -110,12 +110,12 @@ void Foam::fvMeshAdder::MapVolField // Delete unused patches for ( - label newPatchI = nUsedPatches; - newPatchI < bfld.size(); - newPatchI++ + label newPatchi = nUsedPatches; + newPatchi < bfld.size(); + newPatchi++ ) { - bfld.set(newPatchI, NULL); + bfld.set(newPatchi, NULL); } @@ -124,9 +124,9 @@ void Foam::fvMeshAdder::MapVolField forAll(oldPatchMap, patchi) { - label newPatchI = oldPatchMap[patchi]; + label newPatchi = oldPatchMap[patchi]; - if (newPatchI != -1) + if (newPatchi != -1) { labelList newToOld ( @@ -135,7 +135,7 @@ void Foam::fvMeshAdder::MapVolField oldPatchStarts[patchi], oldPatchSizes[patchi], meshMap.oldFaceMap(), - mesh.boundaryMesh()[newPatchI], + mesh.boundaryMesh()[newPatchi], -1 // unmapped value ) ); @@ -145,18 +145,18 @@ void Foam::fvMeshAdder::MapVolField // Create new patchField with same type as existing one. // Note: - // - boundaryField already in new order so access with newPatchI - // - fld.boundaryField()[newPatchI] both used for type and old + // - boundaryField already in new order so access with newPatchi + // - fld.boundaryField()[newPatchi] both used for type and old // value // - hope that field mapping allows aliasing since old and new // are same memory! bfld.set ( - newPatchI, + newPatchi, fvPatchField<Type>::New ( - bfld[newPatchI], // old field - mesh.boundary()[newPatchI], // new fvPatch + bfld[newPatchi], // old field + mesh.boundary()[newPatchi], // new fvPatch fld.dimensionedInternalField(), // new internal field patchMapper // mapper (new to old) ) @@ -176,17 +176,17 @@ void Foam::fvMeshAdder::MapVolField // Add addedMesh patches forAll(addedPatchMap, patchi) { - label newPatchI = addedPatchMap[patchi]; + label newPatchi = addedPatchMap[patchi]; - if (newPatchI != -1) + if (newPatchi != -1) { - const polyPatch& newPatch = mesh.boundaryMesh()[newPatchI]; + const polyPatch& newPatch = mesh.boundaryMesh()[newPatchi]; const polyPatch& oldPatch = fldToAdd.mesh().boundaryMesh()[patchi]; - if (!bfld(newPatchI)) + if (!bfld(newPatchi)) { - // First occurrence of newPatchI. Map from existing + // First occurrence of newPatchi. Map from existing // patchField // From new patch faces to patch faces on added mesh. @@ -206,11 +206,11 @@ void Foam::fvMeshAdder::MapVolField bfld.set ( - newPatchI, + newPatchi, fvPatchField<Type>::New ( fldToAdd.boundaryField()[patchi], // added field - mesh.boundary()[newPatchI], // new fvPatch + mesh.boundary()[newPatchi], // new fvPatch fld.dimensionedInternalField(), // new int. field patchMapper // mapper ) @@ -224,16 +224,16 @@ void Foam::fvMeshAdder::MapVolField labelList addedToNew(oldPatch.size(), -1); forAll(addedToNew, i) { - label addedFaceI = oldPatch.start()+i; - label newFaceI = meshMap.addedFaceMap()[addedFaceI]; - label patchFaceI = newFaceI-newPatch.start(); - if (patchFaceI >= 0 && patchFaceI < newPatch.size()) + label addedFacei = oldPatch.start()+i; + label newFacei = meshMap.addedFaceMap()[addedFacei]; + label patchFacei = newFacei-newPatch.start(); + if (patchFacei >= 0 && patchFacei < newPatch.size()) { - addedToNew[i] = patchFaceI; + addedToNew[i] = patchFacei; } } - bfld[newPatchI].rmap + bfld[newPatchi].rmap ( fldToAdd.boundaryField()[patchi], addedToNew @@ -359,11 +359,11 @@ void Foam::fvMeshAdder::MapSurfaceField forAll(pf, i) { - label newFaceI = meshMap.oldFaceMap()[start + i]; + label newFacei = meshMap.oldFaceMap()[start + i]; - if (newFaceI >= 0 && newFaceI < mesh.nInternalFaces()) + if (newFacei >= 0 && newFacei < mesh.nInternalFaces()) { - intFld[newFaceI] = pf[i]; + intFld[newFacei] = pf[i]; } } } @@ -379,34 +379,34 @@ void Foam::fvMeshAdder::MapSurfaceField // Reorder old patches in order of new ones. Put removed patches at end. - label unusedPatchI = 0; + label unusedPatchi = 0; forAll(oldPatchMap, patchi) { - label newPatchI = oldPatchMap[patchi]; + label newPatchi = oldPatchMap[patchi]; - if (newPatchI != -1) + if (newPatchi != -1) { - unusedPatchI++; + unusedPatchi++; } } - label nUsedPatches = unusedPatchI; + label nUsedPatches = unusedPatchi; // Reorder list for patchFields labelList oldToNew(oldPatchMap.size()); forAll(oldPatchMap, patchi) { - label newPatchI = oldPatchMap[patchi]; + label newPatchi = oldPatchMap[patchi]; - if (newPatchI != -1) + if (newPatchi != -1) { - oldToNew[patchi] = newPatchI; + oldToNew[patchi] = newPatchi; } else { - oldToNew[patchi] = unusedPatchI++; + oldToNew[patchi] = unusedPatchi++; } } @@ -418,12 +418,12 @@ void Foam::fvMeshAdder::MapSurfaceField // Delete unused patches for ( - label newPatchI = nUsedPatches; - newPatchI < bfld.size(); - newPatchI++ + label newPatchi = nUsedPatches; + newPatchi < bfld.size(); + newPatchi++ ) { - bfld.set(newPatchI, NULL); + bfld.set(newPatchi, NULL); } @@ -432,9 +432,9 @@ void Foam::fvMeshAdder::MapSurfaceField forAll(oldPatchMap, patchi) { - label newPatchI = oldPatchMap[patchi]; + label newPatchi = oldPatchMap[patchi]; - if (newPatchI != -1) + if (newPatchi != -1) { labelList newToOld ( @@ -443,7 +443,7 @@ void Foam::fvMeshAdder::MapSurfaceField oldPatchStarts[patchi], oldPatchSizes[patchi], meshMap.oldFaceMap(), - mesh.boundaryMesh()[newPatchI], + mesh.boundaryMesh()[newPatchi], -1 // unmapped value ) ); @@ -452,18 +452,18 @@ void Foam::fvMeshAdder::MapSurfaceField // Create new patchField with same type as existing one. // Note: - // - boundaryField already in new order so access with newPatchI - // - bfld[newPatchI] both used for type and old + // - boundaryField already in new order so access with newPatchi + // - bfld[newPatchi] both used for type and old // value // - hope that field mapping allows aliasing since old and new // are same memory! bfld.set ( - newPatchI, + newPatchi, fvsPatchField<Type>::New ( - bfld[newPatchI], // old field - mesh.boundary()[newPatchI], // new fvPatch + bfld[newPatchi], // old field + mesh.boundary()[newPatchi], // new fvPatch fld.dimensionedInternalField(), // new internal field patchMapper // mapper (new to old) ) @@ -483,17 +483,17 @@ void Foam::fvMeshAdder::MapSurfaceField // Add addedMesh patches forAll(addedPatchMap, patchi) { - label newPatchI = addedPatchMap[patchi]; + label newPatchi = addedPatchMap[patchi]; - if (newPatchI != -1) + if (newPatchi != -1) { - const polyPatch& newPatch = mesh.boundaryMesh()[newPatchI]; + const polyPatch& newPatch = mesh.boundaryMesh()[newPatchi]; const polyPatch& oldPatch = fldToAdd.mesh().boundaryMesh()[patchi]; - if (!bfld(newPatchI)) + if (!bfld(newPatchi)) { - // First occurrence of newPatchI. Map from existing + // First occurrence of newPatchi. Map from existing // patchField // From new patch faces to patch faces on added mesh. @@ -513,11 +513,11 @@ void Foam::fvMeshAdder::MapSurfaceField bfld.set ( - newPatchI, + newPatchi, fvsPatchField<Type>::New ( fldToAdd.boundaryField()[patchi],// added field - mesh.boundary()[newPatchI], // new fvPatch + mesh.boundary()[newPatchi], // new fvPatch fld.dimensionedInternalField(), // new int. field patchMapper // mapper ) @@ -531,16 +531,16 @@ void Foam::fvMeshAdder::MapSurfaceField labelList addedToNew(oldPatch.size(), -1); forAll(addedToNew, i) { - label addedFaceI = oldPatch.start()+i; - label newFaceI = meshMap.addedFaceMap()[addedFaceI]; - label patchFaceI = newFaceI-newPatch.start(); - if (patchFaceI >= 0 && patchFaceI < newPatch.size()) + label addedFacei = oldPatch.start()+i; + label newFacei = meshMap.addedFaceMap()[addedFacei]; + label patchFacei = newFacei-newPatch.start(); + if (patchFacei >= 0 && patchFacei < newPatch.size()) { - addedToNew[i] = patchFaceI; + addedToNew[i] = patchFacei; } } - bfld[newPatchI].rmap + bfld[newPatchi].rmap ( fldToAdd.boundaryField()[patchi], addedToNew diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index 5488e5ef3583b9e15b08e1a0ebf1329436f28820..7123919e3a57f1e26c36cdbf5c5268b69641aec8 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -94,14 +94,14 @@ void Foam::fvMeshDistribute::checkEqualWordList Pstream::gatherList(allNames); Pstream::scatterList(allNames); - for (label procI = 1; procI < Pstream::nProcs(); procI++) + for (label proci = 1; proci < Pstream::nProcs(); proci++) { - if (allNames[procI] != allNames[0]) + if (allNames[proci] != allNames[0]) { FatalErrorInFunction << "When checking for equal " << msg.c_str() << " :" << endl << "processor0 has:" << allNames[0] << endl - << "processor" << procI << " has:" << allNames[procI] << endl + << "processor" << proci << " has:" << allNames[proci] << endl << msg.c_str() << " need to be synchronised on all processors." << exit(FatalError); } @@ -117,11 +117,11 @@ Foam::wordList Foam::fvMeshDistribute::mergeWordList(const wordList& procNames) Pstream::scatterList(allNames); HashSet<word> mergedNames; - forAll(allNames, procI) + forAll(allNames, proci) { - forAll(allNames[procI], i) + forAll(allNames[proci], i) { - mergedNames.insert(allNames[procI][i]); + mergedNames.insert(allNames[proci][i]); } } return mergedNames.toc(); @@ -201,15 +201,15 @@ void Foam::fvMeshDistribute::printCoupleInfo << "Current coupling info:" << endl; - forAll(sourceFace, bFaceI) + forAll(sourceFace, bFacei) { - label meshFaceI = mesh.nInternalFaces() + bFaceI; + label meshFacei = mesh.nInternalFaces() + bFacei; - Pout<< " meshFace:" << meshFaceI - << " fc:" << mesh.faceCentres()[meshFaceI] - << " connects to proc:" << sourceProc[bFaceI] - << "/face:" << sourceFace[bFaceI] - << " which will move to proc:" << sourceNewNbrProc[bFaceI] + Pout<< " meshFace:" << meshFacei + << " fc:" << mesh.faceCentres()[meshFacei] + << " connects to proc:" << sourceProc[bFacei] + << "/face:" << sourceFace[bFacei] + << " which will move to proc:" << sourceNewNbrProc[bFacei] << endl; } } @@ -220,7 +220,7 @@ Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const { const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - label nonEmptyPatchI = -1; + label nonEmptyPatchi = -1; forAllReverse(patches, patchi) { @@ -228,12 +228,12 @@ Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const if (!isA<emptyPolyPatch>(pp) && !pp.coupled()) { - nonEmptyPatchI = patchi; + nonEmptyPatchi = patchi; break; } } - if (nonEmptyPatchI == -1) + if (nonEmptyPatchi == -1) { FatalErrorInFunction << "Cannot find a patch which is neither of type empty nor" @@ -244,36 +244,36 @@ Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const if (debug) { - Pout<< "findNonEmptyPatch : using patch " << nonEmptyPatchI - << " name:" << patches[nonEmptyPatchI].name() - << " type:" << patches[nonEmptyPatchI].type() + Pout<< "findNonEmptyPatch : using patch " << nonEmptyPatchi + << " name:" << patches[nonEmptyPatchi].name() + << " type:" << patches[nonEmptyPatchi].type() << " to put exposed faces into." << endl; } // Do additional test for processor patches intermingled with non-proc // patches. - label procPatchI = -1; + label procPatchi = -1; forAll(patches, patchi) { if (isA<processorPolyPatch>(patches[patchi])) { - procPatchI = patchi; + procPatchi = patchi; } - else if (procPatchI != -1) + else if (procPatchi != -1) { FatalErrorInFunction << "Processor patches should be at end of patch list." << endl - << "Have processor patch " << procPatchI + << "Have processor patch " << procPatchi << " followed by non-processor patch " << patchi << " in patches " << patches.names() << abort(FatalError); } } - return nonEmptyPatchI; + return nonEmptyPatchi; } @@ -359,11 +359,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::repatch { polyTopoChange meshMod(mesh_); - forAll(newPatchID, bFaceI) + forAll(newPatchID, bFacei) { - if (newPatchID[bFaceI] != -1) + if (newPatchID[bFacei] != -1) { - label facei = mesh_.nInternalFaces() + bFaceI; + label facei = mesh_.nInternalFaces() + bFacei; label zoneID = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; @@ -383,7 +383,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::repatch mesh_.faceOwner()[facei], // owner -1, // neighbour false, // face flip - newPatchID[bFaceI], // patch for face + newPatchID[bFacei], // patch for face false, // remove from zone zoneID, // zone for face zoneFlip // face flip in zone @@ -451,9 +451,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::repatch } } - forAll(constructFaceMap, procI) + forAll(constructFaceMap, proci) { - inplaceRenumber(map().reverseFaceMap(), constructFaceMap[procI]); + inplaceRenumber(map().reverseFaceMap(), constructFaceMap[proci]); } @@ -498,9 +498,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::mergeSharedPoints mesh_.updateMesh(map); // Adapt constructMaps for merged points. - forAll(constructPointMap, procI) + forAll(constructPointMap, proci) { - labelList& constructMap = constructPointMap[procI]; + labelList& constructMap = constructPointMap[proci]; forAll(constructMap, i) { @@ -699,42 +699,42 @@ void Foam::fvMeshDistribute::subsetBoundaryData subPatch.setSize(mesh.nFaces() - mesh.nInternalFaces()); subNewNbrProc.setSize(mesh.nFaces() - mesh.nInternalFaces()); - forAll(subFace, newBFaceI) + forAll(subFace, newBFacei) { - label newFaceI = newBFaceI + mesh.nInternalFaces(); + label newFacei = newBFacei + mesh.nInternalFaces(); - label oldFaceI = faceMap[newFaceI]; + label oldFacei = faceMap[newFacei]; - // Was oldFaceI internal face? If so which side did we get. - if (oldFaceI < oldInternalFaces) + // Was oldFacei internal face? If so which side did we get. + if (oldFacei < oldInternalFaces) { - subFace[newBFaceI] = oldFaceI; - subProc[newBFaceI] = Pstream::myProcNo(); - subPatch[newBFaceI] = -1; + subFace[newBFacei] = oldFacei; + subProc[newBFacei] = Pstream::myProcNo(); + subPatch[newBFacei] = -1; - label oldOwn = oldFaceOwner[oldFaceI]; - label oldNei = oldFaceNeighbour[oldFaceI]; + label oldOwn = oldFaceOwner[oldFacei]; + label oldNei = oldFaceNeighbour[oldFacei]; - if (oldOwn == cellMap[mesh.faceOwner()[newFaceI]]) + if (oldOwn == cellMap[mesh.faceOwner()[newFacei]]) { // We kept the owner side. Where does the neighbour move to? - subNewNbrProc[newBFaceI] = oldDistribution[oldNei]; + subNewNbrProc[newBFacei] = oldDistribution[oldNei]; } else { // We kept the neighbour side. - subNewNbrProc[newBFaceI] = oldDistribution[oldOwn]; + subNewNbrProc[newBFacei] = oldDistribution[oldOwn]; } } else { // Was boundary face. Take over boundary information - label oldBFaceI = oldFaceI - oldInternalFaces; + label oldBFacei = oldFacei - oldInternalFaces; - subFace[newBFaceI] = sourceFace[oldBFaceI]; - subProc[newBFaceI] = sourceProc[oldBFaceI]; - subPatch[newBFaceI] = sourcePatch[oldBFaceI]; - subNewNbrProc[newBFaceI] = sourceNewNbrProc[oldBFaceI]; + subFace[newBFacei] = sourceFace[oldBFacei]; + subProc[newBFacei] = sourceProc[oldBFacei]; + subPatch[newBFacei] = sourcePatch[oldBFacei]; + subNewNbrProc[newBFacei] = sourceNewNbrProc[oldBFacei]; } } } @@ -763,14 +763,14 @@ void Foam::fvMeshDistribute::findCouples // with same face+proc. HashTable<label, labelPair, labelPair::Hash<>> map(domainFace.size()); - forAll(domainProc, bFaceI) + forAll(domainProc, bFacei) { - if (domainProc[bFaceI] != -1 && domainPatch[bFaceI] == -1) + if (domainProc[bFacei] != -1 && domainPatch[bFacei] == -1) { map.insert ( - labelPair(domainFace[bFaceI], domainProc[bFaceI]), - bFaceI + labelPair(domainFace[bFacei], domainProc[bFacei]), + bFacei ); } } @@ -782,23 +782,23 @@ void Foam::fvMeshDistribute::findCouples slaveCoupledFaces.setSize(domainFace.size()); label coupledI = 0; - forAll(sourceFace, bFaceI) + forAll(sourceFace, bFacei) { - if (sourceProc[bFaceI] != -1 && sourcePatch[bFaceI] == -1) + if (sourceProc[bFacei] != -1 && sourcePatch[bFacei] == -1) { - labelPair myData(sourceFace[bFaceI], sourceProc[bFaceI]); + labelPair myData(sourceFace[bFacei], sourceProc[bFacei]); HashTable<label, labelPair, labelPair::Hash<>>::const_iterator iter = map.find(myData); if (iter != map.end()) { - label nbrBFaceI = iter(); + label nbrBFacei = iter(); - masterCoupledFaces[coupledI] = mesh.nInternalFaces() + bFaceI; + masterCoupledFaces[coupledI] = mesh.nInternalFaces() + bFacei; slaveCoupledFaces[coupledI] = domainMesh.nInternalFaces() - + nbrBFaceI; + + nbrBFacei; coupledI++; } @@ -828,26 +828,26 @@ Foam::labelList Foam::fvMeshDistribute::mapBoundaryData { labelList newBoundaryData(mesh.nFaces() - mesh.nInternalFaces()); - forAll(boundaryData0, oldBFaceI) + forAll(boundaryData0, oldBFacei) { - label newFaceI = map.oldFaceMap()[oldBFaceI + map.nOldInternalFaces()]; + label newFacei = map.oldFaceMap()[oldBFacei + map.nOldInternalFaces()]; // Face still exists (is necessary?) and still boundary face - if (newFaceI >= 0 && newFaceI >= mesh.nInternalFaces()) + if (newFacei >= 0 && newFacei >= mesh.nInternalFaces()) { - newBoundaryData[newFaceI - mesh.nInternalFaces()] = - boundaryData0[oldBFaceI]; + newBoundaryData[newFacei - mesh.nInternalFaces()] = + boundaryData0[oldBFacei]; } } - forAll(boundaryData1, addedBFaceI) + forAll(boundaryData1, addedBFacei) { - label newFaceI = map.addedFaceMap()[addedBFaceI + nInternalFaces1]; + label newFacei = map.addedFaceMap()[addedBFacei + nInternalFaces1]; - if (newFaceI >= 0 && newFaceI >= mesh.nInternalFaces()) + if (newFacei >= 0 && newFacei >= mesh.nInternalFaces()) { - newBoundaryData[newFaceI - mesh.nInternalFaces()] = - boundaryData1[addedBFaceI]; + newBoundaryData[newFacei - mesh.nInternalFaces()] = + boundaryData1[addedBFacei]; } } @@ -855,11 +855,11 @@ Foam::labelList Foam::fvMeshDistribute::mapBoundaryData } -// Remove cells. Add all exposed faces to patch oldInternalPatchI +// Remove cells. Add all exposed faces to patch oldInternalPatchi Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::doRemoveCells ( const labelList& cellsToRemove, - const label oldInternalPatchI + const label oldInternalPatchi ) { // Mesh change engine @@ -877,7 +877,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::doRemoveCells ( cellsToRemove, exposedFaces, - labelList(exposedFaces.size(), oldInternalPatchI), // patch for exposed + labelList(exposedFaces.size(), oldInternalPatchi), // patch for exposed // faces. meshMod ); @@ -913,18 +913,18 @@ void Foam::fvMeshDistribute::addProcPatches procPatchID.setSize(Pstream::nProcs()); - forAll(nbrProc, bFaceI) + forAll(nbrProc, bFacei) { - label procI = nbrProc[bFaceI]; + label proci = nbrProc[bFacei]; - if (procI != -1 && procI != Pstream::myProcNo()) + if (proci != -1 && proci != Pstream::myProcNo()) { - if (!procPatchID[procI].found(referPatchID[bFaceI])) + if (!procPatchID[proci].found(referPatchID[bFacei])) { // No patch for neighbour yet. Is either a normal processor // patch or a processorCyclic patch. - if (referPatchID[bFaceI] == -1) + if (referPatchID[bFacei] == -1) { // Ordinary processor boundary processorPolyPatch pp @@ -934,12 +934,12 @@ void Foam::fvMeshDistribute::addProcPatches mesh_.boundaryMesh().size(), mesh_.boundaryMesh(), Pstream::myProcNo(), - nbrProc[bFaceI] + nbrProc[bFacei] ); - procPatchID[procI].insert + procPatchID[proci].insert ( - referPatchID[bFaceI], + referPatchID[bFacei], fvMeshTools::addPatch ( mesh_, @@ -955,7 +955,7 @@ void Foam::fvMeshDistribute::addProcPatches const coupledPolyPatch& pcPatch = refCast<const coupledPolyPatch> ( - mesh_.boundaryMesh()[referPatchID[bFaceI]] + mesh_.boundaryMesh()[referPatchID[bFacei]] ); processorCyclicPolyPatch pp @@ -965,14 +965,14 @@ void Foam::fvMeshDistribute::addProcPatches mesh_.boundaryMesh().size(), mesh_.boundaryMesh(), Pstream::myProcNo(), - nbrProc[bFaceI], + nbrProc[bFacei], pcPatch.name(), pcPatch.transform() ); - procPatchID[procI].insert + procPatchID[proci].insert ( - referPatchID[bFaceI], + referPatchID[bFacei], fvMeshTools::addPatch ( mesh_, @@ -999,21 +999,21 @@ Foam::labelList Foam::fvMeshDistribute::getBoundaryPatch { labelList patchIDs(nbrProc); - forAll(nbrProc, bFaceI) + forAll(nbrProc, bFacei) { - if (nbrProc[bFaceI] == Pstream::myProcNo()) + if (nbrProc[bFacei] == Pstream::myProcNo()) { - label origPatchI = referPatchID[bFaceI]; - patchIDs[bFaceI] = origPatchI; + label origPatchi = referPatchID[bFacei]; + patchIDs[bFacei] = origPatchi; } - else if (nbrProc[bFaceI] != -1) + else if (nbrProc[bFacei] != -1) { - label origPatchI = referPatchID[bFaceI]; - patchIDs[bFaceI] = procPatchID[nbrProc[bFaceI]][origPatchI]; + label origPatchi = referPatchID[bFacei]; + patchIDs[bFacei] = procPatchID[nbrProc[bFacei]][origPatchi]; } else { - patchIDs[bFaceI] = -1; + patchIDs[bFacei] = -1; } } return patchIDs; @@ -1504,15 +1504,15 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute // Find patch to temporarily put exposed and processor faces into. - label oldInternalPatchI = findNonEmptyPatch(); + label oldInternalPatchi = findNonEmptyPatch(); // Delete processor patches, starting from the back. Move all faces into - // oldInternalPatchI. + // oldInternalPatchi. labelList repatchFaceMap; { - autoPtr<mapPolyMesh> repatchMap = deleteProcPatches(oldInternalPatchI); + autoPtr<mapPolyMesh> repatchMap = deleteProcPatches(oldInternalPatchi); // Store face map (only face ordering that changed) repatchFaceMap = repatchMap().faceMap(); @@ -1621,7 +1621,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute ( distribution, recvProc, - oldInternalPatchI, // oldInternalFaces patch + oldInternalPatchi, // oldInternalFaces patch false // no parallel sync ); @@ -1760,7 +1760,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute doRemoveCells ( select(false, distribution, Pstream::myProcNo()), - oldInternalPatchI + oldInternalPatchi ) ); @@ -2112,15 +2112,15 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute const labelList& oldPointMap = map().oldPointMap(); const labelList& oldPatchMap = map().oldPatchMap(); - forAll(constructPatchMap, procI) + forAll(constructPatchMap, proci) { - if (procI != sendProc && constructPatchMap[procI].size()) + if (proci != sendProc && constructPatchMap[proci].size()) { // Processor already in mesh (either myProcNo or received) - inplaceRenumber(oldCellMap, constructCellMap[procI]); - inplaceRenumber(oldFaceMap, constructFaceMap[procI]); - inplaceRenumber(oldPointMap, constructPointMap[procI]); - inplaceRenumber(oldPatchMap, constructPatchMap[procI]); + inplaceRenumber(oldCellMap, constructCellMap[proci]); + inplaceRenumber(oldFaceMap, constructFaceMap[proci]); + inplaceRenumber(oldPointMap, constructPointMap[proci]); + inplaceRenumber(oldPatchMap, constructPatchMap[proci]); } } diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.H b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.H index 52e11746c249e0f984d21324654d2d5e5a054b33..c9469a4f2fef3fda64875cb8389309604e01e4d8 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.H +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.H @@ -219,11 +219,11 @@ class fvMeshDistribute // Other - //- Remove cells. Add all exposed faces to patch oldInternalPatchI + //- Remove cells. Add all exposed faces to patch oldInternalPatchi autoPtr<mapPolyMesh> doRemoveCells ( const labelList& cellsToRemove, - const label oldInternalPatchI + const label oldInternalPatchi ); //- Add processor patches. Changes mesh and returns per neighbour diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C index 318c871eea2ccd6e124403c9bd7b353d29105376..ad056fdeae559dbf5cf9639812c3d7264c6b87c7 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C @@ -127,16 +127,16 @@ void Foam::fvMeshDistribute::mapBoundaryFields forAll(patchFld, i) { - label oldFaceI = faceMap[facei++]; + label oldFacei = faceMap[facei++]; - // Find patch and local patch face oldFaceI was in. - forAll(oldPatchStarts, oldPatchI) + // Find patch and local patch face oldFacei was in. + forAll(oldPatchStarts, oldPatchi) { - label oldLocalI = oldFaceI - oldPatchStarts[oldPatchI]; + label oldLocalI = oldFacei - oldPatchStarts[oldPatchi]; - if (oldLocalI >= 0 && oldLocalI < oldBfld[oldPatchI].size()) + if (oldLocalI >= 0 && oldLocalI < oldBfld[oldPatchi].size()) { - patchFld[i] = oldBfld[oldPatchI][oldLocalI]; + patchFld[i] = oldBfld[oldPatchi][oldLocalI]; } } } diff --git a/src/dynamicMesh/fvMeshTools/fvMeshTools.C b/src/dynamicMesh/fvMeshTools/fvMeshTools.C index a5d41cf6d0162445aa3f45e2f457077077f4e759..dc15deb0095cd6d8217445844dfdc445939ed444 100644 --- a/src/dynamicMesh/fvMeshTools/fvMeshTools.C +++ b/src/dynamicMesh/fvMeshTools/fvMeshTools.C @@ -49,8 +49,8 @@ Foam::label Foam::fvMeshTools::addPatch // Append at end unless there are processor patches - label insertPatchI = polyPatches.size(); - label startFaceI = mesh.nFaces(); + label insertPatchi = polyPatches.size(); + label startFacei = mesh.nFaces(); if (!isA<processorPolyPatch>(patch)) { @@ -60,8 +60,8 @@ Foam::label Foam::fvMeshTools::addPatch if (isA<processorPolyPatch>(pp)) { - insertPatchI = patchi; - startFaceI = pp.start(); + insertPatchi = patchi; + startFacei = pp.start(); break; } } @@ -86,9 +86,9 @@ Foam::label Foam::fvMeshTools::addPatch patch.clone ( polyPatches, - insertPatchI, //index + insertPatchi, //index 0, //size - startFaceI //start + startFacei //start ) ); fvPatches.setSize(sz+1); @@ -179,17 +179,17 @@ Foam::label Foam::fvMeshTools::addPatch // Create reordering list // patches before insert position stay as is labelList oldToNew(sz+1); - for (label i = 0; i < insertPatchI; i++) + for (label i = 0; i < insertPatchi; i++) { oldToNew[i] = i; } // patches after insert position move one up - for (label i = insertPatchI; i < sz; i++) + for (label i = insertPatchi; i < sz; i++) { oldToNew[i] = i+1; } // appended patch gets moved to insert position - oldToNew[sz] = insertPatchI; + oldToNew[sz] = insertPatchi; // Shuffle into place polyPatches.reorder(oldToNew, validBoundary); @@ -206,7 +206,7 @@ Foam::label Foam::fvMeshTools::addPatch reorderPatchFields<surfaceSymmTensorField>(mesh, oldToNew); reorderPatchFields<surfaceTensorField>(mesh, oldToNew); - return insertPatchI; + return insertPatchi; } diff --git a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C index b797e9696177f836b5fe094e3a466ba2fc84dac3..9c6b5392897ae4943e959a8c6a3053a570580021 100644 --- a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C +++ b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C @@ -229,9 +229,9 @@ Foam::label Foam::cellCuts::edgeEdgeToFace { const labelList& cFaces = mesh().cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; const labelList& fEdges = mesh().faceEdges()[facei]; @@ -269,9 +269,9 @@ Foam::label Foam::cellCuts::edgeVertexToFace { const labelList& cFaces = mesh().cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; const face& f = mesh().faces()[facei]; @@ -308,9 +308,9 @@ Foam::label Foam::cellCuts::vertexVertexToFace { const labelList& cFaces = mesh().cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; const face& f = mesh().faces()[facei]; @@ -508,9 +508,9 @@ Foam::label Foam::cellCuts::loopFace { const cell& cFaces = mesh().cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; const labelList& fEdges = mesh().faceEdges()[facei]; const face& f = mesh().faces()[facei]; @@ -569,15 +569,15 @@ bool Foam::cellCuts::walkPoint const labelList& pFaces = mesh().pointFaces()[vertI]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - label otherFaceI = pFaces[pFaceI]; + label otherFacei = pFaces[pFacei]; if ( - otherFaceI != exclude0 - && otherFaceI != exclude1 - && meshTools::faceOnCell(mesh(), celli, otherFaceI) + otherFacei != exclude0 + && otherFacei != exclude1 + && meshTools::faceOnCell(mesh(), celli, otherFacei) ) { label oldNVisited = nVisited; @@ -587,7 +587,7 @@ bool Foam::cellCuts::walkPoint ( celli, startCut, - otherFaceI, + otherFacei, otherCut, nVisited, visited @@ -620,7 +620,7 @@ bool Foam::cellCuts::crossEdge // Cross edge to other face label edgeI = getEdge(otherCut); - label otherFaceI = meshTools::otherFace(mesh(), celli, facei, edgeI); + label otherFacei = meshTools::otherFace(mesh(), celli, facei, edgeI); // Store old state label oldNVisited = nVisited; @@ -631,7 +631,7 @@ bool Foam::cellCuts::crossEdge ( celli, startCut, - otherFaceI, + otherFacei, otherCut, nVisited, visited @@ -1042,9 +1042,9 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells) label nVisited = 0; // Determine the first cut face to start walking from. - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; const labelList& fCuts = allFaceCuts[facei]; @@ -1364,21 +1364,21 @@ bool Foam::cellCuts::calcAnchors if (iter() == 1) { - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - if (meshTools::faceOnCell(mesh(), celli, pFaces[pFaceI])) + if (meshTools::faceOnCell(mesh(), celli, pFaces[pFacei])) { - connectedFaces.insert(pFaces[pFaceI]); + connectedFaces.insert(pFaces[pFacei]); } } } else if (iter() == 2) { - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - if (meshTools::faceOnCell(mesh(), celli, pFaces[pFaceI])) + if (meshTools::faceOnCell(mesh(), celli, pFaces[pFacei])) { - otherFaces.insert(pFaces[pFaceI]); + otherFaces.insert(pFaces[pFacei]); } } } @@ -1737,9 +1737,9 @@ bool Foam::cellCuts::conservativeValidLoop // Check faces using this edge const labelList& eFaces = mesh().edgeFaces()[edgeI]; - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - label nCuts = countFaceCuts(eFaces[eFaceI], loop); + label nCuts = countFaceCuts(eFaces[eFacei], loop); if (nCuts > 2) { @@ -1774,9 +1774,9 @@ bool Foam::cellCuts::conservativeValidLoop // Check faces using vertex. const labelList& pFaces = mesh().pointFaces()[vertI]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - label nCuts = countFaceCuts(pFaces[pFaceI], loop); + label nCuts = countFaceCuts(pFaces[pFacei], loop); if (nCuts > 2) { @@ -1829,7 +1829,7 @@ bool Foam::cellCuts::validLoop label nextCut = loop[(fp+1) % loop.size()]; // Label (if any) of face cut (so cut not along existing edge) - label meshFaceI = -1; + label meshFacei = -1; if (isEdge(cut)) { @@ -1843,9 +1843,9 @@ bool Foam::cellCuts::validLoop label nextEdgeI = getEdge(nextCut); // Find face and mark as to be split. - meshFaceI = edgeEdgeToFace(celli, edgeI, nextEdgeI); + meshFacei = edgeEdgeToFace(celli, edgeI, nextEdgeI); - if (meshFaceI == -1) + if (meshFacei == -1) { // Can't find face using both cut edges. return false; @@ -1861,9 +1861,9 @@ bool Foam::cellCuts::validLoop if (e.start() != nextVertI && e.end() != nextVertI) { // New edge. Find face and mark as to be split. - meshFaceI = edgeVertexToFace(celli, edgeI, nextVertI); + meshFacei = edgeVertexToFace(celli, edgeI, nextVertI); - if (meshFaceI == -1) + if (meshFacei == -1) { // Can't find face. Ilegal. return false; @@ -1886,9 +1886,9 @@ bool Foam::cellCuts::validLoop if (nextE.start() != vertI && nextE.end() != vertI) { // Should be cross cut. Find face. - meshFaceI = edgeVertexToFace(celli, nextEdgeI, vertI); + meshFacei = edgeVertexToFace(celli, nextEdgeI, vertI); - if (meshFaceI == -1) + if (meshFacei == -1) { return false; } @@ -1902,9 +1902,9 @@ bool Foam::cellCuts::validLoop if (meshTools::findEdge(mesh(), vertI, nextVertI) == -1) { // New edge. Find face. - meshFaceI = vertexVertexToFace(celli, vertI, nextVertI); + meshFacei = vertexVertexToFace(celli, vertI, nextVertI); - if (meshFaceI == -1) + if (meshFacei == -1) { return false; } @@ -1912,18 +1912,18 @@ bool Foam::cellCuts::validLoop } } - if (meshFaceI != -1) + if (meshFacei != -1) { - // meshFaceI is cut across along cut-nextCut (so not along existing + // meshFacei is cut across along cut-nextCut (so not along existing // edge). Check if this is compatible with existing pattern. edge cutEdge(cut, nextCut); - Map<edge>::const_iterator iter = faceSplitCut_.find(meshFaceI); + Map<edge>::const_iterator iter = faceSplitCut_.find(meshFacei); if (iter == faceSplitCut_.end()) { // Face not yet cut so insert. - newFaceSplitCut.insert(meshFaceI, cutEdge); + newFaceSplitCut.insert(meshFacei, cutEdge); } else { @@ -2202,9 +2202,9 @@ void Foam::cellCuts::setFromCellCutter DynamicList<scalarField> invalidCutLoopWeights(2); - forAll(refCells, refCellI) + forAll(refCells, refCelli) { - const refineCell& refCell = refCells[refCellI]; + const refineCell& refCell = refCells[refCelli]; label celli = refCell.cellNo(); diff --git a/src/dynamicMesh/meshCut/cellLooper/cellLooper.C b/src/dynamicMesh/meshCut/cellLooper/cellLooper.C index c7a61901cc4c8f62b5b3e91ab4cfbc37d03732f9..26353dafb2e0dbb2708f4ca1c4653a4c518c7c47 100644 --- a/src/dynamicMesh/meshCut/cellLooper/cellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/cellLooper.C @@ -79,11 +79,11 @@ Foam::labelList Foam::cellLooper::getVertFacesNonEdge const labelList& pFaces = mesh().pointFaces()[vertI]; labelList vertFaces(pFaces.size()); - label vertFaceI = 0; + label vertFacei = 0; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - label facei = pFaces[pFaceI]; + label facei = pFaces[pFacei]; if ( @@ -92,10 +92,10 @@ Foam::labelList Foam::cellLooper::getVertFacesNonEdge && (meshTools::faceOnCell(mesh(), celli, facei)) ) { - vertFaces[vertFaceI++] = facei; + vertFaces[vertFacei++] = facei; } } - vertFaces.setSize(vertFaceI); + vertFaces.setSize(vertFacei); return vertFaces; } diff --git a/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.C b/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.C index 382048ea024205b5d47cad27d69a2454e52cf0ff..c3a7fcc67ffdf32f19a8643894c87002797b8af6 100644 --- a/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.C @@ -49,14 +49,14 @@ addToRunTimeSelectionTable(cellLooper, hexCellLooper, word); bool Foam::hexCellLooper::walkHex ( const label celli, - const label startFaceI, + const label startFacei, const label startEdgeI, labelList& loop, scalarField& loopWeights ) const { - label facei = startFaceI; + label facei = startFacei; label edgeI = startEdgeI; diff --git a/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.H b/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.H index 913593561066ec8153c25ade1053307b3fd4404a..41cb01a83875583488c6ec4310c0d622cc1e45d0 100644 --- a/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.H +++ b/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.H @@ -79,7 +79,7 @@ private: bool walkHex ( const label celli, - const label startFaceI, + const label startFacei, const label startEdgeI, labelList& loop, diff --git a/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C b/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C index b733a995eafefa7a24b406d68811fa0daa6bbde0..70a1347169b231358c61ffc706346f9741c103f6 100644 --- a/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C @@ -373,7 +373,7 @@ void Foam::topoCellLooper::walkSplitHex ( const label celli, const cellFeatures& features, - const label fromFaceI, + const label fromFacei, const label fromEdgeI, const label fromVertI, @@ -382,7 +382,7 @@ void Foam::topoCellLooper::walkSplitHex ) const { // Work vars giving position on cell - label facei = fromFaceI; + label facei = fromFacei; label edgeI = fromEdgeI; label vertI = fromVertI; @@ -517,17 +517,17 @@ void Foam::topoCellLooper::walkSplitHex // Cross to other face (there is only one since no edges) const labelList& pFaces = mesh().pointFaces()[vertI]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - label thisFaceI = pFaces[pFaceI]; + label thisFacei = pFaces[pFacei]; if ( - (thisFaceI != facei) - && meshTools::faceOnCell(mesh(), celli, thisFaceI) + (thisFacei != facei) + && meshTools::faceOnCell(mesh(), celli, thisFacei) ) { - facei = thisFaceI; + facei = thisFacei; break; } } diff --git a/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.H b/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.H index b053d7f690ba15ed71b8a02cdd08743ed8b76736..fbe3417287d34174ecabfd8044c5247eeb038604 100644 --- a/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.H +++ b/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.H @@ -135,7 +135,7 @@ class topoCellLooper ( const label celli, const cellFeatures& features, - const label fromFaceI, + const label fromFacei, const label fromEdgeI, const label fromVertI, diff --git a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H index 891f5d1ea389c3ca8b986b95b5f4b3e0106c17f1..96021c7217fdea36386329a3da7370aebbb93f7b 100644 --- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H +++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H @@ -172,7 +172,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -183,7 +183,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -202,8 +202,8 @@ public: inline bool updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const directionInfo& neighbourInfo, const scalar tol, TrackingData& td @@ -214,8 +214,8 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const directionInfo& neighbourInfo, const scalar tol, TrackingData& td @@ -226,7 +226,7 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const directionInfo& neighbourInfo, const scalar tol, TrackingData& td diff --git a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H index 976718967054615471f71aa569c4b85386f43d2f..cd2a14ec666e9f6169376943d6708a0c779188ca 100644 --- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H +++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H @@ -87,7 +87,7 @@ inline void Foam::directionInfo::leaveDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ) @@ -103,14 +103,14 @@ inline void Foam::directionInfo::enterDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ) { if (index_ >= 0) { - const face& f = patch[patchFaceI]; + const face& f = patch[patchFacei]; index_ = (f.size() - index_) % f.size(); } @@ -133,8 +133,8 @@ template<class TrackingData> inline bool Foam::directionInfo::updateCell ( const polyMesh& mesh, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const directionInfo& neighbourInfo, const scalar, // tol TrackingData& td @@ -146,9 +146,9 @@ inline bool Foam::directionInfo::updateCell return false; } - if (hexMatcher().isA(mesh, thisCellI)) + if (hexMatcher().isA(mesh, thisCelli)) { - const face& f = mesh.faces()[neighbourFaceI]; + const face& f = mesh.faces()[neighbourFacei]; if (neighbourInfo.index() == -2) { @@ -161,7 +161,7 @@ inline bool Foam::directionInfo::updateCell // but not used in face. // Get first edge on face. - label edgeI = mesh.faceEdges()[neighbourFaceI][0]; + label edgeI = mesh.faceEdges()[neighbourFacei][0]; const edge& e = mesh.edges()[edgeI]; @@ -170,8 +170,8 @@ inline bool Foam::directionInfo::updateCell meshTools::otherFace ( mesh, - thisCellI, - neighbourFaceI, + thisCelli, + neighbourFacei, edgeI ); @@ -193,7 +193,7 @@ inline bool Foam::directionInfo::updateCell label v0 = f[neighbourInfo.index()]; label v1 = f[(neighbourInfo.index() + 1) % f.size()]; - index_ = findEdge(mesh, mesh.faceEdges()[neighbourFaceI], v0, v1); + index_ = findEdge(mesh, mesh.faceEdges()[neighbourFacei], v0, v1); } } else @@ -214,8 +214,8 @@ template<class TrackingData> inline bool Foam::directionInfo::updateFace ( const polyMesh& mesh, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const directionInfo& neighbourInfo, const scalar, // tol TrackingData& td @@ -240,8 +240,8 @@ inline bool Foam::directionInfo::updateFace edgeToFaceIndex ( mesh, - neighbourCellI, - thisFaceI, + neighbourCelli, + thisFacei, neighbourInfo.index() ); } @@ -263,7 +263,7 @@ template<class TrackingData> inline bool Foam::directionInfo::updateFace ( const polyMesh& mesh, - const label, // thisFaceI + const label, // thisFacei const directionInfo& neighbourInfo, const scalar, // tol TrackingData& td diff --git a/src/dynamicMesh/meshCut/directions/directions.C b/src/dynamicMesh/meshCut/directions/directions.C index 900a0deb792a5bb80f44fe089ff7f35906b5d30d..2097a2c578530f8b2153d650515fcb85261ce979 100644 --- a/src/dynamicMesh/meshCut/directions/directions.C +++ b/src/dynamicMesh/meshCut/directions/directions.C @@ -150,21 +150,21 @@ Foam::vectorField Foam::directions::propagateDirection if (useTopo) { - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { - label meshFaceI = pp.start() + patchFaceI; + label meshFacei = pp.start() + patchFacei; - label celli = mesh.faceOwner()[meshFaceI]; + label celli = mesh.faceOwner()[meshFacei]; if (!hexMatcher().isA(mesh, celli)) { FatalErrorInFunction << "useHexTopology specified but cell " << celli - << " on face " << patchFaceI << " of patch " << pp.name() + << " on face " << patchFacei << " of patch " << pp.name() << " is not a hex" << exit(FatalError); } - const vector& cutDir = ppField[patchFaceI]; + const vector& cutDir = ppField[patchFacei]; // Get edge(bundle) on cell most in direction of cutdir label edgeI = meshTools::cutDirToEdge(mesh, celli, cutDir); @@ -175,13 +175,13 @@ Foam::vectorField Foam::directions::propagateDirection ( mesh, celli, - meshFaceI, + meshFacei, edgeI ); // Set initial face and direction - changedFaces[patchFaceI] = meshFaceI; - changedFacesInfo[patchFaceI] = + changedFaces[patchFacei] = meshFacei; + changedFacesInfo[patchFacei] = directionInfo ( faceIndex, @@ -191,14 +191,14 @@ Foam::vectorField Foam::directions::propagateDirection } else { - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { - changedFaces[patchFaceI] = pp.start() + patchFaceI; - changedFacesInfo[patchFaceI] = + changedFaces[patchFacei] = pp.start() + patchFacei; + changedFacesInfo[patchFacei] = directionInfo ( -2, // Geometric information only - ppField[patchFaceI] + ppField[patchFacei] ); } } diff --git a/src/dynamicMesh/meshCut/edgeVertex/edgeVertex.C b/src/dynamicMesh/meshCut/edgeVertex/edgeVertex.C index f6df6d13c12b13a6c35d251fec5fb1c293c25fcc..83b6a0b12763727b621ff3c649ec9b951b071d3a 100644 --- a/src/dynamicMesh/meshCut/edgeVertex/edgeVertex.C +++ b/src/dynamicMesh/meshCut/edgeVertex/edgeVertex.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,13 +44,13 @@ void Foam::edgeVertex::updateLabels { const refineCell& refCell = refCells[refI]; - label oldCellI = refCell.cellNo(); + label oldCelli = refCell.cellNo(); - label newCellI = map[oldCellI]; + label newCelli = map[oldCelli]; - if (newCellI != -1) + if (newCelli != -1) { - refCells[newRefI++] = refineCell(newCellI, refCell.direction()); + refCells[newRefI++] = refineCell(newCelli, refCell.direction()); } } refCells.setSize(newRefI); @@ -133,9 +133,9 @@ void Foam::edgeVertex::updateLabels forAllConstIter(labelHashSet, cells, iter) { - const label newCellI = map[iter.key()]; + const label newCelli = map[iter.key()]; - if (newCellI != iter.key()) + if (newCelli != iter.key()) { changed = true; @@ -150,11 +150,11 @@ void Foam::edgeVertex::updateLabels forAllConstIter(labelHashSet, cells, iter) { - const label newCellI = map[iter.key()]; + const label newCelli = map[iter.key()]; - if (newCellI != -1) + if (newCelli != -1) { - newCells.insert(newCellI); + newCells.insert(newCelli); } } diff --git a/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C b/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C index 8f8da6070ff291811ea4817c3d96bc0de310e231..031e5be7dd1469d6491361dc9ef3af29df04235c 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C +++ b/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C @@ -843,17 +843,17 @@ void Foam::boundaryCutter::updateMesh(const mapPolyMesh& morphMap) forAllConstIter(Map<label>, faceAddedPoint_, iter) { - label oldFaceI = iter.key(); + label oldFacei = iter.key(); - label newFaceI = morphMap.reverseFaceMap()[oldFaceI]; + label newFacei = morphMap.reverseFaceMap()[oldFacei]; label oldPointI = iter(); label newPointI = morphMap.reversePointMap()[oldPointI]; - if (newFaceI >= 0 && newPointI >= 0) + if (newFacei >= 0 && newPointI >= 0) { - newAddedPoints.insert(newFaceI, newPointI); + newAddedPoints.insert(newFacei, newPointI); } } diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C index 5ad14f24ddd4f314c8ba603c06c1216246d716cc..b6d34a8dbe4bea6da9b00a97495e153697581938 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C +++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C @@ -119,9 +119,9 @@ Foam::label Foam::meshCutAndRemove::findInternalFacePoint const labelList& pFaces = mesh().pointFaces()[pointI]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - label facei = pFaces[pFaceI]; + label facei = pFaces[pFacei]; if (mesh().isInternalFace(facei)) { @@ -143,7 +143,7 @@ Foam::label Foam::meshCutAndRemove::findInternalFacePoint Foam::label Foam::meshCutAndRemove::findPatchFacePoint ( const face& f, - const label exposedPatchI + const label exposedPatchi ) const { const labelListList& pointFaces = mesh().pointFaces(); @@ -159,7 +159,7 @@ Foam::label Foam::meshCutAndRemove::findPatchFacePoint forAll(pFaces, i) { - if (patches.whichPatch(pFaces[i]) == exposedPatchI) + if (patches.whichPatch(pFaces[i]) == exposedPatchi) { return pointI; } @@ -173,7 +173,7 @@ Foam::label Foam::meshCutAndRemove::findPatchFacePoint void Foam::meshCutAndRemove::faceCells ( const cellCuts& cuts, - const label exposedPatchI, + const label exposedPatchi, const label facei, label& own, label& nei, @@ -210,7 +210,7 @@ void Foam::meshCutAndRemove::faceCells if (patchID == -1 && (own == -1 || nei == -1)) { // Face was internal but becomes external - patchID = exposedPatchI; + patchID = exposedPatchi; } } @@ -506,7 +506,7 @@ Foam::face Foam::meshCutAndRemove::loopToFace { face newFace(2*loop.size()); - label newFaceI = 0; + label newFacei = 0; forAll(loop, fp) { @@ -520,14 +520,14 @@ Foam::face Foam::meshCutAndRemove::loopToFace label vertI = addedPoints_[e]; - newFace[newFaceI++] = vertI; + newFace[newFacei++] = vertI; } else { // cut is vertex. label vertI = getVertex(cut); - newFace[newFaceI++] = vertI; + newFace[newFacei++] = vertI; label nextCut = loop[loop.fcIndex(fp)]; @@ -546,13 +546,13 @@ Foam::face Foam::meshCutAndRemove::loopToFace if (fnd != addedPoints_.end()) { - newFace[newFaceI++] = fnd(); + newFace[newFacei++] = fnd(); } } } } } - newFace.setSize(newFaceI); + newFace.setSize(newFacei); return newFace; } @@ -573,7 +573,7 @@ Foam::meshCutAndRemove::meshCutAndRemove(const polyMesh& mesh) void Foam::meshCutAndRemove::setRefinement ( - const label exposedPatchI, + const label exposedPatchi, const cellCuts& cuts, const labelList& cutPatch, polyTopoChange& meshMod @@ -595,10 +595,10 @@ void Foam::meshCutAndRemove::setRefinement const labelListList& cellLoops = cuts.cellLoops(); const polyBoundaryMesh& patches = mesh().boundaryMesh(); - if (exposedPatchI < 0 || exposedPatchI >= patches.size()) + if (exposedPatchi < 0 || exposedPatchi >= patches.size()) { FatalErrorInFunction - << "Illegal exposed patch " << exposedPatchI + << "Illegal exposed patch " << exposedPatchi << abort(FatalError); } @@ -622,7 +622,7 @@ void Foam::meshCutAndRemove::setRefinement << abort(FatalError); } - // One of the edge end points should be master point of nbCellI. + // One of the edge end points should be master point of nbCelli. label masterPointI = e.start(); const point& v0 = mesh().points()[e.start()]; @@ -790,9 +790,9 @@ void Foam::meshCutAndRemove::setRefinement reverse(newFace); // Pick any anchor point on cell - label masterPointI = findPatchFacePoint(newFace, exposedPatchI); + label masterPointI = findPatchFacePoint(newFace, exposedPatchi); - label addedFaceI = + label addedFacei = meshMod.setAction ( polyAddFace @@ -810,12 +810,12 @@ void Foam::meshCutAndRemove::setRefinement ) ); - addedFaces_.insert(celli, addedFaceI); + addedFaces_.insert(celli, addedFacei); if (debug & 2) { Pout<< "Added splitting face " << newFace << " index:" - << addedFaceI << " from masterPoint:" << masterPointI + << addedFacei << " from masterPoint:" << masterPointI << " to owner " << celli << " with anchors:" << anchorPts[celli] << " from Loop:"; @@ -1027,14 +1027,14 @@ void Foam::meshCutAndRemove::setRefinement if (patchID == -1) { - patchID = exposedPatchI; + patchID = exposedPatchi; } // Do as much as possible by modifying facei. Delay any remove // face. Keep track of whether facei has been used. - bool modifiedFaceI = false; + bool modifiedFacei = false; if (f0Own == -1) { @@ -1042,7 +1042,7 @@ void Foam::meshCutAndRemove::setRefinement { // f0 becomes external face (note:modFace will reverse face) modFace(meshMod, facei, f0, f0Own, f0Nei, patchID); - modifiedFaceI = true; + modifiedFacei = true; } } else @@ -1051,13 +1051,13 @@ void Foam::meshCutAndRemove::setRefinement { // f0 becomes external face modFace(meshMod, facei, f0, f0Own, f0Nei, patchID); - modifiedFaceI = true; + modifiedFacei = true; } else { // f0 stays internal face. modFace(meshMod, facei, f0, f0Own, f0Nei, -1); - modifiedFaceI = true; + modifiedFacei = true; } } @@ -1073,10 +1073,10 @@ void Foam::meshCutAndRemove::setRefinement else { // f1 becomes external face (note:modFace will reverse face) - if (!modifiedFaceI) + if (!modifiedFacei) { modFace(meshMod, facei, f1, f1Own, f1Nei, patchID); - modifiedFaceI = true; + modifiedFacei = true; } else { @@ -1100,10 +1100,10 @@ void Foam::meshCutAndRemove::setRefinement if (f1Nei == -1) { // f1 becomes external face - if (!modifiedFaceI) + if (!modifiedFacei) { modFace(meshMod, facei, f1, f1Own, f1Nei, patchID); - modifiedFaceI = true; + modifiedFacei = true; } else { @@ -1124,10 +1124,10 @@ void Foam::meshCutAndRemove::setRefinement else { // f1 is internal face. - if (!modifiedFaceI) + if (!modifiedFacei) { modFace(meshMod, facei, f1, f1Own, f1Nei, -1); - modifiedFaceI = true; + modifiedFacei = true; } else { @@ -1138,7 +1138,7 @@ void Foam::meshCutAndRemove::setRefinement } } - if (f0Own == -1 && f0Nei == -1 && !modifiedFaceI) + if (f0Own == -1 && f0Nei == -1 && !modifiedFacei) { meshMod.setAction(polyRemoveFace(facei)); @@ -1177,7 +1177,7 @@ void Foam::meshCutAndRemove::setRefinement // Get (new or original) owner and neighbour of facei label own, nei, patchID; - faceCells(cuts, exposedPatchI, facei, own, nei, patchID); + faceCells(cuts, exposedPatchi, facei, own, nei, patchID); if (own == -1 && nei == -1) @@ -1233,7 +1233,7 @@ void Foam::meshCutAndRemove::setRefinement { // Get (new or original) owner and neighbour of facei label own, nei, patchID; - faceCells(cuts, exposedPatchI, facei, own, nei, patchID); + faceCells(cuts, exposedPatchi, facei, own, nei, patchID); if (own == -1 && nei == -1) { @@ -1273,27 +1273,27 @@ void Foam::meshCutAndRemove::updateMesh(const mapPolyMesh& map) forAllConstIter(Map<label>, addedFaces_, iter) { label celli = iter.key(); - label newCellI = map.reverseCellMap()[celli]; + label newCelli = map.reverseCellMap()[celli]; - label addedFaceI = iter(); + label addedFacei = iter(); - label newAddedFaceI = map.reverseFaceMap()[addedFaceI]; + label newAddedFacei = map.reverseFaceMap()[addedFacei]; - if ((newCellI >= 0) && (newAddedFaceI >= 0)) + if ((newCelli >= 0) && (newAddedFacei >= 0)) { if ( (debug & 2) - && (newCellI != celli || newAddedFaceI != addedFaceI) + && (newCelli != celli || newAddedFacei != addedFacei) ) { Pout<< "meshCutAndRemove::updateMesh :" << " updating addedFace for cell " << celli - << " from " << addedFaceI - << " to " << newAddedFaceI + << " from " << addedFacei + << " to " << newAddedFacei << endl; } - newAddedFaces.insert(newCellI, newAddedFaceI); + newAddedFaces.insert(newCelli, newAddedFacei); } } diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.H b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.H index bf9e5c0105553ad19d9d731000444d3cd2ab29ec..1eec8b0f20056691713ac49464701d7aec55956d 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.H +++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.H @@ -101,7 +101,7 @@ class meshCutAndRemove void faceCells ( const cellCuts& cuts, - const label exposedPatchI, + const label exposedPatchi, const label facei, label& own, label& nei, @@ -204,7 +204,7 @@ public: // exposedPatch: patch for other exposed faces void setRefinement ( - const label exposedPatchI, + const label exposedPatchi, const cellCuts& cuts, const labelList& cutPatch, polyTopoChange& meshMod diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C index 7636eeed96452e50c8e8288f5c44048a4da0ec26..46f14e3528df0975411f3455fb0dbe1e33230175 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C +++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C @@ -110,9 +110,9 @@ Foam::label Foam::meshCutter::findInternalFacePoint const labelList& pFaces = mesh().pointFaces()[pointI]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - label facei = pFaces[pFaceI]; + label facei = pFaces[pFacei]; if (mesh().isInternalFace(facei)) { @@ -448,7 +448,7 @@ Foam::face Foam::meshCutter::loopToFace { face newFace(2*loop.size()); - label newFaceI = 0; + label newFacei = 0; forAll(loop, fp) { @@ -462,14 +462,14 @@ Foam::face Foam::meshCutter::loopToFace label vertI = addedPoints_[e]; - newFace[newFaceI++] = vertI; + newFace[newFacei++] = vertI; } else { // cut is vertex. label vertI = getVertex(cut); - newFace[newFaceI++] = vertI; + newFace[newFacei++] = vertI; label nextCut = loop[loop.fcIndex(fp)]; @@ -488,13 +488,13 @@ Foam::face Foam::meshCutter::loopToFace if (fnd != addedPoints_.end()) { - newFace[newFaceI++] = fnd(); + newFace[newFacei++] = fnd(); } } } } } - newFace.setSize(newFaceI); + newFace.setSize(newFacei); return newFace; } @@ -563,7 +563,7 @@ void Foam::meshCutter::setRefinement << abort(FatalError); } - // One of the edge end points should be master point of nbCellI. + // One of the edge end points should be master point of nbCelli. label masterPointI = e.start(); const point& v0 = mesh().points()[e.start()]; @@ -607,7 +607,7 @@ void Foam::meshCutter::setRefinement if (cellLoops[celli].size()) { // Add a cell to the existing cell - label addedCellI = + label addedCelli = meshMod.setAction ( polyAddCell @@ -620,7 +620,7 @@ void Foam::meshCutter::setRefinement ) ); - addedCells_.insert(celli, addedCellI); + addedCells_.insert(celli, addedCelli); if (debug & 2) { @@ -649,7 +649,7 @@ void Foam::meshCutter::setRefinement // Pick any anchor point on cell label masterPointI = findInternalFacePoint(anchorPts[celli]); - label addedFaceI = + label addedFacei = meshMod.setAction ( polyAddFace @@ -667,7 +667,7 @@ void Foam::meshCutter::setRefinement ) ); - addedFaces_.insert(celli, addedFaceI); + addedFaces_.insert(celli, addedFacei); if (debug & 2) { @@ -686,7 +686,7 @@ void Foam::meshCutter::setRefinement } Pout<< "Added splitting face " << newFace << " index:" - << addedFaceI + << addedFacei << " to owner " << celli << " neighbour " << addedCells_[celli] << " from Loop:"; @@ -803,9 +803,9 @@ void Foam::meshCutter::setRefinement // use anchorPts. if (uses(f, anchorPts[own])) { - label newCellI = addedCells_[own]; - f0Owner = newCellI; - f1Owner = newCellI; + label newCelli = addedCells_[own]; + f0Owner = newCelli; + f1Owner = newCelli; } else { @@ -846,9 +846,9 @@ void Foam::meshCutter::setRefinement // whether use anchorPts. if (uses(f, anchorPts[nei])) { - label newCellI = addedCells_[nei]; - f0Neighbour = newCellI; - f1Neighbour = newCellI; + label newCelli = addedCells_[nei]; + f0Neighbour = newCelli; + f1Neighbour = newCelli; } else { @@ -919,9 +919,9 @@ void Foam::meshCutter::setRefinement { const labelList& cllFaces = mesh().cells()[celli]; - forAll(cllFaces, cllFaceI) + forAll(cllFaces, cllFacei) { - label facei = cllFaces[cllFaceI]; + label facei = cllFaces[cllFacei]; if (!faceUptodate[facei]) { @@ -981,26 +981,26 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap) forAllConstIter(Map<label>, addedCells_, iter) { label celli = iter.key(); - label newCellI = morphMap.reverseCellMap()[celli]; + label newCelli = morphMap.reverseCellMap()[celli]; - label addedCellI = iter(); + label addedCelli = iter(); - label newAddedCellI = morphMap.reverseCellMap()[addedCellI]; + label newAddedCelli = morphMap.reverseCellMap()[addedCelli]; - if (newCellI >= 0 && newAddedCellI >= 0) + if (newCelli >= 0 && newAddedCelli >= 0) { if ( (debug & 2) - && (newCellI != celli || newAddedCellI != addedCellI) + && (newCelli != celli || newAddedCelli != addedCelli) ) { Pout<< "meshCutter::updateMesh :" << " updating addedCell for cell " << celli - << " from " << addedCellI - << " to " << newAddedCellI << endl; + << " from " << addedCelli + << " to " << newAddedCelli << endl; } - newAddedCells.insert(newCellI, newAddedCellI); + newAddedCells.insert(newCelli, newAddedCelli); } } @@ -1014,27 +1014,27 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap) forAllConstIter(Map<label>, addedFaces_, iter) { label celli = iter.key(); - label newCellI = morphMap.reverseCellMap()[celli]; + label newCelli = morphMap.reverseCellMap()[celli]; - label addedFaceI = iter(); + label addedFacei = iter(); - label newAddedFaceI = morphMap.reverseFaceMap()[addedFaceI]; + label newAddedFacei = morphMap.reverseFaceMap()[addedFacei]; - if ((newCellI >= 0) && (newAddedFaceI >= 0)) + if ((newCelli >= 0) && (newAddedFacei >= 0)) { if ( (debug & 2) - && (newCellI != celli || newAddedFaceI != addedFaceI) + && (newCelli != celli || newAddedFacei != addedFacei) ) { Pout<< "meshCutter::updateMesh :" << " updating addedFace for cell " << celli - << " from " << addedFaceI - << " to " << newAddedFaceI + << " from " << addedFacei + << " to " << newAddedFacei << endl; } - newAddedFaces.insert(newCellI, newAddedFaceI); + newAddedFaces.insert(newCelli, newAddedFacei); } } diff --git a/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C b/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C index 29dd36f3fdd9911351cd08e117c7893d0748e6b4..7338228f8675afc0017444bb6bc6470e0a480804 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C +++ b/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C @@ -104,13 +104,13 @@ void Foam::multiDirRefinement::addCells labelList& labels ) { - label newCellI = labels.size(); + label newCelli = labels.size(); labels.setSize(labels.size() + splitMap.size()); forAllConstIter(Map<label>, splitMap, iter) { - labels[newCellI++] = iter(); + labels[newCelli++] = iter(); } } @@ -152,7 +152,7 @@ void Foam::multiDirRefinement::addCells forAllConstIter(Map<label>, splitMap, iter) { label masterI = iter.key(); - label newCellI = iter(); + label newCelli = iter(); while (origCell[masterI] != -1 && origCell[masterI] != masterI) { @@ -166,7 +166,7 @@ void Foam::multiDirRefinement::addCells << " which is not a valid cell number" << endl << "This means that the mesh is not consistent with the" << " done refinement" << endl - << "newCell:" << newCellI << abort(FatalError); + << "newCell:" << newCelli << abort(FatalError); } labelList& added = addedCells_[masterI]; @@ -175,13 +175,13 @@ void Foam::multiDirRefinement::addCells { added.setSize(2); added[0] = masterI; - added[1] = newCellI; + added[1] = newCelli; } - else if (findIndex(added, newCellI) == -1) + else if (findIndex(added, newCelli) == -1) { label sz = added.size(); added.setSize(sz + 1); - added[sz] = newCellI; + added[sz] = newCelli; } } } @@ -350,11 +350,11 @@ void Foam::multiDirRefinement::refineHex8 forAll(cellMap, celli) { - const label oldCellI = cellMap[celli]; + const label oldCelli = cellMap[celli]; - if (addedCells_[oldCellI].size()) + if (addedCells_[oldCelli].size()) { - addedCells_[oldCellI][nAddedCells[oldCellI]++] = celli; + addedCells_[oldCelli][nAddedCells[oldCelli]++] = celli; } } } diff --git a/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C b/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C index aaba8d724de86f19106d53a10d76b368bccb9490..97b0d055251fc671cb99a33d8afea09e4228415e 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C +++ b/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C @@ -145,23 +145,23 @@ void Foam::undoableMeshCutter::updateLabels label celli = splitPtr->cellLabel(); - label newCellI = map[celli]; + label newCelli = map[celli]; - if (debug && (celli != newCellI)) + if (debug && (celli != newCelli)) { Pout<< "undoableMeshCutter::updateLabels :" << " Updating live (split)cell from " << celli - << " to " << newCellI << endl; + << " to " << newCelli << endl; } - if (newCellI >= 0) + if (newCelli >= 0) { // Update splitCell. Can do inplace since only one celli will // refer to this structure. - splitPtr->cellLabel() = newCellI; + splitPtr->cellLabel() = newCelli; // Update liveSplitCells - newLiveSplitCells.insert(newCellI, splitPtr); + newLiveSplitCells.insert(newCelli, splitPtr); } } liveSplitCells = newLiveSplitCells; @@ -241,10 +241,10 @@ void Foam::undoableMeshCutter::setRefinement { label celli = iter.key(); - label addedCellI = iter(); + label addedCelli = iter(); - // Newly created split cell. (celli -> celli + addedCellI) + // Newly created split cell. (celli -> celli + addedCelli) // Check if celli already part of split. Map<splitCell*>::iterator findCell = @@ -252,7 +252,7 @@ void Foam::undoableMeshCutter::setRefinement if (findCell == liveSplitCells_.end()) { - // CellI not yet split. It cannot be unlive split cell + // Celli not yet split. It cannot be unlive split cell // since that would be illegal to split in the first // place. @@ -261,7 +261,7 @@ void Foam::undoableMeshCutter::setRefinement splitCell* masterPtr = new splitCell(celli, parentPtr); - splitCell* slavePtr = new splitCell(addedCellI, parentPtr); + splitCell* slavePtr = new splitCell(addedCelli, parentPtr); // Store newly created cells on parent together with face // that splits them @@ -270,15 +270,15 @@ void Foam::undoableMeshCutter::setRefinement // Insert master and slave into live splitcell list - if (liveSplitCells_.found(addedCellI)) + if (liveSplitCells_.found(addedCelli)) { FatalErrorInFunction - << "problem addedCell:" << addedCellI + << "problem addedCell:" << addedCelli << abort(FatalError); } liveSplitCells_.insert(celli, masterPtr); - liveSplitCells_.insert(addedCellI, slavePtr); + liveSplitCells_.insert(addedCelli, slavePtr); } else { @@ -290,7 +290,7 @@ void Foam::undoableMeshCutter::setRefinement splitCell* masterPtr = new splitCell(celli, parentPtr); - splitCell* slavePtr = new splitCell(addedCellI, parentPtr); + splitCell* slavePtr = new splitCell(addedCelli, parentPtr); // Store newly created cells on parent together with face // that splits them @@ -299,15 +299,15 @@ void Foam::undoableMeshCutter::setRefinement // Insert master and slave into live splitcell list - if (liveSplitCells_.found(addedCellI)) + if (liveSplitCells_.found(addedCelli)) { FatalErrorInFunction - << "problem addedCell:" << addedCellI + << "problem addedCell:" << addedCelli << abort(FatalError); } liveSplitCells_.insert(celli, masterPtr); - liveSplitCells_.insert(addedCellI, slavePtr); + liveSplitCells_.insert(addedCelli, slavePtr); } } @@ -379,17 +379,17 @@ Foam::labelList Foam::undoableMeshCutter::getSplitFaces() const label celli = splitPtr->cellLabel(); - label slaveCellI = slavePtr->cellLabel(); + label slaveCelli = slavePtr->cellLabel(); - label commonFaceI = + label commonFacei = meshTools::getSharedFace ( mesh(), celli, - slaveCellI + slaveCelli ); - liveSplitFaces.append(commonFaceI); + liveSplitFaces.append(commonFacei); } } } diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C b/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C index 050b8ea220674c916790bdf413d3eb41c9790266..a4ad646e2a86482d9ae621d0014390f729c7838e 100644 --- a/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C +++ b/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C @@ -45,9 +45,9 @@ bool Foam::wallLayerCells::usesCoupledPatch(const label celli) const const cell& cFaces = mesh().cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; label patchID = patches.whichPatch(facei); @@ -116,14 +116,14 @@ Foam::wallLayerCells::wallLayerCells const polyPatch& pp = patches[patchi]; - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { - label meshFaceI = pp.start() + patchFaceI; + label meshFacei = pp.start() + patchFacei; - changedFaces[nChangedFaces] = meshFaceI; + changedFaces[nChangedFaces] = meshFacei; // Set transported information to the wall normal. - const vector& norm = pp.faceNormals()[patchFaceI]; + const vector& norm = pp.faceNormals()[patchFacei]; changedFacesInfo[nChangedFaces] = wallNormalInfo(norm); diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H index a7c9bd8f463f20189359e678c02b24067882a43b..6940560b632866f445ff4ea545542da8d27ceb3e 100644 --- a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H +++ b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -112,7 +112,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -123,7 +123,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -142,8 +142,8 @@ public: inline bool updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const wallNormalInfo& neighbourInfo, const scalar tol, TrackingData& td @@ -154,8 +154,8 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const wallNormalInfo& neighbourInfo, const scalar tol, TrackingData& td @@ -166,7 +166,7 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const wallNormalInfo& neighbourInfo, const scalar tol, TrackingData& td diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H index bbea7eee835e75808880583141e82f18ef064d72..11c06f9fe7d6be3cf341d86d48bbdd460fbaf2af 100644 --- a/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H +++ b/src/dynamicMesh/meshCut/wallLayerCells/wallNormalInfo/wallNormalInfoI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -114,7 +114,7 @@ inline void Foam::wallNormalInfo::leaveDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ) @@ -138,7 +138,7 @@ inline void Foam::wallNormalInfo::enterDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ) @@ -150,8 +150,8 @@ template<class TrackingData> inline bool Foam::wallNormalInfo::updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const wallNormalInfo& neighbourWallInfo, const scalar tol, TrackingData& td @@ -166,8 +166,8 @@ template<class TrackingData> inline bool Foam::wallNormalInfo::updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const wallNormalInfo& neighbourWallInfo, const scalar tol, TrackingData& td @@ -182,7 +182,7 @@ template<class TrackingData> inline bool Foam::wallNormalInfo::updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const wallNormalInfo& neighbourWallInfo, const scalar tol, TrackingData& td diff --git a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C index 6cea332cb8fe386b940e3c4b2ccedd242a1ddd6a..7709b5c9d5d353bab1e80b3f9f45c1d2ec224559 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherAlgo.C @@ -315,13 +315,13 @@ void Foam::motionSmootherAlgo::getAffectedFacesAndPoints { const labelList& pCells = mesh_.pointCells(iter.key()); - forAll(pCells, pCellI) + forAll(pCells, pCelli) { - const cell& cFaces = mesh_.cells()[pCells[pCellI]]; + const cell& cFaces = mesh_.cells()[pCells[pCelli]]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - nbrFaces.insert(cFaces[cFaceI]); + nbrFaces.insert(cFaces[cFacei]); } } } diff --git a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C index 242616c6bb345eb9793bb7c4f2e8ce7611fefbac..84220fa8f7adfa6a11a0342c21b172b1de844736 100644 --- a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C +++ b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C @@ -1495,7 +1495,7 @@ bool Foam::polyMeshGeometry::checkFaceAngles label nConcave = 0; - label errorFaceI = -1; + label errorFacei = -1; forAll(checkFaces, i) { @@ -1537,10 +1537,10 @@ bool Foam::polyMeshGeometry::checkFaceAngles if ((edgeNormal & faceNormal) < SMALL) { - if (facei != errorFaceI) + if (facei != errorFacei) { // Count only one error per face. - errorFaceI = facei; + errorFacei = facei; nConcave++; } @@ -2121,9 +2121,9 @@ bool Foam::polyMeshGeometry::checkCellDeterminant tensor areaSum(Zero); scalar magAreaSum = 0; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; scalar magArea = mag(faceAreas[facei]); @@ -2142,9 +2142,9 @@ bool Foam::polyMeshGeometry::checkCellDeterminant if (setPtr) { // Insert all faces of the cell. - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; setPtr->insert(facei); } } diff --git a/src/dynamicMesh/perfectInterface/perfectInterface.C b/src/dynamicMesh/perfectInterface/perfectInterface.C index cac409901c6be0a32b31a635698c6752a32f77d3..182296464bbed56560ffe262726469a5830c845e 100644 --- a/src/dynamicMesh/perfectInterface/perfectInterface.C +++ b/src/dynamicMesh/perfectInterface/perfectInterface.C @@ -68,9 +68,9 @@ Foam::pointField Foam::perfectInterface::calcFaceCentres pointField ctrs(pp.size()); - forAll(ctrs, patchFaceI) + forAll(ctrs, patchFacei) { - ctrs[patchFaceI] = pp[patchFaceI].centre(points); + ctrs[patchFacei] = pp[patchFacei].centre(points); } return ctrs; @@ -264,9 +264,9 @@ void Foam::perfectInterface::setRefinement { const labelList& pFaces = mesh.pointFaces()[meshPointI]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - affectedFaces.insert(pFaces[pFaceI]); + affectedFaces.insert(pFaces[pFacei]); } } } @@ -388,9 +388,9 @@ void Foam::perfectInterface::setRefinement label own = mesh.faceOwner()[facei]; - label pp1FaceI = pp1.addressing()[from0To1Faces[i]]; + label pp1Facei = pp1.addressing()[from0To1Faces[i]]; - label nbr = mesh.faceOwner()[pp1FaceI]; + label nbr = mesh.faceOwner()[pp1Facei]; if (own < nbr) { diff --git a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C index ce6453a8aa77d15473f5d3e6aecb9fba1f6870a1..02d5871c2176ed62a1dc97e5111c9d7d363eb0d5 100644 --- a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C +++ b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C @@ -169,22 +169,22 @@ void Foam::faceCoupleInfo::writePointsFaces() const pointField equivMasterFaces(c.size()); - forAll(cutToMasterFaces(), cutFaceI) + forAll(cutToMasterFaces(), cutFacei) { - label masterFaceI = cutToMasterFaces()[cutFaceI]; + label masterFacei = cutToMasterFaces()[cutFacei]; - if (masterFaceI != -1) + if (masterFacei != -1) { - equivMasterFaces[cutFaceI] = m[masterFaceI].centre(m.points()); + equivMasterFaces[cutFacei] = m[masterFacei].centre(m.points()); } else { WarningInFunction - << "No master face for cut face " << cutFaceI - << " at position " << c[cutFaceI].centre(c.points()) + << "No master face for cut face " << cutFacei + << " at position " << c[cutFacei].centre(c.points()) << endl; - equivMasterFaces[cutFaceI] = Zero; + equivMasterFaces[cutFacei] = Zero; } } @@ -201,11 +201,11 @@ void Foam::faceCoupleInfo::writePointsFaces() const pointField equivSlaveFaces(c.size()); - forAll(cutToSlaveFaces(), cutFaceI) + forAll(cutToSlaveFaces(), cutFacei) { - label slaveFaceI = cutToSlaveFaces()[cutFaceI]; + label slaveFacei = cutToSlaveFaces()[cutFacei]; - equivSlaveFaces[cutFaceI] = s[slaveFaceI].centre(s.points()); + equivSlaveFaces[cutFacei] = s[slaveFacei].centre(s.points()); } writeOBJ @@ -350,9 +350,9 @@ bool Foam::faceCoupleInfo::regionEdge { label facei = eFaces[i]; - label meshFaceI = slavePatch().addressing()[facei]; + label meshFacei = slavePatch().addressing()[facei]; - label patchI = slaveMesh.boundaryMesh().whichPatch(meshFaceI); + label patchI = slaveMesh.boundaryMesh().whichPatch(meshFacei); if (patch0 == -1) { @@ -731,12 +731,12 @@ bool Foam::faceCoupleInfo::matchPointsThroughFaces labelList cutPointRegion(cutPoints.size(), -1); DynamicList<label> cutPointRegionMaster; - forAll(patchFaces, patchFaceI) + forAll(patchFaces, patchFacei) { - const face& patchF = patchFaces[patchFaceI]; + const face& patchF = patchFaces[patchFacei]; - //const face& cutF = cutFaces[patchToCutFaces[patchFaceI]]; - const face& cutF = cutFaces[patchFaceI]; + //const face& cutF = cutFaces[patchToCutFaces[patchFacei]]; + const face& cutF = cutFaces[patchFacei]; // Do geometric matching to get position of cutF[0] in patchF label patchFp = matchFaces @@ -1009,12 +1009,12 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster for ( - label mesh1FaceI = mesh1.nInternalFaces(); - mesh1FaceI < mesh1.nFaces(); - mesh1FaceI++ + label mesh1Facei = mesh1.nInternalFaces(); + mesh1Facei < mesh1.nFaces(); + mesh1Facei++ ) { - const face& f1 = mesh1.faces()[mesh1FaceI]; + const face& f1 = mesh1.faces()[mesh1Facei]; // Generate face centre (prevent cellCentres() reconstruction) point fc(f1.centre(mesh1.points())); @@ -1023,7 +1023,7 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster if (nearInfo.hit()) { - label mesh0FaceI = tree.shapes().faceLabels()[nearInfo.index()]; + label mesh0Facei = tree.shapes().faceLabels()[nearInfo.index()]; // Check if points of f1 actually lie on top of mesh0 face // This is the bit that might fail since if f0 is severely warped @@ -1036,14 +1036,14 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster ( f1, mesh1.points(), - mesh0.faces()[mesh0FaceI], + mesh0.faces()[mesh0Facei], mesh0.points() ); if (dist < absTol) { - mesh0Set.insert(mesh0FaceI); - mesh1Set.insert(mesh1FaceI); + mesh0Set.insert(mesh0Facei); + mesh1Set.insert(mesh1Facei); } } } @@ -1081,17 +1081,17 @@ Foam::label Foam::faceCoupleInfo::growCutFaces label nChanged = 0; - forAll(cutToMasterFaces_, cutFaceI) + forAll(cutToMasterFaces_, cutFacei) { - const label masterFaceI = cutToMasterFaces_[cutFaceI]; + const label masterFacei = cutToMasterFaces_[cutFacei]; - if (masterFaceI != -1) + if (masterFacei != -1) { // We now have a cutFace for which we have already found a // master face. Grow this masterface across any internal edge // (internal: no corresponding master edge) - const labelList& fEdges = cutFaceEdges[cutFaceI]; + const labelList& fEdges = cutFaceEdges[cutFacei]; forAll(fEdges, i) { @@ -1102,7 +1102,7 @@ Foam::label Foam::faceCoupleInfo::growCutFaces // So this edge: // - internal to the cutPatch (since all region edges // marked before) - // - on cutFaceI which corresponds to masterFace. + // - on cutFacei which corresponds to masterFace. // Mark all connected faces with this masterFace. const labelList& eFaces = cutEdgeFaces[cutEdgeI]; @@ -1113,11 +1113,11 @@ Foam::label Foam::faceCoupleInfo::growCutFaces if (cutToMasterFaces_[facei] == -1) { - cutToMasterFaces_[facei] = masterFaceI; + cutToMasterFaces_[facei] = masterFacei; candidates.erase(facei); nChanged++; } - else if (cutToMasterFaces_[facei] != masterFaceI) + else if (cutToMasterFaces_[facei] != masterFacei) { const pointField& cutPoints = cutFaces().points(); @@ -1129,7 +1129,7 @@ Foam::label Foam::faceCoupleInfo::growCutFaces label myMaster = cutToMasterFaces_[facei]; const face& myF = masterPatch()[myMaster]; - const face& nbrF = masterPatch()[masterFaceI]; + const face& nbrF = masterPatch()[masterFacei]; FatalErrorInFunction << "Cut face " @@ -1137,8 +1137,8 @@ Foam::label Foam::faceCoupleInfo::growCutFaces << " has master " << myMaster << " but also connects to nbr face " - << cutFaces()[cutFaceI].points(cutPoints) - << " with master " << masterFaceI + << cutFaces()[cutFacei].points(cutPoints) + << " with master " << masterFacei << nl << "myMasterFace:" << myF.points(masterPoints) @@ -1190,24 +1190,24 @@ void Foam::faceCoupleInfo::checkMatch(const labelList& cutToMasterEdges) const // Internal edge. Check that master face is same on both sides. const labelList& cutEFaces = cutFaces().edgeFaces()[cutEdgeI]; - label masterFaceI = -1; + label masterFacei = -1; forAll(cutEFaces, i) { - label cutFaceI = cutEFaces[i]; + label cutFacei = cutEFaces[i]; - if (cutToMasterFaces_[cutFaceI] != -1) + if (cutToMasterFaces_[cutFacei] != -1) { - if (masterFaceI == -1) + if (masterFacei == -1) { - masterFaceI = cutToMasterFaces_[cutFaceI]; + masterFacei = cutToMasterFaces_[cutFacei]; } - else if (masterFaceI != cutToMasterFaces_[cutFaceI]) + else if (masterFacei != cutToMasterFaces_[cutFacei]) { - label myMaster = cutToMasterFaces_[cutFaceI]; + label myMaster = cutToMasterFaces_[cutFacei]; const face& myF = masterLocalFaces[myMaster]; - const face& nbrF = masterLocalFaces[masterFaceI]; + const face& nbrF = masterLocalFaces[masterFacei]; FatalErrorInFunction << "Internal CutEdge " << e @@ -1215,7 +1215,7 @@ void Foam::faceCoupleInfo::checkMatch(const labelList& cutToMasterEdges) const << cutLocalPoints[e[0]] << cutLocalPoints[e[1]] << " connects to master " << myMaster - << " and to master " << masterFaceI << nl + << " and to master " << masterFacei << nl << "myMasterFace:" << myF.points(masterLocalPoints) << " nbrMasterFace:" @@ -1239,7 +1239,7 @@ Foam::label Foam::faceCoupleInfo::matchEdgeFaces // than one region edge. Updates cutToMasterFaces_ and sets candidates which // is for every cutface on a region edge the possible master faces. - // For every unassigned cutFaceI the possible list of master faces. + // For every unassigned cutFacei the possible list of master faces. candidates.clear(); candidates.resize(cutFaces().size()); @@ -1260,24 +1260,24 @@ Foam::label Foam::faceCoupleInfo::matchEdgeFaces forAll(cutEFaces, i) { - label cutFaceI = cutEFaces[i]; + label cutFacei = cutEFaces[i]; - if (cutToMasterFaces_[cutFaceI] == -1) + if (cutToMasterFaces_[cutFacei] == -1) { - // So this face (cutFaceI) is on an edge (cutEdgeI) that + // So this face (cutFacei) is on an edge (cutEdgeI) that // is used by some master faces (masterEFaces). Check if - // the cutFaceI and some of these masterEFaces share more + // the cutFacei and some of these masterEFaces share more // than one edge (which uniquely defines face) // Combine master faces with current set of candidate // master faces. - Map<labelList>::iterator fnd = candidates.find(cutFaceI); + Map<labelList>::iterator fnd = candidates.find(cutFacei); if (fnd == candidates.end()) { - // No info yet for cutFaceI. Add all master faces as + // No info yet for cutFacei. Add all master faces as // candidates - candidates.insert(cutFaceI, masterEFaces); + candidates.insert(cutFacei, masterEFaces); } else { @@ -1300,8 +1300,8 @@ Foam::label Foam::faceCoupleInfo::matchEdgeFaces { // We found a perfect match. Delete entry from // candidates map. - cutToMasterFaces_[cutFaceI] = newCandidates[0]; - candidates.erase(cutFaceI); + cutToMasterFaces_[cutFacei] = newCandidates[0]; + candidates.erase(cutFacei); nChanged++; } else @@ -1357,21 +1357,21 @@ Foam::label Foam::faceCoupleInfo::geometricMatchEdgeFaces forAllConstIter(Map<labelList>, candidates, iter) { - label cutFaceI = iter.key(); + label cutFacei = iter.key(); - const face& cutF = cutFaces()[cutFaceI]; + const face& cutF = cutFaces()[cutFacei]; - if (cutToMasterFaces_[cutFaceI] == -1) + if (cutToMasterFaces_[cutFacei] == -1) { const labelList& masterFaces = iter(); // Find the best matching master face. scalar minDist = GREAT; - label minMasterFaceI = -1; + label minMasterFacei = -1; forAll(masterFaces, i) { - label masterFaceI = masterFaces[i]; + label masterFacei = masterFaces[i]; if (masterToCutFaces[masterFaces[i]].empty()) { @@ -1379,33 +1379,33 @@ Foam::label Foam::faceCoupleInfo::geometricMatchEdgeFaces ( cutF, cutPoints, - masterPatch()[masterFaceI], + masterPatch()[masterFacei], masterPatch().points() ); if (dist < minDist) { minDist = dist; - minMasterFaceI = masterFaceI; + minMasterFacei = masterFacei; } } } - if (minMasterFaceI != -1) + if (minMasterFacei != -1) { - cutToMasterFaces_[cutFaceI] = minMasterFaceI; - masterToCutFaces[minMasterFaceI] = cutFaceI; + cutToMasterFaces_[cutFacei] = minMasterFacei; + masterToCutFaces[minMasterFacei] = cutFacei; nChanged++; } } } // (inefficiently) force candidates to be uptodate. - forAll(cutToMasterFaces_, cutFaceI) + forAll(cutToMasterFaces_, cutFacei) { - if (cutToMasterFaces_[cutFaceI] != -1) + if (cutToMasterFaces_[cutFacei] != -1) { - candidates.erase(cutFaceI); + candidates.erase(cutFacei); } } @@ -1775,7 +1775,7 @@ void Foam::faceCoupleInfo::subDivisionMatch << " matching (topological) cut faces to masterPatch" << endl; } - // For every unassigned cutFaceI the possible list of master faces. + // For every unassigned cutFacei the possible list of master faces. Map<labelList> candidates(cutFaces().size()); cutToMasterFaces_.setSize(cutFaces().size()); @@ -1832,15 +1832,15 @@ void Foam::faceCoupleInfo::subDivisionMatch // All cut faces matched? - forAll(cutToMasterFaces_, cutFaceI) + forAll(cutToMasterFaces_, cutFacei) { - if (cutToMasterFaces_[cutFaceI] == -1) + if (cutToMasterFaces_[cutFacei] == -1) { - const face& cutF = cutFaces()[cutFaceI]; + const face& cutF = cutFaces()[cutFacei]; FatalErrorInFunction << "Did not match all of cutFaces to a master face" << nl - << "First unmatched cut face:" << cutFaceI << " with points:" + << "First unmatched cut face:" << cutFacei << " with points:" << UIndirectList<point>(cutFaces().points(), cutF)() << nl << "This usually means that the slave patch is not a" diff --git a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C index 7cdb7242e5fe69a2468992761b3f8f04aad7dcb3..132eb4dc897430e6336912f1c1d017b2364bab84 100644 --- a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C +++ b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C @@ -216,7 +216,7 @@ Foam::List<Foam::polyPatch*> Foam::polyMeshAdder::combinePatches from0ToAllPatches.setSize(patches0.size()); from0ToAllPatches = -1; - label startFaceI = nInternalFaces; + label startFacei = nInternalFaces; // Copy patches0 with new sizes. First patches always come from // mesh0 and will always be present. @@ -224,80 +224,80 @@ Foam::List<Foam::polyPatch*> Foam::polyMeshAdder::combinePatches { // Originates from mesh0. Clone with new size & filter out empty // patch. - label filteredPatchI; + label filteredPatchi; if (nFaces[patchi] == 0 && isA<processorPolyPatch>(patches0[patchi])) { //Pout<< "Removing zero sized mesh0 patch " // << patches0[patchi].name() << endl; - filteredPatchI = -1; + filteredPatchi = -1; } else { - filteredPatchI = allPatches.size(); + filteredPatchi = allPatches.size(); allPatches.append ( patches0[patchi].clone ( allBoundaryMesh, - filteredPatchI, + filteredPatchi, nFaces[patchi], - startFaceI + startFacei ).ptr() ); - startFaceI += nFaces[patchi]; + startFacei += nFaces[patchi]; } // Record new index in allPatches - from0ToAllPatches[patchi] = filteredPatchI; + from0ToAllPatches[patchi] = filteredPatchi; // Check if patch was also in mesh1 and update its addressing if so. if (fromAllTo1Patches[patchi] != -1) { - from1ToAllPatches[fromAllTo1Patches[patchi]] = filteredPatchI; + from1ToAllPatches[fromAllTo1Patches[patchi]] = filteredPatchi; } } // Copy unique patches of mesh1. forAll(from1ToAllPatches, patchi) { - label allPatchI = from1ToAllPatches[patchi]; + label allPatchi = from1ToAllPatches[patchi]; - if (allPatchI >= patches0.size()) + if (allPatchi >= patches0.size()) { // Patch has not been merged with any mesh0 patch. - label filteredPatchI; + label filteredPatchi; if ( - nFaces[allPatchI] == 0 + nFaces[allPatchi] == 0 && isA<processorPolyPatch>(patches1[patchi]) ) { //Pout<< "Removing zero sized mesh1 patch " // << patches1[patchi].name() << endl; - filteredPatchI = -1; + filteredPatchi = -1; } else { - filteredPatchI = allPatches.size(); + filteredPatchi = allPatches.size(); allPatches.append ( patches1[patchi].clone ( allBoundaryMesh, - filteredPatchI, - nFaces[allPatchI], - startFaceI + filteredPatchi, + nFaces[allPatchi], + startFacei ).ptr() ); - startFaceI += nFaces[allPatchI]; + startFacei += nFaces[allPatchi]; } - from1ToAllPatches[patchi] = filteredPatchI; + from1ToAllPatches[patchi] = filteredPatchi; } } @@ -324,7 +324,7 @@ Foam::labelList Foam::polyMeshAdder::getFaceOrder } // First unassigned face - label newFaceI = 0; + label newFacei = 0; forAll(cells, celli) { @@ -336,20 +336,20 @@ Foam::labelList Foam::polyMeshAdder::getFaceOrder { label facei = cFaces[i]; - label nbrCellI = neighbour[facei]; + label nbrCelli = neighbour[facei]; - if (nbrCellI != -1) + if (nbrCelli != -1) { // Internal face. Get cell on other side. - if (nbrCellI == celli) + if (nbrCelli == celli) { - nbrCellI = owner[facei]; + nbrCelli = owner[facei]; } - if (celli < nbrCellI) + if (celli < nbrCelli) { - // CellI is master - nbr[i] = nbrCellI; + // Celli is master + nbr[i] = nbrCelli; } else { @@ -370,7 +370,7 @@ Foam::labelList Foam::polyMeshAdder::getFaceOrder { if (nbr[i] != -1) { - oldToNew[cFaces[nbr.indices()[i]]] = newFaceI++; + oldToNew[cFaces[nbr.indices()[i]]] = newFacei++; } } } @@ -614,7 +614,7 @@ void Foam::polyMeshAdder::mergePrimitives allOwner = -1; allNeighbour.setSize(allFaces.size()); allNeighbour = -1; - label allFaceI = 0; + label allFacei = 0; from0ToAllFaces.setSize(mesh0.nFaces()); from0ToAllFaces = -1; @@ -624,10 +624,10 @@ void Foam::polyMeshAdder::mergePrimitives // Copy mesh0 internal faces (always uncoupled) for (label facei = 0; facei < mesh0.nInternalFaces(); facei++) { - allFaces[allFaceI] = renumber(from0ToAllPoints, mesh0.faces()[facei]); - allOwner[allFaceI] = mesh0.faceOwner()[facei]; - allNeighbour[allFaceI] = mesh0.faceNeighbour()[facei]; - from0ToAllFaces[facei] = allFaceI++; + allFaces[allFacei] = renumber(from0ToAllPoints, mesh0.faces()[facei]); + allOwner[allFacei] = mesh0.faceOwner()[facei]; + allNeighbour[allFacei] = mesh0.faceNeighbour()[facei]; + from0ToAllFaces[facei] = allFacei++; } // Copy coupled faces. Every coupled face has an equivalent master and @@ -637,61 +637,61 @@ void Foam::polyMeshAdder::mergePrimitives forAll(cutFaces, i) { - label masterFaceI = cutToMasterFaces[i]; + label masterFacei = cutToMasterFaces[i]; - label mesh0FaceI = masterPatch.addressing()[masterFaceI]; + label mesh0Facei = masterPatch.addressing()[masterFacei]; - if (from0ToAllFaces[mesh0FaceI] == -1) + if (from0ToAllFaces[mesh0Facei] == -1) { // First occurrence of face - from0ToAllFaces[mesh0FaceI] = allFaceI; + from0ToAllFaces[mesh0Facei] = allFacei; // External face becomes internal so uncount - label patch0 = patches0.whichPatch(mesh0FaceI); + label patch0 = patches0.whichPatch(mesh0Facei); nFacesPerPatch[patch0]--; } - label slaveFaceI = cutToSlaveFaces[i]; + label slaveFacei = cutToSlaveFaces[i]; - label mesh1FaceI = slavePatch.addressing()[slaveFaceI]; + label mesh1Facei = slavePatch.addressing()[slaveFacei]; - if (from1ToAllFaces[mesh1FaceI] == -1) + if (from1ToAllFaces[mesh1Facei] == -1) { - from1ToAllFaces[mesh1FaceI] = allFaceI; + from1ToAllFaces[mesh1Facei] = allFacei; - label patch1 = patches1.whichPatch(mesh1FaceI); + label patch1 = patches1.whichPatch(mesh1Facei); nFacesPerPatch[from1ToAllPatches[patch1]]--; } // Copy cut face (since cutPoints are copied first no renumbering // necessary) - allFaces[allFaceI] = cutFaces[i]; - allOwner[allFaceI] = mesh0.faceOwner()[mesh0FaceI]; - allNeighbour[allFaceI] = mesh1.faceOwner()[mesh1FaceI] + mesh0.nCells(); + allFaces[allFacei] = cutFaces[i]; + allOwner[allFacei] = mesh0.faceOwner()[mesh0Facei]; + allNeighbour[allFacei] = mesh1.faceOwner()[mesh1Facei] + mesh0.nCells(); - allFaceI++; + allFacei++; } // Copy mesh1 internal faces (always uncoupled) for (label facei = 0; facei < mesh1.nInternalFaces(); facei++) { - allFaces[allFaceI] = renumber(from1ToAllPoints, mesh1.faces()[facei]); - allOwner[allFaceI] = mesh1.faceOwner()[facei] + mesh0.nCells(); - allNeighbour[allFaceI] = mesh1.faceNeighbour()[facei] + mesh0.nCells(); - from1ToAllFaces[facei] = allFaceI++; + allFaces[allFacei] = renumber(from1ToAllPoints, mesh1.faces()[facei]); + allOwner[allFacei] = mesh1.faceOwner()[facei] + mesh0.nCells(); + allNeighbour[allFacei] = mesh1.faceNeighbour()[facei] + mesh0.nCells(); + from1ToAllFaces[facei] = allFacei++; } - nInternalFaces = allFaceI; + nInternalFaces = allFacei; // Copy (unmarked/uncoupled) external faces in new order. - for (label allPatchI = 0; allPatchI < nAllPatches; allPatchI++) + for (label allPatchi = 0; allPatchi < nAllPatches; allPatchi++) { - if (allPatchI < patches0.size()) + if (allPatchi < patches0.size()) { // Patch is present in mesh0 - const polyPatch& pp = patches0[allPatchI]; + const polyPatch& pp = patches0[allPatchi]; - nFacesPerPatch[allPatchI] += pp.size(); + nFacesPerPatch[allPatchi] += pp.size(); label facei = pp.start(); @@ -700,25 +700,25 @@ void Foam::polyMeshAdder::mergePrimitives if (from0ToAllFaces[facei] == -1) { // Is uncoupled face since has not yet been dealt with - allFaces[allFaceI] = renumber + allFaces[allFacei] = renumber ( from0ToAllPoints, mesh0.faces()[facei] ); - allOwner[allFaceI] = mesh0.faceOwner()[facei]; - allNeighbour[allFaceI] = -1; + allOwner[allFacei] = mesh0.faceOwner()[facei]; + allNeighbour[allFacei] = -1; - from0ToAllFaces[facei] = allFaceI++; + from0ToAllFaces[facei] = allFacei++; } facei++; } } - if (fromAllTo1Patches[allPatchI] != -1) + if (fromAllTo1Patches[allPatchi] != -1) { // Patch is present in mesh1 - const polyPatch& pp = patches1[fromAllTo1Patches[allPatchI]]; + const polyPatch& pp = patches1[fromAllTo1Patches[allPatchi]]; - nFacesPerPatch[allPatchI] += pp.size(); + nFacesPerPatch[allPatchi] += pp.size(); label facei = pp.start(); @@ -727,25 +727,25 @@ void Foam::polyMeshAdder::mergePrimitives if (from1ToAllFaces[facei] == -1) { // Is uncoupled face - allFaces[allFaceI] = renumber + allFaces[allFacei] = renumber ( from1ToAllPoints, mesh1.faces()[facei] ); - allOwner[allFaceI] = + allOwner[allFacei] = mesh1.faceOwner()[facei] + mesh0.nCells(); - allNeighbour[allFaceI] = -1; + allNeighbour[allFacei] = -1; - from1ToAllFaces[facei] = allFaceI++; + from1ToAllFaces[facei] = allFacei++; } facei++; } } } - allFaces.setSize(allFaceI); - allOwner.setSize(allFaceI); - allNeighbour.setSize(allFaceI); + allFaces.setSize(allFacei); + allOwner.setSize(allFacei); + allNeighbour.setSize(allFacei); // So now we have all ok for one-to-one mapping. @@ -767,9 +767,9 @@ void Foam::polyMeshAdder::mergePrimitives labelHashSet masterCutFaces(cutToMasterFaces.size()); forAll(cutToMasterFaces, i) { - label meshFaceI = masterPatch.addressing()[cutToMasterFaces[i]]; + label meshFacei = masterPatch.addressing()[cutToMasterFaces[i]]; - masterCutFaces.insert(meshFaceI); + masterCutFaces.insert(meshFacei); } DynamicList<label> workFace(100); @@ -778,7 +778,7 @@ void Foam::polyMeshAdder::mergePrimitives { if (!masterCutFaces.found(face0)) { - label allFaceI = from0ToAllFaces[face0]; + label allFacei = from0ToAllFaces[face0]; insertVertices ( @@ -788,7 +788,7 @@ void Foam::polyMeshAdder::mergePrimitives mesh0.faces()[face0], workFace, - allFaces[allFaceI] + allFaces[allFacei] ); } } @@ -798,16 +798,16 @@ void Foam::polyMeshAdder::mergePrimitives labelHashSet slaveCutFaces(cutToSlaveFaces.size()); forAll(cutToSlaveFaces, i) { - label meshFaceI = slavePatch.addressing()[cutToSlaveFaces[i]]; + label meshFacei = slavePatch.addressing()[cutToSlaveFaces[i]]; - slaveCutFaces.insert(meshFaceI); + slaveCutFaces.insert(meshFacei); } forAll(from1ToAllFaces, face1) { if (!slaveCutFaces.found(face1)) { - label allFaceI = from1ToAllFaces[face1]; + label allFacei = from1ToAllFaces[face1]; insertVertices ( @@ -817,7 +817,7 @@ void Foam::polyMeshAdder::mergePrimitives mesh1.faces()[face1], workFace, - allFaces[allFaceI] + allFaces[allFacei] ); } } @@ -1050,25 +1050,25 @@ void Foam::polyMeshAdder::mergeFaceZones label face0 = addressing[i]; bool flip0 = flipMap[i]; - label allFaceI = from0ToAllFaces[face0]; - if (allFaceI != -1) + label allFacei = from0ToAllFaces[face0]; + if (allFacei != -1) { // Check if orientation same label allCell0 = owner0[face0]; - if (allOwner[allFaceI] != allCell0) + if (allOwner[allFacei] != allCell0) { flip0 = !flip0; } - if (faceToZone[allFaceI] == -1) + if (faceToZone[allFacei] == -1) { - faceToZone[allFaceI] = zoneI; - faceToFlip[allFaceI] = flip0; + faceToZone[allFacei] = zoneI; + faceToFlip[allFacei] = flip0; } - else if (faceToZone[allFaceI] != zoneI) + else if (faceToZone[allFacei] != zoneI) { - labelList& fZones = addFaceToZones[allFaceI]; - boolList& flipZones = addFaceToFlips[allFaceI]; + labelList& fZones = addFaceToZones[allFacei]; + boolList& flipZones = addFaceToFlips[allFacei]; if (findIndex(fZones, zoneI) == -1) { @@ -1093,25 +1093,25 @@ void Foam::polyMeshAdder::mergeFaceZones label face1 = addressing[i]; bool flip1 = flipMap[i]; - label allFaceI = from1ToAllFaces[face1]; - if (allFaceI != -1) + label allFacei = from1ToAllFaces[face1]; + if (allFacei != -1) { // Check if orientation same label allCell1 = from1ToAllCells[owner1[face1]]; - if (allOwner[allFaceI] != allCell1) + if (allOwner[allFacei] != allCell1) { flip1 = !flip1; } - if (faceToZone[allFaceI] == -1) + if (faceToZone[allFacei] == -1) { - faceToZone[allFaceI] = allZoneI; - faceToFlip[allFaceI] = flip1; + faceToZone[allFacei] = allZoneI; + faceToFlip[allFacei] = flip1; } - else if (faceToZone[allFaceI] != allZoneI) + else if (faceToZone[allFacei] != allZoneI) { - labelList& fZones = addFaceToZones[allFaceI]; - boolList& flipZones = addFaceToFlips[allFaceI]; + labelList& fZones = addFaceToZones[allFacei]; + boolList& flipZones = addFaceToFlips[allFacei]; if (findIndex(fZones, allZoneI) == -1) { @@ -1128,17 +1128,17 @@ void Foam::polyMeshAdder::mergeFaceZones // 1. Count labelList nFaces(zoneNames.size(), 0); - forAll(faceToZone, allFaceI) + forAll(faceToZone, allFacei) { - label zoneI = faceToZone[allFaceI]; + label zoneI = faceToZone[allFacei]; if (zoneI != -1) { nFaces[zoneI]++; } } - forAll(addFaceToZones, allFaceI) + forAll(addFaceToZones, allFacei) { - const labelList& fZones = addFaceToZones[allFaceI]; + const labelList& fZones = addFaceToZones[allFacei]; forAll(fZones, i) { nFaces[fZones[i]]++; @@ -1153,25 +1153,25 @@ void Foam::polyMeshAdder::mergeFaceZones fzFaces[zoneI].setCapacity(nFaces[zoneI]); fzFlips[zoneI].setCapacity(nFaces[zoneI]); } - forAll(faceToZone, allFaceI) + forAll(faceToZone, allFacei) { - label zoneI = faceToZone[allFaceI]; - bool flip = faceToFlip[allFaceI]; + label zoneI = faceToZone[allFacei]; + bool flip = faceToFlip[allFacei]; if (zoneI != -1) { - fzFaces[zoneI].append(allFaceI); + fzFaces[zoneI].append(allFacei); fzFlips[zoneI].append(flip); } } - forAll(addFaceToZones, allFaceI) + forAll(addFaceToZones, allFacei) { - const labelList& fZones = addFaceToZones[allFaceI]; - const boolList& flipZones = addFaceToFlips[allFaceI]; + const labelList& fZones = addFaceToZones[allFacei]; + const boolList& flipZones = addFaceToFlips[allFacei]; forAll(fZones, i) { label zoneI = fZones[i]; - fzFaces[zoneI].append(allFaceI); + fzFaces[zoneI].append(allFacei); fzFlips[zoneI].append(flipZones[i]); } } @@ -1251,15 +1251,15 @@ void Foam::polyMeshAdder::mergeCellZones forAll(cz, i) { label cell1 = cz[i]; - label allCellI = from1ToAllCells[cell1]; + label allCelli = from1ToAllCells[cell1]; - if (cellToZone[allCellI] == -1) + if (cellToZone[allCelli] == -1) { - cellToZone[allCellI] = allZoneI; + cellToZone[allCelli] = allZoneI; } - else if (cellToZone[allCellI] != allZoneI) + else if (cellToZone[allCelli] != allZoneI) { - labelList& cZones = addCellToZones[allCellI]; + labelList& cZones = addCellToZones[allCelli]; if (findIndex(cZones, allZoneI) == -1) { cZones.append(allZoneI); @@ -1272,17 +1272,17 @@ void Foam::polyMeshAdder::mergeCellZones // 1. Count labelList nCells(zoneNames.size(), 0); - forAll(cellToZone, allCellI) + forAll(cellToZone, allCelli) { - label zoneI = cellToZone[allCellI]; + label zoneI = cellToZone[allCelli]; if (zoneI != -1) { nCells[zoneI]++; } } - forAll(addCellToZones, allCellI) + forAll(addCellToZones, allCelli) { - const labelList& cZones = addCellToZones[allCellI]; + const labelList& cZones = addCellToZones[allCelli]; forAll(cZones, i) { nCells[cZones[i]]++; @@ -1295,20 +1295,20 @@ void Foam::polyMeshAdder::mergeCellZones { czCells[zoneI].setCapacity(nCells[zoneI]); } - forAll(cellToZone, allCellI) + forAll(cellToZone, allCelli) { - label zoneI = cellToZone[allCellI]; + label zoneI = cellToZone[allCelli]; if (zoneI != -1) { - czCells[zoneI].append(allCellI); + czCells[zoneI].append(allCelli); } } - forAll(addCellToZones, allCellI) + forAll(addCellToZones, allCelli) { - const labelList& cZones = addCellToZones[allCellI]; + const labelList& cZones = addCellToZones[allCelli]; forAll(cZones, i) { - czCells[cZones[i]].append(allCellI); + czCells[cZones[i]].append(allCelli); } } forAll(czCells, i) @@ -1819,11 +1819,11 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add labelList patchSizes(allPatches.size()); labelList patchStarts(allPatches.size()); - label startFaceI = nInternalFaces; + label startFacei = nInternalFaces; // Copy patches0 with new sizes. First patches always come from // mesh0 and will always be present. - label allPatchI = 0; + label allPatchi = 0; forAll(from0ToAllPatches, patch0) { @@ -1848,50 +1848,50 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add // SubList construction in polyPatch. allPatches.set ( - allPatchI, + allPatchi, allPatches[patch0].clone ( allPatches, - allPatchI, + allPatchi, 0, // dummy size 0 // dummy start ) ); - patchSizes[allPatchI] = nFaces[patch0]; - patchStarts[allPatchI] = startFaceI; + patchSizes[allPatchi] = nFaces[patch0]; + patchStarts[allPatchi] = startFacei; // Record new index in allPatches - from0ToAllPatches[patch0] = allPatchI; + from0ToAllPatches[patch0] = allPatchi; // Check if patch was also in mesh1 and update its addressing if so. if (fromAllTo1Patches[patch0] != -1) { - from1ToAllPatches[fromAllTo1Patches[patch0]] = allPatchI; + from1ToAllPatches[fromAllTo1Patches[patch0]] = allPatchi; } - startFaceI += nFaces[patch0]; + startFacei += nFaces[patch0]; - allPatchI++; + allPatchi++; } } // Copy unique patches of mesh1. forAll(from1ToAllPatches, patch1) { - label uncompactAllPatchI = from1ToAllPatches[patch1]; + label uncompactAllPatchi = from1ToAllPatches[patch1]; - if (uncompactAllPatchI >= from0ToAllPatches.size()) + if (uncompactAllPatchi >= from0ToAllPatches.size()) { // Patch has not been merged with any mesh0 patch. if ( - nFaces[uncompactAllPatchI] == 0 + nFaces[uncompactAllPatchi] == 0 && isA<processorPolyPatch>(patches1[patch1]) ) { //Pout<< "Removing zero sized mesh1 patch " - // << allPatchNames[uncompactAllPatchI] << endl; + // << allPatchNames[uncompactAllPatchi] << endl; from1ToAllPatches[patch1] = -1; } else @@ -1899,31 +1899,31 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add // Clone. allPatches.set ( - allPatchI, + allPatchi, patches1[patch1].clone ( allPatches, - allPatchI, + allPatchi, 0, // dummy size 0 // dummy start ) ); - patchSizes[allPatchI] = nFaces[uncompactAllPatchI]; - patchStarts[allPatchI] = startFaceI; + patchSizes[allPatchi] = nFaces[uncompactAllPatchi]; + patchStarts[allPatchi] = startFacei; // Record new index in allPatches - from1ToAllPatches[patch1] = allPatchI; + from1ToAllPatches[patch1] = allPatchi; - startFaceI += nFaces[uncompactAllPatchI]; + startFacei += nFaces[uncompactAllPatchi]; - allPatchI++; + allPatchi++; } } } - allPatches.setSize(allPatchI); - patchSizes.setSize(allPatchI); - patchStarts.setSize(allPatchI); + allPatches.setSize(allPatchi); + patchSizes.setSize(allPatchi); + patchStarts.setSize(allPatchi); // Construct map information before changing mesh0 primitives diff --git a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C index 468d6715d1285df0a62cb1ee6ca1882e9b90dc21..8b33c1cb5766ef2b3200ebfcc3f3dd537bf5dee9 100644 --- a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C +++ b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C @@ -672,9 +672,9 @@ void Foam::polyMeshFilter::checkMeshFacesAndRelaxEdges { const labelList& eFaces = mesh_.edgeFaces()[fEdges[fEdgeI]]; - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - const label eFace = eFaces[eFaceI]; + const label eFace = eFaces[eFacei]; const face& f = faces[eFace]; @@ -838,11 +838,11 @@ void Foam::polyMeshFilter::mapOldMeshFaceFieldToNewMesh { scalarField tmp(newMesh.nFaces()); - forAll(faceMap, newFaceI) + forAll(faceMap, newFacei) { - const label oldFaceI = faceMap[newFaceI]; + const label oldFacei = faceMap[newFacei]; - tmp[newFaceI] = newMeshFaceFilterFactor[oldFaceI]; + tmp[newFacei] = newMeshFaceFilterFactor[oldFacei]; } newMeshFaceFilterFactor.transfer(tmp); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C index 2d9f87b1c1a4c12c4a0cababee2a5f7e655f89cc..63ea55c49a48c269329f77705365a6e0873fa5c5 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C @@ -93,8 +93,8 @@ bool Foam::addPatchCellLayer::sameEdgeNeighbour const indirectPrimitivePatch& pp, const labelListList& globalEdgeFaces, const boolList& doneEdge, - const label thisGlobalFaceI, - const label nbrGlobalFaceI, + const label thisGlobalFacei, + const label nbrGlobalFacei, const label edgeI ) const { @@ -107,8 +107,8 @@ bool Foam::addPatchCellLayer::sameEdgeNeighbour || addedPoints_[e[1]].size() ) && ( - nbrFace(globalEdgeFaces, edgeI, thisGlobalFaceI) - == nbrGlobalFaceI // is to same neighbour + nbrFace(globalEdgeFaces, edgeI, thisGlobalFacei) + == nbrGlobalFacei // is to same neighbour ); } @@ -121,11 +121,11 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString const indirectPrimitivePatch& pp, const labelListList& globalEdgeFaces, const boolList& doneEdge, - const label patchFaceI, - const label globalFaceI + const label patchFacei, + const label globalFacei ) const { - const labelList& fEdges = pp.faceEdges()[patchFaceI]; + const labelList& fEdges = pp.faceEdges()[patchFacei]; label startFp = -1; label endFp = -1; @@ -151,14 +151,14 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString { // We found an edge that needs extruding but hasn't been done yet. // Now find the face on the other side - label nbrGlobalFaceI = nbrFace + label nbrGlobalFacei = nbrFace ( globalEdgeFaces, fEdges[startFp], - globalFaceI + globalFacei ); - if (nbrGlobalFaceI == -1) + if (nbrGlobalFacei == -1) { // Proper boundary edge. Only extrude single edge. endFp = startFp; @@ -180,8 +180,8 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString pp, globalEdgeFaces, doneEdge, - globalFaceI, - nbrGlobalFaceI, + globalFacei, + nbrGlobalFacei, fEdges[prevFp] ) ) @@ -204,8 +204,8 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString pp, globalEdgeFaces, doneEdge, - globalFaceI, - nbrGlobalFaceI, + globalFacei, + nbrGlobalFacei, fEdges[nextFp] ) ) @@ -229,8 +229,8 @@ Foam::label Foam::addPatchCellLayer::addSideFace const face& newFace, const label newPatchID, - const label ownFaceI, // pp face that provides owner - const label nbrFaceI, + const label ownFacei, // pp face that provides owner + const label nbrFacei, const label meshEdgeI, // corresponding mesh edge const label layerI, // layer const label numEdgeFaces, // number of layers for edge @@ -240,7 +240,7 @@ Foam::label Foam::addPatchCellLayer::addSideFace { // Face or edge to 'inflate' from label inflateEdgeI = -1; - label inflateFaceI = -1; + label inflateFacei = -1; // Check mesh faces using edge if (addToMesh_) @@ -258,13 +258,13 @@ Foam::label Foam::addPatchCellLayer::addSideFace // Zone info comes from any side patch face. Otherwise -1 since we // don't know what to put it in - inherit from the extruded faces? - label zoneI = -1; //mesh_.faceZones().whichZone(meshFaceI); + label zoneI = -1; //mesh_.faceZones().whichZone(meshFacei); bool flip = false; - label addedFaceI = -1; + label addedFacei = -1; // Is patch edge external edge of indirectPrimitivePatch? - if (nbrFaceI == -1) + if (nbrFacei == -1) { // External edge so external face. @@ -274,7 +274,7 @@ Foam::label Foam::addPatchCellLayer::addSideFace // see if we can find a face that is otherPatchID // Get my mesh face and its zone. - label meshFaceI = pp.addressing()[ownFaceI]; + label meshFacei = pp.addressing()[ownFacei]; forAll(meshFaces, k) { @@ -282,13 +282,13 @@ Foam::label Foam::addPatchCellLayer::addSideFace if ( - (facei != meshFaceI) + (facei != meshFacei) && (patches.whichPatch(facei) == newPatchID) ) { // Found the patch face. Use it to inflate from inflateEdgeI = -1; - inflateFaceI = facei; + inflateFacei = facei; zoneI = mesh_.faceZones().whichZone(facei); if (zoneI != -1) @@ -306,9 +306,9 @@ Foam::label Foam::addPatchCellLayer::addSideFace label layerOwn; - if (addedCells[ownFaceI].size() < numEdgeFaces) + if (addedCells[ownFacei].size() < numEdgeFaces) { - label offset = numEdgeFaces - addedCells[ownFaceI].size(); + label offset = numEdgeFaces - addedCells[ownFacei].size(); if (layerI <= offset) { layerOwn = 0; @@ -325,20 +325,20 @@ Foam::label Foam::addPatchCellLayer::addSideFace //Pout<< "Added boundary face:" << newFace - // << " own:" << addedCells[ownFaceI][layerOwn] + // << " own:" << addedCells[ownFacei][layerOwn] // << " patch:" << newPatchID // << endl; - addedFaceI = meshMod.setAction + addedFacei = meshMod.setAction ( polyAddFace ( newFace, // face - addedCells[ownFaceI][layerOwn], // owner + addedCells[ownFacei][layerOwn], // owner -1, // neighbour -1, // master point inflateEdgeI, // master edge - inflateFaceI, // master face + inflateFacei, // master face false, // flux flip newPatchID, // patch for face zoneI, // zone for face @@ -356,10 +356,10 @@ Foam::label Foam::addPatchCellLayer::addSideFace label layerNbr; label layerOwn; - if (addedCells[ownFaceI].size() > addedCells[nbrFaceI].size()) + if (addedCells[ownFacei].size() > addedCells[nbrFacei].size()) { label offset = - addedCells[ownFaceI].size() - addedCells[nbrFaceI].size(); + addedCells[ownFacei].size() - addedCells[nbrFacei].size(); layerOwn = layerI; @@ -372,10 +372,10 @@ Foam::label Foam::addPatchCellLayer::addSideFace layerNbr = layerI - offset; } } - else if (addedCells[nbrFaceI].size() > addedCells[ownFaceI].size()) + else if (addedCells[nbrFacei].size() > addedCells[ownFacei].size()) { label offset = - addedCells[nbrFaceI].size() - addedCells[ownFaceI].size(); + addedCells[nbrFacei].size() - addedCells[ownFacei].size(); layerNbr = layerI; @@ -395,13 +395,13 @@ Foam::label Foam::addPatchCellLayer::addSideFace layerOwn = layerI; } - addedFaceI = meshMod.setAction + addedFacei = meshMod.setAction ( polyAddFace ( newFace, // face - addedCells[ownFaceI][layerOwn], // owner - addedCells[nbrFaceI][layerNbr], // neighbour + addedCells[ownFacei][layerOwn], // owner + addedCells[nbrFacei][layerNbr], // neighbour -1, // master point inflateEdgeI, // master edge -1, // master face @@ -413,12 +413,12 @@ Foam::label Foam::addPatchCellLayer::addSideFace ); //Pout<< "Added internal face:" << newFace - // << " own:" << addedCells[ownFaceI][layerOwn] - // << " nei:" << addedCells[nbrFaceI][layerNbr] + // << " own:" << addedCells[ownFacei][layerOwn] + // << " nei:" << addedCells[nbrFacei][layerNbr] // << endl; } - return addedFaceI; + return addedFacei; } @@ -493,13 +493,13 @@ Foam::labelListList Foam::addPatchCellLayer::addedCells { labelListList layerCells(layerFaces.size()); - forAll(layerFaces, patchFaceI) + forAll(layerFaces, patchFacei) { - const labelList& faceLabels = layerFaces[patchFaceI]; + const labelList& faceLabels = layerFaces[patchFacei]; if (faceLabels.size()) { - labelList& added = layerCells[patchFaceI]; + labelList& added = layerCells[patchFacei]; added.setSize(faceLabels.size()-1); for (label i = 0; i < faceLabels.size()-1; i++) @@ -590,7 +590,7 @@ void Foam::addPatchCellLayer::calcSidePatch // - what zone&orientation face should have labelList inflateEdgeI(pp.nEdges(), -1); - labelList inflateFaceI(pp.nEdges(), -1); + labelList inflateFacei(pp.nEdges(), -1); labelList sideZoneID(pp.nEdges(), -1); boolList sideFlip(pp.nEdges(), false); @@ -612,33 +612,33 @@ void Foam::addPatchCellLayer::calcSidePatch label f0 = eGlobalFaces[0]; label f1 = eGlobalFaces[1]; - label otherProcI = -1; + label otherProci = -1; if (globalFaces.isLocal(f0) && !globalFaces.isLocal(f1)) { - otherProcI = globalFaces.whichProcID(f1); + otherProci = globalFaces.whichProcID(f1); } else if (!globalFaces.isLocal(f0) && globalFaces.isLocal(f1)) { - otherProcI = globalFaces.whichProcID(f0); + otherProci = globalFaces.whichProcID(f0); } - if (otherProcI != -1) + if (otherProci != -1) { - sidePatchID[edgeI] = findProcPatch(mesh, otherProcI); + sidePatchID[edgeI] = findProcPatch(mesh, otherProci); if (sidePatchID[edgeI] == -1) { // Cannot find a patch to processor. See if already // marked for addition - if (nbrProcToPatch.found(otherProcI)) + if (nbrProcToPatch.found(otherProci)) { - sidePatchID[edgeI] = nbrProcToPatch[otherProcI]; + sidePatchID[edgeI] = nbrProcToPatch[otherProci]; } else { sidePatchID[edgeI] = nPatches; - nbrProcToPatch.insert(otherProcI, nPatches); - patchToNbrProc.insert(nPatches, otherProcI); + nbrProcToPatch.insert(otherProci, nPatches); + patchToNbrProc.insert(nPatches, otherProci); nPatches++; } } @@ -661,7 +661,7 @@ void Foam::addPatchCellLayer::calcSidePatch { // Proper, uncoupled patch edge. - label myFaceI = pp.addressing()[edgeFaces[edgeI][0]]; + label myFacei = pp.addressing()[edgeFaces[edgeI][0]]; // Pick up any boundary face on this edge and use its properties label meshEdgeI = meshEdges[edgeI]; @@ -675,7 +675,7 @@ void Foam::addPatchCellLayer::calcSidePatch { label facei = meshFaces[k]; - if (facei != myFaceI && !mesh.isInternalFace(facei)) + if (facei != myFacei && !mesh.isInternalFace(facei)) { setFaceProps ( @@ -686,7 +686,7 @@ void Foam::addPatchCellLayer::calcSidePatch sideZoneID[edgeI], sideFlip[edgeI] ); - inflateFaceI[edgeI] = facei; + inflateFacei[edgeI] = facei; inflateEdgeI[edgeI] = -1; break; @@ -724,12 +724,12 @@ void Foam::addPatchCellLayer::calcSidePatch ( edgeFaces[edgeI].size() == 1 && sidePatchID[edgeI] != -1 - && inflateFaceI[edgeI] == -1 + && inflateFacei[edgeI] == -1 ) { // 1. Do we have a boundary face to inflate from - label myFaceI = pp.addressing()[edgeFaces[edgeI][0]]; + label myFacei = pp.addressing()[edgeFaces[edgeI][0]]; // Pick up any boundary face on this edge and use its properties label meshEdgeI = meshEdges[edgeI]; @@ -743,7 +743,7 @@ void Foam::addPatchCellLayer::calcSidePatch { label facei = meshFaces[k]; - if (facei != myFaceI) + if (facei != myFacei) { if (mesh.isInternalFace(facei)) { @@ -762,7 +762,7 @@ void Foam::addPatchCellLayer::calcSidePatch sideZoneID[edgeI], sideFlip[edgeI] ); - inflateFaceI[edgeI] = facei; + inflateFacei[edgeI] = facei; inflateEdgeI[edgeI] = -1; break; @@ -989,7 +989,7 @@ void Foam::addPatchCellLayer::setRefinement << abort(FatalError); } - label myFaceI = pp.addressing()[eFaces[0]]; + label myFacei = pp.addressing()[eFaces[0]]; label meshEdgeI = meshEdges[edgeI]; @@ -999,19 +999,19 @@ void Foam::addPatchCellLayer::setRefinement // Check that there is only one patchface using edge. const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - label bFaceI = -1; + label bFacei = -1; forAll(meshFaces, i) { label facei = meshFaces[i]; - if (facei != myFaceI) + if (facei != myFacei) { if (!mesh_.isInternalFace(facei)) { - if (bFaceI == -1) + if (bFacei == -1) { - bFaceI = facei; + bFacei = facei; } else { @@ -1021,9 +1021,9 @@ void Foam::addPatchCellLayer::setRefinement << pp.points()[meshPoints[e[1]]] << " has more than two boundary faces" << " using it:" - << bFaceI << " fc:" - << mesh_.faceCentres()[bFaceI] - << " patch:" << patches.whichPatch(bFaceI) + << bFacei << " fc:" + << mesh_.faceCentres()[bFacei] + << " patch:" << patches.whichPatch(bFacei) << " and " << facei << " fc:" << mesh_.faceCentres()[facei] << " patch:" << patches.whichPatch(facei) @@ -1042,11 +1042,11 @@ void Foam::addPatchCellLayer::setRefinement // Precalculated patchID for each patch face labelList patchID(pp.size()); - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { - label meshFaceI = pp.addressing()[patchFaceI]; + label meshFacei = pp.addressing()[patchFacei]; - patchID[patchFaceI] = patches.whichPatch(meshFaceI); + patchID[patchFacei] = patches.whichPatch(meshFacei); } @@ -1148,31 +1148,31 @@ void Foam::addPatchCellLayer::setRefinement labelListList addedCells(pp.size()); - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { - if (nFaceLayers[patchFaceI] > 0) + if (nFaceLayers[patchFacei] > 0) { - addedCells[patchFaceI].setSize(nFaceLayers[patchFaceI]); + addedCells[patchFacei].setSize(nFaceLayers[patchFacei]); - label meshFaceI = pp.addressing()[patchFaceI]; + label meshFacei = pp.addressing()[patchFacei]; label ownZoneI = mesh_.cellZones().whichZone ( - mesh_.faceOwner()[meshFaceI] + mesh_.faceOwner()[meshFacei] ); - for (label i = 0; i < nFaceLayers[patchFaceI]; i++) + for (label i = 0; i < nFaceLayers[patchFacei]; i++) { // Note: add from cell (owner of patch face) or from face? // for now add from cell so we can map easily. - addedCells[patchFaceI][i] = meshMod.setAction + addedCells[patchFacei][i] = meshMod.setAction ( polyAddCell ( -1, // master point -1, // master edge -1, // master face - (addToMesh_ ? mesh_.faceOwner()[meshFaceI] : -1), + (addToMesh_ ? mesh_.faceOwner()[meshFacei] : -1), //master ownZoneI // zone for cell ) @@ -1190,20 +1190,20 @@ void Foam::addPatchCellLayer::setRefinement layerFaces_.setSize(pp.size()); - forAll(pp.localFaces(), patchFaceI) + forAll(pp.localFaces(), patchFacei) { - label meshFaceI = pp.addressing()[patchFaceI]; + label meshFacei = pp.addressing()[patchFacei]; - if (addedCells[patchFaceI].size()) + if (addedCells[patchFacei].size()) { - layerFaces_[patchFaceI].setSize(addedCells[patchFaceI].size() + 1); + layerFaces_[patchFacei].setSize(addedCells[patchFacei].size() + 1); // Get duplicated vertices on the patch face. - const face& f = pp.localFaces()[patchFaceI]; + const face& f = pp.localFaces()[patchFacei]; face newFace(f.size()); - forAll(addedCells[patchFaceI], i) + forAll(addedCells[patchFacei], i) { forAll(f, fp) { @@ -1222,7 +1222,7 @@ void Foam::addPatchCellLayer::setRefinement // Get new outside point label offset = addedPoints_[f[fp]].size() - - addedCells[patchFaceI].size(); + - addedCells[patchFacei].size(); newFace[fp] = addedPoints_[f[fp]][i+offset]; } } @@ -1235,36 +1235,36 @@ void Foam::addPatchCellLayer::setRefinement bool flip = false; - if (i == addedCells[patchFaceI].size()-1) + if (i == addedCells[patchFacei].size()-1) { // Top layer so is patch face. nei = -1; - patchi = patchID[patchFaceI]; - zoneI = mesh_.faceZones().whichZone(meshFaceI); + patchi = patchID[patchFacei]; + zoneI = mesh_.faceZones().whichZone(meshFacei); if (zoneI != -1) { const faceZone& fz = mesh_.faceZones()[zoneI]; - flip = fz.flipMap()[fz.whichFace(meshFaceI)]; + flip = fz.flipMap()[fz.whichFace(meshFacei)]; } } else { // Internal face between layer i and i+1 - nei = addedCells[patchFaceI][i+1]; + nei = addedCells[patchFacei][i+1]; patchi = -1; } - layerFaces_[patchFaceI][i+1] = meshMod.setAction + layerFaces_[patchFacei][i+1] = meshMod.setAction ( polyAddFace ( newFace, // face - addedCells[patchFaceI][i], // owner + addedCells[patchFacei][i], // owner nei, // neighbour -1, // master point -1, // master edge - (addToMesh_ ? meshFaceI : -1), // master face + (addToMesh_ ? meshFacei : -1), // master face false, // flux flip patchi, // patch for face zoneI, // zone for face @@ -1281,22 +1281,22 @@ void Foam::addPatchCellLayer::setRefinement if (addToMesh_) { - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { - if (addedCells[patchFaceI].size()) + if (addedCells[patchFacei].size()) { - label meshFaceI = pp.addressing()[patchFaceI]; + label meshFacei = pp.addressing()[patchFacei]; - layerFaces_[patchFaceI][0] = meshFaceI; + layerFaces_[patchFacei][0] = meshFacei; meshMod.setAction ( polyModifyFace ( - pp[patchFaceI], // modified face - meshFaceI, // label of face - mesh_.faceOwner()[meshFaceI], // owner - addedCells[patchFaceI][0], // neighbour + pp[patchFacei], // modified face + meshFacei, // label of face + mesh_.faceOwner()[meshFacei], // owner + addedCells[patchFacei][0], // neighbour false, // face flip -1, // patch for face true, //false, // remove from zone @@ -1311,38 +1311,38 @@ void Foam::addPatchCellLayer::setRefinement { // If creating new mesh: reverse original faces and put them // in the exposed patch ID. - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { - if (nFaceLayers[patchFaceI] > 0) + if (nFaceLayers[patchFacei] > 0) { - label meshFaceI = pp.addressing()[patchFaceI]; - label zoneI = mesh_.faceZones().whichZone(meshFaceI); + label meshFacei = pp.addressing()[patchFacei]; + label zoneI = mesh_.faceZones().whichZone(meshFacei); bool zoneFlip = false; if (zoneI != -1) { const faceZone& fz = mesh_.faceZones()[zoneI]; - zoneFlip = !fz.flipMap()[fz.whichFace(meshFaceI)]; + zoneFlip = !fz.flipMap()[fz.whichFace(meshFacei)]; } // Reverse and renumber old patch face. - face f(pp.localFaces()[patchFaceI].reverseFace()); + face f(pp.localFaces()[patchFacei].reverseFace()); forAll(f, fp) { f[fp] = copiedPatchPoints[f[fp]]; } - layerFaces_[patchFaceI][0] = meshMod.setAction + layerFaces_[patchFacei][0] = meshMod.setAction ( polyAddFace ( f, // modified face - addedCells[patchFaceI][0], // owner + addedCells[patchFacei][0], // owner -1, // neighbour -1, // masterPoint -1, // masterEdge -1, // masterFace true, // face flip - exposedPatchID[patchFaceI], // patch for face + exposedPatchID[patchFacei], // patch for face zoneI, // zone for face zoneFlip // face flip in zone ) @@ -1416,9 +1416,9 @@ void Foam::addPatchCellLayer::setRefinement // Create faces. Per face walk connected edges and find string of edges // between the same two faces and extrude string into a single face. - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { - const labelList& fEdges = faceEdges[patchFaceI]; + const labelList& fEdges = faceEdges[patchFacei]; forAll(fEdges, fp) { @@ -1431,8 +1431,8 @@ void Foam::addPatchCellLayer::setRefinement pp, globalEdgeFaces, doneEdge, - patchFaceI, - globalFaces.toGlobal(pp.addressing()[patchFaceI]) + patchFacei, + globalFaces.toGlobal(pp.addressing()[patchFacei]) ) ); @@ -1449,7 +1449,7 @@ void Foam::addPatchCellLayer::setRefinement // Extrude edges from indexPair[0] up to indexPair[1] // (note indexPair = indices of edges. There is one more vertex // than edges) - const face& f = localFaces[patchFaceI]; + const face& f = localFaces[patchFacei]; labelList stringedVerts; if (endFp >= startFp) @@ -1474,10 +1474,10 @@ void Foam::addPatchCellLayer::setRefinement // Now stringedVerts contains the vertices in order of face f. // This is consistent with the order if f becomes the owner cell - // and nbrFaceI the neighbour cell. Note that the cells get + // and nbrFacei the neighbour cell. Note that the cells get // added in order of pp so we can just use face ordering and // because we loop in incrementing order as well we will - // always have nbrFaceI > patchFaceI. + // always have nbrFacei > patchFacei. label startEdgeI = fEdges[startFp]; @@ -1634,7 +1634,7 @@ void Foam::addPatchCellLayer::setRefinement if (newFp >= 3) { - // Add face inbetween faces patchFaceI and nbrFaceI + // Add face inbetween faces patchFacei and nbrFacei // (possibly -1 for external edges) newFace.setSize(newFp); @@ -1682,11 +1682,11 @@ void Foam::addPatchCellLayer::setRefinement } } - label nbrFaceI = nbrFace + label nbrFacei = nbrFace ( pp.edgeFaces(), startEdgeI, - patchFaceI + patchFacei ); const labelList& meshFaces = mesh_.edgeFaces @@ -1703,8 +1703,8 @@ void Foam::addPatchCellLayer::setRefinement newFace, // vertices of new face sidePatchID[startEdgeI],// -1 or patch for face - patchFaceI, - nbrFaceI, + patchFacei, + nbrFacei, meshEdgeI, // (mesh) edge to inflate i, // layer numEdgeSideFaces, // num layers @@ -1756,23 +1756,23 @@ void Foam::addPatchCellLayer::updateMesh { labelListList newLayerFaces(faceMap.size()); - forAll(newLayerFaces, newFaceI) + forAll(newLayerFaces, newFacei) { - label oldFaceI = faceMap[newFaceI]; + label oldFacei = faceMap[newFacei]; - const labelList& added = layerFaces_[oldFaceI]; + const labelList& added = layerFaces_[oldFacei]; - labelList& newAdded = newLayerFaces[newFaceI]; + labelList& newAdded = newLayerFaces[newFacei]; newAdded.setSize(added.size()); label newI = 0; forAll(added, i) { - label newFaceI = morphMap.reverseFaceMap()[added[i]]; + label newFacei = morphMap.reverseFaceMap()[added[i]]; - if (newFaceI >= 0) + if (newFacei >= 0) { - newAdded[newI++] = newFaceI; + newAdded[newI++] = newFacei; } } newAdded.setSize(newI); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.H index 4fc54130b042feb3e9ac070eaa5ec94f00a1269d..27e147115406e8565f09ed744fc9f00f69fffebd 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.H @@ -197,8 +197,8 @@ class addPatchCellLayer const indirectPrimitivePatch& pp, const labelListList& globalEdgeFaces, const boolList& doneEdge, - const label thisGlobalFaceI, - const label nbrGlobalFaceI, + const label thisGlobalFacei, + const label nbrGlobalFacei, const label edgeI ) const; @@ -207,8 +207,8 @@ class addPatchCellLayer const indirectPrimitivePatch& pp, const labelListList& globalEdgeFaces, const boolList& doneEdge, - const label patchFaceI, - const label globalFaceI + const label patchFacei, + const label globalFacei ) const; @@ -221,8 +221,8 @@ class addPatchCellLayer const face& newFace, const label newPatchID, - const label ownFaceI, - const label nbrFaceI, + const label ownFacei, + const label nbrFacei, const label meshEdgeI, const label layerI, const label numEdgeFaces, diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C index e760425bed7f6a4b2984cda0f5610ae372bc67d8..4d4b55908fdfda2af4e4d633140a780307f5c65c 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C @@ -229,9 +229,9 @@ bool Foam::combineFaces::faceNeighboursValid DynamicList<label> storage; // Test for face collapsing to edge since too many neighbours merged. - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; if (!faceRegion.found(facei)) { @@ -623,12 +623,12 @@ void Foam::combineFaces::setRefinement // Modify master face // ~~~~~~~~~~~~~~~~~~ - label masterFaceI = setFaces[0]; + label masterFacei = setFaces[0]; // Get outside face in mesh vertex labels face outsideFace(getOutsideFace(bigFace)); - label zoneID = mesh_.faceZones().whichZone(masterFaceI); + label zoneID = mesh_.faceZones().whichZone(masterFacei); bool zoneFlip = false; @@ -636,18 +636,18 @@ void Foam::combineFaces::setRefinement { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(masterFaceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(masterFacei)]; } - label patchi = mesh_.boundaryMesh().whichPatch(masterFaceI); + label patchi = mesh_.boundaryMesh().whichPatch(masterFacei); meshMod.setAction ( polyModifyFace ( outsideFace, // modified face - masterFaceI, // label of face being modified - mesh_.faceOwner()[masterFaceI], // owner + masterFacei, // label of face being modified + mesh_.faceOwner()[masterFacei], // owner -1, // neighbour false, // face flip patchi, // patch for face @@ -845,14 +845,14 @@ void Foam::combineFaces::setUnrefinement forAll(masterFaces, i) { - label masterFaceI = masterFaces[i]; + label masterFacei = masterFaces[i]; - Map<label>::const_iterator iter = masterToSet.find(masterFaceI); + Map<label>::const_iterator iter = masterToSet.find(masterFacei); if (iter == masterToSet.end()) { FatalErrorInFunction - << "Master face " << masterFaceI + << "Master face " << masterFacei << " is not the master of one of the merge sets" << " or has already been merged" << abort(FatalError); @@ -869,7 +869,7 @@ void Foam::combineFaces::setUnrefinement if (faces.empty()) { FatalErrorInFunction - << "Set " << setI << " with master face " << masterFaceI + << "Set " << setI << " with master face " << masterFacei << " has already been merged." << abort(FatalError); } @@ -914,25 +914,25 @@ void Foam::combineFaces::setUnrefinement // Restore // ~~~~~~~ - label own = mesh_.faceOwner()[masterFaceI]; - label zoneID = mesh_.faceZones().whichZone(masterFaceI); + label own = mesh_.faceOwner()[masterFacei]; + label zoneID = mesh_.faceZones().whichZone(masterFacei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(masterFaceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(masterFacei)]; } - label patchi = mesh_.boundaryMesh().whichPatch(masterFaceI); + label patchi = mesh_.boundaryMesh().whichPatch(masterFacei); if (mesh_.boundaryMesh()[patchi].coupled()) { FatalErrorInFunction - << "Master face " << masterFaceI << " is on coupled patch " + << "Master face " << masterFacei << " is on coupled patch " << mesh_.boundaryMesh()[patchi].name() << abort(FatalError); } - //Pout<< "Restoring new master face " << masterFaceI + //Pout<< "Restoring new master face " << masterFacei // << " to vertices " << faces[0] << endl; // Modify the master face. @@ -941,7 +941,7 @@ void Foam::combineFaces::setUnrefinement polyModifyFace ( faces[0], // original face - masterFaceI, // label of face + masterFacei, // label of face own, // owner -1, // neighbour false, // face flip @@ -951,7 +951,7 @@ void Foam::combineFaces::setUnrefinement zoneFlip // face flip in zone ) ); - restoredFaces.insert(masterFaceI, masterFaceI); + restoredFaces.insert(masterFacei, masterFacei); // Add the previously removed faces for (label i = 1; i < faces.size(); i++) @@ -968,14 +968,14 @@ void Foam::combineFaces::setUnrefinement -1, // neighbour, -1, // masterPointID, -1, // masterEdgeID, - masterFaceI, // masterFaceID, + masterFacei, // masterFaceID, false, // flipFaceFlux, patchi, // patchID, zoneID, // zoneID, zoneFlip // zoneFlip ) ); - restoredFaces.insert(facei, masterFaceI); + restoredFaces.insert(facei, masterFacei); } // Clear out restored set diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C index 691b4b6a29ff40a2f3e64cd007f74fb2c5c4e5d5..9d4bca5e174b320b571fff074d54664d537ff992 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C @@ -484,15 +484,15 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const const label nBoundaryFaces = mesh_.nFaces() - mesh_.nInternalFaces(); // Calculate face size from cell volumes for internal faces - for (label intFaceI = 0; intFaceI < mesh_.nInternalFaces(); ++intFaceI) + for (label intFacei = 0; intFacei < mesh_.nInternalFaces(); ++intFacei) { - const scalar cellOwnerVol = max(0.0, V[cellOwner[intFaceI]]); - const scalar cellNeighbourVol = max(0.0, V[cellNeighbour[intFaceI]]); + const scalar cellOwnerVol = max(0.0, V[cellOwner[intFacei]]); + const scalar cellNeighbourVol = max(0.0, V[cellNeighbour[intFacei]]); scalar targetFaceSizeA = Foam::pow(cellOwnerVol, 1.0/3.0); scalar targetFaceSizeB = Foam::pow(cellNeighbourVol, 1.0/3.0); - targetFaceSizes[intFaceI] = 0.5*(targetFaceSizeA + targetFaceSizeB); + targetFaceSizes[intFacei] = 0.5*(targetFaceSizeA + targetFaceSizeB); } scalarField neiCellVolumes(nBoundaryFaces, -1); @@ -502,7 +502,7 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const { const polyPatch& patch = patches[patchi]; - label bFaceI = patch.start() - mesh_.nInternalFaces(); + label bFacei = patch.start() - mesh_.nInternalFaces(); if (patch.coupled()) { @@ -512,19 +512,19 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const forAll(faceCells, facei) { - neiCellVolumes[bFaceI++] = max(0.0, V[faceCells[facei]]); + neiCellVolumes[bFacei++] = max(0.0, V[faceCells[facei]]); } } else { // Normal boundary face: Just use owner cell volume to calculate // the target face size - forAll(patch, patchFaceI) + forAll(patch, patchFacei) { - const label extFaceI = patchFaceI + patch.start(); - const scalar cellOwnerVol = max(0.0, V[cellOwner[extFaceI]]); + const label extFacei = patchFacei + patch.start(); + const scalar cellOwnerVol = max(0.0, V[cellOwner[extFacei]]); - targetFaceSizes[extFaceI] = Foam::pow(cellOwnerVol, 1.0/3.0); + targetFaceSizes[extFacei] = Foam::pow(cellOwnerVol, 1.0/3.0); } } } @@ -535,20 +535,20 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const { const polyPatch& patch = patches[patchi]; - label bFaceI = patch.start() - mesh_.nInternalFaces(); + label bFacei = patch.start() - mesh_.nInternalFaces(); if (patch.coupled()) { - forAll(patch, patchFaceI) + forAll(patch, patchFacei) { - const label localFaceI = patchFaceI + patch.start(); - const scalar cellOwnerVol = max(0.0, V[cellOwner[localFaceI]]); - const scalar cellNeighbourVol = neiCellVolumes[bFaceI++]; + const label localFacei = patchFacei + patch.start(); + const scalar cellOwnerVol = max(0.0, V[cellOwner[localFacei]]); + const scalar cellNeighbourVol = neiCellVolumes[bFacei++]; scalar targetFaceSizeA = Foam::pow(cellOwnerVol, 1.0/3.0); scalar targetFaceSizeB = Foam::pow(cellNeighbourVol, 1.0/3.0); - targetFaceSizes[localFaceI] + targetFaceSizes[localFacei] = 0.5*(targetFaceSizeA + targetFaceSizeB); } } @@ -1577,9 +1577,9 @@ bool Foam::edgeCollapser::setRefinement { const labelList& changedFaces = pointFaces[pointI]; - forAll(changedFaces, changedFaceI) + forAll(changedFaces, changedFacei) { - label facei = changedFaces[changedFaceI]; + label facei = changedFaces[changedFacei]; if (!doneFace[facei]) { @@ -2108,9 +2108,9 @@ Foam::labelPair Foam::edgeCollapser::markFaceZoneEdges // // bool coupled = false; // -// forAll(eFaces, eFaceI) +// forAll(eFaces, eFacei) // { -// const label eFaceIndex = eFaces[eFaceI]; +// const label eFaceIndex = eFaces[eFacei]; // // if (mesh_.isInternalFace(eFaceIndex)) // { diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C index b030377f354e5ffa3e94056473e6e2060bd045fd..18d8837ce0f661804a683b9d9e7fe069439773f0 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C @@ -136,12 +136,12 @@ Foam::label Foam::hexRef8::addFace getFaceInfo(facei, patchID, zoneID, zoneFlip); - label newFaceI = -1; + label newFacei = -1; if ((nei == -1) || (own < nei)) { // Ordering ok. - newFaceI = meshMod.setAction + newFacei = meshMod.setAction ( polyAddFace ( @@ -161,7 +161,7 @@ Foam::label Foam::hexRef8::addFace else { // Reverse owner/neighbour - newFaceI = meshMod.setAction + newFacei = meshMod.setAction ( polyAddFace ( @@ -178,7 +178,7 @@ Foam::label Foam::hexRef8::addFace ) ); } - return newFaceI; + return newFacei; } @@ -191,14 +191,14 @@ Foam::label Foam::hexRef8::addFace Foam::label Foam::hexRef8::addInternalFace ( polyTopoChange& meshMod, - const label meshFaceI, + const label meshFacei, const label meshPointI, const face& newFace, const label own, const label nei ) const { - if (mesh_.isInternalFace(meshFaceI)) + if (mesh_.isInternalFace(meshFacei)) { return meshMod.setAction ( @@ -209,7 +209,7 @@ Foam::label Foam::hexRef8::addInternalFace nei, // neighbour -1, // master point -1, // master edge - meshFaceI, // master face for addition + meshFacei, // master face for addition false, // flux flip -1, // patch for face -1, // zone for face @@ -1337,7 +1337,7 @@ void Foam::hexRef8::createInternalFaces edgeMidPointI = f[edgeMid]; } - label newFaceI = storeMidPointInfo + label newFacei = storeMidPointInfo ( cellAnchorPoints, cellAddedCells, @@ -1356,7 +1356,7 @@ void Foam::hexRef8::createInternalFaces meshMod ); - if (newFaceI != -1) + if (newFacei != -1) { nFacesAdded++; @@ -1417,7 +1417,7 @@ void Foam::hexRef8::createInternalFaces edgeMidPointI = f[edgeMid]; } - newFaceI = storeMidPointInfo + newFacei = storeMidPointInfo ( cellAnchorPoints, cellAddedCells, @@ -1436,7 +1436,7 @@ void Foam::hexRef8::createInternalFaces meshMod ); - if (newFaceI != -1) + if (newFacei != -1) { nFacesAdded++; @@ -1875,17 +1875,17 @@ bool Foam::hexRef8::matchHexShape { // Collect and orient. faceList fourFaces(pFaces.size()); - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - label facei = pFaces[pFaceI]; + label facei = pFaces[pFacei]; const face& f = mesh_.faces()[facei]; if (mesh_.faceOwner()[facei] == celli) { - fourFaces[pFaceI] = f; + fourFaces[pFacei] = f; } else { - fourFaces[pFaceI] = f.reverseFace(); + fourFaces[pFacei] = f.reverseFace(); } } @@ -2612,9 +2612,9 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement const labelList& pCells = mesh_.pointCells(pointI); - forAll(pCells, pCellI) + forAll(pCells, pCelli) { - label celli = pCells[pCellI]; + label celli = pCells[pCelli]; refinementData& cellInfo = allCellInfo[celli]; @@ -2633,9 +2633,9 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement // Insert faces of cell as seed faces. const cell& cFaces = mesh_.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; refinementData faceData; faceData.updateFace @@ -3684,9 +3684,9 @@ Foam::labelListList Foam::hexRef8::setRefinement { const labelList& pCells = mesh_.pointCells(pointI); - forAll(pCells, pCellI) + forAll(pCells, pCelli) { - label celli = pCells[pCellI]; + label celli = pCells[pCelli]; if ( @@ -4343,17 +4343,17 @@ void Foam::hexRef8::updateMesh const labelList& cellMap = map.cellMap(); labelList newCellLevel(cellMap.size()); - forAll(cellMap, newCellI) + forAll(cellMap, newCelli) { - label oldCellI = cellMap[newCellI]; + label oldCelli = cellMap[newCelli]; - if (oldCellI == -1) + if (oldCelli == -1) { - newCellLevel[newCellI] = -1; + newCellLevel[newCelli] = -1; } else { - newCellLevel[newCellI] = cellLevel_[oldCellI]; + newCellLevel[newCelli] = cellLevel_[oldCelli]; } } cellLevel_.transfer(newCellLevel); @@ -4363,20 +4363,20 @@ void Foam::hexRef8::updateMesh // the corresponding old cell. forAllConstIter(Map<label>, cellsToRestore, iter) { - label newCellI = iter.key(); - label storedCellI = iter(); + label newCelli = iter.key(); + label storedCelli = iter(); - Map<label>::iterator fnd = savedCellLevel_.find(storedCellI); + Map<label>::iterator fnd = savedCellLevel_.find(storedCelli); if (fnd == savedCellLevel_.end()) { FatalErrorInFunction << "Problem : trying to restore old value for new cell " - << newCellI << " but cannot find old cell " << storedCellI + << newCelli << " but cannot find old cell " << storedCelli << " in map of stored values " << savedCellLevel_ << abort(FatalError); } - cellLevel_[newCellI] = fnd(); + cellLevel_[newCelli] = fnd(); } //if (findIndex(cellLevel_, -1) != -1) @@ -4512,9 +4512,9 @@ void Foam::hexRef8::subset { labelList newCellLevel(cellMap.size()); - forAll(cellMap, newCellI) + forAll(cellMap, newCelli) { - newCellLevel[newCellI] = cellLevel_[cellMap[newCellI]]; + newCellLevel[newCelli] = cellLevel_[cellMap[newCelli]]; } cellLevel_.transfer(newCellLevel); @@ -4640,9 +4640,9 @@ void Foam::hexRef8::checkMesh() const forAll(pp, i) { label own = mesh_.faceOwner()[facei]; - label bFaceI = facei-mesh_.nInternalFaces(); + label bFacei = facei-mesh_.nInternalFaces(); - if (!cellToFace.insert(labelPair(own, nei[bFaceI]), facei)) + if (!cellToFace.insert(labelPair(own, nei[bFacei]), facei)) { dumpCell(own); FatalErrorInFunction @@ -4651,10 +4651,10 @@ void Foam::hexRef8::checkMesh() const << "Coupled face " << facei << " between owner " << own << " on patch " << pp.name() - << " and coupled neighbour " << nei[bFaceI] + << " and coupled neighbour " << nei[bFacei] << " has two faces connected to it:" << facei << " and " - << cellToFace[labelPair(own, nei[bFaceI])] + << cellToFace[labelPair(own, nei[bFacei])] << abort(FatalError); } @@ -5175,9 +5175,9 @@ Foam::labelList Foam::hexRef8::getSplitPoints() const { label pointI = cPoints[i]; - label masterCellI = splitMaster[pointI]; + label masterCelli = splitMaster[pointI]; - if (masterCellI == -1) + if (masterCelli == -1) { // First time visit of point. Store parent cell and // level of the parent cell (with respect to celli). This @@ -5187,13 +5187,13 @@ Foam::labelList Foam::hexRef8::getSplitPoints() const splitMaster[pointI] = parentIndex; splitMasterLevel[pointI] = cellLevel_[celli] - 1; } - else if (masterCellI == -2) + else if (masterCelli == -2) { // Already decided that point is not splitPoint } else if ( - (masterCellI != parentIndex) + (masterCelli != parentIndex) || (splitMasterLevel[pointI] != cellLevel_[celli] - 1) ) { @@ -5675,7 +5675,7 @@ void Foam::hexRef8::setUnrefinement // (should be guaranteed by directRemoveFaces) //if (debug) { - label masterCellI = min(pCells); + label masterCelli = min(pCells); forAll(pCells, j) { @@ -5694,7 +5694,7 @@ void Foam::hexRef8::setUnrefinement << abort(FatalError); } - if (masterCellI != cellRegionMaster[region]) + if (masterCelli != cellRegionMaster[region]) { FatalErrorInFunction << "cell:" << celli << " on splitPoint:" << pointI @@ -5727,14 +5727,14 @@ void Foam::hexRef8::setUnrefinement const labelList& pCells = mesh_.pointCells(pointI); - label masterCellI = min(pCells); + label masterCelli = min(pCells); forAll(pCells, j) { cellLevel_[pCells[j]]--; } - history_.combineCells(masterCellI, pCells); + history_.combineCells(masterCelli, pCells); } // Mark files as changed diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H index 021c8626f8df1dc3bc9494d471361ac90c871802..6b0ff0ff83d16f6cfd4d856dc7d8c5b3ea021605 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H @@ -128,7 +128,7 @@ class hexRef8 label addInternalFace ( polyTopoChange& meshMod, - const label meshFaceI, + const label meshFacei, const label meshPointI, const face& newFace, const label own, diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C index 98436d128b2e1629355eda6c51b7970e38441aa7..b57e6f3203cffce4b51ecbd2e1e33ac6529de2aa 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C @@ -134,13 +134,13 @@ void Foam::polyTopoChange::countMap nMerge = 0; nRemove = 0; - forAll(map, newCellI) + forAll(map, newCelli) { - label oldCellI = map[newCellI]; + label oldCelli = map[newCelli]; - if (oldCellI >= 0) + if (oldCelli >= 0) { - if (reverseMap[oldCellI] == newCellI) + if (reverseMap[oldCelli] == newCelli) { // unchanged } @@ -150,7 +150,7 @@ void Foam::polyTopoChange::countMap nAdd++; } } - else if (oldCellI == -1) + else if (oldCelli == -1) { // Created from nothing nInflate++; @@ -158,26 +158,26 @@ void Foam::polyTopoChange::countMap else { FatalErrorInFunction - << " new:" << newCellI << abort(FatalError); + << " new:" << newCelli << abort(FatalError); } } - forAll(reverseMap, oldCellI) + forAll(reverseMap, oldCelli) { - label newCellI = reverseMap[oldCellI]; + label newCelli = reverseMap[oldCelli]; - if (newCellI >= 0) + if (newCelli >= 0) { // unchanged } - else if (newCellI == -1) + else if (newCelli == -1) { // removed nRemove++; } else { - // merged into -newCellI-2 + // merged into -newCelli-2 nMerge++; } } @@ -232,15 +232,15 @@ void Foam::polyTopoChange::getMergeSets // Per new cell the number of old cells that have been merged into it labelList nMerged(cellMap.size(), 1); - forAll(reverseCellMap, oldCellI) + forAll(reverseCellMap, oldCelli) { - label newCellI = reverseCellMap[oldCellI]; + label newCelli = reverseCellMap[oldCelli]; - if (newCellI < -1) + if (newCelli < -1) { - label mergeCellI = -newCellI-2; + label mergeCelli = -newCelli-2; - nMerged[mergeCellI]++; + nMerged[mergeCelli]++; } } @@ -265,38 +265,38 @@ void Foam::polyTopoChange::getMergeSets cellsFromCells.setSize(nSets); - forAll(reverseCellMap, oldCellI) + forAll(reverseCellMap, oldCelli) { - label newCellI = reverseCellMap[oldCellI]; + label newCelli = reverseCellMap[oldCelli]; - if (newCellI < -1) + if (newCelli < -1) { - label mergeCellI = -newCellI-2; + label mergeCelli = -newCelli-2; - // oldCellI was merged into mergeCellI + // oldCelli was merged into mergeCelli - label setI = cellToMergeSet[mergeCellI]; + label setI = cellToMergeSet[mergeCelli]; objectMap& mergeSet = cellsFromCells[setI]; if (mergeSet.masterObjects().empty()) { - // First occurrence of master cell mergeCellI + // First occurrence of master cell mergeCelli - mergeSet.index() = mergeCellI; - mergeSet.masterObjects().setSize(nMerged[mergeCellI]); + mergeSet.index() = mergeCelli; + mergeSet.masterObjects().setSize(nMerged[mergeCelli]); // old master label - mergeSet.masterObjects()[0] = cellMap[mergeCellI]; + mergeSet.masterObjects()[0] = cellMap[mergeCelli]; // old slave label - mergeSet.masterObjects()[1] = oldCellI; + mergeSet.masterObjects()[1] = oldCelli; - nMerged[mergeCellI] = 2; + nMerged[mergeCelli] = 2; } else { - mergeSet.masterObjects()[nMerged[mergeCellI]++] = oldCellI; + mergeSet.masterObjects()[nMerged[mergeCelli]++] = oldCelli; } } } @@ -713,7 +713,7 @@ void Foam::polyTopoChange::getFaceOrder oldToNew = -1; // First unassigned face - label newFaceI = 0; + label newFacei = 0; labelList nbr; labelList order; @@ -731,25 +731,25 @@ void Foam::polyTopoChange::getFaceOrder { label facei = cellFaces[startOfCell + i]; - label nbrCellI = faceNeighbour_[facei]; + label nbrCelli = faceNeighbour_[facei]; if (facei >= nActiveFaces) { // Retired face. nbr[i] = -1; } - else if (nbrCellI != -1) + else if (nbrCelli != -1) { // Internal face. Get cell on other side. - if (nbrCellI == celli) + if (nbrCelli == celli) { - nbrCellI = faceOwner_[facei]; + nbrCelli = faceOwner_[facei]; } - if (celli < nbrCellI) + if (celli < nbrCelli) { - // CellI is master - nbr[i] = nbrCellI; + // Celli is master + nbr[i] = nbrCelli; } else { @@ -773,7 +773,7 @@ void Foam::polyTopoChange::getFaceOrder // if (nbr[i] != -1) // { // oldToNew[cellFaces[startOfCell + nbr.indices()[i]]] = - // newFaceI++; + // newFacei++; // } //} forAll(order, i) @@ -781,7 +781,7 @@ void Foam::polyTopoChange::getFaceOrder label index = order[i]; if (nbr[index] != -1) { - oldToNew[cellFaces[startOfCell + index]] = newFaceI++; + oldToNew[cellFaces[startOfCell + index]] = newFacei++; } } } @@ -795,7 +795,7 @@ void Foam::polyTopoChange::getFaceOrder if (nPatches_ > 0) { - patchStarts[0] = newFaceI; + patchStarts[0] = newFacei; for (label facei = 0; facei < nActiveFaces; facei++) { @@ -1101,40 +1101,40 @@ void Foam::polyTopoChange::compact // Compact faces. { labelList localFaceMap(faces_.size(), -1); - label newFaceI = 0; + label newFacei = 0; forAll(faces_, facei) { if (!faceRemoved(facei) && faceOwner_[facei] >= 0) { - localFaceMap[facei] = newFaceI++; + localFaceMap[facei] = newFacei++; } } - nActiveFaces_ = newFaceI; + nActiveFaces_ = newFacei; forAll(faces_, facei) { if (!faceRemoved(facei) && faceOwner_[facei] < 0) { // Retired face - localFaceMap[facei] = newFaceI++; + localFaceMap[facei] = newFacei++; } } if (debug) { Pout<< "Faces : active:" << nActiveFaces_ - << " removed:" << faces_.size()-newFaceI << endl; + << " removed:" << faces_.size()-newFacei << endl; } // Reorder faces. - reorderCompactFaces(newFaceI, localFaceMap); + reorderCompactFaces(newFacei, localFaceMap); } // Compact cells. { labelList localCellMap; - label newCellI; + label newCelli; if (orderCells) { @@ -1143,7 +1143,7 @@ void Foam::polyTopoChange::compact makeCellCells(nActiveFaces_, cellCells); // Cell ordering (based on bandCompression). Handles removed cells. - newCellI = getCellOrder(cellCells, localCellMap); + newCelli = getCellOrder(cellCells, localCellMap); } else { @@ -1151,31 +1151,31 @@ void Foam::polyTopoChange::compact localCellMap.setSize(cellMap_.size()); localCellMap = -1; - newCellI = 0; + newCelli = 0; forAll(cellMap_, celli) { if (!cellRemoved(celli)) { - localCellMap[celli] = newCellI++; + localCellMap[celli] = newCelli++; } } } if (debug) { - Pout<< "Cells : active:" << newCellI - << " removed:" << cellMap_.size()-newCellI << endl; + Pout<< "Cells : active:" << newCelli + << " removed:" << cellMap_.size()-newCelli << endl; } // Renumber -if cells reordered or -if cells removed - if (orderCells || (newCellI != cellMap_.size())) + if (orderCells || (newCelli != cellMap_.size())) { reorder(localCellMap, cellMap_); - cellMap_.setCapacity(newCellI); + cellMap_.setCapacity(newCelli); renumberReverseMap(localCellMap, reverseCellMap_); reorder(localCellMap, cellZone_); - cellZone_.setCapacity(newCellI); + cellZone_.setCapacity(newCelli); renumberKey(localCellMap, cellFromPoint_); renumberKey(localCellMap, cellFromEdge_); @@ -1381,14 +1381,14 @@ void Foam::polyTopoChange::calcFaceInflationMaps // Collect all still existing faces connected to this point. forAllConstIter(Map<label>, faceFromPoint_, iter) { - label newFaceI = iter.key(); + label newFacei = iter.key(); - if (region_[newFaceI] == -1) + if (region_[newFacei] == -1) { // Get internal faces using point on old mesh facesFromPoints[nFacesFromPoints++] = objectMap ( - newFaceI, + newFacei, selectFaces ( mesh, @@ -1402,7 +1402,7 @@ void Foam::polyTopoChange::calcFaceInflationMaps // Get patch faces using point on old mesh facesFromPoints[nFacesFromPoints++] = objectMap ( - newFaceI, + newFacei, selectFaces ( mesh, @@ -1427,14 +1427,14 @@ void Foam::polyTopoChange::calcFaceInflationMaps // Collect all still existing faces connected to this edge. forAllConstIter(Map<label>, faceFromEdge_, iter) { - label newFaceI = iter.key(); + label newFacei = iter.key(); - if (region_[newFaceI] == -1) + if (region_[newFacei] == -1) { // Get internal faces using edge on old mesh facesFromEdges[nFacesFromEdges++] = objectMap ( - newFaceI, + newFacei, selectFaces ( mesh, @@ -1448,7 +1448,7 @@ void Foam::polyTopoChange::calcFaceInflationMaps // Get patch faces using edge on old mesh facesFromEdges[nFacesFromEdges++] = objectMap ( - newFaceI, + newFacei, selectFaces ( mesh, @@ -1529,12 +1529,12 @@ void Foam::polyTopoChange::calcCellInflationMaps // Collect all still existing faces connected to this point. forAllConstIter(Map<label>, cellFromFace_, iter) { - label oldFaceI = iter(); + label oldFacei = iter(); - if (mesh.isInternalFace(oldFaceI)) + if (mesh.isInternalFace(oldFacei)) { - twoCells[0] = mesh.faceOwner()[oldFaceI]; - twoCells[1] = mesh.faceNeighbour()[oldFaceI]; + twoCells[0] = mesh.faceOwner()[oldFacei]; + twoCells[1] = mesh.faceNeighbour()[oldFacei]; cellsFromFaces[nCellsFromFaces++] = objectMap ( iter.key(), @@ -1546,7 +1546,7 @@ void Foam::polyTopoChange::calcCellInflationMaps cellsFromFaces[nCellsFromFaces++] = objectMap ( iter.key(), - labelList(1, mesh.faceOwner()[oldFaceI]) + labelList(1, mesh.faceOwner()[oldFacei]) ); } } @@ -1993,16 +1993,16 @@ void Foam::polyTopoChange::reorderCoupledFaces // Merge patch face reordering into mesh face reordering table label start = patchStarts[patchi]; - forAll(patchFaceMap, patchFaceI) + forAll(patchFaceMap, patchFacei) { - oldToNew[patchFaceI + start] = - start + patchFaceMap[patchFaceI]; + oldToNew[patchFacei + start] = + start + patchFaceMap[patchFacei]; } - forAll(patchFaceRotation, patchFaceI) + forAll(patchFaceRotation, patchFacei) { - rotation[patchFaceI + start] = - patchFaceRotation[patchFaceI]; + rotation[patchFacei + start] = + patchFaceRotation[patchFacei]; } anyChanged = true; @@ -2456,9 +2456,9 @@ void Foam::polyTopoChange::addMesh << "Are patches in incremental order?" << abort(FatalError); } - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { - label facei = pp.start() + patchFaceI; + label facei = pp.start() + patchFacei; addFace ( @@ -2896,7 +2896,7 @@ void Foam::polyTopoChange::modifyFace } -void Foam::polyTopoChange::removeFace(const label facei, const label mergeFaceI) +void Foam::polyTopoChange::removeFace(const label facei, const label mergeFacei) { if (facei < 0 || facei >= faces_.size()) { @@ -2923,9 +2923,9 @@ void Foam::polyTopoChange::removeFace(const label facei, const label mergeFaceI) faceOwner_[facei] = -1; faceNeighbour_[facei] = -1; faceMap_[facei] = -1; - if (mergeFaceI >= 0) + if (mergeFacei >= 0) { - reverseFaceMap_[facei] = -mergeFaceI-2; + reverseFaceMap_[facei] = -mergeFacei-2; } else { @@ -2986,7 +2986,7 @@ void Foam::polyTopoChange::modifyCell } -void Foam::polyTopoChange::removeCell(const label celli, const label mergeCellI) +void Foam::polyTopoChange::removeCell(const label celli, const label mergeCelli) { if (celli < 0 || celli >= cellMap_.size()) { @@ -3005,9 +3005,9 @@ void Foam::polyTopoChange::removeCell(const label celli, const label mergeCellI) } cellMap_[celli] = -2; - if (mergeCellI >= 0) + if (mergeCelli >= 0) { - reverseCellMap_[celli] = -mergeCellI-2; + reverseCellMap_[celli] = -mergeCelli-2; } else { diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementData.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementData.H index ccffed78e3ab15b9dcd81a747621999b086d29f6..8b8a3b64b6b06f82d5c001055ec13d889309a626 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementData.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementData.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -128,7 +128,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -139,7 +139,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -158,8 +158,8 @@ public: inline bool updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const refinementData& neighbourInfo, const scalar tol, TrackingData& td @@ -170,8 +170,8 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const refinementData& neighbourInfo, const scalar tol, TrackingData& td @@ -182,7 +182,7 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const refinementData& neighbourInfo, const scalar tol, TrackingData& td diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDataI.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDataI.H index debb1ed094feff856229785a9f70f899b6309a3b..c57dc6efc6b44fcc542d12733746173c8d66ee41 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDataI.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -74,7 +74,7 @@ inline void Foam::refinementData::leaveDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ) @@ -98,7 +98,7 @@ inline void Foam::refinementData::enterDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ) @@ -110,8 +110,8 @@ template<class TrackingData> inline bool Foam::refinementData::updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const refinementData& neighbourInfo, const scalar tol, TrackingData& td @@ -172,8 +172,8 @@ template<class TrackingData> inline bool Foam::refinementData::updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const refinementData& neighbourInfo, const scalar tol, TrackingData& td @@ -207,7 +207,7 @@ template<class TrackingData> inline bool Foam::refinementData::updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const refinementData& neighbourInfo, const scalar tol, TrackingData& td diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceData.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceData.H index 63970726c4e32fca64ff476cbb0b92554c2d088a..32a5f1f351584916f70a9eeeb47612b32ae06ea1 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceData.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceData.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -159,7 +159,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& ); @@ -170,7 +170,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& ); @@ -189,8 +189,8 @@ public: inline bool updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const refinementDistanceData& neighbourInfo, const scalar tol, TrackingData& @@ -201,8 +201,8 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const refinementDistanceData& neighbourInfo, const scalar tol, TrackingData& @@ -213,7 +213,7 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const refinementDistanceData& neighbourInfo, const scalar tol, TrackingData& diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceDataI.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceDataI.H index 954f3eb1eb3ed0b18024e9afb6726a84decacb5b..9027206b6e6ab2c7481f041fe1cda63dada1c343 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceDataI.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementDistanceDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -170,7 +170,7 @@ inline void Foam::refinementDistanceData::leaveDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ) @@ -197,7 +197,7 @@ inline void Foam::refinementDistanceData::enterDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ) @@ -212,14 +212,14 @@ template<class TrackingData> inline bool Foam::refinementDistanceData::updateCell ( const polyMesh& mesh, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const refinementDistanceData& neighbourInfo, const scalar tol, TrackingData& td ) { - const point& pos = mesh.cellCentres()[thisCellI]; + const point& pos = mesh.cellCentres()[thisCelli]; return update(pos, neighbourInfo, tol, td); } @@ -230,14 +230,14 @@ template<class TrackingData> inline bool Foam::refinementDistanceData::updateFace ( const polyMesh& mesh, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const refinementDistanceData& neighbourInfo, const scalar tol, TrackingData& td ) { - const point& pos = mesh.faceCentres()[thisFaceI]; + const point& pos = mesh.faceCentres()[thisFacei]; return update(pos, neighbourInfo, tol, td); } @@ -248,13 +248,13 @@ template<class TrackingData> inline bool Foam::refinementDistanceData::updateFace ( const polyMesh& mesh, - const label thisFaceI, + const label thisFacei, const refinementDistanceData& neighbourInfo, const scalar tol, TrackingData& td ) { - const point& pos = mesh.faceCentres()[thisFaceI]; + const point& pos = mesh.faceCentres()[thisFacei]; return update(pos, neighbourInfo, tol, td); } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C index 5035bba2ac5a6a98631e83fbc40c3d2c19eba4a1..f4940f1d8df7ba1dbe08a916f0fe33deecf9f5b9 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C @@ -544,11 +544,11 @@ void Foam::refinementHistory::updateMesh(const mapPolyMesh& map) << "Problem" << abort(FatalError); } - label newCellI = reverseCellMap[celli]; + label newCelli = reverseCellMap[celli]; - if (newCellI >= 0) + if (newCelli >= 0) { - newVisibleCells[newCellI] = index; + newVisibleCells[newCelli] = index; } } } @@ -580,9 +580,9 @@ void Foam::refinementHistory::subset forAll(newVisibleCells, celli) { - label oldCellI = cellMap[celli]; + label oldCelli = cellMap[celli]; - label index = visibleCells_[oldCellI]; + label index = visibleCells_[oldCelli]; // Check that cell is live (so its parent has no refinement) if (index >= 0 && splitCells_[index].addedCellsPtr_.valid()) @@ -686,15 +686,15 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) const labelListList& subCellMap = map.cellMap().subMap(); - forAll(subCellMap, procI) + forAll(subCellMap, proci) { - const labelList& newToOld = subCellMap[procI]; + const labelList& newToOld = subCellMap[proci]; forAll(newToOld, i) { - label oldCellI = newToOld[i]; + label oldCelli = newToOld[i]; - destination[oldCellI] = procI; + destination[oldCelli] = proci; } } @@ -731,9 +731,9 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) // Create subsetted refinement tree consisting of all parents that // move in their whole to other processor. - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { - //Pout<< "-- Subetting for processor " << procI << endl; + //Pout<< "-- Subetting for processor " << proci << endl; // From uncompacted to compacted splitCells. labelList oldToNew(splitCells_.size(), -1); @@ -751,9 +751,9 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) // << " nCells:" << splitCellNum[index] // << endl; - if (splitCellProc[index] == procI && splitCellNum[index] == 8) + if (splitCellProc[index] == proci && splitCellNum[index] == 8) { - // Entry moves in its whole to procI + // Entry moves in its whole to proci oldToNew[index] = newSplitCells.size(); newSplitCells.append(splitCells_[index]); @@ -769,13 +769,13 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) { label index = visibleCells_[celli]; - if (index >= 0 && destination[celli] == procI) + if (index >= 0 && destination[celli] == proci) { label parent = splitCells_[index].parent_; //Pout<< "Adding refined cell " << celli // << " since moves to " - // << procI << " old parent:" << parent << endl; + // << proci << " old parent:" << parent << endl; // Create new splitCell with parent oldToNew[index] = newSplitCells.size(); @@ -815,30 +815,30 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) } - const labelList& subMap = subCellMap[procI]; + const labelList& subMap = subCellMap[proci]; // New visible cells. labelList newVisibleCells(subMap.size(), -1); - forAll(subMap, newCellI) + forAll(subMap, newCelli) { - label oldCellI = subMap[newCellI]; + label oldCelli = subMap[newCelli]; - label oldIndex = visibleCells_[oldCellI]; + label oldIndex = visibleCells_[oldCelli]; if (oldIndex >= 0) { - newVisibleCells[newCellI] = oldToNew[oldIndex]; + newVisibleCells[newCelli] = oldToNew[oldIndex]; } } - //Pout<< nl << "--Subset for domain:" << procI << endl; + //Pout<< nl << "--Subset for domain:" << proci << endl; //writeDebug(newVisibleCells, newSplitCells); //Pout<< "---------" << nl << endl; // Send to neighbours - OPstream toNbr(Pstream::blocking, procI); + OPstream toNbr(Pstream::blocking, proci); toNbr << newSplitCells << newVisibleCells; } @@ -852,13 +852,13 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) visibleCells_.setSize(map.mesh().nCells()); visibleCells_ = -1; - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { - IPstream fromNbr(Pstream::blocking, procI); + IPstream fromNbr(Pstream::blocking, proci); List<splitCell8> newSplitCells(fromNbr); labelList newVisibleCells(fromNbr); - //Pout<< nl << "--Received from domain:" << procI << endl; + //Pout<< nl << "--Received from domain:" << proci << endl; //writeDebug(newVisibleCells, newSplitCells); //Pout<< "---------" << nl << endl; @@ -867,7 +867,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) // renumbering can be done here. label offset = splitCells_.size(); - //Pout<< "**Renumbering data from proc " << procI << " with offset " + //Pout<< "**Renumbering data from proc " << proci << " with offset " // << offset << endl; forAll(newSplitCells, index) @@ -896,7 +896,7 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) // Combine visibleCell. - const labelList& constructMap = map.cellMap().constructMap()[procI]; + const labelList& constructMap = map.cellMap().constructMap()[proci]; forAll(newVisibleCells, i) { @@ -1105,23 +1105,23 @@ void Foam::refinementHistory::storeSplit // cell they were created from (parentIndex) forAll(addedCells, i) { - label addedCellI = addedCells[i]; + label addedCelli = addedCells[i]; // Create entries for the split off cells. All of them // are visible. - visibleCells_[addedCellI] = allocateSplitCell(parentIndex, i); + visibleCells_[addedCelli] = allocateSplitCell(parentIndex, i); } } void Foam::refinementHistory::combineCells ( - const label masterCellI, + const label masterCelli, const labelList& combinedCells ) { // Save the parent structure - label parentIndex = splitCells_[visibleCells_[masterCellI]].parent_; + label parentIndex = splitCells_[visibleCells_[masterCelli]].parent_; // Remove the information for the combined cells forAll(combinedCells, i) @@ -1134,7 +1134,7 @@ void Foam::refinementHistory::combineCells splitCell8& parentSplit = splitCells_[parentIndex]; parentSplit.addedCellsPtr_.reset(NULL); - visibleCells_[masterCellI] = parentIndex; + visibleCells_[masterCelli] = parentIndex; } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.H index 1e8abb02afd1936bff89fb375af5f2606ba7ee4d..a2947e4530b307149580b9130f3783e0dbf3ff6f 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.H @@ -310,7 +310,7 @@ public: //- Store combining 8 cells into master void combineCells ( - const label masterCellI, + const label masterCelli, const labelList& combinedCells ); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C index 7b62dbf2690e823ecf43fcafc789acddced2e962..2042adcb0a0c5065f62b94cbd28227f7362d09c5 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C @@ -293,7 +293,7 @@ void Foam::removeCells::setRefinement << abort(FatalError); } - // nei is remaining cell. FaceI becomes external cell + // nei is remaining cell. Facei becomes external cell label zoneID = faceZones.whichZone(facei); bool zoneFlip = false; @@ -342,7 +342,7 @@ void Foam::removeCells::setRefinement // << " fc:" << mesh_.faceCentres()[facei] // << " into patch " << newPatchID[facei] << endl; - // own is remaining cell. FaceI becomes external cell. + // own is remaining cell. Facei becomes external cell. label zoneID = faceZones.whichZone(facei); bool zoneFlip = false; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C index 982886948bf191405696a26158f1cfaae6cfc9e9..e38d1d0012a5fa3c4af67538044af58d929df22b 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C @@ -109,16 +109,16 @@ Foam::label Foam::removeFaces::changeFaceRegion forAll(eFaces, j) { - label nbrFaceI = eFaces[j]; + label nbrFacei = eFaces[j]; - const labelList& fEdges1 = mesh_.faceEdges(nbrFaceI, fe); + const labelList& fEdges1 = mesh_.faceEdges(nbrFacei, fe); nChanged += changeFaceRegion ( cellRegion, removedFace, nFacesPerEdge, - nbrFaceI, + nbrFacei, newRegion, fEdges1, faceRegion @@ -156,9 +156,9 @@ Foam::boolList Foam::removeFaces::getFacesAffected { const labelList& cFaces = mesh_.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - affectedFace[cFaces[cFaceI]] = true; + affectedFace[cFaces[cFacei]] = true; } } } @@ -174,9 +174,9 @@ Foam::boolList Foam::removeFaces::getFacesAffected { const labelList& eFaces = mesh_.edgeFaces(iter.key()); - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - affectedFace[eFaces[eFaceI]] = true; + affectedFace[eFaces[eFacei]] = true; } } @@ -187,9 +187,9 @@ Foam::boolList Foam::removeFaces::getFacesAffected const labelList& pFaces = mesh_.pointFaces()[pointI]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - affectedFace[pFaces[pFaceI]] = true; + affectedFace[pFaces[pFacei]] = true; } } return affectedFace; @@ -399,13 +399,13 @@ void Foam::removeFaces::mergeFaces // Remove all but master face. - forAll(faceLabels, patchFaceI) + forAll(faceLabels, patchFacei) { - if (patchFaceI != masterIndex) + if (patchFacei != masterIndex) { - //Pout<< "Removing face " << faceLabels[patchFaceI] << endl; + //Pout<< "Removing face " << faceLabels[patchFacei] << endl; - meshMod.setAction(polyRemoveFace(faceLabels[patchFaceI], facei)); + meshMod.setAction(polyRemoveFace(faceLabels[patchFacei], facei)); } } } @@ -1117,20 +1117,20 @@ void Foam::removeFaces::setRefinement // Walk to fill faceRegion with faces that will be connected across // edges that will be removed. - label startFaceI = 0; + label startFacei = 0; while (true) { // Find unset region. - for (; startFaceI < mesh_.nFaces(); startFaceI++) + for (; startFacei < mesh_.nFaces(); startFacei++) { - if (faceRegion[startFaceI] == -1 && !removedFace[startFaceI]) + if (faceRegion[startFacei] == -1 && !removedFace[startFacei]) { break; } } - if (startFaceI == mesh_.nFaces()) + if (startFacei == mesh_.nFaces()) { break; } @@ -1143,9 +1143,9 @@ void Foam::removeFaces::setRefinement cellRegion, removedFace, nFacesPerEdge, - startFaceI, + startFacei, nRegions, - mesh_.faceEdges(startFaceI, fe), + mesh_.faceEdges(startFacei, fe), faceRegion ); @@ -1156,7 +1156,7 @@ void Foam::removeFaces::setRefinement else if (nRegion == 1) { // Reset face to be single region. - faceRegion[startFaceI] = -2; + faceRegion[startFacei] = -2; } else { diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C index 336f64b4ff78697c170c1aa608d66e516d3923a3..ae9589d6f055ca6811f14aebd4e832d69b93d748 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C @@ -461,16 +461,16 @@ void Foam::removePoints::updateMesh(const mapPolyMesh& map) { if (savedFaceLabels_[localI] >= 0) { - label newFaceI = map.reverseFaceMap()[savedFaceLabels_[localI]]; + label newFacei = map.reverseFaceMap()[savedFaceLabels_[localI]]; - if (newFaceI == -1) + if (newFacei == -1) { FatalErrorInFunction << "Old face " << savedFaceLabels_[localI] << " seems to have dissapeared." << abort(FatalError); } - savedFaceLabels_[localI] = newFaceI; + savedFaceLabels_[localI] = newFacei; } } @@ -651,13 +651,13 @@ void Foam::removePoints::getUnrefimentSet // Populate with my local points-to-restore. forAll(savedFaces_, saveI) { - label bFaceI = savedFaceLabels_[saveI] - mesh_.nInternalFaces(); + label bFacei = savedFaceLabels_[saveI] - mesh_.nInternalFaces(); - if (bFaceI >= 0) + if (bFacei >= 0) { const face& savedFace = savedFaces_[saveI]; - boolList& fRestore = faceVertexRestore[bFaceI]; + boolList& fRestore = faceVertexRestore[bFacei]; fRestore.setSize(savedFace.size()); fRestore = false; @@ -693,11 +693,11 @@ void Foam::removePoints::getUnrefimentSet forAll(savedFaces_, saveI) { - label bFaceI = savedFaceLabels_[saveI] - mesh_.nInternalFaces(); + label bFacei = savedFaceLabels_[saveI] - mesh_.nInternalFaces(); - if (bFaceI >= 0) + if (bFacei >= 0) { - const boolList& fRestore = faceVertexRestore[bFaceI]; + const boolList& fRestore = faceVertexRestore[bFacei]; const face& savedFace = savedFaces_[saveI]; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.C index 3300bef1ef37a6da91477a74a50f93cdb4fb6da2..2ecae363bb735fce2bd3950289c7c904ff7a2077 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.C @@ -254,9 +254,9 @@ void Foam::tetDecomposer::setRefinement EdgeMap<label> edgeToFace(8*cFaces.size()); - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; const face& f = mesh_.faces()[facei]; // Get reference to either owner or neighbour @@ -271,7 +271,7 @@ void Foam::tetDecomposer::setRefinement { forAll(f, fp) { - if (cFaceI == 0 && fp == 0) + if (cFacei == 0 && fp == 0) { // Reuse cell itself added[fp] = celli; @@ -293,7 +293,7 @@ void Foam::tetDecomposer::setRefinement { for (label triI = 0; triI < f.size()-2; triI++) { - if (cFaceI == 0 && triI == 0) + if (cFacei == 0 && triI == 0) { // Reuse cell itself added[triI] = celli; @@ -560,9 +560,9 @@ void Foam::tetDecomposer::setRefinement edgeToFace.clear(); - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; label zoneI = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; @@ -588,12 +588,12 @@ void Foam::tetDecomposer::setRefinement else { // Found the other face on the edge. - label otherFaceI = edgeFnd(); - const face& otherF = mesh_.faces()[otherFaceI]; + label otherFacei = edgeFnd(); + const face& otherF = mesh_.faces()[otherFacei]; // Found the other face on the edge. Note that since // we are looping in the same order the tets added for - // otherFaceI will be before those of facei + // otherFacei will be before those of facei label otherFp = findIndex(otherF, p0); if (otherF.nextLabel(otherFp) == p1) @@ -639,14 +639,14 @@ void Foam::tetDecomposer::setRefinement thisTet = faceNeighbourCells_[facei][fp]; } - if (mesh_.faceOwner()[otherFaceI] == celli) + if (mesh_.faceOwner()[otherFacei] == celli) { - otherTet = faceOwnerCells_[otherFaceI][otherFp]; + otherTet = faceOwnerCells_[otherFacei][otherFp]; } else { otherTet = - faceNeighbourCells_[otherFaceI][otherFp]; + faceNeighbourCells_[otherFacei][otherFp]; } } else @@ -661,15 +661,15 @@ void Foam::tetDecomposer::setRefinement thisTet = faceNeighbourCells_[facei][thisTriI]; } - label otherTriI = triIndex(otherFaceI, otherFp); - if (mesh_.faceOwner()[otherFaceI] == celli) + label otherTriI = triIndex(otherFacei, otherFp); + if (mesh_.faceOwner()[otherFacei] == celli) { - otherTet = faceOwnerCells_[otherFaceI][otherTriI]; + otherTet = faceOwnerCells_[otherFacei][otherTriI]; } else { otherTet = - faceNeighbourCells_[otherFaceI][otherTriI]; + faceNeighbourCells_[otherFacei][otherTriI]; } } diff --git a/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C b/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C index 155af2a2dd0429bbd0b130ffdc2a766bd5c6ccc4..4579e9750da4b96e6a28b2939df419b5c43650b5 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C +++ b/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C @@ -267,11 +267,11 @@ void Foam::slidingInterface::renumberAttachedAddressing forAll(mfc, facei) { - label newCellI = reverseCellMap[mfc[mfzRenumber[facei]]]; + label newCelli = reverseCellMap[mfc[mfzRenumber[facei]]]; - if (newCellI >= 0) + if (newCelli >= 0) { - newMfc[facei] = newCellI; + newMfc[facei] = newCelli; } } @@ -284,11 +284,11 @@ void Foam::slidingInterface::renumberAttachedAddressing forAll(sfc, facei) { - label newCellI = reverseCellMap[sfc[sfzRenumber[facei]]]; + label newCelli = reverseCellMap[sfc[sfzRenumber[facei]]]; - if (newCellI >= 0) + if (newCelli >= 0) { - newSfc[facei] = newCellI; + newSfc[facei] = newCelli; } } @@ -317,11 +317,11 @@ void Foam::slidingInterface::renumberAttachedAddressing forAll(msof, facei) { - label newFaceI = reverseFaceMap[msof[facei]]; + label newFacei = reverseFaceMap[msof[facei]]; - if (newFaceI >= 0) + if (newFacei >= 0) { - newMsof[facei] = newFaceI; + newMsof[facei] = newFacei; } } // Pout<< "newMsof: " << newMsof << endl; @@ -333,11 +333,11 @@ void Foam::slidingInterface::renumberAttachedAddressing forAll(ssof, facei) { - label newFaceI = reverseFaceMap[ssof[facei]]; + label newFacei = reverseFaceMap[ssof[facei]]; - if (newFaceI >= 0) + if (newFacei >= 0) { - newSsof[facei] = newFaceI; + newSsof[facei] = newFacei; } } // Pout<< "newSsof: " << newSsof << endl; diff --git a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C index 1dce40cc0f75ce62ee1bc4d63184f051fd1cc048..4217642059d5fabca7b1136e869890e12bd10847 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C @@ -114,12 +114,12 @@ void Foam::externalCoupledMixedFvPatchField<Type>::setMaster label sumOffset = 0; List<label>& procOffsets = offsets_[patchi]; - forAll(procOffsets, procI) + forAll(procOffsets, proci) { - label o = procOffsets[procI]; + label o = procOffsets[proci]; if (o > 0) { - procOffsets[procI] = patchOffset + sumOffset; + procOffsets[proci] = patchOffset + sumOffset; sumOffset += o; } } @@ -137,7 +137,7 @@ void Foam::externalCoupledMixedFvPatchField<Type>::writeGeometry { int tag = Pstream::msgType() + 1; - const label procI = Pstream::myProcNo(); + const label proci = Pstream::myProcNo(); const polyPatch& p = this->patch().patch(); const polyMesh& mesh = p.boundaryMesh().mesh(); @@ -152,11 +152,11 @@ void Foam::externalCoupledMixedFvPatchField<Type>::writeGeometry ); List<pointField> allPoints(Pstream::nProcs()); - allPoints[procI] = pointField(mesh.points(), uniquePointIDs); + allPoints[proci] = pointField(mesh.points(), uniquePointIDs); Pstream::gatherList(allPoints, tag); List<faceList> allFaces(Pstream::nProcs()); - faceList& patchFaces = allFaces[procI]; + faceList& patchFaces = allFaces[proci]; patchFaces = p.localFaces(); forAll(patchFaces, facei) { @@ -738,11 +738,11 @@ void Foam::externalCoupledMixedFvPatchField<Type>::transferData if (Pstream::master()) { - forAll(values, procI) + forAll(values, proci) { - const Field<scalar>& magSf = magSfs[procI]; - const Field<Type>& value = values[procI]; - const Field<Type>& snGrad = snGrads[procI]; + const Field<scalar>& magSf = magSfs[proci]; + const Field<Type>& value = values[proci]; + const Field<Type>& snGrad = snGrads[proci]; forAll(magSf, facei) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C index fbbae0c14bf5a471cb7f51b4eb6d09fe1f58bc13..c0afd6b15f47800b7dd77ebb47703b8999fd3b8f 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C @@ -135,9 +135,9 @@ void Foam::mappedFixedInternalValueFvPatchField<Type>::updateCoeffs() case mappedPatchBase::NEARESTPATCHFACE: case mappedPatchBase::NEARESTPATCHFACEAMI: { - const label samplePatchI = mpp.samplePolyPatch().index(); + const label samplePatchi = mpp.samplePolyPatch().index(); const fvPatchField<Type>& nbrPatchField = - this->sampleField().boundaryField()[samplePatchI]; + this->sampleField().boundaryField()[samplePatchi]; nbrIntFld = nbrPatchField.patchInternalField(); mpp.distribute(nbrIntFld); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H index 9e97467c4efb72887a67e61cc781138e5ac13719..76b4ff80cca5503377960bf303ca47481b9ec3aa 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/smoothData.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -126,7 +126,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -137,7 +137,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -156,8 +156,8 @@ public: inline bool updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const smoothData& svf, const scalar tol, TrackingData& td @@ -168,8 +168,8 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const smoothData& svf, const scalar tol, TrackingData& td @@ -180,7 +180,7 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const smoothData& svf, const scalar tol, TrackingData& td diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H index f1ad014e45107c0ecdb29d78d0e0e27c646472fe..2e9ebbefda00c2f05822f5652d3a9fd3136fc429 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepData.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -117,7 +117,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -128,7 +128,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -147,8 +147,8 @@ public: inline bool updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const sweepData& svf, const scalar tol, TrackingData& td @@ -159,8 +159,8 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const sweepData& svf, const scalar tol, TrackingData& td @@ -171,7 +171,7 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const sweepData& svf, const scalar tol, TrackingData& td diff --git a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepDataI.H b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepDataI.H index 0668fad184d1732f6b6f0dbc12890fa9bf157622..e96e8d81e813f6028879efc01bded09922131e62 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepDataI.H +++ b/src/finiteVolume/finiteVolume/fvc/fvcSmooth/sweepDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -152,14 +152,14 @@ template<class TrackingData> inline bool Foam::sweepData::updateCell ( const polyMesh& mesh, - const label thisCellI, + const label thisCelli, const label, const sweepData& svf, const scalar tol, TrackingData& td ) { - return update(svf, mesh.cellCentres()[thisCellI], tol, td); + return update(svf, mesh.cellCentres()[thisCelli], tol, td); } @@ -167,14 +167,14 @@ template<class TrackingData> inline bool Foam::sweepData::updateFace ( const polyMesh& mesh, - const label thisFaceI, + const label thisFacei, const label, const sweepData& svf, const scalar tol, TrackingData& td ) { - return update(svf, mesh.faceCentres()[thisFaceI], tol, td); + return update(svf, mesh.faceCentres()[thisFacei], tol, td); } @@ -183,13 +183,13 @@ template<class TrackingData> inline bool Foam::sweepData::updateFace ( const polyMesh& mesh, - const label thisFaceI, + const label thisFacei, const sweepData& svf, const scalar tol, TrackingData& td ) { - return update(svf, mesh.faceCentres()[thisFaceI], tol, td); + return update(svf, mesh.faceCentres()[thisFacei], tol, td); } diff --git a/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.C index 367c33d673be574b5119fe08192f676e2d0500b4..8accf10590542dc6696cf9885b71f9bd54c1f60a 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/fourthGrad/fourthGrad.C @@ -137,15 +137,15 @@ Foam::fv::fourthGrad<Type>::calcGrad secondfGrad.boundaryField()[patchi].patchNeighbourField() ); - forAll(faceCells, patchFaceI) + forAll(faceCells, patchFacei) { - fGrad[faceCells[patchFaceI]] -= - 0.5*lambdap[patchFaceI]*patchOwnLs[patchFaceI] + fGrad[faceCells[patchFacei]] -= + 0.5*lambdap[patchFacei]*patchOwnLs[patchFacei] *( - pd[patchFaceI] + pd[patchFacei] & ( - neighbourSecondfGrad[patchFaceI] - - secondfGrad[faceCells[patchFaceI]] + neighbourSecondfGrad[patchFacei] + - secondfGrad[faceCells[patchFacei]] ) ); } diff --git a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C index d027065b4c9e34b7cf106665d23923fb767394c7..e25da6f1c9154936141e4ac983855ddb2df62a0a 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/leastSquaresGrad/leastSquaresGrad.C @@ -89,13 +89,13 @@ Foam::fv::leastSquaresGrad<Type>::calcGrad forAll(own, facei) { - label ownFaceI = own[facei]; - label neiFaceI = nei[facei]; + label ownFacei = own[facei]; + label neiFacei = nei[facei]; - Type deltaVsf = vsf[neiFaceI] - vsf[ownFaceI]; + Type deltaVsf = vsf[neiFacei] - vsf[ownFacei]; - lsGrad[ownFaceI] += ownLs[facei]*deltaVsf; - lsGrad[neiFaceI] -= neiLs[facei]*deltaVsf; + lsGrad[ownFacei] += ownLs[facei]*deltaVsf; + lsGrad[neiFacei] -= neiLs[facei]*deltaVsf; } // Boundary faces @@ -113,22 +113,22 @@ Foam::fv::leastSquaresGrad<Type>::calcGrad vsf.boundaryField()[patchi].patchNeighbourField() ); - forAll(neiVsf, patchFaceI) + forAll(neiVsf, patchFacei) { - lsGrad[faceCells[patchFaceI]] += - patchOwnLs[patchFaceI] - *(neiVsf[patchFaceI] - vsf[faceCells[patchFaceI]]); + lsGrad[faceCells[patchFacei]] += + patchOwnLs[patchFacei] + *(neiVsf[patchFacei] - vsf[faceCells[patchFacei]]); } } else { const fvPatchField<Type>& patchVsf = vsf.boundaryField()[patchi]; - forAll(patchVsf, patchFaceI) + forAll(patchVsf, patchFacei) { - lsGrad[faceCells[patchFaceI]] += - patchOwnLs[patchFaceI] - *(patchVsf[patchFaceI] - vsf[faceCells[patchFaceI]]); + lsGrad[faceCells[patchFacei]] += + patchOwnLs[patchFacei] + *(patchVsf[patchFacei] - vsf[faceCells[patchFacei]]); } } } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C index a54af5d77b5369303fee78f5e9114a2da4373706..f7ed9ce24bdc8bf808054d225a4b93f937ca4411 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C @@ -51,8 +51,8 @@ void Foam::CFCCellToCellStencil::calcFaceBoundaryData // For coupled faces get the cell on the other side forAll(pp, i) { - label bFaceI = facei-mesh().nInternalFaces(); - neiGlobal[bFaceI] = globalNumbering().toGlobal(own[facei]); + label bFacei = facei-mesh().nInternalFaces(); + neiGlobal[bFacei] = globalNumbering().toGlobal(own[facei]); facei++; } } @@ -60,8 +60,8 @@ void Foam::CFCCellToCellStencil::calcFaceBoundaryData { forAll(pp, i) { - label bFaceI = facei-mesh().nInternalFaces(); - neiGlobal[bFaceI] = -1; + label bFacei = facei-mesh().nInternalFaces(); + neiGlobal[bFacei] = -1; facei++; } } @@ -70,9 +70,9 @@ void Foam::CFCCellToCellStencil::calcFaceBoundaryData // For noncoupled faces get the boundary face. forAll(pp, i) { - label bFaceI = facei-mesh().nInternalFaces(); - neiGlobal[bFaceI] = - globalNumbering().toGlobal(mesh().nCells()+bFaceI); + label bFacei = facei-mesh().nInternalFaces(); + neiGlobal[bFacei] = + globalNumbering().toGlobal(mesh().nCells()+bFacei); facei++; } } @@ -122,19 +122,19 @@ void Foam::CFCCellToCellStencil::calcCellStencil if (mesh().isInternalFace(facei)) { - label nbrCellI = own[facei]; - if (nbrCellI == celli) + label nbrCelli = own[facei]; + if (nbrCelli == celli) { - nbrCellI = nei[facei]; + nbrCelli = nei[facei]; } - cCells[nNbr++] = globalNumbering().toGlobal(nbrCellI); + cCells[nNbr++] = globalNumbering().toGlobal(nbrCelli); } else { - label nbrCellI = neiGlobal[facei-mesh().nInternalFaces()]; - if (nbrCellI != -1) + label nbrCelli = neiGlobal[facei-mesh().nInternalFaces()]; + if (nbrCelli != -1) { - cCells[nNbr++] = nbrCellI; + cCells[nNbr++] = nbrCelli; } } } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C index 1ee76c8627624ce8f3d5e3dea660cb7b9f374360..ce21c3a6d27eb53b1d0153c0ad5d2e6be365a192 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C @@ -177,10 +177,10 @@ void Foam::cellToCellStencil::validBoundaryFaces(boolList& isValidBFace) const if (pp.coupled() || isA<emptyPolyPatch>(pp)) { - label bFaceI = pp.start()-mesh().nInternalFaces(); + label bFacei = pp.start()-mesh().nInternalFaces(); forAll(pp, i) { - isValidBFace[bFaceI++] = false; + isValidBFace[bFacei++] = false; } } } @@ -293,14 +293,14 @@ void Foam::cellToCellStencil::insertFaceCells } else { - label bFaceI = facei-mesh().nInternalFaces(); + label bFacei = facei-mesh().nInternalFaces(); - if (isValidBFace[bFaceI]) + if (isValidBFace[bFacei]) { label globalI = globalNumbering().toGlobal ( mesh().nCells() - + bFaceI + + bFacei ); if (globalI != exclude0 && globalI != exclude1) diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C index 0ace3a8c461e4e7bd8f10c5f965ba540b58d5cc2..d0534ea014665cea0b6e2e65d04d19d6a98cb8af 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C @@ -77,15 +77,15 @@ void Foam::extendedCellToFaceStencil::writeStencilStats // Sum all sent data label nSent = 0; label nLocal = 0; - forAll(map.subMap(), procI) + forAll(map.subMap(), proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - nSent += map.subMap()[procI].size(); + nSent += map.subMap()[proci].size(); } else { - nLocal += map.subMap()[procI].size(); + nLocal += map.subMap()[proci].size(); } } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C index e3368ebe0bf257924aa8160b657723e4c8cd3c51..be351280b975ebc5e53e61c4489439c065466a74 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C @@ -49,17 +49,17 @@ void Foam::extendedUpwindCellToFaceStencil::selectOppositeFaces // Pick up all the faces that oppose this one. forAll(cFaces, i) { - label otherFaceI = cFaces[i]; + label otherFacei = cFaces[i]; - if (otherFaceI != facei && nonEmptyFace[otherFaceI]) + if (otherFacei != facei && nonEmptyFace[otherFacei]) { - if ((own[otherFaceI] == celli) == (own[facei] == celli)) + if ((own[otherFacei] == celli) == (own[facei] == celli)) { - opposedness[i] = -(areas[otherFaceI] & areas[facei]); + opposedness[i] = -(areas[otherFacei] & areas[facei]); } else { - opposedness[i] = (areas[otherFaceI] & areas[facei]); + opposedness[i] = (areas[otherFacei] & areas[facei]); } } } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C index 10fb6fc04516dd75db218eb5948c5c5354739bc3..2016ada0620a3e7ad3e8799df23ee06c3baac4c9 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C @@ -178,10 +178,10 @@ void Foam::cellToFaceStencil::validBoundaryFaces(boolList& isValidBFace) const if (pp.coupled() || isA<emptyPolyPatch>(pp)) { - label bFaceI = pp.start()-mesh().nInternalFaces(); + label bFacei = pp.start()-mesh().nInternalFaces(); forAll(pp, i) { - isValidBFace[bFaceI++] = false; + isValidBFace[bFacei++] = false; } } } @@ -294,14 +294,14 @@ void Foam::cellToFaceStencil::insertFaceCells } else { - label bFaceI = facei-mesh().nInternalFaces(); + label bFacei = facei-mesh().nInternalFaces(); - if (isValidBFace[bFaceI]) + if (isValidBFace[bFacei]) { label globalI = globalNumbering().toGlobal ( mesh().nCells() - + bFaceI + + bFacei ); if (globalI != exclude0 && globalI != exclude1) diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C index bc9ef3c429d18f91ce7565aa5fcc3b17edc8aff7..9348d33273cc5406f3b05dc254afb308af22f4dc 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C @@ -118,10 +118,10 @@ void Foam::CFCFaceToCellStencil::calcCellStencil if (isA<emptyPolyPatch>(pp)) { - label bFaceI = pp.start()-mesh().nInternalFaces(); + label bFacei = pp.start()-mesh().nInternalFaces(); forAll(pp, i) { - validBFace[bFaceI++] = false; + validBFace[bFacei++] = false; } } } @@ -161,24 +161,24 @@ void Foam::CFCFaceToCellStencil::calcCellStencil if (mesh().isInternalFace(facei)) { - label nbrCellI = own[facei]; - if (nbrCellI == celli) + label nbrCelli = own[facei]; + if (nbrCelli == celli) { - nbrCellI = nei[facei]; + nbrCelli = nei[facei]; } - const cell& nbrFaces = mesh().cells()[nbrCellI]; + const cell& nbrFaces = mesh().cells()[nbrCelli]; forAll(nbrFaces, j) { - label nbrFaceI = nbrFaces[j]; + label nbrFacei = nbrFaces[j]; if ( - mesh().isInternalFace(nbrFaceI) - || validBFace[nbrFaceI-mesh().nInternalFaces()] + mesh().isInternalFace(nbrFacei) + || validBFace[nbrFacei-mesh().nInternalFaces()] ) { - label nbrGlobalI = globalNumbering().toGlobal(nbrFaceI); + label nbrGlobalI = globalNumbering().toGlobal(nbrFacei); // Check if already there. Note:should use hashset? if (findIndex(allGlobalFaces, nbrGlobalI) == -1) diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 68cff3e5096e5f3c84a8af9459dda4cd81f95dcd..0d6b415a4869bb1ba26598b8f401b3cfffc3f489 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -652,15 +652,15 @@ void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap) // Inject volume of merged cells label nMerged = 0; - forAll(meshMap.reverseCellMap(), oldCellI) + forAll(meshMap.reverseCellMap(), oldCelli) { - label index = meshMap.reverseCellMap()[oldCellI]; + label index = meshMap.reverseCellMap()[oldCelli]; if (index < -1) { label celli = -index-2; - V0[celli] += savedV0[oldCellI]; + V0[celli] += savedV0[oldCelli]; nMerged++; } @@ -696,15 +696,15 @@ void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap) // Inject volume of merged cells label nMerged = 0; - forAll(meshMap.reverseCellMap(), oldCellI) + forAll(meshMap.reverseCellMap(), oldCelli) { - label index = meshMap.reverseCellMap()[oldCellI]; + label index = meshMap.reverseCellMap()[oldCelli]; if (index < -1) { label celli = -index-2; - V00[celli] += savedV00[oldCellI]; + V00[celli] += savedV00[oldCelli]; nMerged++; } } diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C index 3f66ebebe8dc5a35ef727bbe9299266505302a77..36f7a6f881ae700d0e71152ec3dd532c7ef8caf9 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C @@ -105,9 +105,9 @@ void Foam::fvMeshSubset::doCoupledPatches PstreamBuffers pBufs(Pstream::nonBlocking); // Send face usage across processor patches - forAll(oldPatches, oldPatchI) + forAll(oldPatches, oldPatchi) { - const polyPatch& pp = oldPatches[oldPatchI]; + const polyPatch& pp = oldPatches[oldPatchi]; if (isA<processorPolyPatch>(pp)) { @@ -124,9 +124,9 @@ void Foam::fvMeshSubset::doCoupledPatches pBufs.finishedSends(); // Receive face usage count and check for faces that become uncoupled. - forAll(oldPatches, oldPatchI) + forAll(oldPatches, oldPatchi) { - const polyPatch& pp = oldPatches[oldPatchI]; + const polyPatch& pp = oldPatches[oldPatchi]; if (isA<processorPolyPatch>(pp)) { @@ -158,9 +158,9 @@ void Foam::fvMeshSubset::doCoupledPatches } // Do same for cyclics. - forAll(oldPatches, oldPatchI) + forAll(oldPatches, oldPatchi) { - const polyPatch& pp = oldPatches[oldPatchI]; + const polyPatch& pp = oldPatches[oldPatchi]; if (isA<cyclicPolyPatch>(pp)) { @@ -169,16 +169,16 @@ void Foam::fvMeshSubset::doCoupledPatches forAll(cycPatch, i) { - label thisFaceI = cycPatch.start() + i; - label otherFaceI = cycPatch.transformGlobalFace(thisFaceI); + label thisFacei = cycPatch.start() + i; + label otherFacei = cycPatch.transformGlobalFace(thisFacei); if ( - nCellsUsingFace[thisFaceI] == 1 - && nCellsUsingFace[otherFaceI] == 0 + nCellsUsingFace[thisFacei] == 1 + && nCellsUsingFace[otherFacei] == 0 ) { - nCellsUsingFace[thisFaceI] = 3; + nCellsUsingFace[thisFacei] = 3; nUncoupled++; } } @@ -303,17 +303,17 @@ void Foam::fvMeshSubset::subsetZones() labelList subAddressing(nSub); boolList subFlipStatus(nSub); nSub = 0; - forAll(faceMap(), subFaceI) + forAll(faceMap(), subFacei) { - label meshFaceI = faceMap()[subFaceI]; - if (zone[meshFaceI] != 0) + label meshFacei = faceMap()[subFacei]; + if (zone[meshFacei] != 0) { - subAddressing[nSub] = subFaceI; - label subOwner = subMesh().faceOwner()[subFaceI]; - label baseOwner = baseMesh().faceOwner()[meshFaceI]; + subAddressing[nSub] = subFacei; + label subOwner = subMesh().faceOwner()[subFacei]; + label baseOwner = baseMesh().faceOwner()[meshFacei]; // If subowner is the same cell as the base keep the flip status bool sameOwner = (cellMap()[subOwner] == baseOwner); - bool flip = (zone[meshFaceI] == 1); + bool flip = (zone[meshFacei] == 1); subFlipStatus[nSub] = (sameOwner == flip); nSub++; @@ -498,20 +498,20 @@ void Foam::fvMeshSubset::setCellSubset } // 3. old internal faces - forAll(facesToc, intFaceI) + forAll(facesToc, intFacei) { if ( - baseMesh().isInternalFace(facesToc[intFaceI]) - && facesToSubset[facesToc[intFaceI]] == 1 + baseMesh().isInternalFace(facesToc[intFacei]) + && facesToSubset[facesToc[intFacei]] == 1 ) { // Mark face and increment number of points in set - faceMap_[globalFaceMap.size()] = facesToc[intFaceI]; - globalFaceMap.insert(facesToc[intFaceI], globalFaceMap.size()); + faceMap_[globalFaceMap.size()] = facesToc[intFacei]; + globalFaceMap.insert(facesToc[intFacei], globalFaceMap.size()); // Mark all points from the face - markPoints(oldFaces[facesToc[intFaceI]], globalPointMap); + markPoints(oldFaces[facesToc[intFacei]], globalPointMap); } } @@ -606,21 +606,21 @@ void Foam::fvMeshSubset::setCellSubset // Assign boundary faces. Visited in order of faceMap_. for (label facei = nInternalFaces; facei < faceMap_.size(); facei++) { - label oldFaceI = faceMap_[facei]; + label oldFacei = faceMap_[facei]; - face oldF = oldFaces[oldFaceI]; + face oldF = oldFaces[oldFacei]; // Turn the faces as necessary to point outwards - if (baseMesh().isInternalFace(oldFaceI)) + if (baseMesh().isInternalFace(oldFacei)) { // Internal face. Possibly turned the wrong way round if ( - !globalCellMap.found(oldOwner[oldFaceI]) - && globalCellMap.found(oldNeighbour[oldFaceI]) + !globalCellMap.found(oldOwner[oldFacei]) + && globalCellMap.found(oldNeighbour[oldFacei]) ) { - oldF = oldFaces[oldFaceI].reverseFace(); + oldF = oldFaces[oldFacei].reverseFace(); } // Update count for patch @@ -629,7 +629,7 @@ void Foam::fvMeshSubset::setCellSubset else { // Boundary face. Increment the appropriate patch - label patchOfFace = oldPatches.whichPatch(oldFaceI); + label patchOfFace = oldPatches.whichPatch(oldFacei); // Update count for patch boundaryPatchSizes[patchOfFace]++; @@ -798,11 +798,11 @@ void Foam::fvMeshSubset::setLargeCellSubset cellMap_.setSize(oldCells.size()); label nCellsInSet = 0; - forAll(region, oldCellI) + forAll(region, oldCelli) { - if (region[oldCellI] == currentRegion) + if (region[oldCelli] == currentRegion) { - cellMap_[nCellsInSet++] = oldCellI; + cellMap_[nCellsInSet++] = oldCelli; } } cellMap_.setSize(nCellsInSet); @@ -821,23 +821,23 @@ void Foam::fvMeshSubset::setLargeCellSubset labelList nCellsUsingFace(oldFaces.size(), 0); label nFacesInSet = 0; - forAll(oldFaces, oldFaceI) + forAll(oldFaces, oldFacei) { bool faceUsed = false; - if (region[oldOwner[oldFaceI]] == currentRegion) + if (region[oldOwner[oldFacei]] == currentRegion) { - nCellsUsingFace[oldFaceI]++; + nCellsUsingFace[oldFacei]++; faceUsed = true; } if ( - baseMesh().isInternalFace(oldFaceI) - && (region[oldNeighbour[oldFaceI]] == currentRegion) + baseMesh().isInternalFace(oldFacei) + && (region[oldNeighbour[oldFacei]] == currentRegion) ) { - nCellsUsingFace[oldFaceI]++; + nCellsUsingFace[oldFacei]++; faceUsed = true; } @@ -883,18 +883,18 @@ void Foam::fvMeshSubset::setLargeCellSubset nbSize++; // adapt old to new patches for inserted patch - for (label oldPatchI = 0; oldPatchI < nextPatchID; oldPatchI++) + for (label oldPatchi = 0; oldPatchi < nextPatchID; oldPatchi++) { - globalPatchMap[oldPatchI] = oldPatchI; + globalPatchMap[oldPatchi] = oldPatchi; } for ( - label oldPatchI = nextPatchID; - oldPatchI < oldPatches.size(); - oldPatchI++ + label oldPatchi = nextPatchID; + oldPatchi < oldPatches.size(); + oldPatchi++ ) { - globalPatchMap[oldPatchI] = oldPatchI+1; + globalPatchMap[oldPatchi] = oldPatchi+1; } } else @@ -916,15 +916,15 @@ void Foam::fvMeshSubset::setLargeCellSubset label facei = 0; // 1. Pick up all preserved internal faces. - for (label oldFaceI = 0; oldFaceI < oldNInternalFaces; oldFaceI++) + for (label oldFacei = 0; oldFacei < oldNInternalFaces; oldFacei++) { - if (nCellsUsingFace[oldFaceI] == 2) + if (nCellsUsingFace[oldFacei] == 2) { - globalFaceMap[oldFaceI] = facei; - faceMap_[facei++] = oldFaceI; + globalFaceMap[oldFacei] = facei; + faceMap_[facei++] = oldFacei; // Mark all points from the face - markPoints(oldFaces[oldFaceI], globalPointMap); + markPoints(oldFaces[oldFacei], globalPointMap); } } @@ -934,46 +934,46 @@ void Foam::fvMeshSubset::setLargeCellSubset // 2. Boundary faces up to where we want to insert old internal faces for ( - label oldPatchI = 0; - oldPatchI < oldPatches.size() - && oldPatchI < nextPatchID; - oldPatchI++ + label oldPatchi = 0; + oldPatchi < oldPatches.size() + && oldPatchi < nextPatchID; + oldPatchi++ ) { - const polyPatch& oldPatch = oldPatches[oldPatchI]; + const polyPatch& oldPatch = oldPatches[oldPatchi]; - label oldFaceI = oldPatch.start(); + label oldFacei = oldPatch.start(); forAll(oldPatch, i) { - if (nCellsUsingFace[oldFaceI] == 1) + if (nCellsUsingFace[oldFacei] == 1) { // Boundary face is kept. // Mark face and increment number of points in set - globalFaceMap[oldFaceI] = facei; - faceMap_[facei++] = oldFaceI; + globalFaceMap[oldFacei] = facei; + faceMap_[facei++] = oldFacei; // Mark all points from the face - markPoints(oldFaces[oldFaceI], globalPointMap); + markPoints(oldFaces[oldFacei], globalPointMap); // Increment number of patch faces - boundaryPatchSizes[globalPatchMap[oldPatchI]]++; + boundaryPatchSizes[globalPatchMap[oldPatchi]]++; } - oldFaceI++; + oldFacei++; } } // 3a. old internal faces that have become exposed. - for (label oldFaceI = 0; oldFaceI < oldNInternalFaces; oldFaceI++) + for (label oldFacei = 0; oldFacei < oldNInternalFaces; oldFacei++) { - if (nCellsUsingFace[oldFaceI] == 1) + if (nCellsUsingFace[oldFacei] == 1) { - globalFaceMap[oldFaceI] = facei; - faceMap_[facei++] = oldFaceI; + globalFaceMap[oldFacei] = facei; + faceMap_[facei++] = oldFacei; // Mark all points from the face - markPoints(oldFaces[oldFaceI], globalPointMap); + markPoints(oldFaces[oldFacei], globalPointMap); // Increment number of patch faces boundaryPatchSizes[oldInternalPatchID]++; @@ -983,18 +983,18 @@ void Foam::fvMeshSubset::setLargeCellSubset // 3b. coupled patch faces that have become uncoupled. for ( - label oldFaceI = oldNInternalFaces; - oldFaceI < oldFaces.size(); - oldFaceI++ + label oldFacei = oldNInternalFaces; + oldFacei < oldFaces.size(); + oldFacei++ ) { - if (nCellsUsingFace[oldFaceI] == 3) + if (nCellsUsingFace[oldFacei] == 3) { - globalFaceMap[oldFaceI] = facei; - faceMap_[facei++] = oldFaceI; + globalFaceMap[oldFacei] = facei; + faceMap_[facei++] = oldFacei; // Mark all points from the face - markPoints(oldFaces[oldFaceI], globalPointMap); + markPoints(oldFaces[oldFacei], globalPointMap); // Increment number of patch faces boundaryPatchSizes[oldInternalPatchID]++; @@ -1004,32 +1004,32 @@ void Foam::fvMeshSubset::setLargeCellSubset // 4. Remaining boundary faces for ( - label oldPatchI = nextPatchID; - oldPatchI < oldPatches.size(); - oldPatchI++ + label oldPatchi = nextPatchID; + oldPatchi < oldPatches.size(); + oldPatchi++ ) { - const polyPatch& oldPatch = oldPatches[oldPatchI]; + const polyPatch& oldPatch = oldPatches[oldPatchi]; - label oldFaceI = oldPatch.start(); + label oldFacei = oldPatch.start(); forAll(oldPatch, i) { - if (nCellsUsingFace[oldFaceI] == 1) + if (nCellsUsingFace[oldFacei] == 1) { // Boundary face is kept. // Mark face and increment number of points in set - globalFaceMap[oldFaceI] = facei; - faceMap_[facei++] = oldFaceI; + globalFaceMap[oldFacei] = facei; + faceMap_[facei++] = oldFacei; // Mark all points from the face - markPoints(oldFaces[oldFaceI], globalPointMap); + markPoints(oldFaces[oldFacei], globalPointMap); // Increment number of patch faces - boundaryPatchSizes[globalPatchMap[oldPatchI]]++; + boundaryPatchSizes[globalPatchMap[oldPatchi]]++; } - oldFaceI++; + oldFacei++; } } @@ -1104,21 +1104,21 @@ void Foam::fvMeshSubset::setLargeCellSubset // flipped) for (label facei = nInternalFaces; facei < faceMap_.size(); facei++) { - label oldFaceI = faceMap_[facei]; + label oldFacei = faceMap_[facei]; - face oldF = oldFaces[oldFaceI]; + face oldF = oldFaces[oldFacei]; // Turn the faces as necessary to point outwards - if (baseMesh().isInternalFace(oldFaceI)) + if (baseMesh().isInternalFace(oldFacei)) { // Was internal face. Possibly turned the wrong way round if ( - region[oldOwner[oldFaceI]] != currentRegion - && region[oldNeighbour[oldFaceI]] == currentRegion + region[oldOwner[oldFacei]] != currentRegion + && region[oldNeighbour[oldFacei]] == currentRegion ) { - oldF = oldFaces[oldFaceI].reverseFace(); + oldF = oldFaces[oldFacei].reverseFace(); } } @@ -1220,9 +1220,9 @@ void Foam::fvMeshSubset::setLargeCellSubset // everywhere remove the patch. bool samePatches = true; - for (label procI = 1; procI < patchNames.size(); procI++) + for (label proci = 1; proci < patchNames.size(); proci++) { - if (patchNames[procI] != patchNames[0]) + if (patchNames[proci] != patchNames[0]) { samePatches = false; break; @@ -1242,16 +1242,16 @@ void Foam::fvMeshSubset::setLargeCellSubset for ( - label oldPatchI = 0; - oldPatchI < oldPatches.size() - && oldPatchI < nextPatchID; - oldPatchI++ + label oldPatchi = 0; + oldPatchi < oldPatches.size() + && oldPatchi < nextPatchID; + oldPatchi++ ) { - label newSize = boundaryPatchSizes[globalPatchMap[oldPatchI]]; + label newSize = boundaryPatchSizes[globalPatchMap[oldPatchi]]; // Clone (even if 0 size) - newBoundary[nNewPatches] = oldPatches[oldPatchI].clone + newBoundary[nNewPatches] = oldPatches[oldPatchi].clone ( fvMeshSubsetPtr_().boundaryMesh(), nNewPatches, @@ -1260,7 +1260,7 @@ void Foam::fvMeshSubset::setLargeCellSubset ).ptr(); patchStart += newSize; - patchMap_[nNewPatches] = oldPatchI; // compact patchMap + patchMap_[nNewPatches] = oldPatchi; // compact patchMap nNewPatches++; } @@ -1303,15 +1303,15 @@ void Foam::fvMeshSubset::setLargeCellSubset for ( - label oldPatchI = nextPatchID; - oldPatchI < oldPatches.size(); - oldPatchI++ + label oldPatchi = nextPatchID; + oldPatchi < oldPatches.size(); + oldPatchi++ ) { - label newSize = boundaryPatchSizes[globalPatchMap[oldPatchI]]; + label newSize = boundaryPatchSizes[globalPatchMap[oldPatchi]]; // Patch still exists. Add it - newBoundary[nNewPatches] = oldPatches[oldPatchI].clone + newBoundary[nNewPatches] = oldPatches[oldPatchi].clone ( fvMeshSubsetPtr_().boundaryMesh(), nNewPatches, @@ -1319,11 +1319,11 @@ void Foam::fvMeshSubset::setLargeCellSubset patchStart ).ptr(); - //Pout<< " " << oldPatches[oldPatchI].name() << " : " + //Pout<< " " << oldPatches[oldPatchi].name() << " : " // << newSize << endl; patchStart += newSize; - patchMap_[nNewPatches] = oldPatchI; // compact patchMap + patchMap_[nNewPatches] = oldPatchi; // compact patchMap nNewPatches++; } diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C index b188a4326c9f2dd6863d8855a487c6bdf2c5fc67..9841584b1b5400c04621f4695bf9979986dfda5d 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C @@ -123,11 +123,11 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> fvMeshSubset::interpolate forAll(directAddressing, i) { - label baseFaceI = faceMap[subPatch.start()+i]; + label baseFacei = faceMap[subPatch.start()+i]; - if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize) + if (baseFacei >= baseStart && baseFacei < baseStart+baseSize) { - directAddressing[i] = baseFaceI-baseStart; + directAddressing[i] = baseFacei-baseStart; } else { @@ -266,11 +266,11 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate forAll(directAddressing, i) { - label baseFaceI = faceMap[subPatch.start()+i]; + label baseFacei = faceMap[subPatch.start()+i]; - if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize) + if (baseFacei >= baseStart && baseFacei < baseStart+baseSize) { - directAddressing[i] = baseFaceI-baseStart; + directAddressing[i] = baseFacei-baseStart; } else { @@ -300,11 +300,11 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate forAll(pfld, i) { - label baseFaceI = faceMap[subPatch.start()+i]; - if (baseFaceI < vf.internalField().size()) + label baseFacei = faceMap[subPatch.start()+i]; + if (baseFacei < vf.internalField().size()) { // Exposed internal face - pfld[i] = vf.internalField()[baseFaceI]; + pfld[i] = vf.internalField()[baseFacei]; } else { @@ -312,11 +312,11 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate // Only possible in case of a coupled boundary label patchi = vf.mesh().boundaryMesh().whichPatch ( - baseFaceI + baseFacei ); const fvPatch& otherPatch = vf.mesh().boundary()[patchi]; - label patchFaceI = otherPatch.patch().whichFace(baseFaceI); - pfld[i] = vf.boundaryField()[patchi][patchFaceI]; + label patchFacei = otherPatch.patch().whichFace(baseFacei); + pfld[i] = vf.boundaryField()[patchi][patchFacei]; } } } diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C index 01ae829ac7d8fe7eb98aca030dc47d48414fc6aa..8a5dfdc92bf85ed744915f7156a6c0935633021e 100644 --- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C +++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C @@ -98,9 +98,9 @@ void Foam::singleCellFvMesh::agglomerateMesh forAll(pp, i) { - label bFaceI = offset+i; + label bFacei = offset+i; label myZone = agglom[patchi][i]; - label nbrZone = nbrAgglom[bFaceI]; + label nbrZone = nbrAgglom[bFacei]; Map<label>::const_iterator iter = localToNbr.find(myZone); @@ -182,9 +182,9 @@ void Foam::singleCellFvMesh::agglomerateMesh // - patchStarts[patchi] : coarse mesh patch start // - myAgglom : agglomeration // - agglomToPatch[myAgglom] : fine mesh faces for zone - label coarsePatchFaceI = coarseI - patchStarts[patchi]; - patchFaceMap_[patchi][coarsePatchFaceI] = myAgglom; - agglomToFace[myAgglom] = coarsePatchFaceI; + label coarsePatchFacei = coarseI - patchStarts[patchi]; + patchFaceMap_[patchi][coarsePatchFacei] = myAgglom; + agglomToFace[myAgglom] = coarsePatchFacei; const labelList& fineFaces = agglomToPatch[myAgglom]; @@ -329,11 +329,11 @@ void Foam::singleCellFvMesh::agglomerateMesh forAll(oldFz, i) { - label newFaceI = reverseFaceMap_[oldFz[i]]; + label newFacei = reverseFaceMap_[oldFz[i]]; - if (newFaceI != -1) + if (newFacei != -1) { - newAddressing.append(newFaceI); + newAddressing.append(newFacei); newFlipMap.append(oldFz.flipMap()[i]); } } diff --git a/src/finiteVolume/fvMesh/wallDist/nearWallDist/nearWallDist.C b/src/finiteVolume/fvMesh/wallDist/nearWallDist/nearWallDist.C index 8877303e1f224f72b500a18308f585373fbdb2fb..0845327f7a3224b0a8d6735889c7aff37599b1cb 100644 --- a/src/finiteVolume/fvMesh/wallDist/nearWallDist/nearWallDist.C +++ b/src/finiteVolume/fvMesh/wallDist/nearWallDist/nearWallDist.C @@ -60,24 +60,24 @@ void Foam::nearWallDist::calculate() const labelUList& faceCells = patch.faceCells(); // Check cells with face on wall - forAll(patch, patchFaceI) + forAll(patch, patchFacei) { label nNeighbours = wallUtils.getPointNeighbours ( pPatch, - patchFaceI, + patchFacei, neighbours ); - label minFaceI = -1; + label minFacei = -1; - ypatch[patchFaceI] = wallUtils.smallestDist + ypatch[patchFacei] = wallUtils.smallestDist ( - cellCentres[faceCells[patchFaceI]], + cellCentres[faceCells[patchFacei]], pPatch, nNeighbours, neighbours, - minFaceI + minFacei ); } } diff --git a/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H b/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H index d4ffd57a040418394eaeec7356a9120ed3f6bb3f..c0c04033da31344e8c3edd5f6ab8aaadc9818280 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H +++ b/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H @@ -107,8 +107,8 @@ public: inline bool updateCell ( const polyMesh& mesh, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const wallPointYPlus& neighbourWallInfo, const scalar tol, TrackingData& td @@ -120,8 +120,8 @@ public: inline bool updateFace ( const polyMesh& mesh, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const wallPointYPlus& neighbourWallInfo, const scalar tol, TrackingData& td @@ -134,7 +134,7 @@ public: inline bool updateFace ( const polyMesh& mesh, - const label thisFaceI, + const label thisFacei, const wallPointYPlus& neighbourWallInfo, const scalar tol, TrackingData& td diff --git a/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlusI.H b/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlusI.H index 5f7c7bcd6fcf9901a59b8264ec2aaf07b45193e4..f62c0d69560f3271f8476c0a76fdb80871d231c2 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlusI.H +++ b/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlusI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -113,8 +113,8 @@ template<class TrackingData> inline bool wallPointYPlus::updateCell ( const polyMesh& mesh, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const wallPointYPlus& neighbourWallInfo, const scalar tol, TrackingData& td @@ -124,7 +124,7 @@ inline bool wallPointYPlus::updateCell return update ( - cellCentres[thisCellI], + cellCentres[thisCelli], neighbourWallInfo, tol, td @@ -137,8 +137,8 @@ template<class TrackingData> inline bool wallPointYPlus::updateFace ( const polyMesh& mesh, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const wallPointYPlus& neighbourWallInfo, const scalar tol, TrackingData& td @@ -148,7 +148,7 @@ inline bool wallPointYPlus::updateFace return update ( - faceCentres[thisFaceI], + faceCentres[thisFacei], neighbourWallInfo, tol, td @@ -161,7 +161,7 @@ template<class TrackingData> inline bool wallPointYPlus::updateFace ( const polyMesh& mesh, - const label thisFaceI, + const label thisFacei, const wallPointYPlus& neighbourWallInfo, const scalar tol, TrackingData& td @@ -171,7 +171,7 @@ inline bool wallPointYPlus::updateFace return update ( - faceCentres[thisFaceI], + faceCentres[thisFacei], neighbourWallInfo, tol, td diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C index 9d052527bab3bbef11ca871d5b47cc0d1aef8b94..6924c0f6209863ab9afd30d1ec5c4acf379badbb 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C @@ -53,9 +53,9 @@ Type Foam::interpolationCellPatchConstrained<Type>::interpolate // Use boundary value const polyBoundaryMesh& pbm = this->psi_.mesh().boundaryMesh(); label patchi = pbm.patchID()[facei-this->psi_.mesh().nInternalFaces()]; - label patchFaceI = pbm[patchi].whichFace(facei); + label patchFacei = pbm[patchi].whichFace(facei); - return this->psi_.boundaryField()[patchi][patchFaceI]; + return this->psi_.boundaryField()[patchi][patchFacei]; } else { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C index cc3a7342ef0ba0d89bea2162b4a42bc3753bacc2..d066ac7309539cee04d8613fdabc8223935a19fd 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/skewCorrected/skewCorrectionVectors.C @@ -109,17 +109,17 @@ void Foam::skewCorrectionVectors::calcSkewCorrectionVectors() const vectorField& patchSf = Sf.boundaryField()[patchi]; const vectorField patchD(p.delta()); - forAll(p, patchFaceI) + forAll(p, patchFacei) { vector Cpf = - patchFaceCentres[patchFaceI] - C[faceCells[patchFaceI]]; + patchFaceCentres[patchFacei] - C[faceCells[patchFacei]]; - patchSkewCorrVecs[patchFaceI] = + patchSkewCorrVecs[patchFacei] = Cpf - ( - (patchSf[patchFaceI] & Cpf)/ - (patchSf[patchFaceI] & patchD[patchFaceI]) - )*patchD[patchFaceI]; + (patchSf[patchFacei] & Cpf)/ + (patchSf[patchFacei] & patchD[patchFacei]) + )*patchD[patchFacei]; } } } diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C index 3c6ee43ad00258d0ecd0d50068e51be5519892f4..2e6e342b6980e60b7a8672776b8da84192241859 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C @@ -174,7 +174,7 @@ Foam::tmp<Foam::Field<Type>> Foam::volPointInterpolation::flatBoundaryField forAll(vf.boundaryField(), patchi) { - label bFaceI = bm[patchi].patch().start() - mesh.nInternalFaces(); + label bFacei = bm[patchi].patch().start() - mesh.nInternalFaces(); if ( @@ -186,7 +186,7 @@ Foam::tmp<Foam::Field<Type>> Foam::volPointInterpolation::flatBoundaryField ( boundaryVals, vf.boundaryField()[patchi].size(), - bFaceI + bFacei ) = vf.boundaryField()[patchi]; } else @@ -195,7 +195,7 @@ Foam::tmp<Foam::Field<Type>> Foam::volPointInterpolation::flatBoundaryField forAll(pp, i) { - boundaryVals[bFaceI++] = Zero; + boundaryVals[bFacei++] = Zero; } } } diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C index cf41cebc3814fc0a0ca2d660a0172ee24a0026bc..41c5d716d928512f26a6e3d8733173b86a2eaf26 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C @@ -87,13 +87,13 @@ void Foam::volPointInterpolation::calcBoundaryAddressing() && !magSf.boundaryField()[patchi].coupled() ) { - label bFaceI = pp.start()-mesh().nInternalFaces(); + label bFacei = pp.start()-mesh().nInternalFaces(); forAll(pp, i) { - boundaryIsPatchFace_[bFaceI] = true; + boundaryIsPatchFace_[bFacei] = true; - const face& f = boundary[bFaceI++]; + const face& f = boundary[bFacei++]; forAll(f, fp) { diff --git a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C index 91af7578fe4fc95cdbb877c6b6056c1e978cdbef..b9cd2fa91c0465f8916aee0532c5d400285b4d40 100644 --- a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C @@ -97,11 +97,11 @@ void Foam::inverseFaceDistanceDiffusivity::correct() const vectorField::subField fc(patch.faceCentres()); - forAll(fc, patchFaceI) + forAll(fc, patchFacei) { - changedFaces[nPatchFaces] = patch.start() + patchFaceI; + changedFaces[nPatchFaces] = patch.start() + patchFacei; - faceDist[nPatchFaces] = wallPoint(fc[patchFaceI], 0); + faceDist[nPatchFaces] = wallPoint(fc[patchFacei], 0); nPatchFaces++; } diff --git a/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C index 3e28d7792e90d7d8ae729dc647381657a11d7dd1..ac46c4b96dce68ef4a775829dbcc36a598c1f5f6 100644 --- a/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C @@ -172,9 +172,9 @@ void Foam::inversePointDistanceDiffusivity::correct() scalar dist = 0; - forAll(ownFaces, ownFaceI) + forAll(ownFaces, ownFacei) { - const face& f = mesh().faces()[ownFaces[ownFaceI]]; + const face& f = mesh().faces()[ownFaces[ownFacei]]; forAll(f, fp) { diff --git a/src/fvOptions/cellSetOption/cellSetOption.C b/src/fvOptions/cellSetOption/cellSetOption.C index e0cceb2644a2e1f2af37c86abce0647b90565f2c..56a664432cd5759422c6d5cdcc9642a8230f5fc3 100644 --- a/src/fvOptions/cellSetOption/cellSetOption.C +++ b/src/fvOptions/cellSetOption/cellSetOption.C @@ -107,8 +107,8 @@ void Foam::fv::cellSetOption::setCellSet() selectedCells.insert(celli); } - label globalCellI = returnReduce(celli, maxOp<label>()); - if (globalCellI < 0) + label globalCelli = returnReduce(celli, maxOp<label>()); + if (globalCelli < 0) { WarningInFunction << "Unable to find owner cell for point " << points_[i] diff --git a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C index 6aaa40220440bf3b82dd1b64711c89239e04e3ea..a57a6c947f8da1215e57cfc90d5a67fe6ba30abe 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C @@ -150,9 +150,9 @@ void Foam::fv::rotorDiskSource::setFaceArea(vector& axis, const bool correct) forAll(pp, i) { label facei = pp.start() + i; - label nbrFaceI = facei - nInternalFaces; + label nbrFacei = facei - nInternalFaces; label own = mesh_.faceOwner()[facei]; - nbrFaceCellAddr[nbrFaceI] = cellAddr[own]; + nbrFaceCellAddr[nbrFacei] = cellAddr[own]; } } } diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C index bc72f66b62ab636aec5c3a58471e9a3bd4bc7940..91a6c48af5b656d6cf19939d790534c81eee42db 100644 --- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C +++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C @@ -467,7 +467,7 @@ void Foam::DSMCCloud<ParcelType>::addNewParcel const vector& U, const scalar Ei, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId ) @@ -479,7 +479,7 @@ void Foam::DSMCCloud<ParcelType>::addNewParcel U, Ei, celli, - tetFaceI, + tetFacei, tetPtI, typeId ); diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.H b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.H index 67716694fbb62c0ac8c61b6d1c7a82f943ca1f0e..c80e000fd40c0b86c21e8194c291fb7200a05a24 100644 --- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.H +++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.H @@ -454,7 +454,7 @@ public: const vector& U, const scalar Ei, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId ); diff --git a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H index f8402638633ec956324139ce736a79bf4403a8df..f21642de457673068fc05e571d30fbe664e8fd29 100644 --- a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H +++ b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H @@ -182,7 +182,7 @@ public: const vector& U, const scalar Ei, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId ); diff --git a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelI.H b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelI.H index 1e3809a6854d409655f7ce755a3c1419b8d34044..fb41a6cee331b2ea28ada801c4e75604c1291b39 100644 --- a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelI.H +++ b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelI.H @@ -59,12 +59,12 @@ inline Foam::DSMCParcel<ParcelType>::DSMCParcel const vector& U, const scalar Ei, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId ) : - ParcelType(mesh, position, celli, tetFaceI, tetPtI), + ParcelType(mesh, position, celli, tetFacei, tetPtI), U_(U), Ei_(Ei), typeId_(typeId) diff --git a/src/lagrangian/DSMC/parcels/derived/dsmcParcel/dsmcParcel.C b/src/lagrangian/DSMC/parcels/derived/dsmcParcel/dsmcParcel.C index 27f508a5fc202627da134e7a5d8ee5fd4f145b44..ea58c2f59b9caeec38c10e6510e66fc157f0595b 100644 --- a/src/lagrangian/DSMC/parcels/derived/dsmcParcel/dsmcParcel.C +++ b/src/lagrangian/DSMC/parcels/derived/dsmcParcel/dsmcParcel.C @@ -43,7 +43,7 @@ Foam::dsmcParcel::dsmcParcel const vector& U, const scalar Ei, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId ) @@ -55,7 +55,7 @@ Foam::dsmcParcel::dsmcParcel U, Ei, celli, - tetFaceI, + tetFacei, tetPtI, typeId ) diff --git a/src/lagrangian/basic/InteractionLists/InteractionLists.C b/src/lagrangian/basic/InteractionLists/InteractionLists.C index 9f2bff5523ff147ff37199adfc7a814146015f12..3c258d1035858e8af01f06187e0f05ac92d23677 100644 --- a/src/lagrangian/basic/InteractionLists/InteractionLists.C +++ b/src/lagrangian/basic/InteractionLists/InteractionLists.C @@ -290,17 +290,17 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() List<DynamicList<label>> rilInverseTemp(rilInverse_.size()); // Loop over all referred cells - forAll(ril_, refCellI) + forAll(ril_, refCelli) { - const labelList& realCells = ril_[refCellI]; + const labelList& realCells = ril_[refCelli]; // Loop over all real cells in that the referred cell is to // supply interactions to and record the index of this // referred cell in the real cells entry in rilInverse - forAll(realCells, realCellI) + forAll(realCells, realCelli) { - rilInverseTemp[realCells[realCellI]].append(refCellI); + rilInverseTemp[realCells[realCelli]].append(refCelli); } } @@ -363,11 +363,11 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() // This wall face is in range of the Bb of the other // processor Bb, and so needs to be referred to it - label wallFaceI = localWallFaces[i]; + label wallFacei = localWallFaces[i]; wallFaceIAndTToExchange.append ( - globalTransforms.encode(wallFaceI, transformIndex) + globalTransforms.encode(wallFacei, transformIndex) ); wallFaceBbsToExchange.append(wallFaceBb); @@ -507,17 +507,17 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() List<DynamicList<label>> rwfilInverseTemp(rwfilInverse_.size()); // Loop over all referred wall faces - forAll(rwfil_, refWallFaceI) + forAll(rwfil_, refWallFacei) { - const labelList& realCells = rwfil_[refWallFaceI]; + const labelList& realCells = rwfil_[refWallFacei]; // Loop over all real cells in that the referred wall face is // to supply interactions to and record the index of this // referred wall face in the real cells entry in rwfilInverse - forAll(realCells, realCellI) + forAll(realCells, realCelli) { - rwfilInverseTemp[realCells[realCellI]].append(refWallFaceI); + rwfilInverseTemp[realCells[realCelli]].append(refWallFacei); } } @@ -653,13 +653,13 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange label nTrans = globalTransforms.nIndependentTransforms(); - forAll(allExtendedProcBbs, procI) + forAll(allExtendedProcBbs, proci) { List<label> permutationIndices(nTrans, 0); - if (nTrans == 0 && procI != Pstream::myProcNo()) + if (nTrans == 0 && proci != Pstream::myProcNo()) { - treeBoundBox extendedReferredProcBb = allExtendedProcBbs[procI]; + treeBoundBox extendedReferredProcBb = allExtendedProcBbs[proci]; if (procBb.overlaps(extendedReferredProcBb)) { @@ -669,7 +669,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange // be no resultant transform when this is decoded. tmpExtendedProcBbsTransformIndex.append(0); - tmpExtendedProcBbsOrigProc.append(procI); + tmpExtendedProcBbsOrigProc.append(proci); } } else if (nTrans == 3) @@ -689,7 +689,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange i == 0 && j == 0 && k == 0 - && procI == Pstream::myProcNo() + && proci == Pstream::myProcNo() ) { // Skip this processor's extended boundBox @@ -709,7 +709,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange ( transform.transformPosition ( - allExtendedProcBbs[procI].points() + allExtendedProcBbs[proci].points() ) ); @@ -722,7 +722,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange tmpExtendedProcBbsTransformIndex.append(transI); - tmpExtendedProcBbsOrigProc.append(procI); + tmpExtendedProcBbsOrigProc.append(proci); } } } @@ -737,7 +737,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange { for (j = -1; j <= 1; j++) { - if (i == 0 && j == 0 && procI == Pstream::myProcNo()) + if (i == 0 && j == 0 && proci == Pstream::myProcNo()) { // Skip this processor's extended boundBox // when it has no transformation @@ -756,7 +756,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange ( transform.transformPosition ( - allExtendedProcBbs[procI].points() + allExtendedProcBbs[proci].points() ) ); @@ -769,7 +769,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange tmpExtendedProcBbsTransformIndex.append(transI); - tmpExtendedProcBbsOrigProc.append(procI); + tmpExtendedProcBbsOrigProc.append(proci); } } } @@ -780,7 +780,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange for (i = -1; i <= 1; i++) { - if (i == 0 && procI == Pstream::myProcNo()) + if (i == 0 && proci == Pstream::myProcNo()) { // Skip this processor's extended boundBox when it // has no transformation @@ -799,7 +799,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange ( transform.transformPosition ( - allExtendedProcBbs[procI].points() + allExtendedProcBbs[proci].points() ) ); @@ -812,7 +812,7 @@ void Foam::InteractionLists<ParticleType>::findExtendedProcBbsInRange tmpExtendedProcBbsTransformIndex.append(transI); - tmpExtendedProcBbsOrigProc.append(procI); + tmpExtendedProcBbsOrigProc.append(proci); } } } @@ -839,27 +839,27 @@ void Foam::InteractionLists<ParticleType>::buildMap forAll(toProc, i) { - label procI = toProc[i]; + label proci = toProc[i]; - nSend[procI]++; + nSend[proci]++; } // 2. Size sendMap labelListList sendMap(Pstream::nProcs()); - forAll(nSend, procI) + forAll(nSend, proci) { - sendMap[procI].setSize(nSend[procI]); + sendMap[proci].setSize(nSend[proci]); - nSend[procI] = 0; + nSend[proci] = 0; } // 3. Fill sendMap forAll(toProc, i) { - label procI = toProc[i]; + label proci = toProc[i]; - sendMap[procI][nSend[procI]++] = i; + sendMap[proci][nSend[proci]++] = i; } // 4. Send over how many I need to receive @@ -880,17 +880,17 @@ void Foam::InteractionLists<ParticleType>::buildMap label constructSize = constructMap[Pstream::myProcNo()].size(); - forAll(constructMap, procI) + forAll(constructMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - label nRecv = recvSizes[procI]; + label nRecv = recvSizes[proci]; - constructMap[procI].setSize(nRecv); + constructMap[proci].setSize(nRecv); for (label i = 0; i < nRecv; i++) { - constructMap[procI][i] = constructSize++; + constructMap[proci][i] = constructSize++; } } } @@ -981,10 +981,10 @@ void Foam::InteractionLists<ParticleType>::fillReferredParticleCloud() { if (writeCloud_) { - forAll(referredParticles_, refCellI) + forAll(referredParticles_, refCelli) { const IDLList<ParticleType>& refCell = - referredParticles_[refCellI]; + referredParticles_[refCelli]; forAllConstIter(typename IDLList<ParticleType>, refCell, iter) { @@ -1027,13 +1027,13 @@ void Foam::InteractionLists<ParticleType>::prepareWallDataToRefer() wallFaceIndex - mesh_.nInternalFaces() ]; - label patchFaceI = + label patchFacei = wallFaceIndex - mesh_.boundaryMesh()[patchi].start(); // Need to transform velocity when tensor transforms are // supported - referredWallData_[rWVI] = U.boundaryField()[patchi][patchFaceI]; + referredWallData_[rWVI] = U.boundaryField()[patchi][patchFacei]; if (transform.hasR()) { diff --git a/src/lagrangian/basic/indexedParticle/indexedParticle.H b/src/lagrangian/basic/indexedParticle/indexedParticle.H index b19baef64d38d4aa94d02257d928c8f418fde239..9c3a017a24b1048f429c2b5e5dcc6a247f604a06 100644 --- a/src/lagrangian/basic/indexedParticle/indexedParticle.H +++ b/src/lagrangian/basic/indexedParticle/indexedParticle.H @@ -67,12 +67,12 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label index = 0 ) : - particle(mesh, position, celli, tetFaceI, tetPtI), + particle(mesh, position, celli, tetFacei, tetPtI), index_(index) {} diff --git a/src/lagrangian/basic/particle/particle.C b/src/lagrangian/basic/particle/particle.C index 9f0fc9dbb85a8b56fcf29b7afb4e1ddf180b05f8..fa1fc78420fb5f7b1427a5624fcac4c93c1aed4e 100644 --- a/src/lagrangian/basic/particle/particle.C +++ b/src/lagrangian/basic/particle/particle.C @@ -49,7 +49,7 @@ Foam::particle::particle const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ) : @@ -58,7 +58,7 @@ Foam::particle::particle celli_(celli), facei_(-1), stepFraction_(0.0), - tetFaceI_(tetFaceI), + tetFacei_(tetFacei), tetPtI_(tetPtI), origProc_(Pstream::myProcNo()), origId_(getNewParticleID()) @@ -78,7 +78,7 @@ Foam::particle::particle celli_(celli), facei_(-1), stepFraction_(0.0), - tetFaceI_(-1), + tetFacei_(-1), tetPtI_(-1), origProc_(Pstream::myProcNo()), origId_(getNewParticleID()) @@ -97,7 +97,7 @@ Foam::particle::particle(const particle& p) celli_(p.celli_), facei_(p.facei_), stepFraction_(p.stepFraction_), - tetFaceI_(p.tetFaceI_), + tetFacei_(p.tetFacei_), tetPtI_(p.tetPtI_), origProc_(p.origProc_), origId_(p.origId_) @@ -111,7 +111,7 @@ Foam::particle::particle(const particle& p, const polyMesh& mesh) celli_(p.celli_), facei_(p.facei_), stepFraction_(p.stepFraction_), - tetFaceI_(p.tetFaceI_), + tetFacei_(p.tetFacei_), tetPtI_(p.tetPtI_), origProc_(p.origProc_), origId_(p.origId_) diff --git a/src/lagrangian/basic/particle/particle.H b/src/lagrangian/basic/particle/particle.H index 612d08c7164d225a01bc790e5be77b981f3120c5..94264587f0811eb4387c24caae56df0d4ef76c87 100644 --- a/src/lagrangian/basic/particle/particle.H +++ b/src/lagrangian/basic/particle/particle.H @@ -151,7 +151,7 @@ protected: //- Index of the face that owns the decomposed tet that the // particle is in - label tetFaceI_; + label tetFacei_; //- Index of the point on the face that defines the decomposed // tet that the particle is in. Relative to the face base @@ -188,7 +188,7 @@ protected: const vector& tetArea, const label tetPlaneBasePtI, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const scalar tol ) const; @@ -202,7 +202,7 @@ protected: const vector& tetArea, const label tetPlaneBasePtI, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const scalar tol ) const; @@ -215,7 +215,7 @@ protected: inline void crossEdgeConnectedFace ( const label& celli, - label& tetFaceI, + label& tetFacei, label& tetPtI, const edge& e ); @@ -316,7 +316,7 @@ public: DefinePropertyList ( "(Px Py Pz) celli facei stepFraction " - "tetFaceI tetPtI origProc origId" + "tetFacei tetPtI origProc origId" ); //- Cumulative particle counter - used to provode unique ID @@ -342,11 +342,11 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ); - //- Construct from components, tetFaceI_ and tetPtI_ are not + //- Construct from components, tetFacei_ and tetPtI_ are not // supplied so they will be deduced by a search particle ( @@ -438,11 +438,11 @@ public: // particle occupies. inline tetPointRef currentTet() const; - //- Return the normal of the tri on tetFaceI_ for the + //- Return the normal of the tri on tetFacei_ for the // current tet. inline vector normal() const; - //- Return the normal of the tri on tetFaceI_ for the + //- Return the normal of the tri on tetFacei_ for the // current tet at the start of the timestep, i.e. based // on oldPoints inline vector oldNormal() const; diff --git a/src/lagrangian/basic/particle/particleI.H b/src/lagrangian/basic/particle/particleI.H index 6e3f80e8712f44addfd0bb624a294f9fa9ce44ce..a31aadd57ede8c0e76f6cfae2e68b4609c67b4df 100644 --- a/src/lagrangian/basic/particle/particleI.H +++ b/src/lagrangian/basic/particle/particleI.H @@ -52,7 +52,7 @@ inline void Foam::particle::findTris tetAreas[i], tetPlaneBasePtIs[i], celli_, - tetFaceI_, + tetFacei_, tetPtI_, tol ); @@ -73,7 +73,7 @@ inline Foam::scalar Foam::particle::tetLambda const vector& n, const label tetPlaneBasePtI, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const scalar tol ) const @@ -90,7 +90,7 @@ inline Foam::scalar Foam::particle::tetLambda n, tetPlaneBasePtI, celli, - tetFaceI, + tetFacei, tetPtI, tol ); @@ -145,7 +145,7 @@ inline Foam::scalar Foam::particle::movingTetLambda const vector& n, const label tetPlaneBasePtI, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const scalar tol ) const @@ -169,7 +169,7 @@ inline Foam::scalar Foam::particle::movingTetLambda vector n0 = Zero; { - tetIndices tetIs(celli, tetFaceI, tetPtI, mesh_); + tetIndices tetIs(celli, tetFacei, tetPtI, mesh_); // Tet at timestep start tetPointRef tet00 = tetIs.oldTet(mesh_); @@ -323,16 +323,16 @@ inline void Foam::particle::tetNeighbour(label triI) const labelList& pOwner = mesh_.faceOwner(); const faceList& pFaces = mesh_.faces(); - bool own = (pOwner[tetFaceI_] == celli_); + bool own = (pOwner[tetFacei_] == celli_); - const Foam::face& f = pFaces[tetFaceI_]; + const Foam::face& f = pFaces[tetFacei_]; - label tetBasePtI = mesh_.tetBasePtIs()[tetFaceI_]; + label tetBasePtI = mesh_.tetBasePtIs()[tetFacei_]; if (tetBasePtI == -1) { FatalErrorInFunction - << "No base point for face " << tetFaceI_ << ", " << f + << "No base point for face " << tetFacei_ << ", " << f << ", produces a valid tet decomposition." << abort(FatalError); } @@ -345,10 +345,10 @@ inline void Foam::particle::tetNeighbour(label triI) case 0: { // Crossing this triangle changes tet to that in the - // neighbour cell over tetFaceI + // neighbour cell over tetFacei // Modification of celli_ will happen by other indexing, - // tetFaceI_ and tetPtI don't change. + // tetFacei_ and tetPtI don't change. break; } @@ -357,7 +357,7 @@ inline void Foam::particle::tetNeighbour(label triI) crossEdgeConnectedFace ( celli_, - tetFaceI_, + tetFacei_, tetPtI_, Foam::edge(f[facePtI], f[otherFacePtI]) ); @@ -377,7 +377,7 @@ inline void Foam::particle::tetNeighbour(label triI) crossEdgeConnectedFace ( celli_, - tetFaceI_, + tetFacei_, tetPtI_, Foam::edge(f[tetBasePtI], f[otherFacePtI]) ); @@ -394,7 +394,7 @@ inline void Foam::particle::tetNeighbour(label triI) crossEdgeConnectedFace ( celli_, - tetFaceI_, + tetFacei_, tetPtI_, Foam::edge(f[tetBasePtI], f[facePtI]) ); @@ -416,7 +416,7 @@ inline void Foam::particle::tetNeighbour(label triI) crossEdgeConnectedFace ( celli_, - tetFaceI_, + tetFacei_, tetPtI_, Foam::edge(f[tetBasePtI], f[facePtI]) ); @@ -433,7 +433,7 @@ inline void Foam::particle::tetNeighbour(label triI) crossEdgeConnectedFace ( celli_, - tetFaceI_, + tetFacei_, tetPtI_, Foam::edge(f[tetBasePtI], f[otherFacePtI]) ); @@ -457,7 +457,7 @@ inline void Foam::particle::tetNeighbour(label triI) inline void Foam::particle::crossEdgeConnectedFace ( const label& celli, - label& tetFaceI, + label& tetFacei, label& tetPtI, const edge& e ) @@ -465,7 +465,7 @@ inline void Foam::particle::crossEdgeConnectedFace const faceList& pFaces = mesh_.faces(); const cellList& pCells = mesh_.cells(); - const Foam::face& f = pFaces[tetFaceI]; + const Foam::face& f = pFaces[tetFacei]; const Foam::cell& thisCell = pCells[celli]; @@ -476,7 +476,7 @@ inline void Foam::particle::crossEdgeConnectedFace label fI = thisCell[cFI]; - if (tetFaceI == fI) + if (tetFacei == fI) { continue; } @@ -501,7 +501,7 @@ inline void Foam::particle::crossEdgeConnectedFace else { //Found edge on other face - tetFaceI = fI; + tetFacei = fI; label eIndex = -1; @@ -609,13 +609,13 @@ inline Foam::label& Foam::particle::cell() inline Foam::label Foam::particle::tetFace() const { - return tetFaceI_; + return tetFacei_; } inline Foam::label& Foam::particle::tetFace() { - return tetFaceI_; + return tetFacei_; } @@ -633,7 +633,7 @@ inline Foam::label& Foam::particle::tetPt() inline Foam::tetIndices Foam::particle::currentTetIndices() const { - return tetIndices(celli_, tetFaceI_, tetPtI_, mesh_); + return tetIndices(celli_, tetFacei_, tetPtI_, mesh_); } @@ -675,7 +675,7 @@ inline void Foam::particle::initCellFacePt() ( position_, celli_, - tetFaceI_, + tetFacei_, tetPtI_ ); @@ -688,27 +688,27 @@ inline void Foam::particle::initCellFacePt() } else { - mesh_.findTetFacePt(celli_, position_, tetFaceI_, tetPtI_); + mesh_.findTetFacePt(celli_, position_, tetFacei_, tetPtI_); - if (tetFaceI_ == -1 || tetPtI_ == -1) + if (tetFacei_ == -1 || tetPtI_ == -1) { - label oldCellI = celli_; + label oldCelli = celli_; mesh_.findCellFacePt ( position_, celli_, - tetFaceI_, + tetFacei_, tetPtI_ ); - if (celli_ == -1 || tetFaceI_ == -1 || tetPtI_ == -1) + if (celli_ == -1 || tetFacei_ == -1 || tetPtI_ == -1) { // The particle has entered this function with a cell // number, but hasn't been able to find a cell to // occupy. - if (!mesh_.pointInCellBB(position_, oldCellI, 0.1)) + if (!mesh_.pointInCellBB(position_, oldCelli, 0.1)) { // If the position is not inside the (slightly // extended) bound-box of the cell that it thought @@ -717,7 +717,7 @@ inline void Foam::particle::initCellFacePt() FatalErrorInFunction << "position " << position_ << nl - << " for requested cell " << oldCellI << nl + << " for requested cell " << oldCelli << nl << " If this is a restart or " "reconstruction/decomposition etc. it is likely that" " the write precision is not sufficient.\n" @@ -737,7 +737,7 @@ inline void Foam::particle::initCellFacePt() // the particle towards the centre of the cell that it // thought that it was in. - celli_ = oldCellI; + celli_ = oldCelli; point newPosition = position_; @@ -755,15 +755,15 @@ inline void Foam::particle::initCellFacePt() ( celli_, newPosition, - tetFaceI_, + tetFacei_, tetPtI_ ); iterNo++; - } while (tetFaceI_ < 0 && iterNo <= trap); + } while (tetFacei_ < 0 && iterNo <= trap); - if (tetFaceI_ == -1) + if (tetFacei_ == -1) { FatalErrorInFunction << "cell, tetFace and tetPt search failure at position " @@ -776,7 +776,7 @@ inline void Foam::particle::initCellFacePt() << "Particle moved from " << position_ << " to " << newPosition << " in cell " << celli_ - << " tetFace " << tetFaceI_ + << " tetFace " << tetFacei_ << " tetPt " << tetPtI_ << nl << " (A fraction of " << 1.0 - mag(cC - newPosition)/mag(cC - position_) @@ -789,17 +789,17 @@ inline void Foam::particle::initCellFacePt() position_ = newPosition; } - if (debug && celli_ != oldCellI) + if (debug && celli_ != oldCelli) { WarningInFunction << "Particle at position " << position_ << " searched for a cell, tetFace and tetPt." << nl << " Found" << " cell " << celli_ - << " tetFace " << tetFaceI_ + << " tetFace " << tetFacei_ << " tetPt " << tetPtI_ << nl << " This is a different cell to that which was supplied" - << " (" << oldCellI << ")." << nl + << " (" << oldCelli << ")." << nl << endl; } } diff --git a/src/lagrangian/basic/particle/particleIO.C b/src/lagrangian/basic/particle/particleIO.C index 086858eebfb980506e5557ce81ea92a464b9441a..1c4b2bf9ad69d19d5e7535c6229279fdc60a8a32 100644 --- a/src/lagrangian/basic/particle/particleIO.C +++ b/src/lagrangian/basic/particle/particleIO.C @@ -50,7 +50,7 @@ Foam::particle::particle(const polyMesh& mesh, Istream& is, bool readFields) celli_(-1), facei_(-1), stepFraction_(0.0), - tetFaceI_(-1), + tetFacei_(-1), tetPtI_(-1), origProc_(Pstream::myProcNo()), origId_(-1) @@ -63,7 +63,7 @@ Foam::particle::particle(const polyMesh& mesh, Istream& is, bool readFields) { is >> facei_ >> stepFraction_ - >> tetFaceI_ + >> tetFacei_ >> tetPtI_ >> origProc_ >> origId_; @@ -110,7 +110,7 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const particle& p) << token::SPACE << p.celli_ << token::SPACE << p.facei_ << token::SPACE << p.stepFraction_ - << token::SPACE << p.tetFaceI_ + << token::SPACE << p.tetFacei_ << token::SPACE << p.tetPtI_ << token::SPACE << p.origProc_ << token::SPACE << p.origId_; diff --git a/src/lagrangian/basic/particle/particleTemplates.C b/src/lagrangian/basic/particle/particleTemplates.C index 5e63a15e88f98be0a5f731ce8c8b5c32b3973480..876f765debda85b1e2181b7e084b045dfc43e3c4 100644 --- a/src/lagrangian/basic/particle/particleTemplates.C +++ b/src/lagrangian/basic/particle/particleTemplates.C @@ -85,7 +85,7 @@ void Foam::particle::correctAfterParallelTransfer transformProperties(-s); } - tetFaceI_ = facei_ + ppp.start(); + tetFacei_ = facei_ + ppp.start(); // Faces either side of a coupled patch have matched base indices, // tetPtI is specified relative to the base point, already and @@ -108,7 +108,7 @@ void Foam::particle::correctAfterParallelTransfer // This relationship can be verified for other points and sizes of // face. - tetPtI_ = mesh_.faces()[tetFaceI_].size() - 1 - tetPtI_; + tetPtI_ = mesh_.faces()[tetFacei_].size() - 1 - tetPtI_; // Reset the face index for the next tracking operation if (stepFraction_ > (1.0 - SMALL)) @@ -225,7 +225,7 @@ Foam::scalar Foam::particle::trackToFace // Pout<< "stepFraction " << stepFraction_ << nl // << "celli " << celli_ << nl - // << "tetFaceI " << tetFaceI_ << nl + // << "tetFacei " << tetFacei_ << nl // << "tetPtI " << tetPtI_ // << endl; @@ -301,11 +301,11 @@ Foam::scalar Foam::particle::trackToFace tetNeighbour(triI); } - const Foam::face& f = pFaces[tetFaceI_]; + const Foam::face& f = pFaces[tetFacei_]; - bool own = (mesh_.faceOwner()[tetFaceI_] == celli_); + bool own = (mesh_.faceOwner()[tetFacei_] == celli_); - label tetBasePtI = mesh_.tetBasePtIs()[tetFaceI_]; + label tetBasePtI = mesh_.tetBasePtIs()[tetFacei_]; label basePtI = f[tetBasePtI]; @@ -429,7 +429,7 @@ Foam::scalar Foam::particle::trackToFace tetAreas[tI], tetPlaneBasePtIs[tI], celli_, - tetFaceI_, + tetFacei_, tetPtI_, lambdaDistanceTolerance ); @@ -446,14 +446,14 @@ Foam::scalar Foam::particle::trackToFace if (triI == 0) { // This must be a cell face crossing - facei_ = tetFaceI_; + facei_ = tetFacei_; // Set the faceHitTetIs to those for the current tet in case a // wall interaction is required with the cell face faceHitTetIs = tetIndices ( celli_, - tetFaceI_, + tetFacei_, tetBasePtI, fPtAI, fPtBI, @@ -469,7 +469,7 @@ Foam::scalar Foam::particle::trackToFace // Pout<< "track loop " << position_ << " " << endPosition << nl // << " " << celli_ // << " " << facei_ - // << " " << tetFaceI_ + // << " " << tetFacei_ // << " " << tetPtI_ // << " " << triI // << " " << lambdaMin @@ -478,9 +478,9 @@ Foam::scalar Foam::particle::trackToFace // Pout<< "# Tracking loop tet " // << origId_ << " " << origProc_<< nl - // << "# face: " << tetFaceI_ << nl + // << "# face: " << tetFacei_ << nl // << "# tetPtI: " << tetPtI_ << nl - // << "# tetBasePtI: " << mesh_.tetBasePtIs()[tetFaceI_] << nl + // << "# tetBasePtI: " << mesh_.tetBasePtIs()[tetFacei_] << nl // << "# tet.mag(): " << tet.mag() << nl // << "# tet.quality(): " << tet.quality() // << endl; @@ -552,10 +552,10 @@ Foam::scalar Foam::particle::trackToFace } else { - label origFaceI = facei_; + label origFacei = facei_; label patchi = patch(facei_); - // No action taken for tetPtI_ for tetFaceI_ here, handled by + // No action taken for tetPtI_ for tetFacei_ here, handled by // patch interaction call or later during processor transfer. if @@ -571,7 +571,7 @@ Foam::scalar Foam::particle::trackToFace ) { // Did patch interaction model switch patches? - if (facei_ != origFaceI) + if (facei_ != origFacei) { patchi = patch(facei_); } @@ -998,10 +998,10 @@ void Foam::particle::hitCyclicPatch celli_ = mesh_.faceOwner()[facei_]; - tetFaceI_ = facei_; + tetFacei_ = facei_; // See note in correctAfterParallelTransfer for tetPtI_ addressing. - tetPtI_ = mesh_.faces()[tetFaceI_].size() - 1 - tetPtI_; + tetPtI_ = mesh_.faces()[tetFacei_].size() - 1 - tetPtI_; const cyclicPolyPatch& receiveCpp = cpp.neighbPatch(); label patchFacei = receiveCpp.whichFace(facei_); @@ -1046,12 +1046,12 @@ void Foam::particle::hitCyclicAMIPatch const cyclicAMIPolyPatch& receiveCpp = cpp.neighbPatch(); // Patch face index on sending side - label patchFaceI = facei_ - cpp.start(); + label patchFacei = facei_ - cpp.start(); // Patch face index on receiving side - also updates position - patchFaceI = cpp.pointFace(patchFaceI, direction, position_); + patchFacei = cpp.pointFace(patchFacei, direction, position_); - if (patchFaceI < 0) + if (patchFacei < 0) { FatalErrorInFunction << "Particle lost across " << cyclicAMIPolyPatch::typeName @@ -1060,14 +1060,14 @@ void Foam::particle::hitCyclicAMIPatch } // Convert face index into global numbering - facei_ = patchFaceI + receiveCpp.start(); + facei_ = patchFacei + receiveCpp.start(); celli_ = mesh_.faceOwner()[facei_]; - tetFaceI_ = facei_; + tetFacei_ = facei_; // See note in correctAfterParallelTransfer for tetPtI_ addressing. - tetPtI_ = mesh_.faces()[tetFaceI_].size() - 1 - tetPtI_; + tetPtI_ = mesh_.faces()[tetFacei_].size() - 1 - tetPtI_; // Now the particle is on the receiving side @@ -1078,7 +1078,7 @@ void Foam::particle::hitCyclicAMIPatch ( receiveCpp.forwardT().size() == 1 ? receiveCpp.forwardT()[0] - : receiveCpp.forwardT()[patchFaceI] + : receiveCpp.forwardT()[patchFacei] ); transformProperties(T); } @@ -1088,7 +1088,7 @@ void Foam::particle::hitCyclicAMIPatch ( (receiveCpp.separation().size() == 1) ? receiveCpp.separation()[0] - : receiveCpp.separation()[patchFaceI] + : receiveCpp.separation()[patchFacei] ); transformProperties(-s); } diff --git a/src/lagrangian/basic/passiveParticle/passiveParticle.H b/src/lagrangian/basic/passiveParticle/passiveParticle.H index be3500a18c912a7dc55f093e0147ae4372ac3c18..572692566d7de4ad54c0e253b682adfda972c31e 100644 --- a/src/lagrangian/basic/passiveParticle/passiveParticle.H +++ b/src/lagrangian/basic/passiveParticle/passiveParticle.H @@ -63,11 +63,11 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ) : - particle(mesh, position, celli, tetFaceI, tetPtI) + particle(mesh, position, celli, tetFacei, tetPtI) {} //- Construct from components, with searching for tetFace and diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index d3e0ee40b112722613f056deef8db4c0ba2b3562..3560b93dbe66cc6c6d96794cc9dc37fb801a24e0 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -708,12 +708,12 @@ void Foam::KinematicCloud<CloudType>::patchData ) const { label patchi = pp.index(); - label patchFaceI = pp.whichFace(p.face()); + label patchFacei = pp.whichFace(p.face()); vector n = tetIs.faceTri(mesh_).normal(); n /= mag(n); - vector U = U_.boundaryField()[patchi][patchFaceI]; + vector U = U_.boundaryField()[patchi][patchFacei]; // Unless the face is rotating, the required normal is n; nw = n; @@ -734,7 +734,7 @@ void Foam::KinematicCloud<CloudType>::patchData } else { - vector U00 = U_.oldTime().boundaryField()[patchi][patchFaceI]; + vector U00 = U_.oldTime().boundaryField()[patchi][patchFacei]; vector n00 = tetIs.oldFaceTri(mesh_).normal(); diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H index 5c95a482e1e328a47d308b04cd5a4399c575558a..b581ef6eb9df3bc27a39e44b83d4402d0368263a 100644 --- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H @@ -170,7 +170,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ); @@ -180,7 +180,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelI.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelI.H index fffc5b9a2303032e964c5504a94c0219ea392e99..a08b546441c9da9c6c60a54c0980e74609c4fbd5 100644 --- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelI.H @@ -65,11 +65,11 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel const polyMesh& owner, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ) : - ParcelType(owner, position, celli, tetFaceI, tetPtI), + ParcelType(owner, position, celli, tetFacei, tetPtI), f_(Zero), angularMomentum_(Zero), torque_(Zero), @@ -83,7 +83,7 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel const polyMesh& owner, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, @@ -101,7 +101,7 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel owner, position, celli, - tetFaceI, + tetFacei, tetPtI, typeId, nParticle0, diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H index 136d87d29702f0fae3a9fd0f5c0ca078290a5494..75a85c72c3c64da30eed8b28ea34c2df6631652b 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H @@ -327,7 +327,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ); @@ -337,7 +337,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H index d361312eded801370f21f65a87f6a683a00358ea..5f71e7b655df97a40ae246771064b43dc551218c 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H @@ -75,11 +75,11 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel const polyMesh& owner, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ) : - ParcelType(owner, position, celli, tetFaceI, tetPtI), + ParcelType(owner, position, celli, tetFacei, tetPtI), active_(true), typeId_(-1), nParticle_(0), @@ -102,7 +102,7 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel const polyMesh& owner, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, @@ -112,7 +112,7 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel const constantProperties& constProps ) : - ParcelType(owner, position, celli, tetFaceI, tetPtI), + ParcelType(owner, position, celli, tetFacei, tetPtI), active_(true), typeId_(typeId), nParticle_(nParticle0), diff --git a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H index ff3fd6b35f33117e355e18709ac40be590513038..313bd60025c41a5c76b9c83820b724db956fc5a9 100644 --- a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H @@ -188,7 +188,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ); @@ -198,7 +198,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, diff --git a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelI.H b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelI.H index 627c8d21e096f56b454b4a0defcb65aeec743ab8..3ee0b680544413e4b88abd854732e27bd87456cb 100644 --- a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelI.H @@ -31,11 +31,11 @@ inline Foam::MPPICParcel<ParcelType>::MPPICParcel const polyMesh& owner, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ) : - ParcelType(owner, position, celli, tetFaceI, tetPtI), + ParcelType(owner, position, celli, tetFacei, tetPtI), UCorrect_(Zero) {} @@ -46,7 +46,7 @@ inline Foam::MPPICParcel<ParcelType>::MPPICParcel const polyMesh& owner, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, @@ -62,7 +62,7 @@ inline Foam::MPPICParcel<ParcelType>::MPPICParcel owner, position, celli, - tetFaceI, + tetFacei, tetPtI, typeId, nParticle0, diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H index 626a5a3ef31507958eaf561ed499561dd11f29ee..2f76f9ef7cb7478893fdf0a6f22b8086f3786b6e 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H @@ -277,7 +277,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ); @@ -288,7 +288,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H index 817173566a15d9934adce370010559aa56da9293..005cafb6322ed7041475ed7ad7172078fd68e4f7 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H @@ -70,11 +70,11 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ) : - ParcelType(mesh, position, celli, tetFaceI, tetPtI), + ParcelType(mesh, position, celli, tetFacei, tetPtI), YGas_(0), YLiquid_(0), YSolid_(0), @@ -88,7 +88,7 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, @@ -110,7 +110,7 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel mesh, position, celli, - tetFaceI, + tetFacei, tetPtI, typeId, nParticle0, diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H index 6642d0e8ecc88be8b629f238bf4f0c240b567ced..d48fa45e944da067e60598d4161dda7d887681be 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H @@ -231,7 +231,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ); @@ -241,7 +241,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H index bdff05ad6d4c62344fcef67591cd9ca86bc49589..78fea81bc53daef38dbe0f2f1c3af70152a6ac73 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H @@ -65,11 +65,11 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ) : - ParcelType(mesh, position, celli, tetFaceI, tetPtI), + ParcelType(mesh, position, celli, tetFacei, tetPtI), mass0_(0.0), Y_(0), pc_(0.0) @@ -82,7 +82,7 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, @@ -101,7 +101,7 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel mesh, position, celli, - tetFaceI, + tetFacei, tetPtI, typeId, nParticle0, diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H index 93964899474f9491672214f3463f5f841433e44f..fd8af64a7b8f22c7511488a742bef046c3bdfb17 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H @@ -287,7 +287,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ); @@ -297,7 +297,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H index 6c09f152400b8889f0aa5ffdd7667b3e6b916f69..b4e80ad19a927555585697fca4d6a2fd1e698a6a 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H @@ -76,11 +76,11 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ) : - ParcelType(mesh, position, celli, tetFaceI, tetPtI), + ParcelType(mesh, position, celli, tetFacei, tetPtI), T_(0.0), Cp_(0.0), Tc_(0.0), @@ -94,7 +94,7 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, @@ -112,7 +112,7 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel mesh, position, celli, - tetFaceI, + tetFacei, tetPtI, typeId, nParticle0, diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.C index c999dc2948736ed5f41b6fa21f87af816bfdb934..ede2197649bbb08b885298f9b31e5a4f4a452612 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.C @@ -95,7 +95,7 @@ void Foam::FacePostProcessing<CloudType>::write() massTotal_[zoneI] += mass_[zoneI]; } - const label procI = Pstream::myProcNo(); + const label proci = Pstream::myProcNo(); Info<< type() << " output:" << nl; @@ -106,7 +106,7 @@ void Foam::FacePostProcessing<CloudType>::write() const word& zoneName = fzm[faceZoneIDs_[zoneI]].name(); scalarListList allProcMass(Pstream::nProcs()); - allProcMass[procI] = massTotal_[zoneI]; + allProcMass[proci] = massTotal_[zoneI]; Pstream::gatherList(allProcMass); zoneMassTotal[zoneI] = ListListOps::combine<scalarList> @@ -116,7 +116,7 @@ void Foam::FacePostProcessing<CloudType>::write() const scalar sumMassTotal = sum(zoneMassTotal[zoneI]); scalarListList allProcMassFlowRate(Pstream::nProcs()); - allProcMassFlowRate[procI] = massFlowRate_[zoneI]; + allProcMassFlowRate[proci] = massFlowRate_[zoneI]; Pstream::gatherList(allProcMassFlowRate); zoneMassFlowRate[zoneI] = ListListOps::combine<scalarList> @@ -160,7 +160,7 @@ void Foam::FacePostProcessing<CloudType>::write() pointField uniquePoints(mesh.points(), uniqueMeshPointLabels); List<pointField> allProcPoints(Pstream::nProcs()); - allProcPoints[procI] = uniquePoints; + allProcPoints[proci] = uniquePoints; Pstream::gatherList(allProcPoints); faceList faces(fZone().localFaces()); @@ -169,7 +169,7 @@ void Foam::FacePostProcessing<CloudType>::write() inplaceRenumber(pointToGlobal, faces[i]); } List<faceList> allProcFaces(Pstream::nProcs()); - allProcFaces[procI] = faces; + allProcFaces[proci] = faces; Pstream::gatherList(allProcFaces); if (Pstream::master()) @@ -303,8 +303,8 @@ Foam::FacePostProcessing<CloudType>::FacePostProcessing } else { - label bFaceI = facei - owner.mesh().nInternalFaces(); - label patchi = pbm.patchID()[bFaceI]; + label bFacei = facei - owner.mesh().nInternalFaces(); + label patchi = pbm.patchID()[bFacei]; const polyPatch& pp = pbm[patchi]; if @@ -313,8 +313,8 @@ Foam::FacePostProcessing<CloudType>::FacePostProcessing || refCast<const coupledPolyPatch>(pp).owner() ) { - label localFaceI = pp.whichFace(facei); - totArea += magSf.boundaryField()[patchi][localFaceI]; + label localFacei = pp.whichFace(facei); + totArea += magSf.boundaryField()[patchi][localFacei]; } } } diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C index 4263956f8a95c7c0868f37701b3a72326f2ff9c2..6c8c1dde0973bf5d58f724c42ab3041260f575e2 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C @@ -405,7 +405,7 @@ void Foam::ParticleCollector<CloudType>::write() massTotal_[facei] += mass_[facei]; } - const label procI = Pstream::myProcNo(); + const label proci = Pstream::myProcNo(); Info<< type() << " output:" << nl; @@ -421,12 +421,12 @@ void Foam::ParticleCollector<CloudType>::write() forAll(faces_, facei) { scalarList allProcMass(Pstream::nProcs()); - allProcMass[procI] = massTotal_[facei]; + allProcMass[proci] = massTotal_[facei]; Pstream::gatherList(allProcMass); faceMassTotal[facei] += sum(allProcMass); scalarList allProcMassFlowRate(Pstream::nProcs()); - allProcMassFlowRate[procI] = massFlowRate_[facei]; + allProcMassFlowRate[proci] = massFlowRate_[facei]; Pstream::gatherList(allProcMassFlowRate); faceMassFlowRate[facei] += sum(allProcMassFlowRate); diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C index 0bff0a986a44805844c1182f10057ceb4c754861..9310d99ff2358398a3daac054b9672451eaeeaff 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C @@ -30,12 +30,12 @@ License template<class CloudType> Foam::label Foam::ParticleErosion<CloudType>::applyToPatch ( - const label globalPatchI + const label globalPatchi ) const { forAll(patchIDs_, i) { - if (patchIDs_[i] == globalPatchI) + if (patchIDs_[i] == globalPatchi) { return i; } @@ -169,9 +169,9 @@ void Foam::ParticleErosion<CloudType>::postPatch { const label patchi = pp.index(); - const label localPatchI = applyToPatch(patchi); + const label localPatchi = applyToPatch(patchi); - if (localPatchI != -1) + if (localPatchi != -1) { vector nw; vector Up; @@ -196,8 +196,8 @@ void Foam::ParticleErosion<CloudType>::postPatch const scalar coeff = p.nParticle()*p.mass()*sqr(magU)/(p_*psi_*K_); - const label patchFaceI = pp.whichFace(p.face()); - scalar& Q = QPtr_->boundaryFieldRef()[patchi][patchFaceI]; + const label patchFacei = pp.whichFace(p.face()); + scalar& Q = QPtr_->boundaryFieldRef()[patchi][patchFacei]; if (tan(alpha) < K_/6.0) { Q += coeff*(sin(2.0*alpha) - 6.0/K_*sqr(sin(alpha))); diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.H index ab6bec14b8eb95405abef709d7d8d389de9f7352..6e73fbcaaa65cefa41975c0071b1cc0169c688e2 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.H @@ -81,7 +81,7 @@ protected: // Protected Member Functions //- Returns local patchI if patch is in patchIds_ list - label applyToPatch(const label globalPatchI) const; + label applyToPatch(const label globalPatchi) const; //- Write post-processing info virtual void write(); diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C index a7203cf1f13763daa08ec5bc99daf4e5f33d43c9..3535fc01eed0e3d932bcb1145e0e5c84cd763878 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C @@ -34,12 +34,12 @@ License template<class CloudType> Foam::label Foam::PatchPostProcessing<CloudType>::applyToPatch ( - const label globalPatchI + const label globalPatchi ) const { forAll(patchIDs_, i) { - if (patchIDs_[i] == globalPatchI) + if (patchIDs_[i] == globalPatchi) { return i; } @@ -203,16 +203,16 @@ void Foam::PatchPostProcessing<CloudType>::postPatch ) { const label patchi = pp.index(); - const label localPatchI = applyToPatch(patchi); + const label localPatchi = applyToPatch(patchi); - if (localPatchI != -1 && patchData_[localPatchI].size() < maxStoredParcels_) + if (localPatchi != -1 && patchData_[localPatchi].size() < maxStoredParcels_) { - times_[localPatchI].append(this->owner().time().value()); + times_[localPatchi].append(this->owner().time().value()); OStringStream data; data<< Pstream::myProcNo() << ' ' << p; - patchData_[localPatchI].append(data.str()); + patchData_[localPatchi].append(data.str()); } } diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.H index 902e186b1d523319fee5fe90c63adcc4b4020961..4c1b5588cf4e81af60b21d7b388ece111a29d055 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.H @@ -71,7 +71,7 @@ class PatchPostProcessing // Private Member Functions //- Returns local patchI if patch is in patchIds_ list - label applyToPatch(const label globalPatchI) const; + label applyToPatch(const label globalPatchi) const; protected: diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C index 36c32aaa7aa30bc517732ccb248d568e8bee7c5f..987da01bda9102b84455b9305ff27715c94f6c12 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C @@ -83,17 +83,17 @@ void Foam::PairCollision<CloudType>::realRealInteraction() List<DynamicList<typename CloudType::parcelType*>>& cellOccupancy = this->owner().cellOccupancy(); - forAll(dil, realCellI) + forAll(dil, realCelli) { // Loop over all Parcels in cell A (a) - forAll(cellOccupancy[realCellI], a) + forAll(cellOccupancy[realCelli], a) { - pA_ptr = cellOccupancy[realCellI][a]; + pA_ptr = cellOccupancy[realCelli][a]; - forAll(dil[realCellI], interactingCells) + forAll(dil[realCelli], interactingCells) { List<typename CloudType::parcelType*> cellBParcels = - cellOccupancy[dil[realCellI][interactingCells]]; + cellOccupancy[dil[realCelli][interactingCells]]; // Loop over all Parcels in cell B (b) forAll(cellBParcels, b) @@ -105,9 +105,9 @@ void Foam::PairCollision<CloudType>::realRealInteraction() } // Loop over the other Parcels in cell A (aO) - forAll(cellOccupancy[realCellI], aO) + forAll(cellOccupancy[realCelli], aO) { - pB_ptr = cellOccupancy[realCellI][aO]; + pB_ptr = cellOccupancy[realCelli][aO]; // Do not double-evaluate, compare pointers, arbitrary // order @@ -134,12 +134,12 @@ void Foam::PairCollision<CloudType>::realReferredInteraction() this->owner().cellOccupancy(); // Loop over all referred cells - forAll(ril, refCellI) + forAll(ril, refCelli) { IDLList<typename CloudType::parcelType>& refCellRefParticles = - referredParticles[refCellI]; + referredParticles[refCelli]; - const labelList& realCells = ril[refCellI]; + const labelList& realCells = ril[refCelli]; // Loop over all referred parcels in the referred cell @@ -153,10 +153,10 @@ void Foam::PairCollision<CloudType>::realReferredInteraction() // Loop over all real cells in that the referred cell is // to supply interactions to - forAll(realCells, realCellI) + forAll(realCells, realCelli) { List<typename CloudType::parcelType*> realCellParcels = - cellOccupancy[realCells[realCellI]]; + cellOccupancy[realCells[realCelli]]; forAll(realCellParcels, realParcelI) { @@ -199,13 +199,13 @@ void Foam::PairCollision<CloudType>::wallInteraction() DynamicList<scalar> sharpSiteExclusionDistancesSqr; DynamicList<WallSiteData<vector>> sharpSiteData; - forAll(dil, realCellI) + forAll(dil, realCelli) { // The real wall faces in range of this real cell - const labelList& realWallFaces = directWallFaces[realCellI]; + const labelList& realWallFaces = directWallFaces[realCelli]; // Loop over all Parcels in cell - forAll(cellOccupancy[realCellI], cellParticleI) + forAll(cellOccupancy[realCelli], cellParticleI) { flatSitePoints.clear(); flatSiteExclusionDistancesSqr.clear(); @@ -218,7 +218,7 @@ void Foam::PairCollision<CloudType>::wallInteraction() sharpSiteData.clear(); typename CloudType::parcelType& p = - *cellOccupancy[realCellI][cellParticleI]; + *cellOccupancy[realCelli][cellParticleI]; const point& pos = p.position(); @@ -226,11 +226,11 @@ void Foam::PairCollision<CloudType>::wallInteraction() // real wallFace interactions - forAll(realWallFaces, realWallFaceI) + forAll(realWallFaces, realWallFacei) { - label realFaceI = realWallFaces[realWallFaceI]; + label realFacei = realWallFaces[realWallFacei]; - pointHit nearest = mesh.faces()[realFaceI].nearestPoint + pointHit nearest = mesh.faces()[realFacei].nearestPoint ( pos, mesh.points() @@ -238,7 +238,7 @@ void Foam::PairCollision<CloudType>::wallInteraction() if (nearest.distance() < r) { - vector normal = mesh.faceAreas()[realFaceI]; + vector normal = mesh.faceAreas()[realFacei]; normal /= mag(normal); @@ -249,15 +249,15 @@ void Foam::PairCollision<CloudType>::wallInteraction() scalar normalAlignment = normal & pW/(mag(pW) + SMALL); // Find the patchIndex and wallData for WallSiteData object - label patchi = patchID[realFaceI - mesh.nInternalFaces()]; + label patchi = patchID[realFacei - mesh.nInternalFaces()]; - label patchFaceI = - realFaceI - mesh.boundaryMesh()[patchi].start(); + label patchFacei = + realFacei - mesh.boundaryMesh()[patchi].start(); WallSiteData<vector> wSD ( patchi, - U.boundaryField()[patchi][patchFaceI] + U.boundaryField()[patchi][patchFacei] ); bool particleHit = false; @@ -303,7 +303,7 @@ void Foam::PairCollision<CloudType>::wallInteraction() if (particleHit) { bool keep = true; - this->owner().functions().postFace(p, realFaceI, keep); + this->owner().functions().postFace(p, realFacei, keep); this->owner().functions().postPatch ( p, @@ -319,14 +319,14 @@ void Foam::PairCollision<CloudType>::wallInteraction() // referred wallFace interactions // The labels of referred wall faces in range of this real cell - const labelList& cellRefWallFaces = il_.rwfilInverse()[realCellI]; + const labelList& cellRefWallFaces = il_.rwfilInverse()[realCelli]; forAll(cellRefWallFaces, rWFI) { - label refWallFaceI = cellRefWallFaces[rWFI]; + label refWallFacei = cellRefWallFaces[rWFI]; const referredWallFace& rwf = - il_.referredWallFaces()[refWallFaceI]; + il_.referredWallFaces()[refWallFacei]; const pointField& pts = rwf.points(); @@ -349,7 +349,7 @@ void Foam::PairCollision<CloudType>::wallInteraction() WallSiteData<vector> wSD ( rwf.patchIndex(), - il_.referredWallData()[refWallFaceI] + il_.referredWallData()[refWallFacei] ); bool particleHit = false; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C index c96e81ca610ad630ec964c7ee89e9790d4c80cb9..8336f8c88faee291935f9c98985295ecb07fdf9e 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C @@ -319,13 +319,13 @@ void Foam::CellZoneInjection<CloudType>::setPositionAndCell const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { position = positions_[parcelI]; cellOwner = injectorCells_[parcelI]; - tetFaceI = injectorTetFaces_[parcelI]; + tetFacei = injectorTetFaces_[parcelI]; tetPtI = injectorTetPts_[parcelI]; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.H index 343129837045aa79acb3b6a129f426d6bf7dad8d..c5cb05a957c6a0ea5c154742e9d4accf2a12b3bd 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.H @@ -156,7 +156,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C index 0e65b0e519a8e8a08d6ef52a5b6aeee5f21b8218..8e979312267df9dce59eb86f3488fd12ac7f3b30 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C @@ -240,7 +240,7 @@ void Foam::ConeInjection<CloudType>::setPositionAndCell const scalar, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { @@ -248,7 +248,7 @@ void Foam::ConeInjection<CloudType>::setPositionAndCell position = positionAxis_[i].first(); cellOwner = injectorCells_[i]; - tetFaceI = injectorTetFaces_[i]; + tetFacei = injectorTetFaces_[i]; tetPtI = injectorTetPts_[i]; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H index 56fb18d4135d4981f06585d7c3d3731fb7217b99..bacfaaa9977f2d17b0117f680d8c27c813d86ee2 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H @@ -170,7 +170,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C index a757a39f838645bf4dfb8e6cb5af979e936c5764..392f901f463de8eb5aed2e2691b876397549a983 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.C @@ -48,7 +48,7 @@ void Foam::ConeNozzleInjection<CloudType>::setInjectionMethod() this->findCellAtPosition ( injectorCell_, - tetFaceI_, + tetFacei_, tetPtI_, position_, false @@ -110,7 +110,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection duration_(readScalar(this->coeffDict().lookup("duration"))), position_(this->coeffDict().lookup("position")), injectorCell_(-1), - tetFaceI_(-1), + tetFacei_(-1), tetPtI_(-1), direction_(this->coeffDict().lookup("direction")), parcelsPerSecond_ @@ -214,7 +214,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection duration_(im.duration_), position_(im.position_), injectorCell_(im.injectorCell_), - tetFaceI_(im.tetFaceI_), + tetFacei_(im.tetFacei_), tetPtI_(im.tetPtI_), direction_(im.direction_), parcelsPerSecond_(im.parcelsPerSecond_), @@ -251,7 +251,7 @@ void Foam::ConeNozzleInjection<CloudType>::updateMesh() this->findCellAtPosition ( injectorCell_, - tetFaceI_, + tetFacei_, tetPtI_, position_ ); @@ -315,7 +315,7 @@ void Foam::ConeNozzleInjection<CloudType>::setPositionAndCell const scalar, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { @@ -330,7 +330,7 @@ void Foam::ConeNozzleInjection<CloudType>::setPositionAndCell { position = position_; cellOwner = injectorCell_; - tetFaceI = tetFaceI_; + tetFacei = tetFacei_; tetPtI = tetPtI_; break; @@ -345,7 +345,7 @@ void Foam::ConeNozzleInjection<CloudType>::setPositionAndCell this->findCellAtPosition ( cellOwner, - tetFaceI, + tetFacei, tetPtI, position, false diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H index 5b1e74a8eb1e36c18969b34a899d590172f14fd3..6a29c1cc1d4300871618cfc1f89c15a07508fca2 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeNozzleInjection/ConeNozzleInjection.H @@ -127,7 +127,7 @@ private: label injectorCell_; //- Index of tet face for injector cell - label tetFaceI_; + label tetFacei_; //- Index of tet point for injector cell label tetPtI_; @@ -242,7 +242,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C index 1b1087d4a25bfcf8e80af80e948b173826d11da2..eb93b942d993d4eab82a0e90845ea61ad0dbcef9 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C @@ -200,13 +200,13 @@ void Foam::FieldActivatedInjection<CloudType>::setPositionAndCell const scalar, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { position = positions_[parcelI]; cellOwner = injectorCells_[parcelI]; - tetFaceI = injectorTetFaces_[parcelI]; + tetFacei = injectorTetFaces_[parcelI]; tetPtI = injectorTetPts_[parcelI]; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H index 87cc0e84269ff64f8417d60bd7de5e0c6d1ca6f9..986f1b46b80bb991356c3cbd0d8bac287339dd10 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H @@ -173,7 +173,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C index 2ba1a5376570f04dd33775783a88a250ac7b78a3..2d6030b3059fd6f14134a16e41f5a03c1de1f9c2 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.C @@ -445,7 +445,7 @@ void Foam::InflationInjection<CloudType>::setPositionAndCell const scalar, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { @@ -454,7 +454,7 @@ void Foam::InflationInjection<CloudType>::setPositionAndCell this->findCellAtPosition ( cellOwner, - tetFaceI, + tetFacei, tetPtI, position, false diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.H index f408ac4728b0d045ee32452caa4bd42cc3e1978b..7f0bc21c2e6fc983fc5965f4da96462342a4834c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InflationInjection/InflationInjection.H @@ -169,7 +169,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 693b286ca252ded84341c1e14b3e5f19f41df577..acb710c85c22a23d91ab7c1e33c62b552b8947ac 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -92,7 +92,7 @@ template<class CloudType> bool Foam::InjectionModel<CloudType>::findCellAtPosition ( label& celli, - label& tetFaceI, + label& tetFacei, label& tetPtI, vector& position, bool errorOnNotFound @@ -106,31 +106,31 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition ( position, celli, - tetFaceI, + tetFacei, tetPtI ); - label procI = -1; + label proci = -1; if (celli >= 0) { - procI = Pstream::myProcNo(); + proci = Pstream::myProcNo(); } - reduce(procI, maxOp<label>()); + reduce(proci, maxOp<label>()); // Ensure that only one processor attempts to insert this Parcel - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { celli = -1; - tetFaceI = -1; + tetFacei = -1; tetPtI = -1; } // Last chance - find nearest cell and try that one - the point is // probably on an edge - if (procI == -1) + if (proci == -1) { celli = this->owner().mesh().findNearestCell(position); @@ -140,21 +140,21 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition if (this->owner().mesh().pointInCell(position, celli)) { - procI = Pstream::myProcNo(); + proci = Pstream::myProcNo(); } } - reduce(procI, maxOp<label>()); + reduce(proci, maxOp<label>()); - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { celli = -1; - tetFaceI = -1; + tetFacei = -1; tetPtI = -1; } } - if (procI == -1) + if (proci == -1) { if (errorOnNotFound) { @@ -442,7 +442,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td) // Determine the injection position and owner cell, // tetFace and tetPt label celli = -1; - label tetFaceI = -1; + label tetFacei = -1; label tetPtI = -1; vector pos = Zero; @@ -454,7 +454,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td) timeInj, pos, celli, - tetFaceI, + tetFacei, tetPtI ); @@ -468,7 +468,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td) // Create a new parcel parcelType* pPtr = - new parcelType(mesh, pos, celli, tetFaceI, tetPtI); + new parcelType(mesh, pos, celli, tetFacei, tetPtI); // Check/set new parcel thermo properties cloud.setParcelThermoProperties(*pPtr, dt); @@ -562,7 +562,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState // Determine the injection position and owner cell, // tetFace and tetPt label celli = -1; - label tetFaceI = -1; + label tetFacei = -1; label tetPtI = -1; vector pos = Zero; @@ -574,7 +574,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState 0.0, pos, celli, - tetFaceI, + tetFacei, tetPtI ); @@ -585,7 +585,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState // Create a new parcel parcelType* pPtr = - new parcelType(mesh, pos, celli, tetFaceI, tetPtI); + new parcelType(mesh, pos, celli, tetFacei, tetPtI); // Check/set new parcel thermo properties cloud.setParcelThermoProperties(*pPtr, 0.0); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H index 509f77300ea8e7f2a557458e5aab57e90e711bb9..9e219bca1015896bf6902b7243d3e9135ad08b52 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H @@ -159,7 +159,7 @@ protected: virtual bool findCellAtPosition ( label& celli, - label& tetFaceI, + label& tetFacei, label& tetPtI, vector& position, bool errorOnNotFound = true @@ -319,7 +319,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) = 0; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C index d53b781cdb48ffdde3aad8ada6829667228e0f39..3708cb89dc3cdd4c0875ed3b653a3ee2bba05dd6 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -175,7 +175,7 @@ void Foam::KinematicLookupTableInjection<CloudType>::setPositionAndCell const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { @@ -192,7 +192,7 @@ void Foam::KinematicLookupTableInjection<CloudType>::setPositionAndCell position = injectors_[injectorI].x(); cellOwner = injectorCells_[injectorI]; - tetFaceI = injectorTetFaces_[injectorI]; + tetFacei = injectorTetFaces_[injectorI]; tetPtI = injectorTetPts_[injectorI]; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H index b03a8b6617798989d40f7bc08e9dd2a10e805c3d..622ac451c03e6be6189fe381947266e8c88acd8b 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/KinematicLookupTableInjection/KinematicLookupTableInjection.H @@ -159,7 +159,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C index 418ad79e287b837d6ec5b62a0dc484dd2a2f6bc0..d19010de6f4ac9f7657c57a65f9869b82cb66af2 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -205,13 +205,13 @@ void Foam::ManualInjection<CloudType>::setPositionAndCell const scalar, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { position = positions_[parcelI]; cellOwner = injectorCells_[parcelI]; - tetFaceI = injectorTetFaces_[parcelI]; + tetFacei = injectorTetFaces_[parcelI]; tetPtI = injectorTetPts_[parcelI]; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H index 715e36214001773fff15c28589154a3dfc973483..b3e78f8c456861003f3b1aa83188df4534cf0c7e 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H @@ -150,7 +150,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H index 96ffac0d7135f6df6933942f63bb30175c48739a..ae8a082ba9cfda9530a823b13e79164431c216b8 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H @@ -105,7 +105,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C index b5dbd756ed4161124ffa79d484323fb35c454071..81be9ea9ceff69c05f886e0b030d62f46e059090 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.C @@ -217,7 +217,7 @@ void Foam::PatchFlowRateInjection<CloudType>::setPositionAndCell const scalar, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { @@ -227,7 +227,7 @@ void Foam::PatchFlowRateInjection<CloudType>::setPositionAndCell this->owner().rndGen(), position, cellOwner, - tetFaceI, + tetFacei, tetPtI ); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.H index 6525f092e62f02cb10ea84f1391beb57101981cc..d4c3ee15219196e5e0b8bc2eeeee34dea7730894 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchFlowRateInjection/PatchFlowRateInjection.H @@ -154,7 +154,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C index 1a214708323594c9d887241a549be0b9ec8a70de..ef10b640cf92a18ba9aefd364ed932380eee7e7a 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C @@ -175,7 +175,7 @@ void Foam::PatchInjection<CloudType>::setPositionAndCell const scalar, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { @@ -185,7 +185,7 @@ void Foam::PatchInjection<CloudType>::setPositionAndCell this->owner().rndGen(), position, cellOwner, - tetFaceI, + tetFacei, tetPtI ); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.H index 93f4c012d8ed9abfc7be746f5c48a46be1427786..7c02e416387668a233388600595df1e2a07bacc0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.H @@ -149,7 +149,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C index e48b9a7b5f22654b340b1ace86740004ade13472..82d56739dc19842dd3428545e25d47632313b3df 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C @@ -152,7 +152,7 @@ void Foam::patchInjectionBase::setPositionAndCell cachedRandom& rnd, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { @@ -168,21 +168,21 @@ void Foam::patchInjectionBase::setPositionAndCell if (cellOwners_.size() > 0) { // Determine which processor to inject from - label procI = 0; + label proci = 0; forAllReverse(sumTriMagSf_, i) { if (areaFraction >= sumTriMagSf_[i]) { - procI = i; + proci = i; break; } } - if (Pstream::myProcNo() == procI) + if (Pstream::myProcNo() == proci) { // Find corresponding decomposed face triangle label triI = 0; - scalar offset = sumTriMagSf_[procI]; + scalar offset = sumTriMagSf_[proci]; forAllReverse(triCumulativeMagSf_, i) { if (areaFraction > triCumulativeMagSf_[i] + offset) @@ -215,13 +215,13 @@ void Foam::patchInjectionBase::setPositionAndCell // first face of the cell as the tetFace and the first point after // the base point on the face as the tetPt. The tracking will pick // the cell consistent with the motion in the first tracking step - tetFaceI = mesh.cells()[cellOwner][0]; + tetFacei = mesh.cells()[cellOwner][0]; tetPtI = 1; } else { cellOwner = -1; - tetFaceI = -1; + tetFacei = -1; tetPtI = -1; // Dummy position @@ -231,7 +231,7 @@ void Foam::patchInjectionBase::setPositionAndCell else { cellOwner = -1; - tetFaceI = -1; + tetFacei = -1; tetPtI = -1; // Dummy position diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.H index b11f2790b0a668b1f9af0ecd10c74b1585fe166d..e6fdd27c9c818815a2ab08d71960eb5ea7c2d277 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -120,7 +120,7 @@ public: cachedRandom& rnd, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H index 6e1bd9dc7676d24163273f5ae227dfe97672de6b..4a3fc10b0648f7f1fec5365ab67c180c1ae07d5f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/NoSurfaceFilm/NoSurfaceFilm.H @@ -107,7 +107,7 @@ public: virtual void setParcelProperties ( parcelType& p, - const label filmCellI + const label filmCelli ) const; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C index 63bd255e546930a3a21101528b4bab00166b381d..b5216521248f88a647dc86188862a9add101e454 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C @@ -129,16 +129,16 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td) forAll(filmPatches, i) { - const label filmPatchI = filmPatches[i]; - const label primaryPatchI = primaryPatches[i]; + const label filmPatchi = filmPatches[i]; + const label primaryPatchi = primaryPatches[i]; - const labelList& injectorCellsPatch = pbm[primaryPatchI].faceCells(); + const labelList& injectorCellsPatch = pbm[primaryPatchi].faceCells(); - cacheFilmFields(filmPatchI, primaryPatchI, filmModel); + cacheFilmFields(filmPatchi, primaryPatchi, filmModel); - const vectorField& Cf = mesh.C().boundaryField()[primaryPatchI]; - const vectorField& Sf = mesh.Sf().boundaryField()[primaryPatchI]; - const scalarField& magSf = mesh.magSf().boundaryField()[primaryPatchI]; + const vectorField& Cf = mesh.C().boundaryField()[primaryPatchi]; + const vectorField& Sf = mesh.Sf().boundaryField()[primaryPatchi]; + const scalarField& magSf = mesh.magSf().boundaryField()[primaryPatchi]; forAll(injectorCellsPatch, j) { @@ -151,7 +151,7 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td) // tetFace and the first point on the face after the base // point as the tetPt. The tracking will pick the cell // consistent with the motion in the first tracking step. - const label tetFaceI = this->owner().mesh().cells()[celli][0]; + const label tetFacei = this->owner().mesh().cells()[celli][0]; const label tetPtI = 1; // const point& pos = this->owner().mesh().C()[celli]; @@ -160,7 +160,7 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td) max ( diameterParcelPatch_[j], - deltaFilmPatch_[primaryPatchI][j] + deltaFilmPatch_[primaryPatchi][j] ); const point pos = Cf[j] - 1.1*offset*Sf[j]/magSf[j]; @@ -171,7 +171,7 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td) this->owner().pMesh(), pos, celli, - tetFaceI, + tetFacei, tetPtI ); @@ -205,27 +205,27 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td) template<class CloudType> void Foam::SurfaceFilmModel<CloudType>::cacheFilmFields ( - const label filmPatchI, - const label primaryPatchI, + const label filmPatchi, + const label primaryPatchi, const regionModels::surfaceFilmModels::surfaceFilmModel& filmModel ) { - massParcelPatch_ = filmModel.cloudMassTrans().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, massParcelPatch_); + massParcelPatch_ = filmModel.cloudMassTrans().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, massParcelPatch_); diameterParcelPatch_ = - filmModel.cloudDiameterTrans().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, diameterParcelPatch_, maxEqOp<scalar>()); + filmModel.cloudDiameterTrans().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, diameterParcelPatch_, maxEqOp<scalar>()); - UFilmPatch_ = filmModel.Us().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, UFilmPatch_); + UFilmPatch_ = filmModel.Us().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, UFilmPatch_); - rhoFilmPatch_ = filmModel.rho().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, rhoFilmPatch_); + rhoFilmPatch_ = filmModel.rho().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, rhoFilmPatch_); - deltaFilmPatch_[primaryPatchI] = - filmModel.delta().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, deltaFilmPatch_[primaryPatchI]); + deltaFilmPatch_[primaryPatchi] = + filmModel.delta().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, deltaFilmPatch_[primaryPatchi]); } @@ -233,16 +233,16 @@ template<class CloudType> void Foam::SurfaceFilmModel<CloudType>::setParcelProperties ( parcelType& p, - const label filmFaceI + const label filmFacei ) const { // Set parcel properties - scalar vol = mathematical::pi/6.0*pow3(diameterParcelPatch_[filmFaceI]); - p.d() = diameterParcelPatch_[filmFaceI]; - p.U() = UFilmPatch_[filmFaceI]; - p.rho() = rhoFilmPatch_[filmFaceI]; + scalar vol = mathematical::pi/6.0*pow3(diameterParcelPatch_[filmFacei]); + p.d() = diameterParcelPatch_[filmFacei]; + p.U() = UFilmPatch_[filmFacei]; + p.rho() = rhoFilmPatch_[filmFacei]; - p.nParticle() = massParcelPatch_[filmFaceI]/p.rho()/vol; + p.nParticle() = massParcelPatch_[filmFacei]/p.rho()/vol; if (ejectedParcelType_ >= 0) { diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H index 03fbffe3da077687263d965bb28c91b2ab754e64..573756aa1c4b60df8d26785124813bee3d38b525 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H @@ -112,8 +112,8 @@ protected: //- Cache the film fields in preparation for injection virtual void cacheFilmFields ( - const label filmPatchI, - const label primaryPatchI, + const label filmPatchi, + const label primaryPatchi, const regionModels::surfaceFilmModels::surfaceFilmModel& filmModel ); @@ -121,7 +121,7 @@ protected: virtual void setParcelProperties ( parcelType& p, - const label filmFaceI + const label filmFacei ) const; diff --git a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C index 1259da7e3718318cd6683b9bc8effe47d8300fea..f0b33169cdbc25bfdb385751bb3adf8089fe5508 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C +++ b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -174,7 +174,7 @@ void Foam::ReactingLookupTableInjection<CloudType>::setPositionAndCell const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { @@ -191,7 +191,7 @@ void Foam::ReactingLookupTableInjection<CloudType>::setPositionAndCell position = injectors_[injectorI].x(); cellOwner = injectorCells_[injectorI]; - tetFaceI = injectorTetFaces_[injectorI]; + tetFacei = injectorTetFaces_[injectorI]; tetPtI = injectorTetPts_[injectorI]; } diff --git a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H index 08b9d327559c069c1a8295ff53ce1c800056fd9c..4d18307b48e523d11a6654b2c9a0317fe9163b9d 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H +++ b/src/lagrangian/intermediate/submodels/Reacting/InjectionModel/ReactingLookupTableInjection/ReactingLookupTableInjection.H @@ -159,7 +159,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.C index 179b846cafab2f17428ea898ada2699654d7ded4..9db4d1cd2d0b41789ec535595115992f0af89151 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -180,7 +180,7 @@ void Foam::ReactingMultiphaseLookupTableInjection<CloudType>::setPositionAndCell const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { @@ -197,7 +197,7 @@ void Foam::ReactingMultiphaseLookupTableInjection<CloudType>::setPositionAndCell position = injectors_[injectorI].x(); cellOwner = injectorCells_[injectorI]; - tetFaceI = injectorTetFaces_[injectorI]; + tetFacei = injectorTetFaces_[injectorI]; tetPtI = injectorTetPts_[injectorI]; } diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.H index 6d1f9b7f2eb4b5bb054458b5f5f7a8244480cc17..9a01e6314cb70c6bf8c140ea19f9a0e1c92e3d51 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/InjectionModel/ReactingMultiphaseLookupTableInjection/ReactingMultiphaseLookupTableInjection.H @@ -161,7 +161,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C index 682fc9c3ea1951c306da3672dabf1f8f276bb156..35e14f2682ea67c4a7f73c618963b3f5413057f1 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -175,7 +175,7 @@ void Foam::ThermoLookupTableInjection<CloudType>::setPositionAndCell const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ) { @@ -192,7 +192,7 @@ void Foam::ThermoLookupTableInjection<CloudType>::setPositionAndCell position = injectors_[injectorI].x(); cellOwner = injectorCells_[injectorI]; - tetFaceI = injectorTetFaces_[injectorI]; + tetFacei = injectorTetFaces_[injectorI]; tetPtI = injectorTetPts_[injectorI]; } diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H index 0f77e61be2a96b35b158315e0a2194c322975815..4fb4b10dcdea4d5cd63172229f9e50635a2f00bc 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/InjectionModel/ThermoLookupTableInjection/ThermoLookupTableInjection.H @@ -159,7 +159,7 @@ public: const scalar time, vector& position, label& cellOwner, - label& tetFaceI, + label& tetFacei, label& tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C index d2c8512fc099918e4e649169dac504cedf5ba7b4..d157d6836f588d7c17453f27c2c1c2f229887042 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C @@ -623,23 +623,23 @@ bool Foam::ThermoSurfaceFilm<CloudType>::transferParcel template<class CloudType> void Foam::ThermoSurfaceFilm<CloudType>::cacheFilmFields ( - const label filmPatchI, - const label primaryPatchI, + const label filmPatchi, + const label primaryPatchi, const regionModels::surfaceFilmModels::surfaceFilmModel& filmModel ) { SurfaceFilmModel<CloudType>::cacheFilmFields ( - filmPatchI, - primaryPatchI, + filmPatchi, + primaryPatchi, filmModel ); - TFilmPatch_ = filmModel.Ts().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, TFilmPatch_); + TFilmPatch_ = filmModel.Ts().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, TFilmPatch_); - CpFilmPatch_ = filmModel.Cp().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, CpFilmPatch_); + CpFilmPatch_ = filmModel.Cp().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, CpFilmPatch_); } @@ -647,14 +647,14 @@ template<class CloudType> void Foam::ThermoSurfaceFilm<CloudType>::setParcelProperties ( parcelType& p, - const label filmFaceI + const label filmFacei ) const { - SurfaceFilmModel<CloudType>::setParcelProperties(p, filmFaceI); + SurfaceFilmModel<CloudType>::setParcelProperties(p, filmFacei); // Set parcel properties - p.T() = TFilmPatch_[filmFaceI]; - p.Cp() = CpFilmPatch_[filmFaceI]; + p.T() = TFilmPatch_[filmFacei]; + p.Cp() = CpFilmPatch_[filmFacei]; } diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H index 6dd9acc3ab9df4f34cf8d389f4aaa914cdef3139..afbc7978fb02bec4422bc630e50c759778c6617c 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H @@ -225,8 +225,8 @@ protected: //- Cache the film fields in preparation for injection virtual void cacheFilmFields ( - const label filmPatchI, - const label primaryPatchI, + const label filmPatchi, + const label primaryPatchi, const regionModels::surfaceFilmModels::surfaceFilmModel& filmModel ); @@ -235,7 +235,7 @@ protected: virtual void setParcelProperties ( parcelType& p, - const label filmFaceI + const label filmFacei ) const; diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H index 96ebcb757247813610c288c1a69db14df23c8016..5fb73664d660790055c9a8d5b1adcb98fc7f53ee 100644 --- a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H +++ b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H @@ -233,7 +233,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const tensor& Q, const vector& v, diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H index 56958573d9ab5444e27757d89e5e8cbd3c3faecb..c9c4077949a2a9709c9ff7917521e6358024de35 100644 --- a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H +++ b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H @@ -222,7 +222,7 @@ inline Foam::molecule::molecule const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const tensor& Q, const vector& v, @@ -236,7 +236,7 @@ inline Foam::molecule::molecule ) : - particle(mesh, position, celli, tetFaceI, tetPtI), + particle(mesh, position, celli, tetFacei, tetPtI), Q_(Q), v_(v), a_(a), diff --git a/src/lagrangian/solidParticle/solidParticle.H b/src/lagrangian/solidParticle/solidParticle.H index dc15d37bb0d7a1e3aab129de988854019fd4dc97..57cf8edacad7be7effa1a781b307dbb37cfe2fe1 100644 --- a/src/lagrangian/solidParticle/solidParticle.H +++ b/src/lagrangian/solidParticle/solidParticle.H @@ -124,7 +124,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const scalar d, const vector& U diff --git a/src/lagrangian/solidParticle/solidParticleI.H b/src/lagrangian/solidParticle/solidParticleI.H index 2e0e9e6658f3b460174b4b980a2b76d3b71a53a9..f1074b7298ba7447c359e609a054b6487d1ddece 100644 --- a/src/lagrangian/solidParticle/solidParticleI.H +++ b/src/lagrangian/solidParticle/solidParticleI.H @@ -47,13 +47,13 @@ inline Foam::solidParticle::solidParticle const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const scalar d, const vector& U ) : - particle(mesh, position, celli, tetFaceI, tetPtI), + particle(mesh, position, celli, tetFacei, tetPtI), d_(d), U_(U) {} diff --git a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloudI.H b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloudI.H index bd0ebdc0dce1b409e5d1d9ac4aa2af802cad8f72..8ff701eea8d45beaa62cb92f3201ccb2422203cb 100644 --- a/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloudI.H +++ b/src/lagrangian/spray/clouds/Templates/SprayCloud/SprayCloudI.H @@ -131,22 +131,22 @@ inline Foam::scalar Foam::SprayCloud<CloudType>::penetration // flatten the mass lists List<scalar> allMass(nParcelSum, 0.0); SortableList<scalar> allDist(nParcelSum, 0.0); - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { SubList<scalar> ( allMass, - globalParcels.localSize(procI), - globalParcels.offset(procI) - ) = procMass[procI]; + globalParcels.localSize(proci), + globalParcels.offset(proci) + ) = procMass[proci]; // flatten the distance list SubList<scalar> ( allDist, - globalParcels.localSize(procI), - globalParcels.offset(procI) - ) = procDist[procI]; + globalParcels.localSize(proci), + globalParcels.offset(proci) + ) = procDist[proci]; } // sort allDist distances into ascending order diff --git a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H index 303445401f243e2255b59ab34b6687dce4605192..056c2b666903d9c0112821a5826bf7ed0d09d88f 100644 --- a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H +++ b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H @@ -191,7 +191,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ); @@ -201,7 +201,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, diff --git a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelI.H b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelI.H index 9e37d9e52524a08d7f58c7e611e1c03f62a343ea..526341eaf2ec03a77f39a6c673b28dab786a4c6e 100644 --- a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelI.H +++ b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelI.H @@ -109,11 +109,11 @@ inline Foam::SprayParcel<ParcelType>::SprayParcel const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI ) : - ParcelType(mesh, position, celli, tetFaceI, tetPtI), + ParcelType(mesh, position, celli, tetFacei, tetPtI), d0_(this->d()), position0_(position), sigma_(0.0), @@ -136,7 +136,7 @@ inline Foam::SprayParcel<ParcelType>::SprayParcel const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label typeId, const scalar nParticle0, @@ -164,7 +164,7 @@ inline Foam::SprayParcel<ParcelType>::SprayParcel mesh, position, celli, - tetFaceI, + tetFacei, tetPtI, typeId, nParticle0, diff --git a/src/mesh/blockMesh/blockMesh/blockMeshCreate.C b/src/mesh/blockMesh/blockMesh/blockMeshCreate.C index 99a9f1f2f186073024ffc29ba911e579f09c7abb..36bd5e3b6cad7f7675512ff519e75a5c7fec5153 100644 --- a/src/mesh/blockMesh/blockMesh/blockMeshCreate.C +++ b/src/mesh/blockMesh/blockMesh/blockMeshCreate.C @@ -118,16 +118,16 @@ void Foam::blockMesh::createCells() const { const labelListList& blockCells = blocks[blockI].cells(); - forAll(blockCells, blockCellI) + forAll(blockCells, blockCelli) { - labelList cellPoints(blockCells[blockCellI].size()); + labelList cellPoints(blockCells[blockCelli].size()); forAll(cellPoints, cellPointI) { cellPoints[cellPointI] = mergeList_ [ - blockCells[blockCellI][cellPointI] + blockCells[blockCelli][cellPointI] + blockOffsets_[blockI] ]; } diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C index 88763c45bca3da75d75b681b18c8c246e96ee426..55a0bdd37542027a03a5735949c3d332266af4a8 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C @@ -107,11 +107,11 @@ Foam::medialAxisMeshMover::getPatch { const polyPatch& pp = patches[patchIDs[i]]; - label meshFaceI = pp.start(); + label meshFacei = pp.start(); forAll(pp, i) { - addressing[nFaces++] = meshFaceI++; + addressing[nFaces++] = meshFacei++; } } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index 8cfe8c94ec66e1c39fcca4194ea966f77e911987..40edd95c45462bb68e4adc5de2e8b12f79d0d10c 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -149,15 +149,15 @@ void Foam::meshRefinement::calcNeighbourData const vectorField::subField faceCentres = pp.faceCentres(); const vectorField::subField faceAreas = pp.faceAreas(); - label bFaceI = pp.start()-mesh_.nInternalFaces(); + label bFacei = pp.start()-mesh_.nInternalFaces(); if (pp.coupled()) { forAll(faceCells, i) { - neiLevel[bFaceI] = cellLevel[faceCells[i]]; - neiCc[bFaceI] = cellCentres[faceCells[i]]; - bFaceI++; + neiLevel[bFacei] = cellLevel[faceCells[i]]; + neiCc[bFacei] = cellCentres[faceCells[i]]; + bFacei++; } } else if (addedPatchIDSet.found(patchi)) @@ -184,19 +184,19 @@ void Foam::meshRefinement::calcNeighbourData // Other cell more refined. Adjust normal distance d *= 0.5; } - neiLevel[bFaceI] = faceLevel; + neiLevel[bFacei] = faceLevel; // Calculate other cell centre by extrapolation - neiCc[bFaceI] = faceCentres[i] + d*fn; - bFaceI++; + neiCc[bFacei] = faceCentres[i] + d*fn; + bFacei++; } } else { forAll(faceCells, i) { - neiLevel[bFaceI] = cellLevel[faceCells[i]]; - neiCc[bFaceI] = faceCentres[i]; - bFaceI++; + neiLevel[bFacei] = cellLevel[faceCells[i]]; + neiCc[bFacei] = faceCentres[i]; + bFacei++; } } } @@ -799,8 +799,8 @@ Pout<< "face:" << facei << " verts:" << f newSplitFaces.setSize(2*sz); forAll(map().faceMap(), facei) { - label oldFaceI = map().faceMap()[facei]; - if (oldToNew[oldFaceI] != facei) + label oldFacei = map().faceMap()[facei]; + if (oldToNew[oldFacei] != facei) { // Added face newSplitFaces[sz++] = facei; @@ -842,7 +842,7 @@ Pout<< "face:" << facei << " verts:" << f // // this face then through another. // // label celli = mesh_.faceOwner()[facei]; -// label globalCellI = globalCells.toGlobal(celli); +// label globalCelli = globalCells.toGlobal(celli); // // Map<label>::iterator iter = // regionToMaster.find(globalRegion[celli]); @@ -850,14 +850,14 @@ Pout<< "face:" << facei << " verts:" << f // if (iter != regionToMaster.end()) // { // label master = iter(); -// iter() = min(master, globalCellI); +// iter() = min(master, globalCelli); // } // else // { // regionToMaster.insert // ( // globalRegion[celli], -// globalCellI +// globalCelli // ); // } // } @@ -1016,13 +1016,13 @@ Pout<< "face:" << facei << " verts:" << f // // Transfer lists. // PtrList<HashSet<edge, Hash<edge>>> regionConnectivity // (Pstream::nProcs()); -// forAll(regionConnectivity, procI) +// forAll(regionConnectivity, proci) // { -// if (procI != Pstream::myProcNo()) +// if (proci != Pstream::myProcNo()) // { // regionConnectivity.set // ( -// procI, +// proci, // new HashSet<edge, Hash<edge>> // ( // coupledRegionToShifted.size() @@ -1097,34 +1097,34 @@ Pout<< "face:" << facei << " verts:" << f // // // // Send -// forAll(regionConnectivity, procI) +// forAll(regionConnectivity, proci) // { -// if (procI != Pstream::myProcNo()) +// if (proci != Pstream::myProcNo()) // { -// OPstream str(Pstream::blocking, procI); -// str << regionConnectivity[procI]; +// OPstream str(Pstream::blocking, proci); +// str << regionConnectivity[proci]; // } // } // // Receive -// forAll(regionConnectivity, procI) +// forAll(regionConnectivity, proci) // { -// if (procI != Pstream::myProcNo()) +// if (proci != Pstream::myProcNo()) // { -// IPstream str(Pstream::blocking, procI); -// str >> regionConnectivity[procI]; +// IPstream str(Pstream::blocking, proci); +// str >> regionConnectivity[proci]; // } // } // // // Add to addressing. -// forAll(regionConnectivity, procI) +// forAll(regionConnectivity, proci) // { -// if (procI != Pstream::myProcNo()) +// if (proci != Pstream::myProcNo()) // { // for // ( // HashSet<edge, Hash<edge>>::const_iterator iter = -// regionConnectivity[procI].begin(); -// iter != regionConnectivity[procI].end(); +// regionConnectivity[proci].begin(); +// iter != regionConnectivity[proci].end(); // ++iter // ) // { @@ -1147,7 +1147,7 @@ Pout<< "face:" << facei << " verts:" << f // if (!someLocal) // { // FatalErrorInFunction -// << "Received from processor " << procI +// << "Received from processor " << proci // << " connection " << e // << " where none of the elements is local to me." // << abort(FatalError); @@ -1571,9 +1571,9 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance // Pstream::listCombineScatter(nProcCells); // // Info<< "Calculated decomposition:" << endl; - // forAll(nProcCells, procI) + // forAll(nProcCells, proci) // { - // Info<< " " << procI << '\t' << nProcCells[procI] + // Info<< " " << proci << '\t' << nProcCells[proci] // << endl; // } // Info<< endl; @@ -1627,9 +1627,9 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance Pstream::listCombineScatter(nProcCells); Pout<< "Wanted resulting decomposition:" << endl; - forAll(nProcCells, procI) + forAll(nProcCells, proci) { - Pout<< " " << procI << '\t' << nProcCells[procI] << endl; + Pout<< " " << proci << '\t' << nProcCells[proci] << endl; } Pout<< endl; } @@ -1769,11 +1769,11 @@ Foam::autoPtr<Foam::indirectPrimitivePatch> Foam::meshRefinement::makePatch { const polyPatch& pp = patches[patchIDs[i]]; - label meshFaceI = pp.start(); + label meshFacei = pp.start(); forAll(pp, i) { - addressing[nFaces++] = meshFaceI++; + addressing[nFaces++] = meshFacei++; } } @@ -1859,16 +1859,16 @@ void Foam::meshRefinement::checkCoupledFaceZones(const polyMesh& mesh) Pstream::gatherList(zoneNames); Pstream::scatterList(zoneNames); // All have same data now. Check. - forAll(zoneNames, procI) + forAll(zoneNames, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - if (zoneNames[procI] != zoneNames[Pstream::myProcNo()]) + if (zoneNames[proci] != zoneNames[Pstream::myProcNo()]) { FatalErrorInFunction << "faceZones are not synchronised on processors." << nl - << "Processor " << procI << " has faceZones " - << zoneNames[procI] << nl + << "Processor " << proci << " has faceZones " + << zoneNames[proci] << nl << "Processor " << Pstream::myProcNo() << " has faceZones " << zoneNames[Pstream::myProcNo()] << nl @@ -1888,15 +1888,15 @@ void Foam::meshRefinement::checkCoupledFaceZones(const polyMesh& mesh) forAll(fZone, i) { - label bFaceI = fZone[i]-mesh.nInternalFaces(); + label bFacei = fZone[i]-mesh.nInternalFaces(); - if (bFaceI >= 0) + if (bFacei >= 0) { - if (faceToZone[bFaceI] == -1) + if (faceToZone[bFacei] == -1) { - faceToZone[bFaceI] = zoneI; + faceToZone[bFacei] = zoneI; } - else if (faceToZone[bFaceI] == zoneI) + else if (faceToZone[bFacei] == zoneI) { FatalErrorInFunction << "Face " << fZone[i] << " in zone " @@ -1910,7 +1910,7 @@ void Foam::meshRefinement::checkCoupledFaceZones(const polyMesh& mesh) << "Face " << fZone[i] << " in zone " << fZone.name() << " is also in zone " - << fZones[faceToZone[bFaceI]].name() + << fZones[faceToZone[bFacei]].name() << abort(FatalError); } } @@ -1993,7 +1993,7 @@ void Foam::meshRefinement::calculateEdgeWeights Foam::label Foam::meshRefinement::appendPatch ( fvMesh& mesh, - const label insertPatchI, + const label insertPatchi, const word& patchName, const dictionary& patchDict ) @@ -2016,7 +2016,7 @@ Foam::label Foam::meshRefinement::appendPatch ( patchName, patchDict, - insertPatchI, + insertPatchi, polyPatches ) ); @@ -2108,8 +2108,8 @@ Foam::label Foam::meshRefinement::addPatch } - label insertPatchI = polyPatches.size(); - label startFaceI = mesh.nFaces(); + label insertPatchi = polyPatches.size(); + label startFacei = mesh.nFaces(); forAll(polyPatches, patchi) { @@ -2117,36 +2117,36 @@ Foam::label Foam::meshRefinement::addPatch if (isA<processorPolyPatch>(pp)) { - insertPatchI = patchi; - startFaceI = pp.start(); + insertPatchi = patchi; + startFacei = pp.start(); break; } } dictionary patchDict(patchInfo); patchDict.set("nFaces", 0); - patchDict.set("startFace", startFaceI); + patchDict.set("startFace", startFacei); // Below is all quite a hack. Feel free to change once there is a better // mechanism to insert and reorder patches. - label addedPatchI = appendPatch(mesh, insertPatchI, patchName, patchDict); + label addedPatchi = appendPatch(mesh, insertPatchi, patchName, patchDict); // Create reordering list // patches before insert position stay as is - labelList oldToNew(addedPatchI+1); - for (label i = 0; i < insertPatchI; i++) + labelList oldToNew(addedPatchi+1); + for (label i = 0; i < insertPatchi; i++) { oldToNew[i] = i; } // patches after insert position move one up - for (label i = insertPatchI; i < addedPatchI; i++) + for (label i = insertPatchi; i < addedPatchi; i++) { oldToNew[i] = i+1; } // appended patch gets moved to insert position - oldToNew[addedPatchI] = insertPatchI; + oldToNew[addedPatchi] = insertPatchi; // Shuffle into place polyPatches.reorder(oldToNew, true); @@ -2163,7 +2163,7 @@ Foam::label Foam::meshRefinement::addPatch reorderPatchFields<surfaceSymmTensorField>(mesh, oldToNew); reorderPatchFields<surfaceTensorField>(mesh, oldToNew); - return insertPatchI; + return insertPatchi; } @@ -2524,11 +2524,11 @@ void Foam::meshRefinement::updateMesh forAll(newFaceData, facei) { - label oldFaceI = map.faceMap()[facei]; + label oldFacei = map.faceMap()[facei]; - if (oldFaceI >= 0 && map.reverseFaceMap()[oldFaceI] == facei) + if (oldFacei >= 0 && map.reverseFaceMap()[oldFacei] == facei) { - newFaceData[facei] = data[oldFaceI]; + newFaceData[facei] = data[oldFacei]; } } data.transfer(newFaceData); @@ -2544,14 +2544,14 @@ void Foam::meshRefinement::updateMesh forAll(map.faceMap(), facei) { - label oldFaceI = map.faceMap()[facei]; + label oldFacei = map.faceMap()[facei]; - if (oldFaceI >= 0) + if (oldFacei >= 0) { - if (reverseFaceMap[oldFaceI] != facei) + if (reverseFaceMap[oldFacei] != facei) { // facei is slave face. Mark old face. - reverseFaceMap[oldFaceI] = -1; + reverseFaceMap[oldFacei] = -1; } } } @@ -2560,13 +2560,13 @@ void Foam::meshRefinement::updateMesh labelList newFaceData(map.faceMap().size(), -1); forAll(newFaceData, facei) { - label oldFaceI = map.faceMap()[facei]; + label oldFacei = map.faceMap()[facei]; - if (oldFaceI >= 0) + if (oldFacei >= 0) { - if (reverseFaceMap[oldFaceI] == facei) + if (reverseFaceMap[oldFacei] == facei) { - newFaceData[facei] = data[oldFaceI]; + newFaceData[facei] = data[oldFacei]; } } } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H index 5d38ccdebc82dee357a780ce95632e2e2bfb2a47..b367f7bff5d9564afdd7bf8026ff23be17394544 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H @@ -237,7 +237,7 @@ private: autoPtr<mapPolyMesh> removeInsideCells ( const string& msg, - const label exposedPatchI + const label exposedPatchi ); @@ -901,7 +901,7 @@ public: static label appendPatch ( fvMesh&, - const label insertPatchI, + const label insertPatchi, const word&, const dictionary& ); diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C index 3ad7c9e8a8fef81cd1c11dd83f663a4d340d587c..3bba0de30b517571613de77f0d42333a46484f7c 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C @@ -86,7 +86,7 @@ Foam::label Foam::meshRefinement::createBaffle ); - label dupFaceI = -1; + label dupFacei = -1; if (mesh_.isInternalFace(facei)) { @@ -104,7 +104,7 @@ Foam::label Foam::meshRefinement::createBaffle reverseFlip = !zoneFlip; } - dupFaceI = meshMod.setAction + dupFacei = meshMod.setAction ( polyAddFace ( @@ -121,7 +121,7 @@ Foam::label Foam::meshRefinement::createBaffle ) ); } - return dupFaceI; + return dupFacei; } @@ -441,11 +441,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles const labelList& faceMap = map().faceMap(); // Pick up owner side of baffle - forAll(ownPatch, oldFaceI) + forAll(ownPatch, oldFacei) { - label facei = reverseFaceMap[oldFaceI]; + label facei = reverseFaceMap[oldFacei]; - if (ownPatch[oldFaceI] != -1 && facei >= 0) + if (ownPatch[oldFacei] != -1 && facei >= 0) { const cell& ownFaces = mesh_.cells()[mesh_.faceOwner()[facei]]; @@ -458,9 +458,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles // Pick up neighbour side of baffle (added faces) forAll(faceMap, facei) { - label oldFaceI = faceMap[facei]; + label oldFacei = faceMap[facei]; - if (oldFaceI >= 0 && reverseFaceMap[oldFaceI] != facei) + if (oldFacei >= 0 && reverseFaceMap[oldFacei] != facei) { const cell& ownFaces = mesh_.cells()[mesh_.faceOwner()[facei]]; @@ -567,20 +567,20 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createZoneBaffles forAll(faceMap, facei) { - label oldFaceI = faceMap[facei]; + label oldFacei = faceMap[facei]; // Does face originate from face-to-patch Map<labelPair>::const_iterator iter = faceToPatch.find ( - oldFaceI + oldFacei ); if (iter != faceToPatch.end()) { - label masterFaceI = reverseFaceMap[oldFaceI]; - if (facei != masterFaceI) + label masterFacei = reverseFaceMap[oldFacei]; + if (facei != masterFacei) { - baffles[baffleI++] = labelPair(masterFaceI, facei); + baffles[baffleI++] = labelPair(masterFacei, facei); } } } @@ -1837,9 +1837,9 @@ void Foam::meshRefinement::calcPatchNumMasterFaces forAll(patch.addressing(), facei) { - const label meshFaceI = patch.addressing()[facei]; + const label meshFacei = patch.addressing()[facei]; - if (isMasterFace[meshFaceI]) + if (isMasterFace[meshFacei]) { const labelList& fEdges = patch.faceEdges()[facei]; forAll(fEdges, fEdgeI) @@ -1928,23 +1928,23 @@ Foam::label Foam::meshRefinement::markPatchZones break; } - label procI = globalFaces.whichProcID(globalSeed); - label seedFaceI = globalFaces.toLocal(procI, globalSeed); + label proci = globalFaces.whichProcID(globalSeed); + label seedFacei = globalFaces.toLocal(proci, globalSeed); //Info<< "Seeding zone " << currentZoneI - // << " from processor " << procI << " face " << seedFaceI + // << " from processor " << proci << " face " << seedFacei // << endl; - if (procI == Pstream::myProcNo()) + if (proci == Pstream::myProcNo()) { - patchEdgeFaceRegion& faceInfo = allFaceInfo[seedFaceI]; + patchEdgeFaceRegion& faceInfo = allFaceInfo[seedFacei]; // Set face faceInfo = currentZoneI; // .. and seed its edges - const labelList& fEdges = patch.faceEdges()[seedFaceI]; + const labelList& fEdges = patch.faceEdges()[seedFacei]; forAll(fEdges, fEdgeI) { label edgeI = fEdges[fEdgeI]; @@ -1958,7 +1958,7 @@ Foam::label Foam::meshRefinement::markPatchZones mesh_, patch, edgeI, - seedFaceI, + seedFacei, faceInfo, tol, dummyTrackData @@ -2039,14 +2039,14 @@ void Foam::meshRefinement::consistentOrientation forAll(patch.addressing(), facei) { - const label meshFaceI = patch.addressing()[facei]; - const label patchi = bm.whichPatch(meshFaceI); + const label meshFacei = patch.addressing()[facei]; + const label patchi = bm.whichPatch(meshFacei); if ( patchi != -1 && bm[patchi].coupled() - && !isMasterFace[meshFaceI] + && !isMasterFace[meshFacei] ) { // Slave side. Mark so doesn't get visited. @@ -2110,28 +2110,28 @@ void Foam::meshRefinement::consistentOrientation break; } - label procI = globalFaces.whichProcID(globalSeed); - label seedFaceI = globalFaces.toLocal(procI, globalSeed); + label proci = globalFaces.whichProcID(globalSeed); + label seedFacei = globalFaces.toLocal(proci, globalSeed); - //Info<< "Seeding from processor " << procI << " face " << seedFaceI + //Info<< "Seeding from processor " << proci << " face " << seedFacei // << endl; - if (procI == Pstream::myProcNo()) + if (proci == Pstream::myProcNo()) { // Determine orientation of seedFace - patchFaceOrientation& faceInfo = allFaceInfo[seedFaceI]; + patchFaceOrientation& faceInfo = allFaceInfo[seedFacei]; // Start off with correct orientation faceInfo = orientedSurface::NOFLIP; - if (zoneToOrientation[faceToZone[seedFaceI]] < 0) + if (zoneToOrientation[faceToZone[seedFacei]] < 0) { faceInfo.flip(); } - const labelList& fEdges = patch.faceEdges()[seedFaceI]; + const labelList& fEdges = patch.faceEdges()[seedFacei]; forAll(fEdges, fEdgeI) { label edgeI = fEdges[fEdgeI]; @@ -2145,7 +2145,7 @@ void Foam::meshRefinement::consistentOrientation mesh_, patch, edgeI, - seedFaceI, + seedFacei, faceInfo, tol, dummyTrackData @@ -2194,10 +2194,10 @@ void Foam::meshRefinement::consistentOrientation forAll(patch.addressing(), i) { - const label meshFaceI = patch.addressing()[i]; - if (!mesh_.isInternalFace(meshFaceI)) + const label meshFacei = patch.addressing()[i]; + if (!mesh_.isInternalFace(meshFacei)) { - neiStatus[meshFaceI-mesh_.nInternalFaces()] = + neiStatus[meshFacei-mesh_.nInternalFaces()] = allFaceInfo[i].flipStatus(); } } @@ -2205,31 +2205,31 @@ void Foam::meshRefinement::consistentOrientation forAll(patch.addressing(), i) { - const label meshFaceI = patch.addressing()[i]; - const label patchi = bm.whichPatch(meshFaceI); + const label meshFacei = patch.addressing()[i]; + const label patchi = bm.whichPatch(meshFacei); if ( patchi != -1 && bm[patchi].coupled() - && !isMasterFace[meshFaceI] + && !isMasterFace[meshFacei] ) { // Slave side. Take flipped from neighbour - label bFaceI = meshFaceI-mesh_.nInternalFaces(); + label bFacei = meshFacei-mesh_.nInternalFaces(); - if (neiStatus[bFaceI] == orientedSurface::NOFLIP) + if (neiStatus[bFacei] == orientedSurface::NOFLIP) { allFaceInfo[i] = orientedSurface::FLIP; } - else if (neiStatus[bFaceI] == orientedSurface::FLIP) + else if (neiStatus[bFacei] == orientedSurface::FLIP) { allFaceInfo[i] = orientedSurface::NOFLIP; } else { FatalErrorInFunction - << "Incorrect status for face " << meshFaceI + << "Incorrect status for face " << meshFacei << abort(FatalError); } } @@ -2244,21 +2244,21 @@ void Foam::meshRefinement::consistentOrientation forAll(allFaceInfo, facei) { - label meshFaceI = patch.addressing()[facei]; + label meshFacei = patch.addressing()[facei]; if (allFaceInfo[facei] == orientedSurface::NOFLIP) { - meshFlipMap[meshFaceI] = false; + meshFlipMap[meshFacei] = false; } else if (allFaceInfo[facei] == orientedSurface::FLIP) { - meshFlipMap[meshFaceI] = true; + meshFlipMap[meshFacei] = true; } else { FatalErrorInFunction << "Problem : unvisited face " << facei - << " centre:" << mesh_.faceCentres()[meshFaceI] + << " centre:" << mesh_.faceCentres()[meshFacei] << abort(FatalError); } } @@ -2564,14 +2564,14 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh } else if (ownRegion != keepRegionI && neiRegion == keepRegionI) { - label newPatchI = neiPatch[facei]; - if (newPatchI == -1) + label newPatchi = neiPatch[facei]; + if (newPatchi == -1) { - newPatchI = max(defaultPatch, ownPatch[facei]); + newPatchi = max(defaultPatch, ownPatch[facei]); } forAll(f, fp) { - pointBaffle[f[fp]] = newPatchI; + pointBaffle[f[fp]] = newPatchi; } } } @@ -2615,9 +2615,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh { const labelList& pFaces = pointFaces[pointI]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - label facei = pFaces[pFaceI]; + label facei = pFaces[pFacei]; if (ownPatch[facei] == -1) { @@ -3128,10 +3128,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify if (!pp.coupled()) { - label bFaceI = pp.start()-mesh_.nInternalFaces(); + label bFacei = pp.start()-mesh_.nInternalFaces(); forAll(pp, i) { - neiCellZone[bFaceI++] = -1; + neiCellZone[bFacei++] = -1; } } } @@ -3222,15 +3222,15 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify // flipMap into account) forAll(patch.addressing(), facei) { - label meshFaceI = patch.addressing()[facei]; + label meshFacei = patch.addressing()[facei]; - if (isMasterFace[meshFaceI]) + if (isMasterFace[meshFacei]) { label n = 1; if ( - bool(posOrientation[meshFaceI]) - == meshFlipMap[meshFaceI] + bool(posOrientation[meshFacei]) + == meshFlipMap[meshFacei] ) { n = -1; diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C index 5b6b239ce8c99bce5de7cce9f3ee70e960f82b8e..98cd3a38427922d20fb79ed46bdf176ce1abf1b7 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C @@ -477,11 +477,11 @@ Foam::label Foam::meshRefinement::mergePatchFacesUndo forAll(allFaceSets, setI) { - label masterFaceI = faceCombiner.masterFace()[setI]; + label masterFacei = faceCombiner.masterFace()[setI]; - if (masterFaceI != -1) + if (masterFacei != -1) { - label masterCellII = mesh_.faceOwner()[masterFaceI]; + label masterCellII = mesh_.faceOwner()[masterFacei]; const cell& cFaces = mesh_.cells()[masterCellII]; @@ -489,7 +489,7 @@ Foam::label Foam::meshRefinement::mergePatchFacesUndo { if (errorFaces.found(cFaces[i])) { - mastersToRestore.append(masterFaceI); + mastersToRestore.append(masterFacei); break; } } @@ -800,9 +800,9 @@ Foam::labelList Foam::meshRefinement::growFaceCellFace label own = mesh_.faceOwner()[facei]; const cell& ownFaces = mesh_.cells()[own]; - forAll(ownFaces, ownFaceI) + forAll(ownFaces, ownFacei) { - selected[ownFaces[ownFaceI]] = true; + selected[ownFaces[ownFacei]] = true; } if (mesh_.isInternalFace(facei)) @@ -810,9 +810,9 @@ Foam::labelList Foam::meshRefinement::growFaceCellFace label nbr = mesh_.faceNeighbour()[facei]; const cell& nbrFaces = mesh_.cells()[nbr]; - forAll(nbrFaces, nbrFaceI) + forAll(nbrFaces, nbrFacei) { - selected[nbrFaces[nbrFaceI]] = true; + selected[nbrFaces[nbrFacei]] = true; } } } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C index df4654334a7be5dbf4ed227e19cb40ca2542c840..088424288f3f4ca2886b0b475f72e10f6537ed86 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C @@ -759,9 +759,9 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells // Count boundary faces. label nBfaces = 0; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - if (isBoundaryFace[cFaces[cFaceI]]) + if (isBoundaryFace[cFaces[cFacei]]) { nBfaces++; } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C index 968394d258ec8951871a19b776bf012592277f8c..aa8d5438dba07d7843bb6ffdc5dcecc63e89d130 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C @@ -351,7 +351,7 @@ void Foam::meshRefinement::markFeatureCellLevel const point& keepPoint = keepPoints[i]; label celli = -1; - label tetFaceI = -1; + label tetFacei = -1; label tetPtI = -1; @@ -360,7 +360,7 @@ void Foam::meshRefinement::markFeatureCellLevel (void)mesh_.cellTree(); if (mesh_.nCells()) { - mesh_.findCellFacePt(keepPoint, celli, tetFaceI, tetPtI); + mesh_.findCellFacePt(keepPoint, celli, tetFacei, tetPtI); } if (celli != -1) @@ -405,7 +405,7 @@ void Foam::meshRefinement::markFeatureCellLevel mesh_, keepPoint, celli, - tetFaceI, + tetFacei, tetPtI, featureMesh.points()[pointI], // endpos featureLevel, // level @@ -450,7 +450,7 @@ void Foam::meshRefinement::markFeatureCellLevel mesh_, keepPoint, celli, - tetFaceI, + tetFacei, tetPtI, featureMesh.points()[pointI], // endpos featureLevel, // level @@ -957,11 +957,11 @@ Foam::label Foam::meshRefinement::markSurfaceRefinement } else { - label bFaceI = facei - mesh_.nInternalFaces(); + label bFacei = facei - mesh_.nInternalFaces(); start[i] = cellCentres[own]; - end[i] = neiCc[bFaceI]; - minLevel[i] = min(cellLevel[own], neiLevel[bFaceI]); + end[i] = neiCc[bFacei]; + minLevel[i] = min(cellLevel[own], neiLevel[bFacei]); } } @@ -1145,17 +1145,17 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement } else { - label bFaceI = facei - mesh_.nInternalFaces(); + label bFacei = facei - mesh_.nInternalFaces(); start[i] = cellCentres[own]; - end[i] = neiCc[bFaceI]; + end[i] = neiCc[bFacei]; if (!isMasterFace[facei]) { Swap(start[i], end[i]); } - minLevel[i] = min(cellLevel[own], neiLevel[bFaceI]); + minLevel[i] = min(cellLevel[own], neiLevel[bFacei]); } } @@ -1436,11 +1436,11 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement ) { label own = mesh_.faceOwner()[facei]; - label bFaceI = facei - mesh_.nInternalFaces(); + label bFacei = facei - mesh_.nInternalFaces(); const vectorList& ownNormals = cellSurfNormals[own]; const labelList& ownLevels = cellSurfLevels[own]; - const vectorList& neiNormals = neiSurfaceNormals[bFaceI]; + const vectorList& neiNormals = neiSurfaceNormals[bFacei]; // Special case: owner normals set is a subset of the neighbour // normals. Do not do curvature refinement since other cell's normals @@ -1754,11 +1754,11 @@ Foam::label Foam::meshRefinement::markProximityRefinement } else { - label bFaceI = facei - mesh_.nInternalFaces(); + label bFacei = facei - mesh_.nInternalFaces(); start[i] = cellCentres[own]; - end[i] = neiCc[bFaceI]; - minLevel[i] = min(cellLevel[own], neiLevel[bFaceI]); + end[i] = neiCc[bFacei]; + minLevel[i] = min(cellLevel[own], neiLevel[bFacei]); } } @@ -1886,12 +1886,12 @@ Foam::label Foam::meshRefinement::markProximityRefinement for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++) { - label bFaceI = facei-mesh_.nInternalFaces(); + label bFacei = facei-mesh_.nInternalFaces(); label own = mesh_.faceOwner()[facei]; - neiBndMaxLevel[bFaceI] = cellMaxLevel[own]; - neiBndMaxLocation[bFaceI] = cellMaxLocation[own]; - neiBndMaxNormal[bFaceI] = cellMaxNormal[own]; + neiBndMaxLevel[bFacei] = cellMaxLevel[own]; + neiBndMaxLocation[bFacei] = cellMaxLocation[own]; + neiBndMaxNormal[bFacei] = cellMaxNormal[own]; } syncTools::swapBoundaryFaceList(mesh_, neiBndMaxLevel); syncTools::swapBoundaryFaceList(mesh_, neiBndMaxLocation); @@ -1973,9 +1973,9 @@ Foam::label Foam::meshRefinement::markProximityRefinement for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++) { label own = mesh_.faceOwner()[facei]; - label bFaceI = facei - mesh_.nInternalFaces(); + label bFacei = facei - mesh_.nInternalFaces(); - if (cellLevel[own] < cellMaxLevel[own] && neiBndMaxLevel[bFaceI] != -1) + if (cellLevel[own] < cellMaxLevel[own] && neiBndMaxLevel[bFacei] != -1) { // Have valid data on both sides. Check planarCos. if @@ -1985,8 +1985,8 @@ Foam::label Foam::meshRefinement::markProximityRefinement planarCos, cellMaxLocation[own], cellMaxNormal[own], - neiBndMaxLocation[bFaceI], - neiBndMaxNormal[bFaceI] + neiBndMaxLocation[bFacei], + neiBndMaxNormal[bFacei] ) ) { @@ -2393,10 +2393,10 @@ Foam::meshRefinement::balanceAndRefine // globalIndex globalCells(mesh_.nCells()); // // Info<< "** Distribution before balancing/refining:" << endl; - // for (label procI = 0; procI < Pstream::nProcs(); procI++) + // for (label proci = 0; proci < Pstream::nProcs(); proci++) // { - // Info<< " " << procI << '\t' - // << globalCells.localSize(procI) << endl; + // Info<< " " << proci << '\t' + // << globalCells.localSize(proci) << endl; // } // Info<< endl; //} @@ -2404,10 +2404,10 @@ Foam::meshRefinement::balanceAndRefine // globalIndex globalCells(cellsToRefine.size()); // // Info<< "** Cells to be refined:" << endl; - // for (label procI = 0; procI < Pstream::nProcs(); procI++) + // for (label proci = 0; proci < Pstream::nProcs(); proci++) // { - // Info<< " " << procI << '\t' - // << globalCells.localSize(procI) << endl; + // Info<< " " << proci << '\t' + // << globalCells.localSize(proci) << endl; // } // Info<< endl; //} @@ -2466,10 +2466,10 @@ Foam::meshRefinement::balanceAndRefine // globalIndex globalCells(mesh_.nCells()); // // Info<< "** Distribution after balancing:" << endl; - // for (label procI = 0; procI < Pstream::nProcs(); procI++) + // for (label proci = 0; proci < Pstream::nProcs(); proci++) // { - // Info<< " " << procI << '\t' - // << globalCells.localSize(procI) << endl; + // Info<< " " << proci << '\t' + // << globalCells.localSize(proci) << endl; // } // Info<< endl; //} @@ -2524,10 +2524,10 @@ Foam::meshRefinement::balanceAndRefine // globalIndex globalCells(mesh_.nCells()); // // Info<< "** After refinement distribution:" << endl; - // for (label procI = 0; procI < Pstream::nProcs(); procI++) + // for (label proci = 0; proci < Pstream::nProcs(); proci++) // { - // Info<< " " << procI << '\t' - // << globalCells.localSize(procI) << endl; + // Info<< " " << proci << '\t' + // << globalCells.localSize(proci) << endl; // } // Info<< endl; //} diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C index dc6232a5501d07dfa569b272bd8b054f5d18fa6b..92463583216c9064ed4d46ee90b5b64c1e87f9e0 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C @@ -123,12 +123,12 @@ void Foam::meshRefinement::testSyncBoundaryFaceList { const polyPatch& pp = patches[patchi]; - label bFaceI = pp.start() - mesh_.nInternalFaces(); + label bFacei = pp.start() - mesh_.nInternalFaces(); forAll(pp, i) { - const T& data = faceData[bFaceI]; - const T& syncData = syncedFaceData[bFaceI]; + const T& data = faceData[bFacei]; + const T& syncData = syncedFaceData[bFacei]; if (mag(data - syncData) > tol) { @@ -146,7 +146,7 @@ void Foam::meshRefinement::testSyncBoundaryFaceList << abort(FatalError); } - bFaceI++; + bFacei++; } } } diff --git a/src/mesh/snappyHexMesh/refinementSurfaces/surfaceZonesInfo.C b/src/mesh/snappyHexMesh/refinementSurfaces/surfaceZonesInfo.C index 0669d2fb5f5049fdbfd15d9bd8bff2a51703b8b3..e01471ddfc08b91055c89edad1b0714ac89c8ed1 100644 --- a/src/mesh/snappyHexMesh/refinementSurfaces/surfaceZonesInfo.C +++ b/src/mesh/snappyHexMesh/refinementSurfaces/surfaceZonesInfo.C @@ -387,15 +387,15 @@ Foam::labelList Foam::surfaceZonesInfo::addCellZonesToMesh Pstream::gatherList(allCellZones); Pstream::scatterList(allCellZones); - for (label procI = 1; procI < allCellZones.size(); procI++) + for (label proci = 1; proci < allCellZones.size(); proci++) { - if (allCellZones[procI] != allCellZones[0]) + if (allCellZones[proci] != allCellZones[0]) { FatalErrorInFunction << "Zones not synchronised among processors." << nl << " Processor0 has cellZones:" << allCellZones[0] - << " , processor" << procI - << " has cellZones:" << allCellZones[procI] + << " , processor" << proci + << " has cellZones:" << allCellZones[proci] << exit(FatalError); } } @@ -450,15 +450,15 @@ Foam::labelList Foam::surfaceZonesInfo::addFaceZonesToMesh Pstream::gatherList(allFaceZones); Pstream::scatterList(allFaceZones); - for (label procI = 1; procI < allFaceZones.size(); procI++) + for (label proci = 1; proci < allFaceZones.size(); proci++) { - if (allFaceZones[procI] != allFaceZones[0]) + if (allFaceZones[proci] != allFaceZones[0]) { FatalErrorInFunction << "Zones not synchronised among processors." << nl << " Processor0 has faceZones:" << allFaceZones[0] - << " , processor" << procI - << " has faceZones:" << allFaceZones[procI] + << " , processor" << proci + << " has faceZones:" << allFaceZones[proci] << exit(FatalError); } } diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C index 3bb4ade11d2fe44d56a0773e98293b96d9a23c68..4c16d74d1d21f140f01d8f051062cdbf11178cb3 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/refinementParameters/refinementParameters.C @@ -87,18 +87,18 @@ const { const point& keepPoint = keepPoints_[i]; - label localCellI = mesh.findCell(keepPoint); + label localCelli = mesh.findCell(keepPoint); - label globalCellI = -1; + label globalCelli = -1; - if (localCellI != -1) + if (localCelli != -1) { - globalCellI = globalCells.toGlobal(localCellI); + globalCelli = globalCells.toGlobal(localCelli); } - reduce(globalCellI, maxOp<label>()); + reduce(globalCelli, maxOp<label>()); - if (globalCellI == -1) + if (globalCelli == -1) { FatalErrorInFunction << "Point " << keepPoint @@ -108,16 +108,16 @@ const } - label procI = globalCells.whichProcID(globalCellI); - label procCellI = globalCells.toLocal(procI, globalCellI); + label proci = globalCells.whichProcID(globalCelli); + label procCelli = globalCells.toLocal(proci, globalCelli); - Info<< "Found point " << keepPoint << " in cell " << procCellI - << " on processor " << procI << endl; + Info<< "Found point " << keepPoint << " in cell " << procCelli + << " on processor " << proci << endl; - if (globalCells.isLocal(globalCellI)) + if (globalCells.isLocal(globalCelli)) { - cellLabels[i] = localCellI; + cellLabels[i] = localCelli; } else { diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C index 0c239dcf977b81e58999c8c49e0b0b8404518a10..c6611e1c02dd8aff90163639395a9a9f80a66181 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C @@ -1017,27 +1017,27 @@ void Foam::snappyLayerDriver::determineSidePatches for (label patchi = nOldPatches; patchi < nPatches; patchi++) { - label nbrProcI = patchToNbrProc[patchi]; + label nbrProci = patchToNbrProc[patchi]; word name ( - processorPolyPatch::newName(Pstream::myProcNo(), nbrProcI) + processorPolyPatch::newName(Pstream::myProcNo(), nbrProci) ); dictionary patchDict; patchDict.add("type", processorPolyPatch::typeName); patchDict.add("myProcNo", Pstream::myProcNo()); - patchDict.add("neighbProcNo", nbrProcI); + patchDict.add("neighbProcNo", nbrProci); patchDict.add("nFaces", 0); patchDict.add("startFace", mesh.nFaces()); - label procPatchI = meshRefiner_.appendPatch + label procPatchi = meshRefiner_.appendPatch ( mesh, mesh.boundaryMesh().size(), // new patch index name, patchDict ); - wantedToAddedPatch.insert(patchi, procPatchI); + wantedToAddedPatch.insert(patchi, procPatchi); } // Renumber sidePatchID @@ -1615,15 +1615,15 @@ void Foam::snappyLayerDriver::getPatchDisplacement bool Foam::snappyLayerDriver::sameEdgeNeighbour ( const labelListList& globalEdgeFaces, - const label myGlobalFaceI, - const label nbrGlobFaceI, + const label myGlobalFacei, + const label nbrGlobFacei, const label edgeI ) const { const labelList& eFaces = globalEdgeFaces[edgeI]; if (eFaces.size() == 2) { - return edge(myGlobalFaceI, nbrGlobFaceI) == edge(eFaces[0], eFaces[1]); + return edge(myGlobalFacei, nbrGlobFacei) == edge(eFaces[0], eFaces[1]); } else { @@ -1638,8 +1638,8 @@ void Foam::snappyLayerDriver::getVertexString const labelListList& globalEdgeFaces, const label facei, const label edgeI, - const label myGlobFaceI, - const label nbrGlobFaceI, + const label myGlobFacei, + const label nbrGlobFacei, DynamicList<label>& vertices ) const { @@ -1663,8 +1663,8 @@ void Foam::snappyLayerDriver::getVertexString !sameEdgeNeighbour ( globalEdgeFaces, - myGlobFaceI, - nbrGlobFaceI, + myGlobFacei, + nbrGlobFacei, fEdges[prevFp] ) ) @@ -1683,8 +1683,8 @@ void Foam::snappyLayerDriver::getVertexString !sameEdgeNeighbour ( globalEdgeFaces, - myGlobFaceI, - nbrGlobFaceI, + myGlobFacei, + nbrGlobFacei, fEdges[nextFp] ) ) @@ -1890,14 +1890,14 @@ Foam::label Foam::snappyLayerDriver::truncateDisplacement if (globFaces.size() == 2) { - label myFaceI = pp.edgeFaces()[edgeI][0]; - label myGlobalFaceI = globalFaces.toGlobal + label myFacei = pp.edgeFaces()[edgeI][0]; + label myGlobalFacei = globalFaces.toGlobal ( - pp.addressing()[myFaceI] + pp.addressing()[myFacei] ); - label nbrGlobalFaceI = + label nbrGlobalFacei = ( - globFaces[0] != myGlobalFaceI + globFaces[0] != myGlobalFacei ? globFaces[0] : globFaces[1] ); @@ -1905,10 +1905,10 @@ Foam::label Foam::snappyLayerDriver::truncateDisplacement ( pp, edgeGlobalFaces, - myFaceI, + myFacei, edgeI, - myGlobalFaceI, - nbrGlobalFaceI, + myGlobalFacei, + nbrGlobalFacei, stringedVerts ); @@ -2046,15 +2046,15 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation << " nBufferCellsNoExtrude set to less than 0 ..." << endl; // Face layers if any point gets extruded - forAll(pp.localFaces(), patchFaceI) + forAll(pp.localFaces(), patchFacei) { - const face& f = pp.localFaces()[patchFaceI]; + const face& f = pp.localFaces()[patchFacei]; forAll(f, fp) { if (patchNLayers[f[fp]] > 0) { - nPatchFaceLayers[patchFaceI] = patchNLayers[f[fp]]; + nPatchFaceLayers[patchFacei] = patchNLayers[f[fp]]; break; } } @@ -2062,11 +2062,11 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation nPatchPointLayers = patchNLayers; // Set any unset patch face layers - forAll(nPatchFaceLayers, patchFaceI) + forAll(nPatchFaceLayers, patchFacei) { - if (nPatchFaceLayers[patchFaceI] == -1) + if (nPatchFaceLayers[patchFacei] == -1) { - nPatchFaceLayers[patchFaceI] = 0; + nPatchFaceLayers[patchFacei] = 0; } } } @@ -2075,9 +2075,9 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation // Determine max point layers per face. labelList maxLevel(pp.size(), 0); - forAll(pp.localFaces(), patchFaceI) + forAll(pp.localFaces(), patchFacei) { - const face& f = pp.localFaces()[patchFaceI]; + const face& f = pp.localFaces()[patchFacei]; // find patch faces where layer terminates (i.e contains extrude // and noextrude points). @@ -2101,12 +2101,12 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation if (noExtrude) { - nPatchFaceLayers[patchFaceI] = 1; - maxLevel[patchFaceI] = mLevel; + nPatchFaceLayers[patchFacei] = 1; + maxLevel[patchFacei] = mLevel; } else { - maxLevel[patchFaceI] = mLevel; + maxLevel[patchFacei] = mLevel; } } } @@ -2142,9 +2142,9 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation forAll(pp.meshPoints(), patchPointI) { - forAll(pointFaces[patchPointI], pointFaceI) + forAll(pointFaces[patchPointI], pointFacei) { - label facei = pointFaces[patchPointI][pointFaceI]; + label facei = pointFaces[patchPointI][pointFacei]; if ( @@ -2171,9 +2171,9 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation { if (foundNeighbour[patchPointI]) { - forAll(pointFaces[patchPointI], pointFaceI) + forAll(pointFaces[patchPointI], pointFacei) { - label facei = pointFaces[patchPointI][pointFaceI]; + label facei = pointFaces[patchPointI][pointFacei]; if ( nPatchFaceLayers[facei] == -1 @@ -2190,11 +2190,11 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation } } - forAll(pp.localFaces(), patchFaceI) + forAll(pp.localFaces(), patchFacei) { - if (nPatchFaceLayers[patchFaceI] == -1) + if (nPatchFaceLayers[patchFacei] == -1) { - nPatchFaceLayers[patchFaceI] = maxLevel[patchFaceI]; + nPatchFaceLayers[patchFacei] = maxLevel[patchFacei]; } } @@ -2202,9 +2202,9 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation { if (extrudeStatus[patchPointI] != NOEXTRUDE) { - forAll(pointFaces[patchPointI], pointFaceI) + forAll(pointFaces[patchPointI], pointFacei) { - label face = pointFaces[patchPointI][pointFaceI]; + label face = pointFaces[patchPointI][pointFacei]; nPatchPointLayers[patchPointI] = max ( nPatchPointLayers[patchPointI], @@ -2241,9 +2241,9 @@ bool Foam::snappyLayerDriver::cellsUseFace { const cell& cFaces = mesh.cells()[cellLabels[i]]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - if (faces.found(cFaces[cFaceI])) + if (faces.found(cFaces[cFacei])) { return true; } @@ -2309,11 +2309,11 @@ Foam::label Foam::snappyLayerDriver::checkAndUnmark const label nReportMax = 10; DynamicField<point> disabledFaceCentres(nReportMax); - forAll(addedCells, oldPatchFaceI) + forAll(addedCells, oldPatchFacei) { // Get the cells (in newMesh labels) per old patch face (in mesh // labels) - const labelList& fCells = addedCells[oldPatchFaceI]; + const labelList& fCells = addedCells[oldPatchFacei]; if (cellsUseFace(newMesh, fCells, wrongFaces)) { @@ -2322,7 +2322,7 @@ Foam::label Foam::snappyLayerDriver::checkAndUnmark ( unmarkExtrusion ( - pp.localFaces()[oldPatchFaceI], + pp.localFaces()[oldPatchFacei], patchDisp, patchNLayers, extrudeStatus @@ -2333,7 +2333,7 @@ Foam::label Foam::snappyLayerDriver::checkAndUnmark { disabledFaceCentres.append ( - pp.faceCentres()[oldPatchFaceI] + pp.faceCentres()[oldPatchFacei] ); } @@ -2442,11 +2442,11 @@ void Foam::snappyLayerDriver::getLayerCellsFaces // Mark all cells in the layer. labelListList addedCells(addPatchCellLayer::addedCells(mesh, layerFaces)); - forAll(addedCells, oldPatchFaceI) + forAll(addedCells, oldPatchFacei) { - const labelList& added = addedCells[oldPatchFaceI]; + const labelList& added = addedCells[oldPatchFacei]; - const labelList& layer = layerFaces[oldPatchFaceI]; + const labelList& layer = layerFaces[oldPatchFacei]; if (layer.size()) { @@ -2457,10 +2457,10 @@ void Foam::snappyLayerDriver::getLayerCellsFaces } } - forAll(layerFaces, oldPatchFaceI) + forAll(layerFaces, oldPatchFacei) { - const labelList& layer = layerFaces[oldPatchFaceI]; - const scalar realThickness = oldRealThickness[oldPatchFaceI]; + const labelList& layer = layerFaces[oldPatchFacei]; + const scalar realThickness = oldRealThickness[oldPatchFacei]; if (layer.size()) { diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.H index c822a9d95744d58aec8f3ab27d1d8a3028102974..f2de478bc0c9718e2e048f70ce3ce1336210b287 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.H +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.H @@ -288,8 +288,8 @@ private: bool sameEdgeNeighbour ( const labelListList& globalEdgeFaces, - const label myGlobalFaceI, - const label nbrGlobFaceI, + const label myGlobalFacei, + const label nbrGlobFacei, const label edgeI ) const; @@ -300,8 +300,8 @@ private: const labelListList& globalEdgeFaces, const label facei, const label edgeI, - const label myGlobFaceI, - const label nbrGlobFaceI, + const label myGlobFacei, + const label nbrGlobFacei, DynamicList<label>& vertices ) const; diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C index 0770feb788bdc388915a8e43b26c78ee272a83a0..cdb0ededa687e8eff6b1422ea551cac77b9c5b12 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C @@ -408,9 +408,9 @@ Foam::label Foam::snappyRefineDriver::gapOnlyRefine ) { label own = mesh.faceOwner()[facei]; - label bFaceI = facei-mesh.nInternalFaces(); + label bFacei = facei-mesh.nInternalFaces(); - if (isCandidateCell[own] != neiIsCandidateCell[bFaceI]) + if (isCandidateCell[own] != neiIsCandidateCell[bFacei]) { newIsCandidateCell[own] = true; } @@ -560,14 +560,14 @@ Foam::label Foam::snappyRefineDriver::danglingCellRefine label nIntFaces = 0; forAll(cFaces, i) { - label bFaceI = cFaces[i]-mesh.nInternalFaces(); - if (bFaceI < 0) + label bFacei = cFaces[i]-mesh.nInternalFaces(); + if (bFacei < 0) { nIntFaces++; } else { - label patchi = pbm.patchID()[bFaceI]; + label patchi = pbm.patchID()[bFacei]; if (pbm[patchi].coupled()) { nIntFaces++; diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C index 47981c1ab747f871b4d139acb52fbb5bc8a25fd2..051508b3d2b144e0c196a49049442ac555fba091 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C @@ -884,9 +884,9 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::avgCellCentres forAll(pFaces, pfI) { label facei = pFaces[pfI]; - label meshFaceI = pp.addressing()[facei]; + label meshFacei = pp.addressing()[facei]; - label own = mesh.faceOwner()[meshFaceI]; + label own = mesh.faceOwner()[meshFacei]; avgBoundary[pointI] += mesh.cellCentres()[own]; nBoundary[pointI]++; } @@ -1919,8 +1919,8 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface // { // label globalRegionI = surfaces.globalRegion(surfI, regionI); // // Collect master patch points -// label masterPatchI = globalToMasterPatch_[globalRegionI]; -// label slavePatchI = globalToSlavePatch_[globalRegionI]; +// label masterPatchi = globalToMasterPatch_[globalRegionI]; +// label slavePatchi = globalToSlavePatch_[globalRegionI]; // // labelList patchPointIndices // ( @@ -1928,7 +1928,7 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface // ( // mesh, // pp, -// pbm[masterPatchI] +// pbm[masterPatchi] // ) // ); // @@ -1961,7 +1961,7 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface // } // // // Slave patch -// if (slavePatchI != masterPatchI) +// if (slavePatchi != masterPatchi) // { // labelList patchPointIndices // ( @@ -1969,7 +1969,7 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface // ( // mesh, // pp, -// pbm[slavePatchI] +// pbm[slavePatchi] // ) // ); // diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C index 89353844f2778ec09be490d4c88bf3123288dbf5..a6c7f69bc99a59b62cb42282b8d5d364b2d5e22b 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C @@ -529,8 +529,8 @@ void Foam::snappySnapDriver::calcNearestFacePointProperties { forAll(pp, i) { - label meshFaceI = pp.start()+i; - patchID[meshFaceI-mesh.nInternalFaces()] = -1; + label meshFacei = pp.start()+i; + patchID[meshFacei-mesh.nInternalFaces()] = -1; } } } @@ -538,8 +538,8 @@ void Foam::snappySnapDriver::calcNearestFacePointProperties // Remove any meshed faces forAll(pp.addressing(), i) { - label meshFaceI = pp.addressing()[i]; - patchID[meshFaceI-mesh.nInternalFaces()] = -1; + label meshFacei = pp.addressing()[i]; + patchID[meshFacei-mesh.nInternalFaces()] = -1; } // See if pp point uses any non-meshed boundary faces @@ -559,17 +559,17 @@ void Foam::snappySnapDriver::calcNearestFacePointProperties forAll(pFaces, i) { - label meshFaceI = pFaces[i]; - if (!mesh.isInternalFace(meshFaceI)) + label meshFacei = pFaces[i]; + if (!mesh.isInternalFace(meshFacei)) { - label patchi = patchID[meshFaceI-mesh.nInternalFaces()]; + label patchi = patchID[meshFacei-mesh.nInternalFaces()]; if (patchi != -1) { - vector fn = mesh.faceAreas()[meshFaceI]; + vector fn = mesh.faceAreas()[meshFacei]; pNormals.append(fn/mag(fn)); - pDisp.append(mesh.faceCentres()[meshFaceI]-pt); - pFc.append(mesh.faceCentres()[meshFaceI]); + pDisp.append(mesh.faceCentres()[meshFacei]-pt); + pFc.append(mesh.faceCentres()[meshFacei]); pFid.append(patchi); } } diff --git a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C index fba90bed0e88562dd0b33f1d5c74d469f050070a..94123bedc07c135271ddb7554eb228a2eec3d468 100644 --- a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C +++ b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C @@ -33,7 +33,7 @@ Foam::trackedParticle::trackedParticle const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const point& end, const label level, @@ -42,7 +42,7 @@ Foam::trackedParticle::trackedParticle const label k ) : - particle(mesh, position, celli, tetFaceI, tetPtI), + particle(mesh, position, celli, tetFacei, tetPtI), end_(end), level_(level), i_(i), diff --git a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H index 06a96b162a401d4e92b0038d18aaca6c681f850d..35cde2ea85139496ce6c22921c6c9282cdde3ae6 100644 --- a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H +++ b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H @@ -114,7 +114,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const point& end, const label level, diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index e09eb873a10b003dc6f465180932643617df8397..4754869fbc9285c8accb8a09aff1aa2820913a15 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -284,8 +284,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate srcMagSf.setSize(sourceRestrictAddressing.size(), 0.0); forAll(sourceRestrictAddressing, facei) { - label coarseFaceI = sourceRestrictAddressing[facei]; - srcMagSf[coarseFaceI] += fineSrcMagSf[facei]; + label coarseFacei = sourceRestrictAddressing[facei]; + srcMagSf[coarseFacei] += fineSrcMagSf[facei]; } } @@ -311,16 +311,16 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate tgtSubMap[Pstream::myProcNo()] = identity(targetCoarseSize); } - forAll(map.subMap(), procI) + forAll(map.subMap(), proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { // Combine entries that point to the same coarse element. All // the elements refer to local data so index into // targetRestrictAddressing or allRestrict (since the same // for local data). - const labelList& elems = map.subMap()[procI]; - labelList& newSubMap = tgtSubMap[procI]; + const labelList& elems = map.subMap()[proci]; + labelList& newSubMap = tgtSubMap[proci]; newSubMap.setSize(elems.size()); labelList oldToNew(targetCoarseSize, -1); @@ -359,16 +359,16 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate label compactI = targetCoarseSize; // Compact data from other processors - forAll(map.constructMap(), procI) + forAll(map.constructMap(), proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { // Combine entries that point to the same coarse element. All // elements now are remote data so we cannot use any local // data here - use allRestrict instead. - const labelList& elems = map.constructMap()[procI]; + const labelList& elems = map.constructMap()[proci]; - labelList& newConstructMap = tgtConstructMap[procI]; + labelList& newConstructMap = tgtConstructMap[proci]; newConstructMap.setSize(elems.size()); if (elems.size()) @@ -386,14 +386,14 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate } remoteTargetCoarseSize += 1; - // Combine locally data coming from procI + // Combine locally data coming from proci labelList oldToNew(remoteTargetCoarseSize, -1); label newI = 0; forAll(elems, i) { label fineElem = elems[i]; - // fineElem now points to section from procI + // fineElem now points to section from proci label coarseElem = allRestrict[fineElem]; if (oldToNew[coarseElem] == -1) { @@ -426,10 +426,10 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate const scalarList& weights = fineSrcWeights[facei]; const scalar fineArea = fineSrcMagSf[facei]; - label coarseFaceI = sourceRestrictAddressing[facei]; + label coarseFacei = sourceRestrictAddressing[facei]; - labelList& newElems = srcAddress[coarseFaceI]; - scalarList& newWeights = srcWeights[coarseFaceI]; + labelList& newElems = srcAddress[coarseFacei]; + scalarList& newWeights = srcWeights[coarseFacei]; forAll(elems, i) { @@ -472,10 +472,10 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate const scalarList& weights = fineSrcWeights[facei]; const scalar fineArea = fineSrcMagSf[facei]; - label coarseFaceI = sourceRestrictAddressing[facei]; + label coarseFacei = sourceRestrictAddressing[facei]; - labelList& newElems = srcAddress[coarseFaceI]; - scalarList& newWeights = srcWeights[coarseFaceI]; + labelList& newElems = srcAddress[coarseFacei]; + scalarList& newWeights = srcWeights[coarseFacei]; forAll(elems, i) { @@ -1417,20 +1417,20 @@ Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::srcPointFace const SourcePatch& srcPatch, const TargetPatch& tgtPatch, const vector& n, - const label tgtFaceI, + const label tgtFacei, point& tgtPoint ) const { const pointField& srcPoints = srcPatch.points(); - // source face addresses that intersect target face tgtFaceI - const labelList& addr = tgtAddress_[tgtFaceI]; + // source face addresses that intersect target face tgtFacei + const labelList& addr = tgtAddress_[tgtFacei]; forAll(addr, i) { - label srcFaceI = addr[i]; - const face& f = srcPatch[srcFaceI]; + label srcFacei = addr[i]; + const face& f = srcPatch[srcFacei]; pointHit ray = f.ray(tgtPoint, n, srcPoints); @@ -1438,18 +1438,18 @@ const { tgtPoint = ray.rawPoint(); - return srcFaceI; + return srcFacei; } } // no hit registered - try with face normal instead of input normal forAll(addr, i) { - label srcFaceI = addr[i]; - const face& f = srcPatch[srcFaceI]; + label srcFacei = addr[i]; + const face& f = srcPatch[srcFacei]; - vector nFace(-srcPatch.faceNormals()[srcFaceI]); - nFace += tgtPatch.faceNormals()[tgtFaceI]; + vector nFace(-srcPatch.faceNormals()[srcFacei]); + nFace += tgtPatch.faceNormals()[tgtFacei]; pointHit ray = f.ray(tgtPoint, nFace, srcPoints); @@ -1457,7 +1457,7 @@ const { tgtPoint = ray.rawPoint(); - return srcFaceI; + return srcFacei; } } @@ -1471,20 +1471,20 @@ Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::tgtPointFace const SourcePatch& srcPatch, const TargetPatch& tgtPatch, const vector& n, - const label srcFaceI, + const label srcFacei, point& srcPoint ) const { const pointField& tgtPoints = tgtPatch.points(); - // target face addresses that intersect source face srcFaceI - const labelList& addr = srcAddress_[srcFaceI]; + // target face addresses that intersect source face srcFacei + const labelList& addr = srcAddress_[srcFacei]; forAll(addr, i) { - label tgtFaceI = addr[i]; - const face& f = tgtPatch[tgtFaceI]; + label tgtFacei = addr[i]; + const face& f = tgtPatch[tgtFacei]; pointHit ray = f.ray(srcPoint, n, tgtPoints); @@ -1492,18 +1492,18 @@ const { srcPoint = ray.rawPoint(); - return tgtFaceI; + return tgtFacei; } } // no hit registered - try with face normal instead of input normal forAll(addr, i) { - label tgtFaceI = addr[i]; - const face& f = tgtPatch[tgtFaceI]; + label tgtFacei = addr[i]; + const face& f = tgtPatch[tgtFacei]; - vector nFace(-srcPatch.faceNormals()[srcFaceI]); - nFace += tgtPatch.faceNormals()[tgtFaceI]; + vector nFace(-srcPatch.faceNormals()[srcFacei]); + nFace += tgtPatch.faceNormals()[tgtFacei]; pointHit ray = f.ray(srcPoint, n, tgtPoints); @@ -1511,7 +1511,7 @@ const { srcPoint = ray.rawPoint(); - return tgtFaceI; + return tgtFacei; } } diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H index 4b6c4bc86289947fd58130df1f11335010151468..8de6e4f3104dada7a2d531a83ce9cc2293f855bd 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H @@ -523,7 +523,7 @@ public: const SourcePatch& srcPatch, const TargetPatch& tgtPatch, const vector& n, - const label tgtFaceI, + const label tgtFacei, point& tgtPoint ) const; @@ -534,7 +534,7 @@ public: const SourcePatch& srcPatch, const TargetPatch& tgtPatch, const vector& n, - const label srcFaceI, + const label srcFacei, point& srcPoint ) const; diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C index f082e4f102a0f28226e3e4cb511d28d6fd683e2e..4d9ddde95410af64e3c8472fee36673fd954d1dd 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C @@ -36,7 +36,7 @@ Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcDistribution const TargetPatch& tgtPatch ) const { - label procI = 0; + label proci = 0; if (Pstream::parRun()) { @@ -57,7 +57,7 @@ Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcDistribution if (nHaveFaces > 1) { - procI = -1; + proci = -1; if (debug) { InfoInFunction @@ -66,18 +66,18 @@ Foam::label Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcDistribution } else if (nHaveFaces == 1) { - procI = findIndex(facesPresentOnProc, 1); + proci = findIndex(facesPresentOnProc, 1); if (debug) { InfoInFunction - << "AMI local to processor" << procI << endl; + << "AMI local to processor" << proci << endl; } } } // Either not parallel or no faces on any processor - return procI; + return proci; } @@ -95,15 +95,15 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcOverlappingProcs label nOverlaps = 0; - forAll(procBb, procI) + forAll(procBb, proci) { - const List<treeBoundBox>& bbs = procBb[procI]; + const List<treeBoundBox>& bbs = procBb[proci]; forAll(bbs, bbI) { if (bbs[bbI].overlaps(bb)) { - overlaps[procI] = true; + overlaps[proci] = true; nOverlaps++; break; } @@ -230,10 +230,10 @@ distributeAndMergePatches // Renumber and flatten label nFaces = 0; label nPoints = 0; - forAll(allFaces, procI) + forAll(allFaces, proci) { - nFaces += allFaces[procI].size(); - nPoints += allPoints[procI].size(); + nFaces += allFaces[proci].size(); + nPoints += allPoints[proci].size(); } tgtFaces.setSize(nFaces); @@ -269,14 +269,14 @@ distributeAndMergePatches // Other proc data follows - forAll(allFaces, procI) + forAll(allFaces, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - const labelList& faceIDs = allTgtFaceIDs[procI]; + const labelList& faceIDs = allTgtFaceIDs[proci]; SubList<label>(tgtFaceIDs, faceIDs.size(), nFaces) = faceIDs; - const faceList& fcs = allFaces[procI]; + const faceList& fcs = allFaces[proci]; forAll(fcs, i) { const face& f = fcs[i]; @@ -288,7 +288,7 @@ distributeAndMergePatches } } - const pointField& pts = allPoints[procI]; + const pointField& pts = allPoints[proci]; forAll(pts, i) { tgtPoints[nPoints++] = pts[i]; @@ -369,9 +369,9 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap { Info<< "Determining extent of srcPatch per processor:" << nl << "\tproc\tbb" << endl; - forAll(procBb, procI) + forAll(procBb, proci) { - Info<< '\t' << procI << '\t' << procBb[procI] << endl; + Info<< '\t' << proci << '\t' << procBb[proci] << endl; } } @@ -398,11 +398,11 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap // Find the processor this face overlaps calcOverlappingProcs(procBb, faceBb, procBbOverlaps); - forAll(procBbOverlaps, procI) + forAll(procBbOverlaps, proci) { - if (procBbOverlaps[procI]) + if (procBbOverlaps[proci]) { - dynSendMap[procI].append(facei); + dynSendMap[proci].append(facei); } } } @@ -410,9 +410,9 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap // Convert dynamicList to labelList sendMap.setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - sendMap[procI].transfer(dynSendMap[procI]); + sendMap[proci].transfer(dynSendMap[proci]); } } @@ -421,9 +421,9 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap { Pout<< "Of my " << faces.size() << " I need to send to:" << nl << "\tproc\tfaces" << endl; - forAll(sendMap, procI) + forAll(sendMap, proci) { - Pout<< '\t' << procI << '\t' << sendMap[procI].size() << endl; + Pout<< '\t' << proci << '\t' << sendMap[proci].size() << endl; } } @@ -431,9 +431,9 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap // Send over how many faces I need to receive labelListList sendSizes(Pstream::nProcs()); sendSizes[Pstream::myProcNo()].setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - sendSizes[Pstream::myProcNo()][procI] = sendMap[procI].size(); + sendSizes[Pstream::myProcNo()][proci] = sendMap[proci].size(); } Pstream::gatherList(sendSizes); Pstream::scatterList(sendSizes); @@ -449,17 +449,17 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap ); label segmentI = constructMap[Pstream::myProcNo()].size(); - forAll(constructMap, procI) + forAll(constructMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { // What I need to receive is what other processor is sending to me - label nRecv = sendSizes[procI][Pstream::myProcNo()]; - constructMap[procI].setSize(nRecv); + label nRecv = sendSizes[proci][Pstream::myProcNo()]; + constructMap[proci].setSize(nRecv); for (label i = 0; i < nRecv; i++) { - constructMap[procI][i] = segmentI++; + constructMap[proci][i] = segmentI++; } } } diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.C index a10c303178f6bf75f033bbfd7712227ac4906ae2..5ca35f44fc2a6818a7506cf0b20e6ec31095db44 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.C @@ -74,8 +74,8 @@ bool Foam::AMIMethod<SourcePatch, TargetPatch>::initialise scalarListList& srcWeights, labelListList& tgtAddress, scalarListList& tgtWeights, - label& srcFaceI, - label& tgtFaceI + label& srcFacei, + label& tgtFacei ) { checkPatches(); @@ -104,17 +104,17 @@ bool Foam::AMIMethod<SourcePatch, TargetPatch>::initialise resetTree(); // find initial face match using brute force/octree search - if ((srcFaceI == -1) || (tgtFaceI == -1)) + if ((srcFacei == -1) || (tgtFacei == -1)) { - srcFaceI = 0; - tgtFaceI = 0; + srcFacei = 0; + tgtFacei = 0; bool foundFace = false; forAll(srcPatch_, facei) { - tgtFaceI = findTargetFace(facei); - if (tgtFaceI >= 0) + tgtFacei = findTargetFace(facei); + if (tgtFacei >= 0) { - srcFaceI = facei; + srcFacei = facei; foundFace = true; break; } @@ -135,7 +135,7 @@ bool Foam::AMIMethod<SourcePatch, TargetPatch>::initialise if (debug) { - Pout<< "AMI: initial target face = " << tgtFaceI << endl; + Pout<< "AMI: initial target face = " << tgtFacei << endl; } return true; @@ -228,21 +228,21 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::resetTree() template<class SourcePatch, class TargetPatch> Foam::label Foam::AMIMethod<SourcePatch, TargetPatch>::findTargetFace ( - const label srcFaceI + const label srcFacei ) const { - label targetFaceI = -1; + label targetFacei = -1; const pointField& srcPts = srcPatch_.points(); - const face& srcFace = srcPatch_[srcFaceI]; + const face& srcFace = srcPatch_[srcFacei]; const point srcPt = srcFace.centre(srcPts); - const scalar srcFaceArea = srcMagSf_[srcFaceI]; + const scalar srcFaceArea = srcMagSf_[srcFacei]; pointIndexHit sample = treePtr_->findNearest(srcPt, 10.0*srcFaceArea); if (sample.hit()) { - targetFaceI = sample.index(); + targetFacei = sample.index(); if (debug) { @@ -252,7 +252,7 @@ Foam::label Foam::AMIMethod<SourcePatch, TargetPatch>::findTargetFace } } - return targetFaceI; + return targetFacei; } @@ -270,11 +270,11 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::appendNbrFaces // filter out faces already visited from face neighbours forAll(nbrFaces, i) { - label nbrFaceI = nbrFaces[i]; + label nbrFacei = nbrFaces[i]; bool valid = true; forAll(visitedFaces, j) { - if (nbrFaceI == visitedFaces[j]) + if (nbrFacei == visitedFaces[j]) { valid = false; break; @@ -285,7 +285,7 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::appendNbrFaces { forAll(faceIDs, j) { - if (nbrFaceI == faceIDs[j]) + if (nbrFacei == faceIDs[j]) { valid = false; break; @@ -297,13 +297,13 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::appendNbrFaces if (valid) { const vector& n1 = patch.faceNormals()[facei]; - const vector& n2 = patch.faceNormals()[nbrFaceI]; + const vector& n2 = patch.faceNormals()[nbrFacei]; scalar cosI = n1 & n2; if (cosI > Foam::cos(degToRad(89.0))) { - faceIDs.append(nbrFaceI); + faceIDs.append(nbrFacei); } } } diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H index 892390c72d85689bc6a62739f80d94f2d3e1909e..d3df112b440894c889d87bf20a4157b67f3d9b43 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H @@ -120,8 +120,8 @@ protected: scalarListList& srcWeights, labelListList& tgtAddress, scalarListList& tgtWeights, - label& srcFaceI, - label& tgtFaceI + label& srcFacei, + label& tgtFacei ); //- Write triangle intersection to OBJ file @@ -141,7 +141,7 @@ protected: void resetTree(); //- Find face on target patch that overlaps source face - label findTargetFace(const label srcFaceI) const; + label findTargetFace(const label srcFacei) const; //- Add faces neighbouring facei to the ID list void appendNbrFaces @@ -235,8 +235,8 @@ public: scalarListList& srcWeights, labelListList& tgtAddress, scalarListList& tgtWeights, - label srcFaceI = -1, - label tgtFaceI = -1 + label srcFacei = -1, + label tgtFacei = -1 ) = 0; }; diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C index c31e8fcfc9028f19260173a82cd4b4e22841d50c..f1728daebab53e3f88efb8993b1a2799cdf66180 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C @@ -34,12 +34,12 @@ void Foam::directAMI<SourcePatch, TargetPatch>::appendToDirectSeeds labelList& srcTgtSeed, DynamicList<label>& srcSeeds, DynamicList<label>& nonOverlapFaces, - label& srcFaceI, - label& tgtFaceI + label& srcFacei, + label& tgtFacei ) const { - const labelList& srcNbr = this->srcPatch_.faceFaces()[srcFaceI]; - const labelList& tgtNbr = this->tgtPatch_.faceFaces()[tgtFaceI]; + const labelList& srcNbr = this->srcPatch_.faceFaces()[srcFacei]; + const labelList& tgtNbr = this->tgtPatch_.faceFaces()[tgtFacei]; const pointField& srcPoints = this->srcPatch_.points(); const pointField& tgtPoints = this->tgtPatch_.points(); @@ -144,13 +144,13 @@ void Foam::directAMI<SourcePatch, TargetPatch>::appendToDirectSeeds if (srcSeeds.size()) { - srcFaceI = srcSeeds.remove(); - tgtFaceI = srcTgtSeed[srcFaceI]; + srcFacei = srcSeeds.remove(); + tgtFacei = srcTgtSeed[srcFacei]; } else { - srcFaceI = -1; - tgtFaceI = -1; + srcFacei = -1; + tgtFacei = -1; } } @@ -160,24 +160,24 @@ void Foam::directAMI<SourcePatch, TargetPatch>::restartAdvancingFront ( labelList& mapFlag, DynamicList<label>& nonOverlapFaces, - label& srcFaceI, - label& tgtFaceI + label& srcFacei, + label& tgtFacei ) const { forAll(mapFlag, facei) { if (mapFlag[facei] == 0) { - tgtFaceI = this->findTargetFace(facei); + tgtFacei = this->findTargetFace(facei); - if (tgtFaceI < 0) + if (tgtFacei < 0) { mapFlag[facei] = -1; nonOverlapFaces.append(facei); } else { - srcFaceI = facei; + srcFacei = facei; break; } } @@ -228,8 +228,8 @@ void Foam::directAMI<SourcePatch, TargetPatch>::calculate scalarListList& srcWeights, labelListList& tgtAddress, scalarListList& tgtWeights, - label srcFaceI, - label tgtFaceI + label srcFacei, + label tgtFacei ) { bool ok = @@ -239,8 +239,8 @@ void Foam::directAMI<SourcePatch, TargetPatch>::calculate srcWeights, tgtAddress, tgtWeights, - srcFaceI, - tgtFaceI + srcFacei, + tgtFacei ); if (!ok) @@ -257,12 +257,12 @@ void Foam::directAMI<SourcePatch, TargetPatch>::calculate // construct weights and addressing // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // list of faces currently visited for srcFaceI to avoid multiple hits + // list of faces currently visited for srcFacei to avoid multiple hits DynamicList<label> srcSeeds(10); // list to keep track of tgt faces used to seed src faces labelList srcTgtSeed(srcAddr.size(), -1); - srcTgtSeed[srcFaceI] = tgtFaceI; + srcTgtSeed[srcFacei] = tgtFacei; // list to keep track of whether src face can be mapped // 1 = mapped, 0 = untested, -1 = cannot map @@ -272,30 +272,30 @@ void Foam::directAMI<SourcePatch, TargetPatch>::calculate DynamicList<label> nonOverlapFaces; do { - srcAddr[srcFaceI].append(tgtFaceI); - tgtAddr[tgtFaceI].append(srcFaceI); + srcAddr[srcFacei].append(tgtFacei); + tgtAddr[tgtFacei].append(srcFacei); - mapFlag[srcFaceI] = 1; + mapFlag[srcFacei] = 1; nTested++; - // Do advancing front starting from srcFaceI, tgtFaceI + // Do advancing front starting from srcFacei, tgtFacei appendToDirectSeeds ( mapFlag, srcTgtSeed, srcSeeds, nonOverlapFaces, - srcFaceI, - tgtFaceI + srcFacei, + tgtFacei ); - if (srcFaceI < 0 && nTested < this->srcPatch_.size()) + if (srcFacei < 0 && nTested < this->srcPatch_.size()) { - restartAdvancingFront(mapFlag, nonOverlapFaces, srcFaceI, tgtFaceI); + restartAdvancingFront(mapFlag, nonOverlapFaces, srcFacei, tgtFacei); } - } while (srcFaceI >= 0); + } while (srcFacei >= 0); if (nonOverlapFaces.size() != 0) { diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.H index 19abca727abd7a7e85c78e8ae239885cf9434a77..2888270a3ed2d3dea4583a7d1f5477083b444f7b 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.H +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.H @@ -71,8 +71,8 @@ private: labelList& srcTgtSeed, DynamicList<label>& srcSeeds, DynamicList<label>& nonOverlapFaces, - label& srcFaceI, - label& tgtFaceI + label& srcFacei, + label& tgtFacei ) const; //- Restart the advancing front - typically happens for @@ -81,8 +81,8 @@ private: ( labelList& mapFlag, DynamicList<label>& nonOverlapFaces, - label& srcFaceI, - label& tgtFaceI + label& srcFacei, + label& tgtFacei ) const; @@ -91,8 +91,8 @@ private: //- Area of intersection between source and target faces scalar interArea ( - const label srcFaceI, - const label tgtFaceI + const label srcFacei, + const label tgtFacei ) const; @@ -132,8 +132,8 @@ public: scalarListList& srcWeights, labelListList& tgtAddress, scalarListList& tgtWeights, - label srcFaceI = -1, - label tgtFaceI = -1 + label srcFacei = -1, + label tgtFacei = -1 ); }; diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C index f0a63cbcff77a051db14e0629abaccaa2dc9c4f3..01777a2c15e11a686a2f34a67c7830550b1e9420 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C @@ -34,8 +34,8 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::calcAddressing List<DynamicList<scalar>>& srcWght, List<DynamicList<label>>& tgtAddr, List<DynamicList<scalar>>& tgtWght, - label srcFaceI, - label tgtFaceI + label srcFacei, + label tgtFacei ) { // construct weights and addressing @@ -46,12 +46,12 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::calcAddressing // list of tgt face neighbour faces DynamicList<label> nbrFaces(10); - // list of faces currently visited for srcFaceI to avoid multiple hits + // list of faces currently visited for srcFacei to avoid multiple hits DynamicList<label> visitedFaces(10); // list to keep track of tgt faces used to seed src faces labelList seedFaces(nFacesRemaining, -1); - seedFaces[srcFaceI] = tgtFaceI; + seedFaces[srcFacei] = tgtFacei; // list to keep track of whether src face can be mapped boolList mapFlag(nFacesRemaining, true); @@ -62,11 +62,11 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::calcAddressing DynamicList<label> nonOverlapFaces; do { - // Do advancing front starting from srcFaceI,tgtFaceI + // Do advancing front starting from srcFacei,tgtFacei bool faceProcessed = processSourceFace ( - srcFaceI, - tgtFaceI, + srcFacei, + tgtFacei, nbrFaces, visitedFaces, @@ -77,13 +77,13 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::calcAddressing tgtWght ); - mapFlag[srcFaceI] = false; + mapFlag[srcFacei] = false; nFacesRemaining--; if (!faceProcessed) { - nonOverlapFaces.append(srcFaceI); + nonOverlapFaces.append(srcFacei); } // choose new src face from current src face neighbour @@ -92,8 +92,8 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::calcAddressing setNextFaces ( startSeedI, - srcFaceI, - tgtFaceI, + srcFacei, + tgtFacei, mapFlag, seedFaces, visitedFaces @@ -108,12 +108,12 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::calcAddressing template<class SourcePatch, class TargetPatch> bool Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::processSourceFace ( - const label srcFaceI, - const label tgtStartFaceI, + const label srcFacei, + const label tgtStartFacei, // list of tgt face neighbour faces DynamicList<label>& nbrFaces, - // list of faces currently visited for srcFaceI to avoid multiple hits + // list of faces currently visited for srcFacei to avoid multiple hits DynamicList<label>& visitedFaces, // temporary storage for addressing and weights @@ -123,7 +123,7 @@ bool Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::processSourceFace List<DynamicList<scalar>>& tgtWght ) { - if (tgtStartFaceI == -1) + if (tgtStartFacei == -1) { return false; } @@ -132,10 +132,10 @@ bool Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::processSourceFace visitedFaces.clear(); // append initial target face and neighbours - nbrFaces.append(tgtStartFaceI); + nbrFaces.append(tgtStartFacei); this->appendNbrFaces ( - tgtStartFaceI, + tgtStartFacei, this->tgtPatch_, visitedFaces, nbrFaces @@ -146,22 +146,22 @@ bool Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::processSourceFace do { // process new target face - label tgtFaceI = nbrFaces.remove(); - visitedFaces.append(tgtFaceI); - scalar area = interArea(srcFaceI, tgtFaceI); + label tgtFacei = nbrFaces.remove(); + visitedFaces.append(tgtFacei); + scalar area = interArea(srcFacei, tgtFacei); // store when intersection fractional area > tolerance - if (area/this->srcMagSf_[srcFaceI] > faceAreaIntersect::tolerance()) + if (area/this->srcMagSf_[srcFacei] > faceAreaIntersect::tolerance()) { - srcAddr[srcFaceI].append(tgtFaceI); - srcWght[srcFaceI].append(area); + srcAddr[srcFacei].append(tgtFacei); + srcWght[srcFacei].append(area); - tgtAddr[tgtFaceI].append(srcFaceI); - tgtWght[tgtFaceI].append(area); + tgtAddr[tgtFacei].append(srcFacei); + tgtWght[tgtFacei].append(area); this->appendNbrFaces ( - tgtFaceI, + tgtFacei, this->tgtPatch_, visitedFaces, nbrFaces @@ -180,18 +180,18 @@ template<class SourcePatch, class TargetPatch> void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces ( label& startSeedI, - label& srcFaceI, - label& tgtFaceI, + label& srcFacei, + label& tgtFacei, const boolList& mapFlag, labelList& seedFaces, const DynamicList<label>& visitedFaces, bool errorOnNotFound ) const { - const labelList& srcNbrFaces = this->srcPatch_.faceFaces()[srcFaceI]; + const labelList& srcNbrFaces = this->srcPatch_.faceFaces()[srcFacei]; - // initialise tgtFaceI - tgtFaceI = -1; + // initialise tgtFacei + tgtFacei = -1; // set possible seeds for later use bool valuesSet = false; @@ -205,7 +205,7 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces { label faceT = visitedFaces[j]; scalar area = interArea(faceS, faceT); - scalar areaTotal = this->srcMagSf_[srcFaceI]; + scalar areaTotal = this->srcMagSf_[srcFacei]; // Check that faces have enough overlap for robust walking if (area/areaTotal > faceAreaIntersect::tolerance()) @@ -216,8 +216,8 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces if (!valuesSet) { - srcFaceI = faceS; - tgtFaceI = faceT; + srcFacei = faceS; + tgtFacei = faceT; valuesSet = true; } } @@ -246,8 +246,8 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces if (seedFaces[facei] != -1) { - srcFaceI = facei; - tgtFaceI = seedFaces[facei]; + srcFacei = facei; + tgtFacei = seedFaces[facei]; return; } @@ -272,10 +272,10 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces foundNextSeed = true; } - srcFaceI = facei; - tgtFaceI = this->findTargetFace(srcFaceI); + srcFacei = facei; + tgtFacei = this->findTargetFace(srcFacei); - if (tgtFaceI >= 0) + if (tgtFacei >= 0) { return; } @@ -294,8 +294,8 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces template<class SourcePatch, class TargetPatch> Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea ( - const label srcFaceI, - const label tgtFaceI + const label srcFacei, + const label tgtFacei ) const { scalar area = 0; @@ -304,13 +304,13 @@ Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea const pointField& tgtPoints = this->tgtPatch_.points(); // references to candidate faces - const face& src = this->srcPatch_[srcFaceI]; - const face& tgt = this->tgtPatch_[tgtFaceI]; + const face& src = this->srcPatch_[srcFacei]; + const face& tgt = this->tgtPatch_[tgtFacei]; // quick reject if either face has zero area // Note: do not use stored face areas for target patch const scalar tgtMag = tgt.mag(tgtPoints); - if ((this->srcMagSf_[srcFaceI] < ROOTVSMALL) || (tgtMag < ROOTVSMALL)) + if ((this->srcMagSf_[srcFacei] < ROOTVSMALL) || (tgtMag < ROOTVSMALL)) { return area; } @@ -319,14 +319,14 @@ Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea faceAreaIntersect inter(srcPoints, tgtPoints, this->reverseTarget_); // crude resultant norm - vector n(-this->srcPatch_.faceNormals()[srcFaceI]); + vector n(-this->srcPatch_.faceNormals()[srcFacei]); if (this->reverseTarget_) { - n -= this->tgtPatch_.faceNormals()[tgtFaceI]; + n -= this->tgtPatch_.faceNormals()[tgtFacei]; } else { - n += this->tgtPatch_.faceNormals()[tgtFaceI]; + n += this->tgtPatch_.faceNormals()[tgtFacei]; } scalar magN = mag(n); @@ -337,9 +337,9 @@ Foam::scalar Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::interArea else { WarningInFunction - << "Invalid normal for source face " << srcFaceI + << "Invalid normal for source face " << srcFacei << " points " << UIndirectList<point>(srcPoints, src) - << " target face " << tgtFaceI + << " target face " << tgtFacei << " points " << UIndirectList<point>(tgtPoints, tgt) << endl; } @@ -368,14 +368,14 @@ restartUncoveredSourceFace // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ labelHashSet lowWeightFaces(100); - forAll(srcWght, srcFaceI) + forAll(srcWght, srcFacei) { - scalar s = sum(srcWght[srcFaceI]); - scalar t = s/this->srcMagSf_[srcFaceI]; + scalar s = sum(srcWght[srcFacei]); + scalar t = s/this->srcMagSf_[srcFacei]; if (t < 0.5) { - lowWeightFaces.insert(srcFaceI); + lowWeightFaces.insert(srcFacei); } } @@ -393,12 +393,12 @@ restartUncoveredSourceFace DynamicList<label> okSrcFaces(10); DynamicList<scalar> okSrcWeights(10); - forAll(tgtAddr, tgtFaceI) + forAll(tgtAddr, tgtFacei) { okSrcFaces.clear(); okSrcWeights.clear(); - DynamicList<label>& srcFaces = tgtAddr[tgtFaceI]; - DynamicList<scalar>& srcWeights = tgtWght[tgtFaceI]; + DynamicList<label>& srcFaces = tgtAddr[tgtFacei]; + DynamicList<scalar>& srcWeights = tgtWght[tgtFacei]; forAll(srcFaces, i) { if (!lowWeightFaces.found(srcFaces[i])) @@ -422,20 +422,20 @@ restartUncoveredSourceFace // list of tgt face neighbour faces DynamicList<label> nbrFaces(10); - // list of faces currently visited for srcFaceI to avoid multiple hits + // list of faces currently visited for srcFacei to avoid multiple hits DynamicList<label> visitedFaces(10); forAllConstIter(labelHashSet, lowWeightFaces, iter) { - label srcFaceI = iter.key(); - label tgtFaceI = this->findTargetFace(srcFaceI); - if (tgtFaceI != -1) + label srcFacei = iter.key(); + label tgtFacei = this->findTargetFace(srcFacei); + if (tgtFacei != -1) { //bool faceProcessed = processSourceFace ( - srcFaceI, - tgtFaceI, + srcFacei, + tgtFacei, nbrFaces, visitedFaces, @@ -497,8 +497,8 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::calculate scalarListList& srcWeights, labelListList& tgtAddress, scalarListList& tgtWeights, - label srcFaceI, - label tgtFaceI + label srcFacei, + label tgtFacei ) { bool ok = @@ -508,8 +508,8 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::calculate srcWeights, tgtAddress, tgtWeights, - srcFaceI, - tgtFaceI + srcFacei, + tgtFacei ); if (!ok) @@ -529,8 +529,8 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::calculate srcWght, tgtAddr, tgtWght, - srcFaceI, - tgtFaceI + srcFacei, + tgtFacei ); if (debug && !this->srcNonOverlap_.empty()) diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.H index 7162d602d95e003abbb4f65b2fd4f523c8ee74f7..b97bcd000e731ab1d55ba4371480dcd2be11e1b6 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.H +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.H @@ -78,15 +78,15 @@ protected: List<DynamicList<scalar>>& srcWeights, List<DynamicList<label>>& tgtAddress, List<DynamicList<scalar>>& tgtWeights, - label srcFaceI, - label tgtFaceI + label srcFacei, + label tgtFacei ); - //- Determine overlap contributions for source face srcFaceI + //- Determine overlap contributions for source face srcFacei virtual bool processSourceFace ( - const label srcFaceI, - const label tgtStartFaceI, + const label srcFacei, + const label tgtStartFacei, DynamicList<label>& nbrFaces, DynamicList<label>& visitedFaces, List<DynamicList<label>>& srcAddr, @@ -108,8 +108,8 @@ protected: virtual void setNextFaces ( label& startSeedI, - label& srcFaceI, - label& tgtFaceI, + label& srcFacei, + label& tgtFacei, const boolList& mapFlag, labelList& seedFaces, const DynamicList<label>& visitedFaces, @@ -122,8 +122,8 @@ protected: //- Area of intersection between source and target faces virtual scalar interArea ( - const label srcFaceI, - const label tgtFaceI + const label srcFacei, + const label tgtFacei ) const; @@ -164,8 +164,8 @@ public: scalarListList& srcWeights, labelListList& tgtAddress, scalarListList& tgtWeights, - label srcFaceI = -1, - label tgtFaceI = -1 + label srcFacei = -1, + label tgtFacei = -1 ); }; diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C index cefbb07236d54b21cd1c458f3ce023a9eb0be9c4..78c0ea5dfdc78b5102b76a3a71338ebc1a7f2005 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C @@ -32,17 +32,17 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::findNearestFace ( const SourcePatch& srcPatch, const TargetPatch& tgtPatch, - const label& srcFaceI, - label& tgtFaceI + const label& srcFacei, + label& tgtFacei ) const { const vectorField& srcCf = srcPatch.faceCentres(); const vectorField& tgtCf = tgtPatch.faceCentres(); - const vector srcP = srcCf[srcFaceI]; + const vector srcP = srcCf[srcFacei]; DynamicList<label> tgtFaces(10); - tgtFaces.append(tgtFaceI); + tgtFaces.append(tgtFacei); DynamicList<label> visitedFaces(10); @@ -56,12 +56,12 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::findNearestFace scalar dTest = magSqr(tgtCf[tgtI] - srcP); if (dTest < d) { - tgtFaceI = tgtI; + tgtFacei = tgtI; d = dTest; this->appendNbrFaces ( - tgtFaceI, + tgtFacei, tgtPatch, visitedFaces, tgtFaces @@ -77,20 +77,20 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::setNextNearestFaces ( boolList& mapFlag, label& startSeedI, - label& srcFaceI, - label& tgtFaceI + label& srcFacei, + label& tgtFacei ) const { - const labelList& srcNbr = this->srcPatch_.faceFaces()[srcFaceI]; + const labelList& srcNbr = this->srcPatch_.faceFaces()[srcFacei]; - srcFaceI = -1; + srcFacei = -1; forAll(srcNbr, i) { label facei = srcNbr[i]; if (mapFlag[facei]) { - srcFaceI = facei; + srcFacei = facei; startSeedI = facei + 1; return; @@ -101,16 +101,16 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::setNextNearestFaces { if (mapFlag[facei]) { - srcFaceI = facei; - tgtFaceI = this->findTargetFace(facei); + srcFacei = facei; + tgtFacei = this->findTargetFace(facei); - if (tgtFaceI == -1) + if (tgtFacei == -1) { const vectorField& srcCf = this->srcPatch_.faceCentres(); FatalErrorInFunction << "Unable to find target face for source face " - << srcFaceI << " with face centre " << srcCf[srcFaceI] + << srcFacei << " with face centre " << srcCf[srcFacei] << abort(FatalError); } @@ -123,18 +123,18 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::setNextNearestFaces template<class SourcePatch, class TargetPatch> Foam::label Foam::mapNearestAMI<SourcePatch, TargetPatch>::findMappedSrcFace ( - const label tgtFaceI, + const label tgtFacei, const List<DynamicList<label>>& tgtToSrc ) const { DynamicList<label> testFaces(10); DynamicList<label> visitedFaces(10); - testFaces.append(tgtFaceI); + testFaces.append(tgtFacei); do { - // search target tgtFaceI neighbours for match with source face + // search target tgtFacei neighbours for match with source face label tgtI = testFaces.remove(); if (findIndex(visitedFaces, tgtI) == -1) @@ -208,8 +208,8 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate scalarListList& srcWeights, labelListList& tgtAddress, scalarListList& tgtWeights, - label srcFaceI, - label tgtFaceI + label srcFacei, + label tgtFacei ) { bool ok = @@ -219,8 +219,8 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate srcWeights, tgtAddress, tgtWeights, - srcFaceI, - tgtFaceI + srcFacei, + tgtFacei ); if (!ok) @@ -246,22 +246,22 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate DynamicList<label> nonOverlapFaces; do { - findNearestFace(this->srcPatch_, this->tgtPatch_, srcFaceI, tgtFaceI); + findNearestFace(this->srcPatch_, this->tgtPatch_, srcFacei, tgtFacei); - srcAddr[srcFaceI].append(tgtFaceI); - tgtAddr[tgtFaceI].append(srcFaceI); + srcAddr[srcFacei].append(tgtFacei); + tgtAddr[tgtFacei].append(srcFacei); - mapFlag[srcFaceI] = false; + mapFlag[srcFacei] = false; - // Do advancing front starting from srcFaceI, tgtFaceI + // Do advancing front starting from srcFacei, tgtFacei setNextNearestFaces ( mapFlag, startSeedI, - srcFaceI, - tgtFaceI + srcFacei, + tgtFacei ); - } while (srcFaceI >= 0); + } while (srcFacei >= 0); // for the case of multiple source faces per target face, select the @@ -269,16 +269,16 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate const vectorField& srcCf = this->srcPatch_.faceCentres(); const vectorField& tgtCf = this->tgtPatch_.faceCentres(); - forAll(tgtAddr, targetFaceI) + forAll(tgtAddr, targetFacei) { - if (tgtAddr[targetFaceI].size() > 1) + if (tgtAddr[targetFacei].size() > 1) { - const vector& tgtC = tgtCf[tgtFaceI]; + const vector& tgtC = tgtCf[tgtFacei]; - DynamicList<label>& srcFaces = tgtAddr[targetFaceI]; + DynamicList<label>& srcFaces = tgtAddr[targetFacei]; - label srcFaceI = srcFaces[0]; - scalar d = magSqr(tgtC - srcCf[srcFaceI]); + label srcFacei = srcFaces[0]; + scalar d = magSqr(tgtC - srcCf[srcFacei]); for (label i = 1; i < srcFaces.size(); i++) { @@ -287,35 +287,35 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::calculate if (dNew < d) { d = dNew; - srcFaceI = srcI; + srcFacei = srcI; } } srcFaces.clear(); - srcFaces.append(srcFaceI); + srcFaces.append(srcFacei); } } // If there are more target faces than source faces, some target faces // might not yet be mapped - forAll(tgtAddr, tgtFaceI) + forAll(tgtAddr, tgtFacei) { - if (tgtAddr[tgtFaceI].empty()) + if (tgtAddr[tgtFacei].empty()) { - label srcFaceI = findMappedSrcFace(tgtFaceI, tgtAddr); + label srcFacei = findMappedSrcFace(tgtFacei, tgtAddr); - if (srcFaceI >= 0) + if (srcFacei >= 0) { // note - reversed search from src->tgt to tgt->src findNearestFace ( this->tgtPatch_, this->srcPatch_, - tgtFaceI, - srcFaceI + tgtFacei, + srcFacei ); - tgtAddr[tgtFaceI].append(srcFaceI); + tgtAddr[tgtFacei].append(srcFacei); } } } diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.H index 8e8634705b74b20dd1929b2de7dac59f907784b9..3325cd6e7768f146d28a4dfb1e6990a73b0d183e 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.H +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.H @@ -64,13 +64,13 @@ private: // Marching front - //- Find nearest target face for source face srcFaceI + //- Find nearest target face for source face srcFacei void findNearestFace ( const SourcePatch& srcPatch, const TargetPatch& tgtPatch, - const label& srcFaceI, - label& tgtFaceI + const label& srcFacei, + label& tgtFacei ) const; //- Determine next source-target face pair @@ -78,14 +78,14 @@ private: ( boolList& mapFlag, label& startSeedI, - label& srcFaceI, - label& tgtFaceI + label& srcFacei, + label& tgtFacei ) const; //- Find mapped source face label findMappedSrcFace ( - const label tgtFaceI, + const label tgtFacei, const List<DynamicList<label>>& tgtToSrc ) const; @@ -95,8 +95,8 @@ private: //- Area of intersection between source and target faces scalar interArea ( - const label srcFaceI, - const label tgtFaceI + const label srcFacei, + const label tgtFacei ) const; @@ -136,8 +136,8 @@ public: scalarListList& srcWeights, labelListList& tgtAddress, scalarListList& tgtWeights, - label srcFaceI = -1, - label tgtFaceI = -1 + label srcFacei = -1, + label tgtFacei = -1 ); }; diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.C index eed906230aeecd23f097071a3f5b6629b338a7f2..b6914215aa426831db8dab331a2ada4e3e67f90b 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.C @@ -31,8 +31,8 @@ template<class SourcePatch, class TargetPatch> void Foam::partialFaceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces ( label& startSeedI, - label& srcFaceI, - label& tgtFaceI, + label& srcFacei, + label& tgtFacei, const boolList& mapFlag, labelList& seedFaces, const DynamicList<label>& visitedFaces, @@ -42,8 +42,8 @@ void Foam::partialFaceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces ( startSeedI, - srcFaceI, - tgtFaceI, + srcFacei, + tgtFacei, mapFlag, seedFaces, visitedFaces, @@ -104,8 +104,8 @@ void Foam::partialFaceAreaWeightAMI<SourcePatch, TargetPatch>::calculate scalarListList& srcWeights, labelListList& tgtAddress, scalarListList& tgtWeights, - label srcFaceI, - label tgtFaceI + label srcFacei, + label tgtFacei ) { bool ok = @@ -115,8 +115,8 @@ void Foam::partialFaceAreaWeightAMI<SourcePatch, TargetPatch>::calculate srcWeights, tgtAddress, tgtWeights, - srcFaceI, - tgtFaceI + srcFacei, + tgtFacei ); if (!ok) @@ -136,8 +136,8 @@ void Foam::partialFaceAreaWeightAMI<SourcePatch, TargetPatch>::calculate srcWght, tgtAddr, tgtWght, - srcFaceI, - tgtFaceI + srcFacei, + tgtFacei ); // transfer data to persistent storage diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.H index 2e3855270ba0e54d0dab1ff8a3a0a8dd33427162..1db671c1011cccf902b5fe5251cc16c39ff3253c 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.H +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.H @@ -68,8 +68,8 @@ private: virtual void setNextFaces ( label& startSeedI, - label& srcFaceI, - label& tgtFaceI, + label& srcFacei, + label& tgtFacei, const boolList& mapFlag, labelList& seedFaces, const DynamicList<label>& visitedFaces, @@ -119,8 +119,8 @@ public: scalarListList& srcWeights, labelListList& tgtAddress, scalarListList& tgtWeights, - label srcFaceI = -1, - label tgtFaceI = -1 + label srcFacei = -1, + label tgtFacei = -1 ); }; diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index d4b659c7240ce236d9cfb7dfb9a96c3e878c0e6a..257d4737cb8abc25426753f8ccfc9209a0ff6ed7 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -999,11 +999,11 @@ Foam::label Foam::cyclicAMIPolyPatch::pointFace vector nrt(n); reverseTransformDirection(nrt, facei); - label nbrFaceI = -1; + label nbrFacei = -1; if (owner()) { - nbrFaceI = AMI().tgtPointFace + nbrFacei = AMI().tgtPointFace ( *this, neighbPatch(), @@ -1014,7 +1014,7 @@ Foam::label Foam::cyclicAMIPolyPatch::pointFace } else { - nbrFaceI = neighbPatch().AMI().srcPointFace + nbrFacei = neighbPatch().AMI().srcPointFace ( neighbPatch(), *this, @@ -1024,12 +1024,12 @@ Foam::label Foam::cyclicAMIPolyPatch::pointFace ); } - if (nbrFaceI >= 0) + if (nbrFacei >= 0) { p = prt; } - return nbrFaceI; + return nbrFacei; } diff --git a/src/meshTools/algorithms/MeshWave/FaceCellWave.C b/src/meshTools/algorithms/MeshWave/FaceCellWave.C index f3b3bca11b74e62d50c7cb5a4d41e6b6fc2cae48..d073ee572bfda77277161b8a94123d02b93cf289 100644 --- a/src/meshTools/algorithms/MeshWave/FaceCellWave.C +++ b/src/meshTools/algorithms/MeshWave/FaceCellWave.C @@ -80,19 +80,19 @@ namespace Foam { if (y.valid(solver_.data())) { - label meshFaceI = -1; + label meshFacei = -1; if (patch_.owner()) { - meshFaceI = patch_.start() + facei; + meshFacei = patch_.start() + facei; } else { - meshFaceI = patch_.neighbPatch().start() + facei; + meshFacei = patch_.neighbPatch().start() + facei; } x.updateFace ( solver_.mesh(), - meshFaceI, + meshFacei, y, solver_.propagationTol(), solver_.data() @@ -115,7 +115,7 @@ template<class Type, class TrackingData> bool Foam::FaceCellWave<Type, TrackingData>::updateCell ( const label celli, - const label neighbourFaceI, + const label neighbourFacei, const Type& neighbourInfo, const scalar tol, Type& cellInfo @@ -130,7 +130,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell ( mesh_, celli, - neighbourFaceI, + neighbourFacei, neighbourInfo, tol, td_ @@ -163,7 +163,7 @@ template<class Type, class TrackingData> bool Foam::FaceCellWave<Type, TrackingData>::updateFace ( const label facei, - const label neighbourCellI, + const label neighbourCelli, const Type& neighbourInfo, const scalar tol, Type& faceInfo @@ -178,7 +178,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace ( mesh_, facei, - neighbourCellI, + neighbourCelli, neighbourInfo, tol, td_ @@ -258,10 +258,10 @@ void Foam::FaceCellWave<Type, TrackingData>::checkCyclic const cyclicPolyPatch& nbrPatch = refCast<const cyclicPolyPatch>(patch).neighbPatch(); - forAll(patch, patchFaceI) + forAll(patch, patchFacei) { - label i1 = patch.start() + patchFaceI; - label i2 = nbrPatch.start() + patchFaceI; + label i1 = patch.start() + patchFacei; + label i2 = nbrPatch.start() + patchFacei; if ( @@ -317,14 +317,14 @@ void Foam::FaceCellWave<Type, TrackingData>::setFaceInfo const List<Type>& changedFacesInfo ) { - forAll(changedFaces, changedFaceI) + forAll(changedFaces, changedFacei) { - label facei = changedFaces[changedFaceI]; + label facei = changedFaces[changedFacei]; bool wasValid = allFaceInfo_[facei].valid(td_); // Copy info for facei - allFaceInfo_[facei] = changedFacesInfo[changedFaceI]; + allFaceInfo_[facei] = changedFacesInfo[changedFacei]; // Maintain count of unset faces if (!wasValid && allFaceInfo_[facei].valid(td_)) @@ -350,20 +350,20 @@ void Foam::FaceCellWave<Type, TrackingData>::mergeFaceInfo const List<Type>& changedFacesInfo ) { - for (label changedFaceI = 0; changedFaceI < nFaces; changedFaceI++) + for (label changedFacei = 0; changedFacei < nFaces; changedFacei++) { - const Type& neighbourWallInfo = changedFacesInfo[changedFaceI]; - label patchFaceI = changedFaces[changedFaceI]; + const Type& neighbourWallInfo = changedFacesInfo[changedFacei]; + label patchFacei = changedFaces[changedFacei]; - label meshFaceI = patch.start() + patchFaceI; + label meshFacei = patch.start() + patchFacei; - Type& currentWallInfo = allFaceInfo_[meshFaceI]; + Type& currentWallInfo = allFaceInfo_[meshFacei]; if (!currentWallInfo.equal(neighbourWallInfo, td_)) { updateFace ( - meshFaceI, + meshFacei, neighbourWallInfo, propagationTol_, currentWallInfo @@ -380,7 +380,7 @@ template<class Type, class TrackingData> Foam::label Foam::FaceCellWave<Type, TrackingData>::getChangedPatchFaces ( const polyPatch& patch, - const label startFaceI, + const label startFacei, const label nFaces, labelList& changedPatchFaces, List<Type>& changedPatchFacesInfo @@ -390,14 +390,14 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::getChangedPatchFaces for (label i = 0; i < nFaces; i++) { - label patchFaceI = i + startFaceI; + label patchFacei = i + startFacei; - label meshFaceI = patch.start() + patchFaceI; + label meshFacei = patch.start() + patchFacei; - if (changedFace_[meshFaceI]) + if (changedFace_[meshFacei]) { - changedPatchFaces[nChangedPatchFaces] = patchFaceI; - changedPatchFacesInfo[nChangedPatchFaces] = allFaceInfo_[meshFaceI]; + changedPatchFaces[nChangedPatchFaces] = patchFacei; + changedPatchFacesInfo[nChangedPatchFaces] = allFaceInfo_[meshFacei]; nChangedPatchFaces++; } } @@ -419,10 +419,10 @@ void Foam::FaceCellWave<Type, TrackingData>::leaveDomain for (label i = 0; i < nFaces; i++) { - label patchFaceI = faceLabels[i]; + label patchFacei = faceLabels[i]; - label meshFaceI = patch.start() + patchFaceI; - faceInfo[i].leaveDomain(mesh_, patch, patchFaceI, fc[meshFaceI], td_); + label meshFacei = patch.start() + patchFacei; + faceInfo[i].leaveDomain(mesh_, patch, patchFacei, fc[meshFacei], td_); } } @@ -441,10 +441,10 @@ void Foam::FaceCellWave<Type, TrackingData>::enterDomain for (label i = 0; i < nFaces; i++) { - label patchFaceI = faceLabels[i]; + label patchFacei = faceLabels[i]; - label meshFaceI = patch.start() + patchFaceI; - faceInfo[i].enterDomain(mesh_, patch, patchFaceI, fc[meshFaceI], td_); + label meshFacei = patch.start() + patchFacei; + faceInfo[i].enterDomain(mesh_, patch, patchFacei, fc[meshFacei], td_); } } @@ -778,9 +778,9 @@ void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches() // Merge into global storage forAll(receiveInfo, i) { - label meshFaceI = cycPatch.start()+i; + label meshFacei = cycPatch.start()+i; - Type& currentWallInfo = allFaceInfo_[meshFaceI]; + Type& currentWallInfo = allFaceInfo_[meshFacei]; if ( @@ -790,7 +790,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches() { updateFace ( - meshFaceI, + meshFacei, receiveInfo[i], propagationTol_, currentWallInfo @@ -946,12 +946,12 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell() for ( - label changedFaceI = 0; - changedFaceI < nChangedFaces_; - changedFaceI++ + label changedFacei = 0; + changedFacei < nChangedFaces_; + changedFacei++ ) { - label facei = changedFaces_[changedFaceI]; + label facei = changedFaces_[changedFacei]; if (!changedFace_[facei]) { FatalErrorInFunction @@ -1029,12 +1029,12 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::cellToFace() for ( - label changedCellI = 0; - changedCellI < nChangedCells_; - changedCellI++ + label changedCelli = 0; + changedCelli < nChangedCells_; + changedCelli++ ) { - label celli = changedCells_[changedCellI]; + label celli = changedCells_[changedCelli]; if (!changedCell_[celli]) { FatalErrorInFunction diff --git a/src/meshTools/algorithms/MeshWave/FaceCellWave.H b/src/meshTools/algorithms/MeshWave/FaceCellWave.H index cbb5b5c4433861cfd9b43871eb7064f65697c53e..49f0e03a562b2e2562ecb44ba344e7d1333603da 100644 --- a/src/meshTools/algorithms/MeshWave/FaceCellWave.H +++ b/src/meshTools/algorithms/MeshWave/FaceCellWave.H @@ -132,7 +132,7 @@ class FaceCellWave bool updateCell ( const label celli, - const label neighbourFaceI, + const label neighbourFacei, const Type& neighbourInfo, const scalar tol, Type& cellInfo @@ -143,7 +143,7 @@ class FaceCellWave bool updateFace ( const label facei, - const label neighbourCellI, + const label neighbourCelli, const Type& neighbourInfo, const scalar tol, Type& faceInfo @@ -182,7 +182,7 @@ class FaceCellWave label getChangedPatchFaces ( const polyPatch& patch, - const label startFaceI, + const label startFacei, const label nFaces, labelList& changedPatchFaces, List<Type>& changedPatchFacesInfo diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.C b/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.C index 7f4780faeb10beb67b4093e8a5d05c2633a003c2..2e481be288cfc960e6f47b602cf319b34a50eb6f 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.C +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.C @@ -67,7 +67,7 @@ bool Foam::PatchEdgeFaceWave<PrimitivePatchType, Type, TrackingData>:: updateEdge ( const label edgeI, - const label neighbourFaceI, + const label neighbourFacei, const Type& neighbourInfo, Type& edgeInfo ) @@ -82,7 +82,7 @@ updateEdge mesh_, patch_, edgeI, - neighbourFaceI, + neighbourFacei, neighbourInfo, propagationTol_, td_ @@ -493,9 +493,9 @@ faceToEdge() changedEdges_.clear(); changedEdge_ = false; - forAll(changedFaces_, changedFaceI) + forAll(changedFaces_, changedFacei) { - label facei = changedFaces_[changedFaceI]; + label facei = changedFaces_[changedFacei]; if (!changedFace_[facei]) { @@ -576,9 +576,9 @@ edgeToFace() // Evaluate all connected faces const labelList& eFaces = edgeFaces[edgeI]; - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - label facei = eFaces[eFaceI]; + label facei = eFaces[eFacei]; Type& currentWallInfo = allFaceInfo_[facei]; diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.H b/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.H index 5bb841f4a5e83765458e3058dc8257f87b429e40..124833e554cb8012fa9a9901e0d91cb03e870223 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.H @@ -133,7 +133,7 @@ class PatchEdgeFaceWave bool updateEdge ( const label edgeI, - const label neighbourFaceI, + const label neighbourFacei, const Type& neighbourInfo, Type& edgeInfo ); diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchPatchDist.C b/src/meshTools/algorithms/PatchEdgeFaceWave/patchPatchDist.C index 56849388d8c13970d5b8a46b8727b7959c6f52ae..24d210eadbd78c6144bddf23ce591c85b008607d 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchPatchDist.C +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchPatchDist.C @@ -59,8 +59,8 @@ void Foam::patchPatchDist::correct() label nBnd = 0; forAllConstIter(labelHashSet, nbrPatchIDs_, iter) { - label nbrPatchI = iter.key(); - const polyPatch& nbrPatch = patch_.boundaryMesh()[nbrPatchI]; + label nbrPatchi = iter.key(); + const polyPatch& nbrPatch = patch_.boundaryMesh()[nbrPatchi]; nBnd += nbrPatch.nEdges()-nbrPatch.nInternalEdges(); } @@ -70,8 +70,8 @@ void Foam::patchPatchDist::correct() forAllConstIter(labelHashSet, nbrPatchIDs_, iter) { - label nbrPatchI = iter.key(); - const polyPatch& nbrPatch = patch_.boundaryMesh()[nbrPatchI]; + label nbrPatchi = iter.key(); + const polyPatch& nbrPatch = patch_.boundaryMesh()[nbrPatchi]; const labelList& nbrMp = nbrPatch.meshPoints(); for @@ -83,7 +83,7 @@ void Foam::patchPatchDist::correct() { const edge& e = nbrPatch.edges()[edgeI]; const edge meshE = edge(nbrMp[e[0]], nbrMp[e[1]]); - nbrEdges.insert(meshE, nbrPatchI); + nbrEdges.insert(meshE, nbrPatchi); } } diff --git a/src/meshTools/cellClassification/cellClassification.C b/src/meshTools/cellClassification/cellClassification.C index 2df5dd90cd5433ad3167f3cf399b2c94292b0413..bfb8443463c121acdd035d421012227a4254cdaf 100644 --- a/src/meshTools/cellClassification/cellClassification.C +++ b/src/meshTools/cellClassification/cellClassification.C @@ -105,9 +105,9 @@ Foam::boolList Foam::cellClassification::markFaces { const labelList& myFaces = mesh_.edgeFaces()[edgeI]; - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - label facei = myFaces[myFaceI]; + label facei = myFaces[myFacei]; if (!cutFace[facei]) { @@ -131,19 +131,19 @@ Foam::boolList Foam::cellClassification::markFaces labelList allFaces(mesh_.nFaces() - nCutFaces); - label allFaceI = 0; + label allFacei = 0; forAll(cutFace, facei) { if (!cutFace[facei]) { - allFaces[allFaceI++] = facei; + allFaces[allFacei++] = facei; } } if (debug) { - Pout<< "Testing " << allFaceI << " faces for piercing by surface" + Pout<< "Testing " << allFacei << " faces for piercing by surface" << endl; } @@ -300,9 +300,9 @@ void Foam::cellClassification::markCells // Mark faces of celli const labelList& myFaces = mesh_.cells()[celli]; - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - outsideFacesMap.insert(myFaces[myFaceI]); + outsideFacesMap.insert(myFaces[myFacei]); } } } @@ -405,9 +405,9 @@ bool Foam::cellClassification::usesMixedPointsOnly const cell& cFaces = mesh_.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = faces[cFaces[cFaceI]]; + const face& f = faces[cFaces[cFacei]]; forAll(f, fp) { @@ -631,9 +631,9 @@ Foam::label Foam::cellClassification::growSurface const labelList& myCells = mesh_.pointCells()[pointI]; // Check if one of cells has meshType - forAll(myCells, myCellI) + forAll(myCells, myCelli) { - label type = operator[](myCells[myCellI]); + label type = operator[](myCells[myCelli]); if (type == meshType) { @@ -654,11 +654,11 @@ Foam::label Foam::cellClassification::growSurface { const labelList& myCells = mesh_.pointCells()[pointI]; - forAll(myCells, myCellI) + forAll(myCells, myCelli) { - if (operator[](myCells[myCellI]) != meshType) + if (operator[](myCells[myCelli]) != meshType) { - operator[](myCells[myCellI]) = fillType; + operator[](myCells[myCelli]) = fillType; nChanged++; } @@ -768,9 +768,9 @@ Foam::label Foam::cellClassification::fillRegionEdges forAll(eFaces, i) { - label patchFaceI = eFaces[i]; + label patchFacei = eFaces[i]; - label ownerCell = outsideOwner[patchFaceI]; + label ownerCell = outsideOwner[patchFacei]; if (operator[](ownerCell) == meshType) { @@ -841,8 +841,8 @@ Foam::label Foam::cellClassification::fillRegionPoints // one would be best to remove. forAll(pFaces, i) { - const label patchFaceI = pFaces[i]; - const label ownerCell = outsideOwner[patchFaceI]; + const label patchFacei = pFaces[i]; + const label ownerCell = outsideOwner[patchFacei]; if (operator[](ownerCell) == meshType) { diff --git a/src/meshTools/cellClassification/cellInfo.H b/src/meshTools/cellClassification/cellInfo.H index d7fab361d89e7e9f98b62004c26216510f3b5c21..8a43eb43bf9e2173771140700f978bcbf331d98e 100644 --- a/src/meshTools/cellClassification/cellInfo.H +++ b/src/meshTools/cellClassification/cellInfo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -67,10 +67,10 @@ class cellInfo inline bool update ( const cellInfo& w2, - const label thisFaceI, - const label thisCellI, - const label neighbourFaceI, - const label neighbourCellI, + const label thisFacei, + const label thisCelli, + const label neighbourFacei, + const label neighbourCelli, TrackingData& td ); @@ -122,7 +122,7 @@ public: ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -133,7 +133,7 @@ public: ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -152,8 +152,8 @@ public: inline bool updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const cellInfo& neighbourInfo, const scalar tol, TrackingData& td @@ -164,8 +164,8 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const cellInfo& neighbourInfo, const scalar tol, TrackingData& td @@ -176,7 +176,7 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const cellInfo& neighbourInfo, const scalar tol, TrackingData& td diff --git a/src/meshTools/cellClassification/cellInfoI.H b/src/meshTools/cellClassification/cellInfoI.H index 11902e02b133cd04978bf2c6a2a980ce716e85cb..41b43f3cc94ecab5b1804f4b0d00c026eb00c321 100644 --- a/src/meshTools/cellClassification/cellInfoI.H +++ b/src/meshTools/cellClassification/cellInfoI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,10 +33,10 @@ template<class TrackingData> inline bool Foam::cellInfo::update ( const cellInfo& w2, - const label thisFaceI, - const label thisCellI, - const label neighbourFaceI, - const label neighbourCellI, + const label thisFacei, + const label thisCelli, + const label neighbourFacei, + const label neighbourCelli, TrackingData& td ) { @@ -49,10 +49,10 @@ inline bool Foam::cellInfo::update FatalErrorInFunction << "Problem: trying to propagate NOTSET or CUT type:" << w2.type() << " into cell/face with type:" << type() << endl - << "thisFaceI:" << thisFaceI - << " thisCellI:" << thisCellI - << " neighbourFaceI:" << neighbourFaceI - << " neighbourCellI:" << neighbourCellI + << "thisFacei:" << thisFacei + << " thisCelli:" << thisCelli + << " neighbourFacei:" << neighbourFacei + << " neighbourCelli:" << neighbourCelli << abort(FatalError); return false; } @@ -80,10 +80,10 @@ inline bool Foam::cellInfo::update FatalErrorInFunction << "Problem: trying to propagate conflicting types:" << w2.type() << " into cell/face with type:" << type() << endl - << "thisFaceI:" << thisFaceI - << " thisCellI:" << thisCellI - << " neighbourFaceI:" << neighbourFaceI - << " neighbourCellI:" << neighbourCellI + << "thisFacei:" << thisFacei + << " thisCelli:" << thisCelli + << " neighbourFacei:" << neighbourFacei + << " neighbourCelli:" << neighbourCelli << abort(FatalError); return false; @@ -143,7 +143,7 @@ inline void Foam::cellInfo::leaveDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ) @@ -167,7 +167,7 @@ inline void Foam::cellInfo::enterDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ) @@ -179,8 +179,8 @@ template<class TrackingData> inline bool Foam::cellInfo::updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const cellInfo& neighbourInfo, const scalar tol, TrackingData& td @@ -190,8 +190,8 @@ inline bool Foam::cellInfo::updateCell ( neighbourInfo, -1, - thisCellI, - neighbourFaceI, + thisCelli, + neighbourFacei, -1, td ); @@ -203,8 +203,8 @@ template<class TrackingData> inline bool Foam::cellInfo::updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const cellInfo& neighbourInfo, const scalar tol, TrackingData& td @@ -213,10 +213,10 @@ inline bool Foam::cellInfo::updateFace return update ( neighbourInfo, - thisFaceI, + thisFacei, -1, -1, - neighbourCellI, + neighbourCelli, td ); } @@ -226,7 +226,7 @@ template<class TrackingData> inline bool Foam::cellInfo::updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const cellInfo& neighbourInfo, const scalar tol, TrackingData& td @@ -235,7 +235,7 @@ inline bool Foam::cellInfo::updateFace return update ( neighbourInfo, - thisFaceI, + thisFacei, -1, -1, -1, diff --git a/src/meshTools/cellDist/cellDistFuncs.C b/src/meshTools/cellDist/cellDistFuncs.C index 0f4bff324e6041b532de60466159a00f7bb5678c..e985d32df69f8b3b7a3246dd97a2f01cdcb8a385 100644 --- a/src/meshTools/cellDist/cellDistFuncs.C +++ b/src/meshTools/cellDist/cellDistFuncs.C @@ -85,24 +85,24 @@ Foam::scalar Foam::cellDistFuncs::smallestDist const polyPatch& patch, const label nWallFaces, const labelList& wallFaces, - label& minFaceI + label& minFacei ) const { const pointField& points = patch.points(); scalar minDist = GREAT; - minFaceI = -1; + minFacei = -1; - for (label wallFaceI = 0; wallFaceI < nWallFaces; wallFaceI++) + for (label wallFacei = 0; wallFacei < nWallFaces; wallFacei++) { - label patchFaceI = wallFaces[wallFaceI]; + label patchFacei = wallFaces[wallFacei]; - pointHit curHit = patch[patchFaceI].nearestPoint(p, points); + pointHit curHit = patch[patchFacei].nearestPoint(p, points); if (curHit.distance() < minDist) { minDist = curHit.distance(); - minFaceI = patch.start() + patchFaceI; + minFacei = patch.start() + patchFacei; } } @@ -116,17 +116,17 @@ Foam::scalar Foam::cellDistFuncs::smallestDist Foam::label Foam::cellDistFuncs::getPointNeighbours ( const primitivePatch& patch, - const label patchFaceI, + const label patchFacei, labelList& neighbours ) const { label nNeighbours = 0; // Add myself - neighbours[nNeighbours++] = patchFaceI; + neighbours[nNeighbours++] = patchFacei; // Add all face neighbours - const labelList& faceNeighbours = patch.faceFaces()[patchFaceI]; + const labelList& faceNeighbours = patch.faceFaces()[patchFacei]; forAll(faceNeighbours, faceNeighbourI) { @@ -141,7 +141,7 @@ Foam::label Foam::cellDistFuncs::getPointNeighbours // Assumes that point-only neighbours are not using multiple points on // face. - const face& f = patch.localFaces()[patchFaceI]; + const face& f = patch.localFaces()[patchFacei]; forAll(f, fp) { @@ -187,7 +187,7 @@ Foam::label Foam::cellDistFuncs::getPointNeighbours if (!nbs.found(nb)) { SeriousErrorInFunction - << "getPointNeighbours : patchFaceI:" << patchFaceI + << "getPointNeighbours : patchFacei:" << patchFacei << " verts:" << f << endl; forAll(f, fp) @@ -292,18 +292,18 @@ void Foam::cellDistFuncs::correctBoundaryFaceCells const polyPatch& patch = mesh().boundaryMesh()[patchi]; // Check cells with face on wall - forAll(patch, patchFaceI) + forAll(patch, patchFacei) { label nNeighbours = getPointNeighbours ( patch, - patchFaceI, + patchFacei, neighbours ); - label celli = faceOwner[patch.start() + patchFaceI]; + label celli = faceOwner[patch.start() + patchFacei]; - label minFaceI = -1; + label minFacei = -1; wallDistCorrected[celli] = smallestDist ( @@ -311,11 +311,11 @@ void Foam::cellDistFuncs::correctBoundaryFaceCells patch, nNeighbours, neighbours, - minFaceI + minFacei ); // Store wallCell and its nearest neighbour - nearestFace.insert(celli, minFaceI); + nearestFace.insert(celli, minFacei); } } } @@ -358,7 +358,7 @@ void Foam::cellDistFuncs::correctBoundaryPointCells { const labelList& wallFaces = pointFaces[meshPointI]; - label minFaceI = -1; + label minFacei = -1; wallDistCorrected[celli] = smallestDist ( @@ -366,11 +366,11 @@ void Foam::cellDistFuncs::correctBoundaryPointCells patch, wallFaces.size(), wallFaces, - minFaceI + minFacei ); // Store wallCell and its nearest neighbour - nearestFace.insert(celli, minFaceI); + nearestFace.insert(celli, minFacei); } } } diff --git a/src/meshTools/cellDist/cellDistFuncs.H b/src/meshTools/cellDist/cellDistFuncs.H index f5aedbe22ca6bef6d9dcd99a6ddb908d27cf81b9..d572d90f8279243c0312bf2e6d56af41dd094cdb 100644 --- a/src/meshTools/cellDist/cellDistFuncs.H +++ b/src/meshTools/cellDist/cellDistFuncs.H @@ -116,14 +116,14 @@ public: const polyPatch& patch, const label nWallFaces, const labelList& wallFaces, - label& meshFaceI + label& meshFacei ) const; //- Get faces sharing point with face on patch label getPointNeighbours ( const primitivePatch&, - const label patchFaceI, + const label patchFacei, labelList& ) const; diff --git a/src/meshTools/cellDist/patchWave/patchDataWave.C b/src/meshTools/cellDist/patchWave/patchDataWave.C index b66e99b632be8963c28bc49523b2e41985ef80b3..7b7531521449410c243e3ebbe9555ac25cc10800 100644 --- a/src/meshTools/cellDist/patchWave/patchDataWave.C +++ b/src/meshTools/cellDist/patchWave/patchDataWave.C @@ -48,17 +48,17 @@ void Foam::patchDataWave<TransferType>::setChangedFaces const Field<Type>& patchField = initialPatchValuePtrs_[patchi]; - forAll(patch.faceCentres(), patchFaceI) + forAll(patch.faceCentres(), patchFacei) { - label meshFaceI = patch.start() + patchFaceI; + label meshFacei = patch.start() + patchFacei; - changedFaces[nChangedFaces] = meshFaceI; + changedFaces[nChangedFaces] = meshFacei; faceDist[nChangedFaces] = TransferType ( - patch.faceCentres()[patchFaceI], - patchField[patchFaceI], + patch.faceCentres()[patchFacei], + patchField[patchFacei], 0.0 ); @@ -132,28 +132,28 @@ Foam::label Foam::patchDataWave<TransferType>::getValues Field<Type>& patchDataField = *patchDataFieldPtr; // Copy distance and data - forAll(patchField, patchFaceI) + forAll(patchField, patchFacei) { - label meshFaceI = patch.start() + patchFaceI; + label meshFacei = patch.start() + patchFacei; - scalar dist = faceInfo[meshFaceI].distSqr(); + scalar dist = faceInfo[meshFacei].distSqr(); - if (faceInfo[meshFaceI].valid(waveInfo.data())) + if (faceInfo[meshFacei].valid(waveInfo.data())) { // Adding SMALL to avoid problems with /0 in the turbulence // models - patchField[patchFaceI] = Foam::sqrt(dist) + SMALL; + patchField[patchFacei] = Foam::sqrt(dist) + SMALL; - patchDataField[patchFaceI] = faceInfo[meshFaceI].data(); + patchDataField[patchFacei] = faceInfo[meshFacei].data(); } else { // Illegal/unset value. What to do with data? - patchField[patchFaceI] = mag(dist); + patchField[patchFacei] = mag(dist); - //patchDataField[patchFaceI] = point::max; - patchDataField[patchFaceI] = faceInfo[meshFaceI].data(); + //patchDataField[patchFacei] = point::max; + patchDataField[patchFacei] = faceInfo[meshFacei].data(); nIllegal++; } @@ -263,9 +263,9 @@ void Foam::patchDataWave<TransferType>::correct() const labelList wallCells(nearestFace.toc()); - forAll(wallCells, wallCellI) + forAll(wallCells, wallCelli) { - label celli = wallCells[wallCellI]; + label celli = wallCells[wallCelli]; label facei = nearestFace[celli]; diff --git a/src/meshTools/cellDist/patchWave/patchWave.C b/src/meshTools/cellDist/patchWave/patchWave.C index 1185e376ac539263c2431e0d1e0f79901151f351..18f6bece4f644d7c1204455f1ccb4689fe0755f6 100644 --- a/src/meshTools/cellDist/patchWave/patchWave.C +++ b/src/meshTools/cellDist/patchWave/patchWave.C @@ -47,16 +47,16 @@ void Foam::patchWave::setChangedFaces { const polyPatch& patch = mesh.boundaryMesh()[patchi]; - forAll(patch.faceCentres(), patchFaceI) + forAll(patch.faceCentres(), patchFacei) { - label meshFaceI = patch.start() + patchFaceI; + label meshFacei = patch.start() + patchFacei; - changedFaces[nChangedFaces] = meshFaceI; + changedFaces[nChangedFaces] = meshFacei; faceDist[nChangedFaces] = wallPoint ( - patch.faceCentres()[patchFaceI], + patch.faceCentres()[patchFacei], 0.0 ); @@ -105,21 +105,21 @@ Foam::label Foam::patchWave::getValues(const MeshWave<wallPoint>& waveInfo) scalarField& patchField = *patchDistPtr; - forAll(patchField, patchFaceI) + forAll(patchField, patchFacei) { - label meshFaceI = patch.start() + patchFaceI; + label meshFacei = patch.start() + patchFacei; - scalar dist = faceInfo[meshFaceI].distSqr(); + scalar dist = faceInfo[meshFacei].distSqr(); - if (faceInfo[meshFaceI].valid(waveInfo.data())) + if (faceInfo[meshFacei].valid(waveInfo.data())) { // Adding SMALL to avoid problems with /0 in the turbulence // models - patchField[patchFaceI] = Foam::sqrt(dist) + SMALL; + patchField[patchFacei] = Foam::sqrt(dist) + SMALL; } else { - patchField[patchFaceI] = dist; + patchField[patchFacei] = dist; nIllegal++; } diff --git a/src/meshTools/cellDist/wallPoint/wallPoint.H b/src/meshTools/cellDist/wallPoint/wallPoint.H index 626438990952e2c74f6757f2bdf74d43a97417eb..c8dca3b8c6c97900f36c670465508f87d7b7f4f0 100644 --- a/src/meshTools/cellDist/wallPoint/wallPoint.H +++ b/src/meshTools/cellDist/wallPoint/wallPoint.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -138,7 +138,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -149,7 +149,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -168,8 +168,8 @@ public: inline bool updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const wallPoint& neighbourInfo, const scalar tol, TrackingData& td @@ -180,8 +180,8 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const wallPoint& neighbourInfo, const scalar tol, TrackingData& td @@ -192,7 +192,7 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const wallPoint& neighbourInfo, const scalar tol, TrackingData& td diff --git a/src/meshTools/cellDist/wallPoint/wallPointData.H b/src/meshTools/cellDist/wallPoint/wallPointData.H index 864d099180c227ff5bf6de2edc2d42f39c28d4cf..474d890d715a08de87af2261088dbe28cecaaf3a 100644 --- a/src/meshTools/cellDist/wallPoint/wallPointData.H +++ b/src/meshTools/cellDist/wallPoint/wallPointData.H @@ -118,8 +118,8 @@ public: inline bool updateCell ( const polyMesh& mesh, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const wallPointData<Type>& neighbourWallInfo, const scalar tol, TrackingData& td @@ -131,8 +131,8 @@ public: inline bool updateFace ( const polyMesh& mesh, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const wallPointData<Type>& neighbourWallInfo, const scalar tol, TrackingData& td @@ -145,7 +145,7 @@ public: inline bool updateFace ( const polyMesh& mesh, - const label thisFaceI, + const label thisFacei, const wallPointData<Type>& neighbourWallInfo, const scalar tol, TrackingData& td diff --git a/src/meshTools/cellDist/wallPoint/wallPointDataI.H b/src/meshTools/cellDist/wallPoint/wallPointDataI.H index 73de754ef992651f6615639ded19f7b03ff96416..5636b004eca3f6f422b9920317c2a05803f7e79f 100644 --- a/src/meshTools/cellDist/wallPoint/wallPointDataI.H +++ b/src/meshTools/cellDist/wallPoint/wallPointDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -119,7 +119,7 @@ template<class TrackingData> inline bool wallPointData<Type>::updateCell ( const polyMesh& mesh, - const label thisCellI, + const label thisCelli, const label, const wallPointData<Type>& neighbourWallInfo, const scalar tol, @@ -130,7 +130,7 @@ inline bool wallPointData<Type>::updateCell return update ( - cellCentres[thisCellI], + cellCentres[thisCelli], neighbourWallInfo, tol, td @@ -144,7 +144,7 @@ template<class TrackingData> inline bool wallPointData<Type>::updateFace ( const polyMesh& mesh, - const label thisFaceI, + const label thisFacei, const label, const wallPointData<Type>& neighbourWallInfo, const scalar tol, @@ -155,7 +155,7 @@ inline bool wallPointData<Type>::updateFace return update ( - faceCentres[thisFaceI], + faceCentres[thisFacei], neighbourWallInfo, tol, td @@ -169,7 +169,7 @@ template<class TrackingData> inline bool wallPointData<Type>::updateFace ( const polyMesh& mesh, - const label thisFaceI, + const label thisFacei, const wallPointData<Type>& neighbourWallInfo, const scalar tol, TrackingData& td @@ -179,7 +179,7 @@ inline bool wallPointData<Type>::updateFace return update ( - faceCentres[thisFaceI], + faceCentres[thisFacei], neighbourWallInfo, tol, td diff --git a/src/meshTools/cellDist/wallPoint/wallPointI.H b/src/meshTools/cellDist/wallPoint/wallPointI.H index 306a274984be67e220f86fd089fdd2cc934ef6ea..79c1a4a9ec82442988cb6fae3f3e50cfb9e4edbb 100644 --- a/src/meshTools/cellDist/wallPoint/wallPointI.H +++ b/src/meshTools/cellDist/wallPoint/wallPointI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -214,8 +214,8 @@ template<class TrackingData> inline bool Foam::wallPoint::updateCell ( const polyMesh& mesh, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const wallPoint& neighbourWallInfo, const scalar tol, TrackingData& td @@ -224,7 +224,7 @@ inline bool Foam::wallPoint::updateCell return update ( - mesh.cellCentres()[thisCellI], + mesh.cellCentres()[thisCelli], neighbourWallInfo, tol, td @@ -237,8 +237,8 @@ template<class TrackingData> inline bool Foam::wallPoint::updateFace ( const polyMesh& mesh, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const wallPoint& neighbourWallInfo, const scalar tol, TrackingData& td @@ -247,7 +247,7 @@ inline bool Foam::wallPoint::updateFace return update ( - mesh.faceCentres()[thisFaceI], + mesh.faceCentres()[thisFacei], neighbourWallInfo, tol, td @@ -259,7 +259,7 @@ template<class TrackingData> inline bool Foam::wallPoint::updateFace ( const polyMesh& mesh, - const label thisFaceI, + const label thisFacei, const wallPoint& neighbourWallInfo, const scalar tol, TrackingData& td @@ -268,7 +268,7 @@ inline bool Foam::wallPoint::updateFace return update ( - mesh.faceCentres()[thisFaceI], + mesh.faceCentres()[thisFacei], neighbourWallInfo, tol, td diff --git a/src/meshTools/cellFeatures/cellFeatures.C b/src/meshTools/cellFeatures/cellFeatures.C index ba4df33514e6ded7a7121cd557ebc25364d2f5fc..74ce47a30b7873c105f88f6cce18f0741bdf7c73 100644 --- a/src/meshTools/cellFeatures/cellFeatures.C +++ b/src/meshTools/cellFeatures/cellFeatures.C @@ -66,7 +66,7 @@ bool Foam::cellFeatures::faceAlignedEdge(const label facei, const label edgeI) Foam::label Foam::cellFeatures::nextEdge ( const Map<label>& toSuperFace, - const label superFaceI, + const label superFacei, const label thisEdgeI, const label thisVertI ) const @@ -83,14 +83,14 @@ Foam::label Foam::cellFeatures::nextEdge const labelList& eFaces = mesh_.edgeFaces()[edgeI]; - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - label facei = eFaces[eFaceI]; + label facei = eFaces[eFacei]; if ( meshTools::faceOnCell(mesh_, celli_, facei) - && (toSuperFace[facei] == superFaceI) + && (toSuperFace[facei] == superFacei) ) { return edgeI; @@ -179,13 +179,13 @@ bool Foam::cellFeatures::isCellFeatureEdge void Foam::cellFeatures::walkSuperFace ( const label facei, - const label superFaceI, + const label superFacei, Map<label>& toSuperFace ) const { if (!toSuperFace.found(facei)) { - toSuperFace.insert(facei, superFaceI); + toSuperFace.insert(facei, superFacei); const labelList& fEdges = mesh_.faceEdges()[facei]; @@ -207,7 +207,7 @@ void Foam::cellFeatures::walkSuperFace walkSuperFace ( face0, - superFaceI, + superFacei, toSuperFace ); } @@ -227,31 +227,31 @@ void Foam::cellFeatures::calcSuperFaces() const // >=0 : superFace Map<label> toSuperFace(10*cFaces.size()); - label superFaceI = 0; + label superFacei = 0; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; if (!toSuperFace.found(facei)) { walkSuperFace ( facei, - superFaceI, + superFacei, toSuperFace ); - superFaceI++; + superFacei++; } } // Construct superFace-to-oldface mapping. - faceMap_.setSize(superFaceI); + faceMap_.setSize(superFacei); - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; faceMap_[toSuperFace[facei]].append(facei); } @@ -264,17 +264,17 @@ void Foam::cellFeatures::calcSuperFaces() const // Construct superFaces - facesPtr_ = new faceList(superFaceI); + facesPtr_ = new faceList(superFacei); faceList& faces = *facesPtr_; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; - label superFaceI = toSuperFace[facei]; + label superFacei = toSuperFace[facei]; - if (faces[superFaceI].empty()) + if (faces[superFacei].empty()) { // Superface not yet constructed. @@ -330,7 +330,7 @@ void Foam::cellFeatures::calcSuperFaces() const label newEdgeI = nextEdge ( toSuperFace, - superFaceI, + superFacei, edgeI, vertI ); @@ -355,13 +355,13 @@ void Foam::cellFeatures::calcSuperFaces() const if (superFace.size() <= 2) { WarningInFunction - << " Can not collapse faces " << faceMap_[superFaceI] + << " Can not collapse faces " << faceMap_[superFacei] << " into one big face on cell " << celli_ << endl << "Try decreasing minCos:" << minCos_ << endl; } else { - faces[superFaceI].transfer(superFace); + faces[superFacei].transfer(superFace); } } } diff --git a/src/meshTools/cellFeatures/cellFeatures.H b/src/meshTools/cellFeatures/cellFeatures.H index 6ba4fcbd586a40fc547c3f9515d72ff12c91c02c..3964c01202fde972c204a3fa2d5110c9b18cde98 100644 --- a/src/meshTools/cellFeatures/cellFeatures.H +++ b/src/meshTools/cellFeatures/cellFeatures.H @@ -88,7 +88,7 @@ class cellFeatures label nextEdge ( const Map<label>& toSuperFace, - const label superFaceI, + const label superFacei, const label thisEdgeI, const label thisVertI ) const; @@ -98,7 +98,7 @@ class cellFeatures void walkSuperFace ( const label facei, - const label superFaceI, + const label superFacei, Map<label>& toSuperFace ) const; diff --git a/src/meshTools/cellQuality/cellQuality.C b/src/meshTools/cellQuality/cellQuality.C index b0cf297010c4953b745f89c9bec1341383875cbe..2ede0110c3e0f58e784921abb4f48e4e1cc074cb 100644 --- a/src/meshTools/cellQuality/cellQuality.C +++ b/src/meshTools/cellQuality/cellQuality.C @@ -208,7 +208,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceNonOrthogonality() const result[facei] = cosDDotS; } - label globalFaceI = mesh_.nInternalFaces(); + label globalFacei = mesh_.nInternalFaces(); forAll(mesh_.boundaryMesh(), patchi) { @@ -230,7 +230,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceNonOrthogonality() const scalar cosDDotS = radToDeg(Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL)))); - result[globalFaceI++] = cosDDotS; + result[globalFacei++] = cosDDotS; } } @@ -279,7 +279,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceSkewness() const } - label globalFaceI = mesh_.nInternalFaces(); + label globalFacei = mesh_.nInternalFaces(); forAll(mesh_.boundaryMesh(), patchi) { @@ -300,7 +300,7 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceSkewness() const cellCtrs[faceCells[facei]] + ((faceCentres[facei] - cellCtrs[faceCells[facei]])&n)*n; - result[globalFaceI++] = + result[globalFacei++] = mag(faceCentres[facei] - faceIntersection) /( mag(faceCentres[facei] - cellCtrs[faceCells[facei]]) diff --git a/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H b/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H index f63bca13f3357acfc83a77bdccd2c05c682e922a..bbebe4382f11ca074d987018e9eb06252795ac87 100644 --- a/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H +++ b/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H @@ -268,7 +268,7 @@ void Foam::edgeFaceCirculator::setCanonical() else { // Internal edge. Walk until we hit minimum face label. - label minFaceI = faceLabel_; + label minFacei = faceLabel_; bool minOwnerSide = ownerSide_; label minIndex = index_; @@ -295,15 +295,15 @@ void Foam::edgeFaceCirculator::setCanonical() << abort(FatalError); } - if (faceLabel_ < minFaceI) + if (faceLabel_ < minFacei) { - minFaceI = faceLabel_; + minFacei = faceLabel_; minOwnerSide = ownerSide_; minIndex = index_; } } - faceLabel_ = minFaceI; + faceLabel_ = minFacei; ownerSide_ = minOwnerSide; index_ = minIndex; startFaceLabel_ = faceLabel_; diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C index 11b059870e07672712dc5d132442aae88a6b34c1..b32b94606b6095f41f7b43315242379b864e62d7 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C @@ -174,11 +174,11 @@ void Foam::mappedPatchBase::collectSamples patchFaceProcs.setSize(patchFaces.size()); label sampleI = 0; - forAll(nPerProc, procI) + forAll(nPerProc, proci) { - for (label i = 0; i < nPerProc[procI]; i++) + for (label i = 0; i < nPerProc[proci]; i++) { - patchFaceProcs[sampleI++] = procI; + patchFaceProcs[sampleI++] = proci; } } } @@ -483,11 +483,11 @@ void Foam::mappedPatchBase::findSamples forAll(nearest, sampleI) { - label procI = nearest[sampleI].second().second(); + label proci = nearest[sampleI].second().second(); label localI = nearest[sampleI].first().index(); Info<< " " << sampleI << " coord:"<< samples[sampleI] - << " found on processor:" << procI + << " found on processor:" << proci << " in local cell/face/point:" << localI << " with location:" << nearest[sampleI].first().rawPoint() << endl; @@ -702,26 +702,26 @@ void Foam::mappedPatchBase::calcMapping() const labelListList& subMap = mapPtr_().subMap(); labelListList& constructMap = mapPtr_().constructMap(); - forAll(subMap, procI) + forAll(subMap, proci) { - subMap[procI] = UIndirectList<label> + subMap[proci] = UIndirectList<label> ( sampleIndices, - subMap[procI] + subMap[proci] ); - constructMap[procI] = UIndirectList<label> + constructMap[proci] = UIndirectList<label> ( patchFaces, - constructMap[procI] + constructMap[proci] ); //if (debug) //{ - // Pout<< "To proc:" << procI << " sending values of cells/faces:" - // << subMap[procI] << endl; - // Pout<< "From proc:" << procI + // Pout<< "To proc:" << proci << " sending values of cells/faces:" + // << subMap[proci] << endl; + // Pout<< "From proc:" << proci // << " receiving values of patch faces:" - // << constructMap[procI] << endl; + // << constructMap[proci] << endl; //} } @@ -732,9 +732,9 @@ void Foam::mappedPatchBase::calcMapping() const { // Check that all elements get a value. PackedBoolList used(patch_.size()); - forAll(constructMap, procI) + forAll(constructMap, proci) { - const labelList& map = constructMap[procI]; + const labelList& map = constructMap[proci]; forAll(map, i) { diff --git a/src/meshTools/meshSearch/meshSearch.C b/src/meshTools/meshSearch/meshSearch.C index 614c660a48e3325320ea24263476520de86a723f..86a7e186b503b0cdb81bdcfd68d0c8de415aef98 100644 --- a/src/meshTools/meshSearch/meshSearch.C +++ b/src/meshTools/meshSearch/meshSearch.C @@ -141,36 +141,36 @@ Foam::label Foam::meshSearch::findNearestCellLinear(const point& location) const Foam::label Foam::meshSearch::findNearestCellWalk ( const point& location, - const label seedCellI + const label seedCelli ) const { - if (seedCellI < 0) + if (seedCelli < 0) { FatalErrorInFunction - << "illegal seedCell:" << seedCellI << exit(FatalError); + << "illegal seedCell:" << seedCelli << exit(FatalError); } // Walk in direction of face that decreases distance - label curCellI = seedCellI; - scalar distanceSqr = magSqr(mesh_.cellCentres()[curCellI] - location); + label curCelli = seedCelli; + scalar distanceSqr = magSqr(mesh_.cellCentres()[curCelli] - location); bool closer; do { - // Try neighbours of curCellI + // Try neighbours of curCelli closer = findNearer ( location, mesh_.cellCentres(), - mesh_.cellCells()[curCellI], - curCellI, + mesh_.cellCells()[curCelli], + curCelli, distanceSqr ); } while (closer); - return curCellI; + return curCelli; } @@ -198,19 +198,19 @@ Foam::label Foam::meshSearch::findNearestFaceTree(const point& location) const const vectorField& centres = mesh_.faceCentres(); const cell& ownFaces = mesh_.cells()[info.index()]; - label nearestFaceI = ownFaces[0]; - scalar minProximity = magSqr(centres[nearestFaceI] - location); + label nearestFacei = ownFaces[0]; + scalar minProximity = magSqr(centres[nearestFacei] - location); findNearer ( location, centres, ownFaces, - nearestFaceI, + nearestFacei, minProximity ); - return nearestFaceI; + return nearestFacei; } @@ -219,18 +219,18 @@ Foam::label Foam::meshSearch::findNearestFaceLinear(const point& location) const { const vectorField& centres = mesh_.faceCentres(); - label nearestFaceI = 0; - scalar minProximity = magSqr(centres[nearestFaceI] - location); + label nearestFacei = 0; + scalar minProximity = magSqr(centres[nearestFacei] - location); findNearer ( location, centres, - nearestFaceI, + nearestFacei, minProximity ); - return nearestFaceI; + return nearestFacei; } @@ -238,13 +238,13 @@ Foam::label Foam::meshSearch::findNearestFaceLinear(const point& location) const Foam::label Foam::meshSearch::findNearestFaceWalk ( const point& location, - const label seedFaceI + const label seedFacei ) const { - if (seedFaceI < 0) + if (seedFacei < 0) { FatalErrorInFunction - << "illegal seedFace:" << seedFaceI << exit(FatalError); + << "illegal seedFace:" << seedFacei << exit(FatalError); } const vectorField& centres = mesh_.faceCentres(); @@ -252,43 +252,43 @@ Foam::label Foam::meshSearch::findNearestFaceWalk // Walk in direction of face that decreases distance - label curFaceI = seedFaceI; - scalar distanceSqr = magSqr(centres[curFaceI] - location); + label curFacei = seedFacei; + scalar distanceSqr = magSqr(centres[curFacei] - location); while (true) { - label betterFaceI = curFaceI; + label betterFacei = curFacei; findNearer ( location, centres, - mesh_.cells()[mesh_.faceOwner()[curFaceI]], - betterFaceI, + mesh_.cells()[mesh_.faceOwner()[curFacei]], + betterFacei, distanceSqr ); - if (mesh_.isInternalFace(curFaceI)) + if (mesh_.isInternalFace(curFacei)) { findNearer ( location, centres, - mesh_.cells()[mesh_.faceNeighbour()[curFaceI]], - betterFaceI, + mesh_.cells()[mesh_.faceNeighbour()[curFacei]], + betterFacei, distanceSqr ); } - if (betterFaceI == curFaceI) + if (betterFacei == curFacei) { break; } - curFaceI = betterFaceI; + curFacei = betterFacei; } - return curFaceI; + return curFacei; } @@ -326,31 +326,31 @@ Foam::label Foam::meshSearch::findCellLinear(const point& location) const Foam::label Foam::meshSearch::findCellWalk ( const point& location, - const label seedCellI + const label seedCelli ) const { - if (seedCellI < 0) + if (seedCelli < 0) { FatalErrorInFunction - << "illegal seedCell:" << seedCellI << exit(FatalError); + << "illegal seedCell:" << seedCelli << exit(FatalError); } - if (mesh_.pointInCell(location, seedCellI, cellDecompMode_)) + if (mesh_.pointInCell(location, seedCelli, cellDecompMode_)) { - return seedCellI; + return seedCelli; } // Walk in direction of face that decreases distance - label curCellI = seedCellI; - scalar nearestDistSqr = magSqr(mesh_.cellCentres()[curCellI] - location); + label curCelli = seedCelli; + scalar nearestDistSqr = magSqr(mesh_.cellCentres()[curCelli] - location); while(true) { - // Try neighbours of curCellI + // Try neighbours of curCelli - const cell& cFaces = mesh_.cells()[curCellI]; + const cell& cFaces = mesh_.cells()[curCelli]; - label nearestCellI = -1; + label nearestCelli = -1; forAll(cFaces, i) { @@ -359,7 +359,7 @@ Foam::label Foam::meshSearch::findCellWalk if (mesh_.isInternalFace(facei)) { label celli = mesh_.faceOwner()[facei]; - if (celli == curCellI) + if (celli == curCelli) { celli = mesh_.faceNeighbour()[facei]; } @@ -376,18 +376,18 @@ Foam::label Foam::meshSearch::findCellWalk if (distSqr < nearestDistSqr) { nearestDistSqr = distSqr; - nearestCellI = celli; + nearestCelli = celli; } } } - if (nearestCellI == -1) + if (nearestCelli == -1) { return -1; } // Continue with the nearest cell - curCellI = nearestCellI; + curCelli = nearestCelli; } return -1; @@ -397,20 +397,20 @@ Foam::label Foam::meshSearch::findCellWalk Foam::label Foam::meshSearch::findNearestBoundaryFaceWalk ( const point& location, - const label seedFaceI + const label seedFacei ) const { - if (seedFaceI < 0) + if (seedFacei < 0) { FatalErrorInFunction - << "illegal seedFace:" << seedFaceI << exit(FatalError); + << "illegal seedFace:" << seedFacei << exit(FatalError); } - // Start off from seedFaceI + // Start off from seedFacei - label curFaceI = seedFaceI; + label curFacei = seedFacei; - const face& f = mesh_.faces()[curFaceI]; + const face& f = mesh_.faces()[curFacei]; scalar minDist = f.nearestPoint ( @@ -427,16 +427,16 @@ Foam::label Foam::meshSearch::findNearestBoundaryFaceWalk // Search through all neighbouring boundary faces by going // across edges - label lastFaceI = curFaceI; + label lastFacei = curFacei; - const labelList& myEdges = mesh_.faceEdges()[curFaceI]; + const labelList& myEdges = mesh_.faceEdges()[curFacei]; forAll(myEdges, myEdgeI) { const labelList& neighbours = mesh_.edgeFaces()[myEdges[myEdgeI]]; // Check any face which uses edge, is boundary face and - // is not curFaceI itself. + // is not curFacei itself. forAll(neighbours, nI) { @@ -445,7 +445,7 @@ Foam::label Foam::meshSearch::findNearestBoundaryFaceWalk if ( (facei >= mesh_.nInternalFaces()) - && (facei != lastFaceI) + && (facei != lastFacei) ) { const face& f = mesh_.faces()[facei]; @@ -460,7 +460,7 @@ Foam::label Foam::meshSearch::findNearestBoundaryFaceWalk if (curHit.distance() < minDist) { minDist = curHit.distance(); - curFaceI = facei; + curFacei = facei; closer = true; // a closer neighbour has been found } } @@ -468,21 +468,21 @@ Foam::label Foam::meshSearch::findNearestBoundaryFaceWalk } } while (closer); - return curFaceI; + return curFacei; } Foam::vector Foam::meshSearch::offset ( const point& bPoint, - const label bFaceI, + const label bFacei, const vector& dir ) const { // Get the neighbouring cell - label ownerCellI = mesh_.faceOwner()[bFaceI]; + label ownerCelli = mesh_.faceOwner()[bFacei]; - const point& c = mesh_.cellCentres()[ownerCellI]; + const point& c = mesh_.cellCentres()[ownerCelli]; // Typical dimension: distance from point on face to cell centre scalar typDim = mag(c - bPoint); @@ -729,11 +729,11 @@ const Foam::label Foam::meshSearch::findNearestCell ( const point& location, - const label seedCellI, + const label seedCelli, const bool useTreeSearch ) const { - if (seedCellI == -1) + if (seedCelli == -1) { if (useTreeSearch) { @@ -746,7 +746,7 @@ Foam::label Foam::meshSearch::findNearestCell } else { - return findNearestCellWalk(location, seedCellI); + return findNearestCellWalk(location, seedCelli); } } @@ -754,11 +754,11 @@ Foam::label Foam::meshSearch::findNearestCell Foam::label Foam::meshSearch::findNearestFace ( const point& location, - const label seedFaceI, + const label seedFacei, const bool useTreeSearch ) const { - if (seedFaceI == -1) + if (seedFacei == -1) { if (useTreeSearch) { @@ -771,7 +771,7 @@ Foam::label Foam::meshSearch::findNearestFace } else { - return findNearestFaceWalk(location, seedFaceI); + return findNearestFaceWalk(location, seedFacei); } } @@ -779,12 +779,12 @@ Foam::label Foam::meshSearch::findNearestFace Foam::label Foam::meshSearch::findCell ( const point& location, - const label seedCellI, + const label seedCelli, const bool useTreeSearch ) const { // Find the nearest cell centre to this location - if (seedCellI == -1) + if (seedCelli == -1) { if (useTreeSearch) { @@ -797,7 +797,7 @@ Foam::label Foam::meshSearch::findCell } else { - return findCellWalk(location, seedCellI); + return findCellWalk(location, seedCelli); } } @@ -805,11 +805,11 @@ Foam::label Foam::meshSearch::findCell Foam::label Foam::meshSearch::findNearestBoundaryFace ( const point& location, - const label seedFaceI, + const label seedFacei, const bool useTreeSearch ) const { - if (seedFaceI == -1) + if (seedFacei == -1) { if (useTreeSearch) { @@ -836,7 +836,7 @@ Foam::label Foam::meshSearch::findNearestBoundaryFace { scalar minDist = GREAT; - label minFaceI = -1; + label minFacei = -1; for ( @@ -857,15 +857,15 @@ Foam::label Foam::meshSearch::findNearestBoundaryFace if (curHit.distance() < minDist) { minDist = curHit.distance(); - minFaceI = facei; + minFacei = facei; } } - return minFaceI; + return minFacei; } } else { - return findNearestBoundaryFaceWalk(location, seedFaceI); + return findNearestBoundaryFaceWalk(location, seedFacei); } } diff --git a/src/meshTools/meshSearch/meshSearch.H b/src/meshTools/meshSearch/meshSearch.H index fa0be07f8e4a0f0e3b202910a34dca0093ef6c7b..fca4846009b1fe85dc63c9fcb5f2eef2a62d3422 100644 --- a/src/meshTools/meshSearch/meshSearch.H +++ b/src/meshTools/meshSearch/meshSearch.H @@ -132,7 +132,7 @@ class meshSearch label findNearestBoundaryFaceWalk ( const point& location, - const label seedFaceI + const label seedFacei ) const; //- Calculate offset vector in direction dir with as length a @@ -140,7 +140,7 @@ class meshSearch vector offset ( const point& bPoint, - const label bFaceI, + const label bFacei, const vector& dir ) const; @@ -221,14 +221,14 @@ public: label findNearestCell ( const point& location, - const label seedCellI = -1, + const label seedCelli = -1, const bool useTreeSearch = true ) const; label findNearestFace ( const point& location, - const label seedFaceI = -1, + const label seedFacei = -1, const bool useTreeSearch = true ) const; @@ -239,7 +239,7 @@ public: label findCell ( const point& location, - const label seedCellI = -1, + const label seedCelli = -1, const bool useTreeSearch = true ) const; @@ -250,7 +250,7 @@ public: label findNearestBoundaryFace ( const point& location, - const label seedFaceI = -1, + const label seedFacei = -1, const bool useTreeSearch = true ) const; diff --git a/src/meshTools/meshStructure/meshStructure.C b/src/meshTools/meshStructure/meshStructure.C index 62eeefbdc88066cf378683664f75ec7092916c38..51e999d616646ea81e296c5376b3757df634b89d 100644 --- a/src/meshTools/meshStructure/meshStructure.C +++ b/src/meshTools/meshStructure/meshStructure.C @@ -118,10 +118,10 @@ void Foam::meshStructure::correct // Start of changes labelList patchFaces(pp.size()); List<topoDistanceData> patchData(pp.size()); - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { - patchFaces[patchFaceI] = pp.addressing()[patchFaceI]; - patchData[patchFaceI] = topoDistanceData(patchFaceI, 0); + patchFaces[patchFacei] = pp.addressing()[patchFacei]; + patchData[patchFacei] = topoDistanceData(patchFacei, 0); } @@ -161,7 +161,7 @@ void Foam::meshStructure::correct forAll(faceToPatchFaceAddressing_, facei) { label own = mesh.faceOwner()[facei]; - label patchFaceI = faceData[facei].data(); + label patchFacei = faceData[facei].data(); label patchDist = faceData[facei].distance(); if (mesh.isInternalFace(facei)) @@ -177,14 +177,14 @@ void Foam::meshStructure::correct else if (cellData[own].distance() < cellData[nei].distance()) { // unturned face - faceToPatchFaceAddressing_[facei] = patchFaceI+1; + faceToPatchFaceAddressing_[facei] = patchFacei+1; faceToPatchEdgeAddressing_[facei] = -1; faceLayer_[facei] = patchDist; } else { // turned face - faceToPatchFaceAddressing_[facei] = -(patchFaceI+1); + faceToPatchFaceAddressing_[facei] = -(patchFacei+1); faceToPatchEdgeAddressing_[facei] = -1; faceLayer_[facei] = patchDist; } @@ -192,7 +192,7 @@ void Foam::meshStructure::correct else if (patchDist == cellData[own].distance()) { // starting face - faceToPatchFaceAddressing_[facei] = -(patchFaceI+1); + faceToPatchFaceAddressing_[facei] = -(patchFacei+1); faceToPatchEdgeAddressing_[facei] = -1; faceLayer_[facei] = patchDist; } @@ -290,11 +290,11 @@ void Foam::meshStructure::correct // << UIndirectList<pointTopoDistanceData>(pointData, f) // << endl; - label patchFaceI = faceData[facei].data(); + label patchFacei = faceData[facei].data(); label patchDist = faceData[facei].distance(); faceToPatchEdgeAddressing_[facei] = -1; - faceToPatchFaceAddressing_[facei] = patchFaceI+1; + faceToPatchFaceAddressing_[facei] = patchFacei+1; faceLayer_[facei] = patchDist; } else @@ -344,9 +344,9 @@ void Foam::meshStructure::correct { const labelList& lCells = layerToCells[layerI]; - forAll(lCells, lCellI) + forAll(lCells, lCelli) { - label celli = lCells[lCellI]; + label celli = lCells[lCelli]; structured_ = isStructuredCell ( diff --git a/src/meshTools/meshStructure/topoDistanceData.H b/src/meshTools/meshStructure/topoDistanceData.H index be6f73ee753f80bb55ed876ea44129dd5a41acbe..ae3d7f8378f589b26569b7f77cecd67798de6086 100644 --- a/src/meshTools/meshStructure/topoDistanceData.H +++ b/src/meshTools/meshStructure/topoDistanceData.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -116,7 +116,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -127,7 +127,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -146,8 +146,8 @@ public: inline bool updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const topoDistanceData& neighbourInfo, const scalar tol, TrackingData& td @@ -158,8 +158,8 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const topoDistanceData& neighbourInfo, const scalar tol, TrackingData& td @@ -170,7 +170,7 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const topoDistanceData& neighbourInfo, const scalar tol, TrackingData& td diff --git a/src/meshTools/meshStructure/topoDistanceDataI.H b/src/meshTools/meshStructure/topoDistanceDataI.H index a0a5ddae1396a7e7cfe959eacad35abb0cb55939..dd7ef2510146725487e67379d73ed82015a31d6c 100644 --- a/src/meshTools/meshStructure/topoDistanceDataI.H +++ b/src/meshTools/meshStructure/topoDistanceDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,7 +79,7 @@ inline void Foam::topoDistanceData::leaveDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& ) @@ -103,7 +103,7 @@ inline void Foam::topoDistanceData::enterDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& ) @@ -115,8 +115,8 @@ template<class TrackingData> inline bool Foam::topoDistanceData::updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const topoDistanceData& neighbourInfo, const scalar tol, TrackingData& @@ -139,8 +139,8 @@ template<class TrackingData> inline bool Foam::topoDistanceData::updateFace ( const polyMesh& mesh, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const topoDistanceData& neighbourInfo, const scalar tol, TrackingData& @@ -166,7 +166,7 @@ template<class TrackingData> inline bool Foam::topoDistanceData::updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const topoDistanceData& neighbourInfo, const scalar tol, TrackingData& diff --git a/src/meshTools/meshTools/meshTools.C b/src/meshTools/meshTools/meshTools.C index 1f0ffec6c55bfda792cad4ac486daded5b80e8af..deef730459a6ff8290829060b7f3ebe965cb17ee 100644 --- a/src/meshTools/meshTools/meshTools.C +++ b/src/meshTools/meshTools/meshTools.C @@ -424,9 +424,9 @@ Foam::label Foam::meshTools::getSharedFace { const cell& cFaces = mesh.cells()[cell0I]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; if ( @@ -468,9 +468,9 @@ void Foam::meshTools::getEdgeFaces face0 = -1; face1 = -1; - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - label facei = eFaces[eFaceI]; + label facei = eFaces[eFacei]; if (faceOnCell(mesh, celli, facei)) { @@ -560,7 +560,7 @@ Foam::label Foam::meshTools::otherFace Foam::label Foam::meshTools::otherCell ( const primitiveMesh& mesh, - const label otherCellI, + const label otherCelli, const label facei ) { @@ -571,13 +571,13 @@ Foam::label Foam::meshTools::otherCell << abort(FatalError); } - label newCellI = mesh.faceOwner()[facei]; + label newCelli = mesh.faceOwner()[facei]; - if (newCellI == otherCellI) + if (newCelli == otherCelli) { - newCellI = mesh.faceNeighbour()[facei]; + newCelli = mesh.faceNeighbour()[facei]; } - return newCellI; + return newCelli; } diff --git a/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C b/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C index aae501af8aeb4b0945dff9bb48134e343ea73533..18cd74c83b2bd34d875dde962ab4cf9885bfcbbf 100644 --- a/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C +++ b/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C @@ -759,7 +759,7 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles label nConcave = 0; - label errorFaceI = -1; + label errorFacei = -1; forAll(checkFaces, i) { @@ -801,10 +801,10 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles if ((edgeNormal & faceNormal) < SMALL) { - if (facei != errorFaceI) + if (facei != errorFacei) { // Count only one error per face. - errorFaceI = facei; + errorFacei = facei; nConcave++; } @@ -1190,9 +1190,9 @@ bool Foam::primitiveMeshGeometry::checkCellDeterminant tensor areaSum(Zero); scalar magAreaSum = 0; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; scalar magArea = mag(faceAreas[facei]); @@ -1211,9 +1211,9 @@ bool Foam::primitiveMeshGeometry::checkCellDeterminant if (setPtr) { // Insert all faces of the cell. - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; setPtr->insert(facei); } } diff --git a/src/meshTools/regionSplit/localPointRegion.C b/src/meshTools/regionSplit/localPointRegion.C index 12e1be2f97132bd331e6c49783872b79bd4976f9..66bd76633556841eb8e2417dc82055676e189c88 100644 --- a/src/meshTools/regionSplit/localPointRegion.C +++ b/src/meshTools/regionSplit/localPointRegion.C @@ -263,10 +263,10 @@ void Foam::localPointRegion::calcPointRegions // - candidateFace does not necessary have to be a baffle! // - candidateFace is synchronised (since candidatePoint is) Map<label> candidateFace(2*nBnd); - label candidateFaceI = 0; + label candidateFacei = 0; Map<label> candidateCell(nBnd); - label candidateCellI = 0; + label candidateCelli = 0; forAll(mesh.faces(), facei) { @@ -277,23 +277,23 @@ void Foam::localPointRegion::calcPointRegions if (candidatePoint[f[fp]]) { // Mark face - if (candidateFace.insert(facei, candidateFaceI)) + if (candidateFace.insert(facei, candidateFacei)) { - candidateFaceI++; + candidateFacei++; } // Mark cells - if (candidateCell.insert(faceOwner[facei], candidateCellI)) + if (candidateCell.insert(faceOwner[facei], candidateCelli)) { - candidateCellI++; + candidateCelli++; } if (mesh.isInternalFace(facei)) { label nei = faceNeighbour[facei]; - if (candidateCell.insert(nei, candidateCellI)) + if (candidateCell.insert(nei, candidateCelli)) { - candidateCellI++; + candidateCelli++; } } @@ -350,9 +350,9 @@ void Foam::localPointRegion::calcPointRegions const cell& cFaces = mesh.cells()[celli]; // Determine minimum per point - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; if (minRegion[facei].size()) { @@ -377,9 +377,9 @@ void Foam::localPointRegion::calcPointRegions } // Set face minimum from point minimum - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; if (minRegion[facei].size()) { @@ -517,9 +517,9 @@ Foam::labelList Foam::localPointRegion::findDuplicateFaces label nDuplicateFaces = 0; // Find all duplicate faces. - forAll(allPatch, bFaceI) + forAll(allPatch, bFacei) { - const face& f = allPatch.localFaces()[bFaceI]; + const face& f = allPatch.localFaces()[bFacei]; // Get faces connected to f[0]. // Check whether share all points with f. @@ -527,31 +527,31 @@ Foam::labelList Foam::localPointRegion::findDuplicateFaces forAll(pFaces, i) { - label otherFaceI = pFaces[i]; + label otherFacei = pFaces[i]; - if (otherFaceI > bFaceI) + if (otherFacei > bFacei) { - const face& otherF = allPatch.localFaces()[otherFaceI]; + const face& otherF = allPatch.localFaces()[otherFacei]; if (isDuplicate(f, otherF, true)) { FatalErrorInFunction - << "Face:" << bFaceI + mesh.nInternalFaces() + << "Face:" << bFacei + mesh.nInternalFaces() << " has local points:" << f << " which are in same order as face:" - << otherFaceI + mesh.nInternalFaces() + << otherFacei + mesh.nInternalFaces() << " with local points:" << otherF << abort(FatalError); } else if (isDuplicate(f, otherF, false)) { - label meshFace0 = bFaceI + mesh.nInternalFaces(); - label meshFace1 = otherFaceI + mesh.nInternalFaces(); + label meshFace0 = bFacei + mesh.nInternalFaces(); + label meshFace1 = otherFacei + mesh.nInternalFaces(); if ( - duplicateFace[bFaceI] != -1 - || duplicateFace[otherFaceI] != -1 + duplicateFace[bFacei] != -1 + || duplicateFace[otherFacei] != -1 ) { FatalErrorInFunction @@ -567,8 +567,8 @@ Foam::labelList Foam::localPointRegion::findDuplicateFaces << abort(FatalError); } - duplicateFace[bFaceI] = otherFaceI; - duplicateFace[otherFaceI] = bFaceI; + duplicateFace[bFacei] = otherFacei; + duplicateFace[otherFacei] = bFacei; nDuplicateFaces++; } } @@ -601,13 +601,13 @@ Foam::List<Foam::labelPair> Foam::localPointRegion::findDuplicateFacePairs forAll(duplicateFace, i) { - label otherFaceI = duplicateFace[i]; + label otherFacei = duplicateFace[i]; - if (otherFaceI != -1 && i < otherFaceI) + if (otherFacei != -1 && i < otherFacei) { label meshFace0 = testFaces[i]; label patch0 = patches.whichPatch(meshFace0); - label meshFace1 = testFaces[otherFaceI]; + label meshFace1 = testFaces[otherFacei]; label patch1 = patches.whichPatch(meshFace1); // Check for illegal topology. Should normally not happen! @@ -643,11 +643,11 @@ void Foam::localPointRegion::updateMesh(const mapPolyMesh& map) forAllConstIter(Map<label>, meshFaceMap_, iter) { - label newFaceI = map.reverseFaceMap()[iter.key()]; + label newFacei = map.reverseFaceMap()[iter.key()]; - if (newFaceI >= 0) + if (newFacei >= 0) { - newMap.insert(newFaceI, iter()); + newMap.insert(newFacei, iter()); } } meshFaceMap_.transfer(newMap); diff --git a/src/meshTools/regionSplit/regionSplit.C b/src/meshTools/regionSplit/regionSplit.C index 28aff8f275f652fca7d9da66a6c809c870bf00f3..d072d0b376f49b2faca0efe92b41efa7e9976a7f 100644 --- a/src/meshTools/regionSplit/regionSplit.C +++ b/src/meshTools/regionSplit/regionSplit.C @@ -44,7 +44,7 @@ defineTypeNameAndDebug(regionSplit, 0); void Foam::regionSplit::transferCoupledFaceRegion ( const label facei, - const label otherFaceI, + const label otherFacei, labelList& faceRegion, DynamicList<label>& newChangedFaces @@ -52,24 +52,24 @@ void Foam::regionSplit::transferCoupledFaceRegion { if (faceRegion[facei] >= 0) { - if (faceRegion[otherFaceI] == -1) + if (faceRegion[otherFacei] == -1) { - faceRegion[otherFaceI] = faceRegion[facei]; - newChangedFaces.append(otherFaceI); + faceRegion[otherFacei] = faceRegion[facei]; + newChangedFaces.append(otherFacei); } - else if (faceRegion[otherFaceI] == -2) + else if (faceRegion[otherFacei] == -2) { - // otherFaceI blocked but facei is not. Is illegal for coupled + // otherFacei blocked but facei is not. Is illegal for coupled // faces, not for explicit connections. } - else if (faceRegion[otherFaceI] != faceRegion[facei]) + else if (faceRegion[otherFacei] != faceRegion[facei]) { FatalErrorInFunction << "Problem : coupled face " << facei << " on patch " << mesh().boundaryMesh().whichPatch(facei) << " has region " << faceRegion[facei] - << " but coupled face " << otherFaceI - << " has region " << faceRegion[otherFaceI] + << " but coupled face " << otherFacei + << " has region " << faceRegion[otherFacei] << endl << "Is your blocked faces specification" << " synchronized across coupled boundaries?" @@ -78,14 +78,14 @@ void Foam::regionSplit::transferCoupledFaceRegion } else if (faceRegion[facei] == -1) { - if (faceRegion[otherFaceI] >= 0) + if (faceRegion[otherFacei] >= 0) { - faceRegion[facei] = faceRegion[otherFaceI]; + faceRegion[facei] = faceRegion[otherFacei]; newChangedFaces.append(facei); } - else if (faceRegion[otherFaceI] == -2) + else if (faceRegion[otherFacei] == -2) { - // otherFaceI blocked but facei is not. Is illegal for coupled + // otherFacei blocked but facei is not. Is illegal for coupled // faces, not for explicit connections. } } @@ -177,9 +177,9 @@ void Foam::regionSplit::fillSeedMask const cell& cFaces = mesh().cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; if (faceRegion[facei] == -1) { @@ -221,12 +221,12 @@ void Foam::regionSplit::fillSeedMask forAll(cycPatch, i) { - label otherFaceI = cycPatch.transformGlobalFace(facei); + label otherFacei = cycPatch.transformGlobalFace(facei); transferCoupledFaceRegion ( facei, - otherFaceI, + otherFacei, faceRegion, newChangedFaces ); @@ -310,21 +310,21 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit // Start with region 0 label nLocalRegions = 0; - label unsetCellI = 0; + label unsetCelli = 0; do { // Find first unset cell - for (; unsetCellI < mesh().nCells(); unsetCellI++) + for (; unsetCelli < mesh().nCells(); unsetCelli++) { - if (cellRegion[unsetCellI] == -1) + if (cellRegion[unsetCelli] == -1) { break; } } - if (unsetCellI >= mesh().nCells()) + if (unsetCelli >= mesh().nCells()) { break; } @@ -334,13 +334,13 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit explicitConnections, cellRegion, faceRegion, - unsetCellI, + unsetCelli, nLocalRegions ); // Current unsetCell has now been handled. Go to next region. nLocalRegions++; - unsetCellI++; + unsetCelli++; } while (true); @@ -566,9 +566,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit Map<label> globalToCompact(2*nCompact); // Remote regions we want the compact number for List<labelHashSet> nonLocal(Pstream::nProcs()); - forAll(nonLocal, procI) + forAll(nonLocal, proci) { - nonLocal[procI].resize((nLocalRegions-nCompact)/Pstream::nProcs()); + nonLocal[proci].resize((nLocalRegions-nCompact)/Pstream::nProcs()); } forAll(cellRegion, celli) @@ -599,21 +599,21 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit labelListList sendNonLocal(Pstream::nProcs()); labelList nNonLocal(Pstream::nProcs(), 0); - forAll(sendNonLocal, procI) + forAll(sendNonLocal, proci) { - sendNonLocal[procI].setSize(nonLocal[procI].size()); - forAllConstIter(labelHashSet, nonLocal[procI], iter) + sendNonLocal[proci].setSize(nonLocal[proci].size()); + forAllConstIter(labelHashSet, nonLocal[proci], iter) { - sendNonLocal[procI][nNonLocal[procI]++] = iter.key(); + sendNonLocal[proci][nNonLocal[proci]++] = iter.key(); } } if (debug) { - forAll(nNonLocal, procI) + forAll(nNonLocal, proci) { - Pout<< " from processor " << procI - << " want " << nNonLocal[procI] + Pout<< " from processor " << proci + << " want " << nNonLocal[proci] << " region numbers." << endl; } @@ -625,19 +625,19 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit labelListList recvNonLocal; Pstream::exchange<labelList, label>(sendNonLocal, recvNonLocal); - // Now we have the wanted compact region labels that procI wants in - // recvNonLocal[procI]. Construct corresponding list of compact + // Now we have the wanted compact region labels that proci wants in + // recvNonLocal[proci]. Construct corresponding list of compact // region labels to send back. labelListList sendWantedLocal(Pstream::nProcs()); - forAll(recvNonLocal, procI) + forAll(recvNonLocal, proci) { - const labelList& nonLocal = recvNonLocal[procI]; - sendWantedLocal[procI].setSize(nonLocal.size()); + const labelList& nonLocal = recvNonLocal[proci]; + sendWantedLocal[proci].setSize(nonLocal.size()); forAll(nonLocal, i) { - sendWantedLocal[procI][i] = globalToCompact[nonLocal[i]]; + sendWantedLocal[proci][i] = globalToCompact[nonLocal[i]]; } } @@ -651,10 +651,10 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit // corresponding compact number. Insert these into the local compaction // map. - forAll(recvNonLocal, procI) + forAll(recvNonLocal, proci) { - const labelList& wantedRegions = sendNonLocal[procI]; - const labelList& compactRegions = recvNonLocal[procI]; + const labelList& wantedRegions = sendNonLocal[proci]; + const labelList& compactRegions = recvNonLocal[proci]; forAll(wantedRegions, i) { diff --git a/src/meshTools/regionSplit/regionSplit.H b/src/meshTools/regionSplit/regionSplit.H index d3290f54c0f65989bb83834748c05e79ed4427b8..5d7c09067d2fa43c3d143b84477e402c5d87dc53 100644 --- a/src/meshTools/regionSplit/regionSplit.H +++ b/src/meshTools/regionSplit/regionSplit.H @@ -130,7 +130,7 @@ class regionSplit void transferCoupledFaceRegion ( const label facei, - const label otherFaceI, + const label otherFacei, labelList& faceRegion, DynamicList<label>& newChangedFaces diff --git a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C index db5bd0042804fd372f44c4b9b93489bab94b376d..0bd6e71e9eab65adce36b08e792f225a411f2f0d 100644 --- a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C +++ b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C @@ -78,9 +78,9 @@ void Foam::pointToCell::combine(topoSet& set, const bool add) const const label pointI = iter.key(); const labelList& pCells = mesh_.pointCells()[pointI]; - forAll(pCells, pCellI) + forAll(pCells, pCelli) { - addOrDelete(set, pCells[pCellI], add); + addOrDelete(set, pCells[pCelli], add); } } } diff --git a/src/meshTools/sets/cellSources/regionToCell/regionToCell.C b/src/meshTools/sets/cellSources/regionToCell/regionToCell.C index 3558ee9020a5731e0a4d6b322b24dfad829e0ce6..341da4c78cdb0e6148e3dd47a1425b5b6ffc7716 100644 --- a/src/meshTools/sets/cellSources/regionToCell/regionToCell.C +++ b/src/meshTools/sets/cellSources/regionToCell/regionToCell.C @@ -89,11 +89,11 @@ void Foam::regionToCell::markRegionFaces forAll(faceCells, i) { label facei = pp.start()+i; - label bFaceI = facei-mesh_.nInternalFaces(); + label bFacei = facei-mesh_.nInternalFaces(); if ( selectedCell[faceCells[i]] - != selectedCell[nbrSelected[bFaceI]] + != selectedCell[nbrSelected[bFacei]] ) { regionFace[facei] = true; @@ -118,18 +118,18 @@ Foam::boolList Foam::regionToCell::findRegions label celli = mesh_.findCell(insidePoints_[i]); label keepRegionI = -1; - label keepProcI = -1; + label keepProci = -1; if (celli != -1) { keepRegionI = cellRegion[celli]; - keepProcI = Pstream::myProcNo(); + keepProci = Pstream::myProcNo(); } reduce(keepRegionI, maxOp<label>()); keepRegion[keepRegionI] = true; - reduce(keepProcI, maxOp<label>()); + reduce(keepProci, maxOp<label>()); - if (keepProcI == -1) + if (keepProci == -1) { FatalErrorInFunction << "Did not find " << insidePoints_[i] @@ -140,7 +140,7 @@ Foam::boolList Foam::regionToCell::findRegions if (verbose) { Info<< " Found location " << insidePoints_[i] - << " in cell " << celli << " on processor " << keepProcI + << " in cell " << celli << " on processor " << keepProci << " in global region " << keepRegionI << " out of " << cellRegion.nRegions() << " regions." << endl; } diff --git a/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.C b/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.C index fc6b976204b4cabb71cdf05cfae5fc1c59f34699..067e0d279dfcafaaf2d87f70222b9bcafe6319dd 100644 --- a/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.C +++ b/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.C @@ -113,9 +113,9 @@ bool Foam::surfaceToCell::differingPointNormals const labelList& cFaces = mesh().cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = faces[cFaces[cFaceI]]; + const face& f = faces[cFaces[cFacei]]; forAll(f, fp) { diff --git a/src/meshTools/sets/faceSources/cellToFace/cellToFace.C b/src/meshTools/sets/faceSources/cellToFace/cellToFace.C index 454eb9117b65dc96674862a89784dfb1aec2a76f..64e04fe756375feaa16fb3b774a7e8b7730f00ed 100644 --- a/src/meshTools/sets/faceSources/cellToFace/cellToFace.C +++ b/src/meshTools/sets/faceSources/cellToFace/cellToFace.C @@ -84,9 +84,9 @@ void Foam::cellToFace::combine(topoSet& set, const bool add) const const label celli = iter.key(); const labelList& cFaces = mesh_.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - addOrDelete(set, cFaces[cFaceI], add); + addOrDelete(set, cFaces[cFacei], add); } } } diff --git a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C index 4cc7ca1d821a9e1933d5367baeebec66d972f78b..d10ecfca9972c903bb98ca183e6e7bd8c474cb4e 100644 --- a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C +++ b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C @@ -80,9 +80,9 @@ void Foam::pointToFace::combine(topoSet& set, const bool add) const const label pointI = iter.key(); const labelList& pFaces = mesh_.pointFaces()[pointI]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - addOrDelete(set, pFaces[pFaceI], add); + addOrDelete(set, pFaces[pFacei], add); } } } @@ -98,9 +98,9 @@ void Foam::pointToFace::combine(topoSet& set, const bool add) const const label pointI = iter.key(); const labelList& pFaces = mesh_.pointFaces()[pointI]; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - const label facei = pFaces[pFaceI]; + const label facei = pFaces[pFacei]; Map<label>::iterator fndFace = numPoints.find(facei); diff --git a/src/meshTools/sets/faceSources/regionToFace/regionToFace.C b/src/meshTools/sets/faceSources/regionToFace/regionToFace.C index b12be8efc526e0ba5fa9819570bdfabeadd83c4d..29548096e737223f5b5cc435bd00acc5471e8153 100644 --- a/src/meshTools/sets/faceSources/regionToFace/regionToFace.C +++ b/src/meshTools/sets/faceSources/regionToFace/regionToFace.C @@ -61,7 +61,7 @@ Foam::topoSetSource::addToUsageTable Foam::regionToFace::usage_ void Foam::regionToFace::markZone ( const indirectPrimitivePatch& patch, - const label procI, + const label proci, const label facei, const label zoneI, labelList& faceZone @@ -74,7 +74,7 @@ void Foam::regionToFace::markZone DynamicList<label> changedEdges; DynamicList<patchEdgeFaceRegion> changedInfo; - if (Pstream::myProcNo() == procI) + if (Pstream::myProcNo() == proci) { const labelList& fEdges = patch.faceEdges()[facei]; forAll(fEdges, i) @@ -158,7 +158,7 @@ void Foam::regionToFace::combine(topoSet& set, const bool add) const markZone ( patch, - ni.second().second(), // procI + ni.second().second(), // proci ni.first().index(), // start face 0, // currentZone faceRegion diff --git a/src/meshTools/sets/faceSources/regionToFace/regionToFace.H b/src/meshTools/sets/faceSources/regionToFace/regionToFace.H index e218ed07cd56782ff2788212aaccbed61228cea6..7a8bef8482ad06651dd379ac724d5ac5a6265f48 100644 --- a/src/meshTools/sets/faceSources/regionToFace/regionToFace.H +++ b/src/meshTools/sets/faceSources/regionToFace/regionToFace.H @@ -70,7 +70,7 @@ class regionToFace void markZone ( const indirectPrimitivePatch& patch, - const label procI, + const label proci, const label facei, const label zoneI, labelList& faceZone diff --git a/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C b/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C index 3a52076ac8d0eca09408bc34da532c952ad793c6..27d55c7813877068d36659dbcceef7cf3b8cf5a7 100644 --- a/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C +++ b/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C @@ -73,9 +73,9 @@ void Foam::cellToPoint::combine(topoSet& set, const bool add) const const label celli = iter.key(); const labelList& cFaces = mesh_.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh_.faces()[cFaces[cFaceI]]; + const face& f = mesh_.faces()[cFaces[cFacei]]; forAll(f, fp) { diff --git a/src/meshTools/sets/topoSets/cellZoneSet.C b/src/meshTools/sets/topoSets/cellZoneSet.C index 280f6d02aaec08ee4be4214d855934430ffd19e8..5fc39bf1420ded10f0105d7e9caf2fab1c81265f 100644 --- a/src/meshTools/sets/topoSets/cellZoneSet.C +++ b/src/meshTools/sets/topoSets/cellZoneSet.C @@ -291,10 +291,10 @@ void cellZoneSet::updateMesh(const mapPolyMesh& morphMap) forAll(addressing_, i) { label celli = addressing_[i]; - label newCellI = morphMap.reverseCellMap()[celli]; - if (newCellI >= 0) + label newCelli = morphMap.reverseCellMap()[celli]; + if (newCelli >= 0) { - newAddressing[n] = newCellI; + newAddressing[n] = newCelli; n++; } } diff --git a/src/meshTools/sets/topoSets/faceZoneSet.C b/src/meshTools/sets/topoSets/faceZoneSet.C index b24846f13fc70dcddf835476eac8a3f40017af12..cbd882d76c98c020ba0425314ebb4b38f5efacb7 100644 --- a/src/meshTools/sets/topoSets/faceZoneSet.C +++ b/src/meshTools/sets/topoSets/faceZoneSet.C @@ -386,10 +386,10 @@ void faceZoneSet::updateMesh(const mapPolyMesh& morphMap) forAll(addressing_, i) { label facei = addressing_[i]; - label newFaceI = morphMap.reverseFaceMap()[facei]; - if (newFaceI >= 0) + label newFacei = morphMap.reverseFaceMap()[facei]; + if (newFacei >= 0) { - newAddressing[n] = newFaceI; + newAddressing[n] = newFacei; newFlipMap[n] = flipMap_[i]; n++; } diff --git a/src/meshTools/sets/topoSets/topoSet.C b/src/meshTools/sets/topoSets/topoSet.C index 7344d2f7f1d72a079465692290d8540df2a3b408..23127c235871e3505bfcbabb8612194b8fdad035 100644 --- a/src/meshTools/sets/topoSets/topoSet.C +++ b/src/meshTools/sets/topoSets/topoSet.C @@ -150,9 +150,9 @@ void Foam::topoSet::updateLabels(const labelList& map) << abort(FatalError); } - const label newCellI = map[iter.key()]; + const label newCelli = map[iter.key()]; - if (newCellI != iter.key()) + if (newCelli != iter.key()) { changed = true; @@ -167,11 +167,11 @@ void Foam::topoSet::updateLabels(const labelList& map) forAllConstIter(labelHashSet, *this, iter) { - const label newCellI = map[iter.key()]; + const label newCelli = map[iter.key()]; - if (newCellI >= 0) + if (newCelli >= 0) { - newSet.insert(newCellI); + newSet.insert(newCelli); } } diff --git a/src/meshTools/surfaceSets/surfaceSets.C b/src/meshTools/surfaceSets/surfaceSets.C index 768a15a29efc0e6229b215938a7ef4a5b309cd53..9c7302d2748f599ee1c45ac09e5d8f5328cfa0ce 100644 --- a/src/meshTools/surfaceSets/surfaceSets.C +++ b/src/meshTools/surfaceSets/surfaceSets.C @@ -74,9 +74,9 @@ License //{ // const labelList& cFaces = mesh.cells()[celli]; // -// forAll(cFaces, cFaceI) +// forAll(cFaces, cFacei) // { -// label facei = cFaces[cFaceI]; +// label facei = cFaces[cFacei]; // // const face& f = mesh.faces()[facei]; // @@ -125,9 +125,9 @@ License // { // const cell& cFaces = cells[iter.key()]; // -// forAll(cFaces, cFaceI) +// forAll(cFaces, cFacei) // { -// const face& f = faces[cFaces[cFaceI]]; +// const face& f = faces[cFaces[cFacei]]; // // forAll(f, fp) // { @@ -302,9 +302,9 @@ Foam::labelHashSet Foam::surfaceSets::getHangingCells // Inside cell. Mark all vertices seen from this cell. const labelList& cFaces = cells[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = faces[cFaces[cFaceI]]; + const face& f = faces[cFaces[cFacei]]; forAll(f, fp) { @@ -330,9 +330,9 @@ Foam::labelHashSet Foam::surfaceSets::getHangingCells // Outside cell const labelList& cFaces = cells[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = faces[cFaces[cFaceI]]; + const face& f = faces[cFaces[cFacei]]; forAll(f, fp) { diff --git a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C index 4d59410b4e4eacf7d59ccaba077037af286c773f..6689fae63c7d4df21355cc9d6460df21f9870de7 100644 --- a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C +++ b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C @@ -58,9 +58,9 @@ void Foam::booleanSurface::checkIncluded bool usesIncluded = false; - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - if (faceZone[myFaces[myFaceI]] == faceZone[includedFace]) + if (faceZone[myFaces[myFacei]] == faceZone[includedFace]) { usesIncluded = true; @@ -136,10 +136,10 @@ Foam::geometricSurfacePatchList Foam::booleanSurface::mergePatches ); // Copy all patches of surf1 - label combinedPatchI = 0; + label combinedPatchi = 0; forAll(surf1.patches(), patchi) { - combinedPatches[combinedPatchI++] = surf1.patches()[patchi]; + combinedPatches[combinedPatchi++] = surf1.patches()[patchi]; } // (inefficiently) add unique patches from surf2 @@ -161,9 +161,9 @@ Foam::geometricSurfacePatchList Foam::booleanSurface::mergePatches if (index == -1) { - combinedPatches[combinedPatchI] = surf2.patches()[patch2I]; - patchMap2[patch2I] = combinedPatchI; - combinedPatchI++; + combinedPatches[combinedPatchi] = surf2.patches()[patch2I]; + patchMap2[patch2I] = combinedPatchi; + combinedPatchi++; } else { @@ -171,7 +171,7 @@ Foam::geometricSurfacePatchList Foam::booleanSurface::mergePatches } } - combinedPatches.setSize(combinedPatchI); + combinedPatches.setSize(combinedPatchi); return combinedPatches; } @@ -181,7 +181,7 @@ void Foam::booleanSurface::propagateEdgeSide ( const triSurface& surf, const label prevVert0, - const label prevFaceI, + const label prevFacei, const label prevState, const label edgeI, labelList& side @@ -192,13 +192,13 @@ void Foam::booleanSurface::propagateEdgeSide // Simple case. Propagate side. if (eFaces.size() == 2) { - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { propagateSide ( surf, prevState, - eFaces[eFaceI], + eFaces[eFacei], side ); } @@ -211,13 +211,13 @@ void Foam::booleanSurface::propagateEdgeSide << "Don't know how to handle edges with odd number of faces" << endl << "edge:" << edgeI << " vertices:" << surf.edges()[edgeI] - << " coming from face:" << prevFaceI + << " coming from face:" << prevFacei << " edgeFaces:" << eFaces << abort(FatalError); } // Get position of face in edgeFaces - label ind = index(eFaces, prevFaceI); + label ind = index(eFaces, prevFacei); // Determine orientation of faces around edge prevVert0 // (might be opposite of edge) @@ -246,13 +246,13 @@ void Foam::booleanSurface::propagateEdgeSide { // Coming from outside. nextInd is outside, rest is inside. - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - if (eFaceI != ind) + if (eFacei != ind) { label nextState; - if (eFaceI == nextInd) + if (eFacei == nextInd) { nextState = OUTSIDE; } @@ -265,7 +265,7 @@ void Foam::booleanSurface::propagateEdgeSide ( surf, nextState, - eFaces[eFaceI], + eFaces[eFacei], side ); } @@ -275,13 +275,13 @@ void Foam::booleanSurface::propagateEdgeSide { // Coming from inside. prevInd is inside as well, rest is outside. - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - if (eFaceI != ind) + if (eFacei != ind) { label nextState; - if (eFaceI == prevInd) + if (eFacei == prevInd) { nextState = INSIDE; } @@ -294,7 +294,7 @@ void Foam::booleanSurface::propagateEdgeSide ( surf, nextState, - eFaces[eFaceI], + eFaces[eFacei], side ); } @@ -427,15 +427,15 @@ Foam::booleanSurface::booleanSurface // Find (first) face of cutSurf1 that originates from includeFace1 - label cutSurf1FaceI = index(cutSurf1.faceMap(), includeFace1); + label cutSurf1Facei = index(cutSurf1.faceMap(), includeFace1); if (debug) { - Pout<< "cutSurf1 : starting to fill from face:" << cutSurf1FaceI + Pout<< "cutSurf1 : starting to fill from face:" << cutSurf1Facei << endl; } - if (cutSurf1FaceI == -1) + if (cutSurf1Facei == -1) { FatalErrorInFunction << "Did not find face with label " << includeFace1 @@ -444,14 +444,14 @@ Foam::booleanSurface::booleanSurface } // Find (first) face of cutSurf2 that originates from includeFace1 - label cutSurf2FaceI = index(cutSurf2.faceMap(), includeFace2); + label cutSurf2Facei = index(cutSurf2.faceMap(), includeFace2); if (debug) { - Pout<< "cutSurf2 : starting to fill from face:" << cutSurf2FaceI + Pout<< "cutSurf2 : starting to fill from face:" << cutSurf2Facei << endl; } - if (cutSurf2FaceI == -1) + if (cutSurf2Facei == -1) { FatalErrorInFunction << "Did not find face with label " << includeFace2 @@ -480,14 +480,14 @@ Foam::booleanSurface::booleanSurface // Check whether at least one of sides of intersection has been marked. - checkIncluded(cutSurf1, faceZone1, cutSurf1FaceI); + checkIncluded(cutSurf1, faceZone1, cutSurf1Facei); - // Subset zone which includes cutSurf2FaceI + // Subset zone which includes cutSurf2Facei boolList includedFaces1(cutSurf1.size(), false); forAll(faceZone1, facei) { - if (faceZone1[facei] == faceZone1[cutSurf1FaceI]) + if (faceZone1[facei] == faceZone1[cutSurf1Facei]) { includedFaces1[facei] = true; } @@ -528,14 +528,14 @@ Foam::booleanSurface::booleanSurface // Check whether at least one of sides of intersection has been marked. - checkIncluded(cutSurf2, faceZone2, cutSurf2FaceI); + checkIncluded(cutSurf2, faceZone2, cutSurf2Facei); - // Subset zone which includes cutSurf2FaceI + // Subset zone which includes cutSurf2Facei boolList includedFaces2(cutSurf2.size(), false); forAll(faceZone2, facei) { - if (faceZone2[facei] == faceZone2[cutSurf2FaceI]) + if (faceZone2[facei] == faceZone2[cutSurf2Facei]) { includedFaces2[facei] = true; } @@ -650,11 +650,11 @@ Foam::booleanSurface::booleanSurface faceMap_.setSize(combinedFaces.size()); // Copy faces from subSurf1. No need for renumbering. - label combinedFaceI = 0; + label combinedFacei = 0; forAll(subSurf1, facei) { - faceMap_[combinedFaceI] = faceMap1[facei]; - combinedFaces[combinedFaceI++] = subSurf1[facei]; + faceMap_[combinedFacei] = faceMap1[facei]; + combinedFaces[combinedFacei++] = subSurf1[facei]; } // Copy and renumber faces from subSurf2. @@ -662,9 +662,9 @@ Foam::booleanSurface::booleanSurface { const labelledTri& f = subSurf2[facei]; - faceMap_[combinedFaceI] = -faceMap2[facei]-1; + faceMap_[combinedFacei] = -faceMap2[facei]-1; - combinedFaces[combinedFaceI++] = + combinedFaces[combinedFacei++] = labelledTri ( pointMap[f[0]], @@ -856,16 +856,16 @@ Foam::booleanSurface::booleanSurface // Faces from 2 get vertices and region renumbered. List<labelledTri> combinedFaces(cutSurf1.size() + cutSurf2.size()); - label combinedFaceI = 0; + label combinedFacei = 0; forAll(cutSurf1, facei) { - combinedFaces[combinedFaceI++] = cutSurf1[facei]; + combinedFaces[combinedFacei++] = cutSurf1[facei]; } forAll(cutSurf2, facei) { - labelledTri& combinedTri = combinedFaces[combinedFaceI++]; + labelledTri& combinedTri = combinedFaces[combinedFacei++]; const labelledTri& tri = cutSurf2[facei]; @@ -916,15 +916,15 @@ Foam::booleanSurface::booleanSurface faceMap_.setSize(combinedSurf.size()); - label combinedFaceI = 0; + label combinedFacei = 0; forAll(cutSurf1, facei) { - faceMap_[combinedFaceI++] = cutSurf1.faceMap()[facei]; + faceMap_[combinedFacei++] = cutSurf1.faceMap()[facei]; } forAll(cutSurf2, facei) { - faceMap_[combinedFaceI++] = -cutSurf2.faceMap()[facei] - 1; + faceMap_[combinedFacei++] = -cutSurf2.faceMap()[facei] - 1; } triSurface::operator=(combinedSurf); @@ -942,7 +942,7 @@ Foam::booleanSurface::booleanSurface const pointField& pts = combinedSurf.points(); - label minFaceI = -1; + label minFacei = -1; pointHit minHit(false, Zero, GREAT, true); forAll(combinedSurf, facei) @@ -952,14 +952,14 @@ Foam::booleanSurface::booleanSurface if (curHit.distance() < minHit.distance()) { minHit = curHit; - minFaceI = facei; + minFacei = facei; } } if (debug) { Pout<< "booleanSurface : found for point:" << outsidePoint - << " nearest face:" << minFaceI + << " nearest face:" << minFacei << " nearest point:" << minHit.rawPoint() << endl; } @@ -971,7 +971,7 @@ Foam::booleanSurface::booleanSurface labelList side(combinedSurf.size(), UNVISITED); // Walk face-edge-face and propagate inside/outside status. - propagateSide(combinedSurf, OUTSIDE, minFaceI, side); + propagateSide(combinedSurf, OUTSIDE, minFacei, side); // Depending on operation include certain faces. @@ -988,7 +988,7 @@ Foam::booleanSurface::booleanSurface FatalErrorInFunction << "Face " << facei << " has not been reached by walking from" << " nearest point " << minHit.rawPoint() - << " nearest face " << minFaceI << exit(FatalError); + << " nearest face " << minFacei << exit(FatalError); } else if (side[facei] == OUTSIDE) { @@ -1041,19 +1041,19 @@ Foam::booleanSurface::booleanSurface forAll(subToCombinedFace, facei) { // Get label in combinedSurf - label combinedFaceI = subToCombinedFace[facei]; + label combinedFacei = subToCombinedFace[facei]; // First faces in combinedSurf come from cutSurf1. - if (combinedFaceI < cutSurf1.size()) + if (combinedFacei < cutSurf1.size()) { - label cutSurf1Face = combinedFaceI; + label cutSurf1Face = combinedFacei; faceMap_[facei] = cutSurf1.faceMap()[cutSurf1Face]; } else { - label cutSurf2Face = combinedFaceI - cutSurf1.size(); + label cutSurf2Face = combinedFacei - cutSurf1.size(); faceMap_[facei] = - cutSurf2.faceMap()[cutSurf2Face] - 1; } diff --git a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.H b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.H index 6f3fd1e9bc75c79584ecc2267ae09e72973a3a2c..e47aeecbc5dc5c4f788c880b54c7739b0be43d9a 100644 --- a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.H +++ b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.H @@ -136,7 +136,7 @@ class booleanSurface ( const triSurface& surf, const label prevVert0, - const label prevFaceI, + const label prevFacei, const label prevState, const label edgeI, labelList& side diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C index 31e013e2e7bcf2f7ba25f0e6935fca9b83aab407..c891d82865bbb3c75231b7571c1a1a98db73184b 100644 --- a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C +++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C @@ -230,9 +230,9 @@ Foam::edgeSurface::edgeSurface { allParentEdges.append(edgeI); - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - allFaceEdges[myFaces[myFaceI]].append(eI); + allFaceEdges[myFaces[myFacei]].append(eI); } } } diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C index 6b52daf7481e3fd2408310d021a6f890edb8a31b..260e2aab7e9944c7ed45cde9d3a4b614823811d3 100644 --- a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C +++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C @@ -1205,9 +1205,9 @@ Foam::intersectedSurface::intersectedSurface // + intersection ) ); - forAll(newFaces, newFaceI) + forAll(newFaces, newFacei) { - const face& newF = newFaces[newFaceI]; + const face& newF = newFaces[newFacei]; // { // fileName fName @@ -1215,11 +1215,11 @@ Foam::intersectedSurface::intersectedSurface // "face_" // + Foam::name(facei) // + "_subFace_" -// + Foam::name(newFaceI) +// + Foam::name(newFacei) // + ".obj" // ); // Pout<< "Writing original face:" << facei << " subFace:" -// << newFaceI << " to " << fName << endl; +// << newFacei << " to " << fName << endl; // // OFstream str(fName); // diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.H b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.H index 368551286d4be13e314784f828b15885a8ab6aaa..636aa84ea5d245e6b3f64cb4e59fc01de40a859d 100644 --- a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.H +++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.H @@ -209,7 +209,7 @@ private: const Map<DynamicList<label>>& facePointEdges, const Map<label>& pointVisited, const point& pt, - const label excludeFaceI, + const label excludeFacei, label& minVertI, scalar& minDist diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C index 72b8c6bb4a2477c1f3ffd6e170dc2c4262205df2..22c383d50d444ef1496fd65c5c6eb3fe62adc683 100644 --- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C +++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/edgeIntersections.C @@ -403,9 +403,9 @@ bool Foam::edgeIntersections::offsetPerturb const pointIndexHit& pHit = hits[i]; // Classify point on face of surface2 - label surf2FaceI = pHit.index(); + label surf2Facei = pHit.index(); - const triSurface::FaceType& f2 = surf2.localFaces()[surf2FaceI]; + const triSurface::FaceType& f2 = surf2.localFaces()[surf2Facei]; const pointField& surf2Pts = surf2.localPoints(); const point ctr = f2.centre(surf2Pts); diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C index dd32bd3530c4e7f81b5589845d424717ddfd6bca..824edfc7754759b77ccc35f4fa7af6201eece251 100644 --- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C +++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C @@ -117,13 +117,13 @@ bool Foam::surfaceIntersection::excludeEdgeHit } -//// Find intersection of plane with edges of hitFaceI. Returns +//// Find intersection of plane with edges of hitFacei. Returns //// - edgeI //// - intersection point //Foam::pointIndexHit Foam::surfaceIntersection::faceEdgeIntersection //( // const triSurface& surf, -// const label hitFaceI, +// const label hitFacei, // // const vector& n, // const point& eStart, @@ -134,7 +134,7 @@ bool Foam::surfaceIntersection::excludeEdgeHit // // const pointField& points = surf.points(); // -// const triSurface::FaceType& f = surf.localFaces()[hitFaceI]; +// const triSurface::FaceType& f = surf.localFaces()[hitFacei]; // // // Plane for intersect test. // plane pl(eStart, n); @@ -172,7 +172,7 @@ bool Foam::surfaceIntersection::excludeEdgeHit // meshTools::findEdge // ( // surf.edges(), -// surf.faceEdges()[hitFaceI], +// surf.faceEdges()[hitFacei], // f[fp], // f[fp1] // ); @@ -186,7 +186,7 @@ bool Foam::surfaceIntersection::excludeEdgeHit // // FatalErrorInFunction // << "Did not find intersection of plane " << pl -// << " with edges of face " << hitFaceI << " verts:" << f +// << " with edges of face " << hitFacei << " verts:" << f // << abort(FatalError); // // return pInter; @@ -290,11 +290,11 @@ void Foam::surfaceIntersection::classifyHit const labelList& facesA = surf1.edgeFaces()[edgeI]; // Label of face on surface2 edgeI intersected - label surf2FaceI = pHit.index(); + label surf2Facei = pHit.index(); // Classify point on surface2 - const triSurface::FaceType& f2 = surf2.localFaces()[surf2FaceI]; + const triSurface::FaceType& f2 = surf2.localFaces()[surf2Facei]; const pointField& surf2Pts = surf2.localPoints(); label nearType, nearLabel; @@ -360,7 +360,7 @@ void Foam::surfaceIntersection::classifyHit { // 3. Point hits edge. Do nothing on this side. Reverse // is handled by 2 (edge hits point) - label edge2I = getEdge(surf2, surf2FaceI, nearLabel); + label edge2I = getEdge(surf2, surf2Facei, nearLabel); const edge& e2 = surf2.edges()[edge2I]; if (debug&2) @@ -380,7 +380,7 @@ void Foam::surfaceIntersection::classifyHit // doing the surf2 with surf1 intersection but these // are merged later on) - label edge2I = getEdge(surf2, surf2FaceI, nearLabel); + label edge2I = getEdge(surf2, surf2Facei, nearLabel); const edge& e2 = surf2.edges()[edge2I]; if (debug&2) @@ -430,7 +430,7 @@ void Foam::surfaceIntersection::classifyHit { Pout<< pHit.hitPoint() << " is surf1:" << " end point of edge " << e - << " surf2: face " << surf2FaceI + << " surf2: face " << surf2Facei << endl; } @@ -465,12 +465,12 @@ void Foam::surfaceIntersection::classifyHit << pHit.hitPoint() << " is surf1:" << " end point of edge " << e << " coord:" << surf1.localPoints()[nearVert] - << " surf2: face " << surf2FaceI << endl; + << " surf2: face " << surf2Facei << endl; } vector eVec = otherPt - nearPt; - if ((surf2.faceNormals()[surf2FaceI] & eVec) > 0) + if ((surf2.faceNormals()[surf2Facei] & eVec) > 0) { // otherVert on outside of surf2 @@ -497,7 +497,7 @@ void Foam::surfaceIntersection::classifyHit ( isFirstSurf, facesA, - surf2FaceI, + surf2Facei, allCutEdges, allCutPoints ); @@ -508,7 +508,7 @@ void Foam::surfaceIntersection::classifyHit { Pout<< "Discarding " << pHit.hitPoint() << " since edge " << e << " on inside of surf2." - << " surf2 normal:" << surf2.faceNormals()[surf2FaceI] + << " surf2 normal:" << surf2.faceNormals()[surf2Facei] << endl; } } @@ -520,7 +520,7 @@ void Foam::surfaceIntersection::classifyHit { Pout<< pHit.hitPoint() << " is surf1:" << " somewhere on edge " << e - << " surf2: face " << surf2FaceI + << " surf2: face " << surf2Facei << endl; } @@ -533,7 +533,7 @@ void Foam::surfaceIntersection::classifyHit ( isFirstSurf, facesA, - surf2FaceI, + surf2Facei, allCutEdges, allCutPoints ); @@ -611,7 +611,7 @@ void Foam::surfaceIntersection::doCutEdges // is in their plane and they share a point with the edge. // Label of face on surface2 edgeI intersected - label hitFaceI = pHit.index(); + label hitFacei = pHit.index(); if ( @@ -619,7 +619,7 @@ void Foam::surfaceIntersection::doCutEdges ( surf1, edgeI, - hitFaceI, + hitFacei, 0.1 // 1-cos of angle between normals ) ) @@ -860,7 +860,7 @@ Foam::surfaceIntersection::surfaceIntersection ( true, // is first surface surf1.edgeFaces()[edgeI], - pHit.index(), // surf2FaceI + pHit.index(), // surf2Facei allCutEdges, allCutPoints ); @@ -901,7 +901,7 @@ Foam::surfaceIntersection::surfaceIntersection ( false, // is second surface surf2.edgeFaces()[edgeI], - pHit.index(), // surf2FaceI + pHit.index(), // surf2Facei allCutEdges, allCutPoints ); diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.H b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.H index f2184f5e7249353a93d304ba1df75f71ab960be7..76a6936d36c20f6dfe46e056a45b178dcb7555cc 100644 --- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.H +++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.H @@ -164,7 +164,7 @@ class surfaceIntersection //static pointIndexHit faceEdgeIntersection //( // const triSurface&, - // const label hitFaceI, + // const label hitFacei, // // const vector& n, // const point& eStart, diff --git a/src/meshTools/triSurface/orientedSurface/orientedSurface.C b/src/meshTools/triSurface/orientedSurface/orientedSurface.C index 5276ef93d891a75a3c9b2128c2c1d77c78cbe6a0..2dad74ff6e2ecafb4f4ce7686d0d549c75222a05 100644 --- a/src/meshTools/triSurface/orientedSurface/orientedSurface.C +++ b/src/meshTools/triSurface/orientedSurface/orientedSurface.C @@ -156,12 +156,12 @@ Foam::labelList Foam::orientedSurface::edgeToFace void Foam::orientedSurface::walkSurface ( const triSurface& s, - const label startFaceI, + const label startFacei, labelList& flipState ) { // List of faces that were changed in the last iteration. - labelList changedFaces(1, startFaceI); + labelList changedFaces(1, startFacei); // List of edges that were changed in the last iteration. labelList changedEdges; @@ -189,7 +189,7 @@ void Foam::orientedSurface::propagateOrientation const triSurface& s, const point& samplePoint, const bool orientOutside, - const label nearestFaceI, + const label nearestFacei, const point& nearestPt, labelList& flipState ) @@ -201,43 +201,43 @@ void Foam::orientedSurface::propagateOrientation ( s, samplePoint, - nearestFaceI + nearestFacei ); if (side == triSurfaceTools::UNKNOWN) { // Non-closed surface. Do what? For now behave as if no flipping // necessary - flipState[nearestFaceI] = NOFLIP; + flipState[nearestFacei] = NOFLIP; } else if ((side == triSurfaceTools::OUTSIDE) == orientOutside) { // outside & orientOutside or inside & !orientOutside // Normals on surface pointing correctly. No need to flip normals - flipState[nearestFaceI] = NOFLIP; + flipState[nearestFacei] = NOFLIP; } else { // Need to flip normals. - flipState[nearestFaceI] = FLIP; + flipState[nearestFacei] = FLIP; } if (debug) { - vector n = triSurfaceTools::surfaceNormal(s, nearestFaceI, nearestPt); + vector n = triSurfaceTools::surfaceNormal(s, nearestFacei, nearestPt); Pout<< "orientedSurface::propagateOrientation : starting face" << " orientation:" << nl << " for samplePoint:" << samplePoint << nl << " starting from point:" << nearestPt << nl - << " on face:" << nearestFaceI << nl + << " on face:" << nearestFacei << nl << " with normal:" << n << nl << " decided side:" << label(side) << endl; } - // Walk the surface from nearestFaceI, changing the flipstate. - walkSurface(s, nearestFaceI, flipState); + // Walk the surface from nearestFacei, changing the flipstate. + walkSurface(s, nearestFacei, flipState); } @@ -249,13 +249,13 @@ void Foam::orientedSurface::findZoneSide const labelList& faceZone, const label zoneI, const point& outsidePoint, - label& zoneFaceI, + label& zoneFacei, bool& isOutside ) { const triSurface& s = surfSearches.surface(); - zoneFaceI = -1; + zoneFacei = -1; isOutside = false; pointField start(1, outsidePoint); @@ -297,7 +297,7 @@ void Foam::orientedSurface::findZoneSide if (zoneIndex != -1) { - zoneFaceI = facei; + zoneFacei = facei; if ((zoneIndex%2) == 0) { @@ -373,24 +373,24 @@ bool Foam::orientedSurface::orientConsistent(triSurface& s) label facei = 0; while (true) { - label startFaceI = -1; + label startFacei = -1; while (facei < s.size()) { if (flipState[facei] == UNVISITED) { - startFaceI = facei; + startFacei = facei; break; } facei++; } - if (startFaceI == -1) + if (startFacei == -1) { break; } - flipState[startFaceI] = NOFLIP; - walkSurface(s, startFaceI, flipState); + flipState[startFacei] = NOFLIP; + walkSurface(s, startFacei, flipState); } anyFlipped = flipSurface(s, flipState); @@ -468,7 +468,7 @@ bool Foam::orientedSurface::orient scalar minDist = GREAT; point minPoint; - label minFaceI = -1; + label minFacei = -1; forAll(s, facei) { @@ -481,13 +481,13 @@ bool Foam::orientedSurface::orient { minDist = curHit.distance(); minPoint = curHit.rawPoint(); - minFaceI = facei; + minFacei = facei; } } } // Did we find anything? - if (minFaceI == -1) + if (minFacei == -1) { break; } @@ -499,7 +499,7 @@ bool Foam::orientedSurface::orient s, samplePoint, orientOutside, - minFaceI, + minFacei, minPoint, flipState ); @@ -542,7 +542,7 @@ bool Foam::orientedSurface::orient labelList flipState(s.size(), UNVISITED); for (label zoneI = 0; zoneI < nZones; zoneI++) { - label zoneFaceI = -1; + label zoneFacei = -1; bool isOutside; findZoneSide ( @@ -551,19 +551,19 @@ bool Foam::orientedSurface::orient zoneI, samplePoint, - zoneFaceI, + zoneFacei, isOutside ); if (isOutside == orientOutside) { - flipState[zoneFaceI] = NOFLIP; + flipState[zoneFacei] = NOFLIP; } else { - flipState[zoneFaceI] = FLIP; + flipState[zoneFacei] = FLIP; } - walkSurface(s, zoneFaceI, flipState); + walkSurface(s, zoneFacei, flipState); } // Now finally flip triangles according to flipState. diff --git a/src/meshTools/triSurface/orientedSurface/orientedSurface.H b/src/meshTools/triSurface/orientedSurface/orientedSurface.H index 6cd99777830f35053ec9551cbdddbea9de382fc2..e5caf9ca3f6da5a0497960839b441bf22314c8e2 100644 --- a/src/meshTools/triSurface/orientedSurface/orientedSurface.H +++ b/src/meshTools/triSurface/orientedSurface/orientedSurface.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -95,11 +95,11 @@ private: ); //- Walk from face across connected faces. Change orientation to be - // consistent with startFaceI. + // consistent with startFacei. static void walkSurface ( const triSurface& s, - const label startFaceI, + const label startFacei, labelList& flipState ); @@ -110,7 +110,7 @@ private: const triSurface&, const point& outsidePoint, const bool orientOutside, - const label nearestFaceI, + const label nearestFacei, const point& nearestPt, labelList& flipState ); @@ -123,7 +123,7 @@ private: const labelList& faceZone, const label zoneI, const point& visiblePoint, - label& zoneFaceI, + label& zoneFacei, bool& isOutside ); diff --git a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C index e7470100758e8b4ccd8a90866563d014517b5fa4..7bcfe6095e548dd14202385950f55ca4e8ea41ce 100644 --- a/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C +++ b/src/meshTools/triSurface/triSurfaceSearch/triSurfaceSearch.C @@ -62,15 +62,15 @@ bool Foam::triSurfaceSearch::checkUniqueHit forAll(pointFaces, pI) { - const label pointFaceI = pointFaces[pI]; + const label pointFacei = pointFaces[pI]; - if (pointFaceI != currHit.index()) + if (pointFacei != currHit.index()) { forAll(hits, hI) { const pointIndexHit& hit = hits[hI]; - if (hit.index() == pointFaceI) + if (hit.index() == pointFacei) { return false; } @@ -91,22 +91,22 @@ bool Foam::triSurfaceSearch::checkUniqueHit forAll(edgeFaces, fI) { - const label edgeFaceI = edgeFaces[fI]; + const label edgeFacei = edgeFaces[fI]; - if (edgeFaceI != currHit.index()) + if (edgeFacei != currHit.index()) { forAll(hits, hI) { const pointIndexHit& hit = hits[hI]; - if (hit.index() == edgeFaceI) + if (hit.index() == edgeFacei) { // Check normals const vector currHitNormal = surface().faceNormals()[currHit.index()]; const vector existingHitNormal = - surface().faceNormals()[edgeFaceI]; + surface().faceNormals()[edgeFacei]; const label signCurrHit = pos(currHitNormal & lineVec); diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C index 34856f5fc9c9d83ab753c300d7701f011ae6a805..9bffe1bf9c56fcdcfacc497d9e6b80dcc862a4de 100644 --- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C +++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C @@ -49,7 +49,7 @@ const Foam::label Foam::triSurfaceTools::COLLAPSED = -3; Wiley-Teubner, 1996) */ -// FaceI gets refined ('red'). Propagate edge refinement. +// Facei gets refined ('red'). Propagate edge refinement. void Foam::triSurfaceTools::calcRefineStatus ( const triSurface& surf, @@ -70,16 +70,16 @@ void Foam::triSurfaceTools::calcRefineStatus forAll(myNeighbours, myNeighbourI) { - label neighbourFaceI = myNeighbours[myNeighbourI]; + label neighbourFacei = myNeighbours[myNeighbourI]; - if (refine[neighbourFaceI] == GREEN) + if (refine[neighbourFacei] == GREEN) { // Change to red refinement and propagate - calcRefineStatus(surf, neighbourFaceI, refine); + calcRefineStatus(surf, neighbourFacei, refine); } - else if (refine[neighbourFaceI] == NONE) + else if (refine[neighbourFacei] == NONE) { - refine[neighbourFaceI] = GREEN; + refine[neighbourFacei] = GREEN; } } } @@ -262,14 +262,14 @@ Foam::triSurface Foam::triSurfaceTools::doRefine { const label edgeI = fEdges[i]; - label otherFaceI = otherFace(surf, facei, edgeI); + label otherFacei = otherFace(surf, facei, edgeI); - if ((otherFaceI != -1) && (refineStatus[otherFaceI] == GREEN)) + if ((otherFacei != -1) && (refineStatus[otherFacei] == GREEN)) { greenRefine ( surf, - otherFaceI, + otherFacei, edgeI, edgeMid[edgeI], newFaces @@ -352,9 +352,9 @@ void Foam::triSurfaceTools::protectNeighbours { const labelList& myFaces = surf.edgeFaces()[myEdges[i]]; - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - label facei = myFaces[myFaceI]; + label facei = myFaces[myFacei]; if ((faceStatus[facei] == ANYEDGE) || (faceStatus[facei] >= 0)) { @@ -385,9 +385,9 @@ Foam::labelHashSet Foam::triSurfaceTools::getCollapsedFaces labelHashSet facesToBeCollapsed(2*myFaces.size()); - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - facesToBeCollapsed.insert(myFaces[myFaceI]); + facesToBeCollapsed.insert(myFaces[myFacei]); } // From faces using v1 check if they share an edge with faces @@ -396,9 +396,9 @@ Foam::labelHashSet Foam::triSurfaceTools::getCollapsedFaces // collapses const labelList& v1Faces = surf.pointFaces()[v1]; - forAll(v1Faces, v1FaceI) + forAll(v1Faces, v1Facei) { - label face1I = v1Faces[v1FaceI]; + label face1I = v1Faces[v1Facei]; label otherEdgeI = oppositeEdge(surf, face1I, v1); @@ -432,9 +432,9 @@ Foam::label Foam::triSurfaceTools::vertexUsesFace { const labelList& myFaces = surf.pointFaces()[vertI]; - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - label face1I = myFaces[myFaceI]; + label face1I = myFaces[myFacei]; if (faceUsed.found(face1I)) { @@ -465,18 +465,18 @@ void Foam::triSurfaceTools::getMergedEdges // Mark all (non collapsed) faces using v2 labelHashSet v2FacesHash(v2Faces.size()); - forAll(v2Faces, v2FaceI) + forAll(v2Faces, v2Facei) { - if (!collapsedFaces.found(v2Faces[v2FaceI])) + if (!collapsedFaces.found(v2Faces[v2Facei])) { - v2FacesHash.insert(v2Faces[v2FaceI]); + v2FacesHash.insert(v2Faces[v2Facei]); } } - forAll(v1Faces, v1FaceI) + forAll(v1Faces, v1Facei) { - label face1I = v1Faces[v1FaceI]; + label face1I = v1Faces[v1Facei]; if (collapsedFaces.found(face1I)) { @@ -638,9 +638,9 @@ Foam::scalar Foam::triSurfaceTools::collapseMinCosAngle scalar minCos = 1; - forAll(v1Faces, v1FaceI) + forAll(v1Faces, v1Facei) { - label facei = v1Faces[v1FaceI]; + label facei = v1Faces[v1Facei]; if (collapsedFaces.found(facei)) { @@ -691,9 +691,9 @@ bool Foam::triSurfaceTools::collapseCreatesFold { const labelList& v1Faces = surf.pointFaces()[v1]; - forAll(v1Faces, v1FaceI) + forAll(v1Faces, v1Facei) { - label facei = v1Faces[v1FaceI]; + label facei = v1Faces[v1Facei]; if (collapsedFaces.found(facei)) { @@ -772,17 +772,17 @@ bool Foam::triSurfaceTools::collapseCreatesFold // if ((myEdges[myEdgeI] != edgeI) && (myFaces.size() == 2)) // { // // Get the other face -// label neighbourFaceI = myFaces[0]; +// label neighbourFacei = myFaces[0]; // -// if (neighbourFaceI == facei) +// if (neighbourFacei == facei) // { -// neighbourFaceI = myFaces[1]; +// neighbourFacei = myFaces[1]; // } // // // Is 'outside' face if not in collapsedFaces itself -// if (!collapsedFaces.found(neighbourFaceI)) +// if (!collapsedFaces.found(neighbourFacei)) // { -// neighbours.insert(neighbourFaceI, myEdges[myEdgeI]); +// neighbours.insert(neighbourFacei, myEdges[myEdgeI]); // } // } // } @@ -1321,14 +1321,14 @@ void Foam::triSurfaceTools::getVertexTriangles edgeTris.setSize(startFaces.size() + endFaces.size() - myFaces.size()); label nTris = 0; - forAll(startFaces, startFaceI) + forAll(startFaces, startFacei) { - edgeTris[nTris++] = startFaces[startFaceI]; + edgeTris[nTris++] = startFaces[startFacei]; } - forAll(endFaces, endFaceI) + forAll(endFaces, endFacei) { - label facei = endFaces[endFaceI]; + label facei = endFaces[endFacei]; if ((facei != face1I) && (facei != face2I)) { @@ -1617,9 +1617,9 @@ Foam::label Foam::triSurfaceTools::getTriangle const labelList& eFaces = surf.edgeFaces()[e0I]; - forAll(eFaces, eFaceI) + forAll(eFaces, eFacei) { - label facei = eFaces[eFaceI]; + label facei = eFaces[eFacei]; const labelList& myEdges = surf.faceEdges()[facei]; @@ -1870,9 +1870,9 @@ Foam::triSurface Foam::triSurfaceTools::redGreenRefine List<refineType> refineStatus(surf.size(), NONE); // Mark & propagate refinement - forAll(refineFaces, refineFaceI) + forAll(refineFaces, refineFacei) { - calcRefineStatus(surf, refineFaces[refineFaceI], refineStatus); + calcRefineStatus(surf, refineFaces[refineFacei], refineStatus); } // Do actual refinement @@ -1906,9 +1906,9 @@ Foam::triSurface Foam::triSurfaceTools::greenRefine bool neighbourIsRefined= false; - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - if (refineStatus[myFaces[myFaceI]] != NONE) + if (refineStatus[myFaces[myFacei]] != NONE) { neighbourIsRefined = true; } @@ -1930,20 +1930,20 @@ Foam::triSurface Foam::triSurfaceTools::greenRefine newPoints[newPointI] = mid; // Refine faces using edge - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { // Add faces to newFaces greenRefine ( surf, - myFaces[myFaceI], + myFaces[myFacei], edgeI, newPointI, newFaces ); // Mark as refined - refineStatus[myFaces[myFaceI]] = GREEN; + refineStatus[myFaces[myFacei]] = GREEN; } newPointI++; @@ -2094,11 +2094,11 @@ Foam::triSurface Foam::triSurfaceTools::mergePoints Foam::vector Foam::triSurfaceTools::surfaceNormal ( const triSurface& surf, - const label nearestFaceI, + const label nearestFacei, const point& nearestPt ) { - const triSurface::FaceType& f = surf[nearestFaceI]; + const triSurface::FaceType& f = surf[nearestFacei]; const pointField& points = surf.points(); label nearType, nearLabel; @@ -2108,12 +2108,12 @@ Foam::vector Foam::triSurfaceTools::surfaceNormal if (nearType == triPointRef::NONE) { // Nearest to face - return surf.faceNormals()[nearestFaceI]; + return surf.faceNormals()[nearestFacei]; } else if (nearType == triPointRef::EDGE) { // Nearest to edge. Assume order of faceEdges same as face vertices. - label edgeI = surf.faceEdges()[nearestFaceI][nearLabel]; + label edgeI = surf.faceEdges()[nearestFacei][nearLabel]; // Calculate edge normal by averaging face normals const labelList& eFaces = surf.edgeFaces()[edgeI]; @@ -2129,7 +2129,7 @@ Foam::vector Foam::triSurfaceTools::surfaceNormal else { // Nearest to point - const triSurface::FaceType& localF = surf.localFaces()[nearestFaceI]; + const triSurface::FaceType& localF = surf.localFaces()[nearestFacei]; return surf.pointNormals()[localF[nearLabel]]; } } @@ -2176,10 +2176,10 @@ Foam::triSurfaceTools::sideType Foam::triSurfaceTools::surfaceSide ( const triSurface& surf, const point& sample, - const label nearestFaceI + const label nearestFacei ) { - const triSurface::FaceType& f = surf[nearestFaceI]; + const triSurface::FaceType& f = surf[nearestFacei]; const pointField& points = surf.points(); // Find where point is on face @@ -2194,7 +2194,7 @@ Foam::triSurfaceTools::sideType Foam::triSurfaceTools::surfaceSide vector sampleNearestVec = (sample - nearestPoint); // Nearest to face interior. Use faceNormal to determine side - scalar c = sampleNearestVec & surf.faceNormals()[nearestFaceI]; + scalar c = sampleNearestVec & surf.faceNormals()[nearestFacei]; // // If the sample is essentially on the face, do not check for // // it being perpendicular. @@ -2203,7 +2203,7 @@ Foam::triSurfaceTools::sideType Foam::triSurfaceTools::surfaceSide // if (magSampleNearestVec > SMALL) // { - // c /= magSampleNearestVec*mag(surf.faceNormals()[nearestFaceI]); + // c /= magSampleNearestVec*mag(surf.faceNormals()[nearestFacei]); // if (mag(c) < 0.99) // { @@ -2215,7 +2215,7 @@ Foam::triSurfaceTools::sideType Foam::triSurfaceTools::surfaceSide // << "nearestPoint: " << nearestPoint << nl // << "sample - nearestPoint: " // << sample - nearestPoint << nl - // << "normal: " << surf.faceNormals()[nearestFaceI] << nl + // << "normal: " << surf.faceNormals()[nearestFacei] << nl // << "mag(sample - nearestPoint): " // << mag(sample - nearestPoint) << nl // << "normalised dot product: " << c << nl @@ -2242,7 +2242,7 @@ Foam::triSurfaceTools::sideType Foam::triSurfaceTools::surfaceSide // situation since otherwise the nearest point could never be the edge. // Get the edge. Assume order of faceEdges same as face vertices. - label edgeI = surf.faceEdges()[nearestFaceI][nearLabel]; + label edgeI = surf.faceEdges()[nearestFacei][nearLabel]; // if (debug) // { @@ -2275,7 +2275,7 @@ Foam::triSurfaceTools::sideType Foam::triSurfaceTools::surfaceSide // above (nearType == triPointRef::EDGE). - const triSurface::FaceType& localF = surf.localFaces()[nearestFaceI]; + const triSurface::FaceType& localF = surf.localFaces()[nearestFacei]; label nearPointI = localF[nearLabel]; const edgeList& edges = surf.edges(); @@ -2344,7 +2344,7 @@ Foam::triSurface Foam::triSurfaceTools::triangulate mesh.nFaces() - mesh.nInternalFaces() ); - label newPatchI = 0; + label newPatchi = 0; forAllConstIter(labelHashSet, includePatches, iter) { @@ -2354,9 +2354,9 @@ Foam::triSurface Foam::triSurfaceTools::triangulate label nTriTotal = 0; - forAll(patch, patchFaceI) + forAll(patch, patchFacei) { - const face& f = patch[patchFaceI]; + const face& f = patch[patchFacei]; faceList triFaces(f.nTriangles(points)); @@ -2364,11 +2364,11 @@ Foam::triSurface Foam::triSurfaceTools::triangulate f.triangles(points, nTri, triFaces); - forAll(triFaces, triFaceI) + forAll(triFaces, triFacei) { - const face& f = triFaces[triFaceI]; + const face& f = triFaces[triFacei]; - triangles.append(labelledTri(f[0], f[1], f[2], newPatchI)); + triangles.append(labelledTri(f[0], f[1], f[2], newPatchi)); nTriTotal++; } @@ -2378,10 +2378,10 @@ Foam::triSurface Foam::triSurfaceTools::triangulate { Pout<< patch.name() << " : generated " << nTriTotal << " triangles from " << patch.size() << " faces with" - << " new patchid " << newPatchI << endl; + << " new patchid " << newPatchi << endl; } - newPatchI++; + newPatchi++; } triangles.shrink(); @@ -2396,19 +2396,19 @@ Foam::triSurface Foam::triSurfaceTools::triangulate ); // Add patch names to surface - surface.patches().setSize(newPatchI); + surface.patches().setSize(newPatchi); - newPatchI = 0; + newPatchi = 0; forAllConstIter(labelHashSet, includePatches, iter) { const label patchi = iter.key(); const polyPatch& patch = bMesh[patchi]; - surface.patches()[newPatchI].name() = patch.name(); - surface.patches()[newPatchI].geometricType() = patch.type(); + surface.patches()[newPatchi].name() = patch.name(); + surface.patches()[newPatchi].geometricType() = patch.type(); - newPatchI++; + newPatchi++; } return surface; @@ -2449,7 +2449,7 @@ Foam::triSurface Foam::triSurfaceTools::triangulateFaceCentre mesh.nFaces() - mesh.nInternalFaces() ); - label newPatchI = 0; + label newPatchi = 0; forAllConstIter(labelHashSet, includePatches, iter) { @@ -2458,19 +2458,19 @@ Foam::triSurface Foam::triSurfaceTools::triangulateFaceCentre label nTriTotal = 0; - forAll(patch, patchFaceI) + forAll(patch, patchFacei) { // Face in global coords. - const face& f = patch[patchFaceI]; + const face& f = patch[patchFacei]; // Index in newPointI of face centre. - label fc = points.size() + patchFaceI + patch.start(); + label fc = points.size() + patchFacei + patch.start(); forAll(f, fp) { label fp1 = f.fcIndex(fp); - triangles.append(labelledTri(f[fp], f[fp1], fc, newPatchI)); + triangles.append(labelledTri(f[fp], f[fp1], fc, newPatchi)); nTriTotal++; } @@ -2480,10 +2480,10 @@ Foam::triSurface Foam::triSurfaceTools::triangulateFaceCentre { Pout<< patch.name() << " : generated " << nTriTotal << " triangles from " << patch.size() << " faces with" - << " new patchid " << newPatchI << endl; + << " new patchid " << newPatchi << endl; } - newPatchI++; + newPatchi++; } triangles.shrink(); @@ -2499,19 +2499,19 @@ Foam::triSurface Foam::triSurfaceTools::triangulateFaceCentre ); // Add patch names to surface - surface.patches().setSize(newPatchI); + surface.patches().setSize(newPatchi); - newPatchI = 0; + newPatchi = 0; forAllConstIter(labelHashSet, includePatches, iter) { const label patchi = iter.key(); const polyPatch& patch = bMesh[patchi]; - surface.patches()[newPatchI].name() = patch.name(); - surface.patches()[newPatchI].geometricType() = patch.type(); + surface.patches()[newPatchi].name() = patch.name(); + surface.patches()[newPatchi].geometricType() = patch.type(); - newPatchI++; + newPatchi++; } return surface; diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H index a11813459dbc2ac4933ad3b4323a739213666dee..1a6dafc4b1e6239948c3b75709b5835f3be1099f 100644 --- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H +++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H @@ -429,7 +429,7 @@ public: static vector surfaceNormal ( const triSurface& surf, - const label nearestFaceI, + const label nearestFacei, const point& nearestPt ); @@ -458,7 +458,7 @@ public: ( const triSurface& surf, const point& sample, - const label nearestFaceI + const label nearestFacei ); // Triangulation of faces diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C index 1d365456e2af5d7493d7423b78ceb27daa0a0707..5ad9046091eff2f6f0ef9d5c63cc3c0af4e80cce 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C @@ -200,16 +200,16 @@ void Foam::decompositionMethod::calcCellCells if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp))) { label facei = pp.start(); - label bFaceI = pp.start() - mesh.nInternalFaces(); + label bFacei = pp.start() - mesh.nInternalFaces(); forAll(pp, i) { - globalNeighbour[bFaceI] = globalAgglom.toGlobal + globalNeighbour[bFacei] = globalAgglom.toGlobal ( agglom[faceOwner[facei]] ); - bFaceI++; + bFacei++; facei++; } } @@ -241,13 +241,13 @@ void Foam::decompositionMethod::calcCellCells if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp))) { label facei = pp.start(); - label bFaceI = pp.start()-mesh.nInternalFaces(); + label bFacei = pp.start()-mesh.nInternalFaces(); forAll(pp, i) { label own = agglom[faceOwner[facei]]; - label globalNei = globalNeighbour[bFaceI]; + label globalNei = globalNeighbour[bFacei]; if ( !globalAgglom.isLocal(globalNei) @@ -258,7 +258,7 @@ void Foam::decompositionMethod::calcCellCells } facei++; - bFaceI++; + bFacei++; } } } @@ -292,13 +292,13 @@ void Foam::decompositionMethod::calcCellCells if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp))) { label facei = pp.start(); - label bFaceI = pp.start()-mesh.nInternalFaces(); + label bFacei = pp.start()-mesh.nInternalFaces(); forAll(pp, i) { label own = agglom[faceOwner[facei]]; - label globalNei = globalNeighbour[bFaceI]; + label globalNei = globalNeighbour[bFacei]; if ( @@ -310,7 +310,7 @@ void Foam::decompositionMethod::calcCellCells } facei++; - bFaceI++; + bFacei++; } } } @@ -407,16 +407,16 @@ void Foam::decompositionMethod::calcCellCells // if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp))) // { // label facei = pp.start(); -// label bFaceI = pp.start() - mesh.nInternalFaces(); +// label bFacei = pp.start() - mesh.nInternalFaces(); // // forAll(pp, i) // { -// globalNeighbour[bFaceI] = globalAgglom.toGlobal +// globalNeighbour[bFacei] = globalAgglom.toGlobal // ( // agglom[faceOwner[facei]] // ); // -// bFaceI++; +// bFacei++; // facei++; // } // } @@ -453,7 +453,7 @@ void Foam::decompositionMethod::calcCellCells // if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp))) // { // label facei = pp.start(); -// label bFaceI = pp.start()-mesh.nInternalFaces(); +// label bFacei = pp.start()-mesh.nInternalFaces(); // // forAll(pp, i) // { @@ -461,7 +461,7 @@ void Foam::decompositionMethod::calcCellCells // { // label own = agglom[faceOwner[facei]]; // -// label globalNei = globalNeighbour[bFaceI]; +// label globalNei = globalNeighbour[bFacei]; // if // ( // !globalAgglom.isLocal(globalNei) @@ -472,7 +472,7 @@ void Foam::decompositionMethod::calcCellCells // } // // facei++; -// bFaceI++; +// bFacei++; // } // } // } @@ -582,7 +582,7 @@ void Foam::decompositionMethod::calcCellCells // if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp))) // { // label facei = pp.start(); -// label bFaceI = pp.start()-mesh.nInternalFaces(); +// label bFacei = pp.start()-mesh.nInternalFaces(); // // forAll(pp, i) // { @@ -590,7 +590,7 @@ void Foam::decompositionMethod::calcCellCells // { // label own = agglom[faceOwner[facei]]; // -// label globalNei = globalNeighbour[bFaceI]; +// label globalNei = globalNeighbour[bFacei]; // // if // ( @@ -602,7 +602,7 @@ void Foam::decompositionMethod::calcCellCells // } // // facei++; -// bFaceI++; +// bFacei++; // } // } // } @@ -916,12 +916,12 @@ Foam::labelList Foam::decompositionMethod::decompose // different processor? So for now just push owner side // proc - const label procI = finalDecomp[mesh.faceOwner()[f0]]; + const label proci = finalDecomp[mesh.faceOwner()[f0]]; - finalDecomp[mesh.faceOwner()[f1]] = procI; + finalDecomp[mesh.faceOwner()[f1]] = proci; if (mesh.isInternalFace(f1)) { - finalDecomp[mesh.faceNeighbour()[f1]] = procI; + finalDecomp[mesh.faceNeighbour()[f1]] = proci; } } else if (blockedFace[f0] != blockedFace[f1]) @@ -1019,12 +1019,12 @@ Foam::labelList Foam::decompositionMethod::decompose { const labelList& set = specifiedProcessorFaces[setI]; - label procI = specifiedProcessor[setI]; - if (procI == -1) + label proci = specifiedProcessor[setI]; + if (proci == -1) { // If no processor specified use the one from the // 0th element - procI = finalDecomp[mesh.faceOwner()[set[0]]]; + proci = finalDecomp[mesh.faceOwner()[set[0]]]; } forAll(set, fI) @@ -1037,10 +1037,10 @@ Foam::labelList Foam::decompositionMethod::decompose { label facei = pFaces[i]; - finalDecomp[mesh.faceOwner()[facei]] = procI; + finalDecomp[mesh.faceOwner()[facei]] = proci; if (mesh.isInternalFace(facei)) { - finalDecomp[mesh.faceNeighbour()[facei]] = procI; + finalDecomp[mesh.faceNeighbour()[facei]] = proci; } } } @@ -1063,12 +1063,12 @@ Foam::labelList Foam::decompositionMethod::decompose { label facei = pp.start()+i; label own = mesh.faceOwner()[facei]; - label bFaceI = facei-mesh.nInternalFaces(); + label bFacei = facei-mesh.nInternalFaces(); if (!blockedFace[facei]) { label ownProc = finalDecomp[own]; - label nbrProc = nbrDecomp[bFaceI]; + label nbrProc = nbrDecomp[bFacei]; if (ownProc != nbrProc) { FatalErrorInFunction diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/minData.H b/src/parallel/decompose/decompositionMethods/decompositionMethod/minData.H index ad3fb947e1af7b3567f5ae517fc612187768ae25..63c80248d201eecab9a70b2d1e402b258579d9ec 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/minData.H +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/minData.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -103,7 +103,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -114,7 +114,7 @@ public: ( const polyMesh&, const polyPatch&, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& td ); @@ -133,8 +133,8 @@ public: inline bool updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const minData& neighbourInfo, const scalar tol, TrackingData& td @@ -145,8 +145,8 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const minData& neighbourInfo, const scalar tol, TrackingData& td @@ -157,7 +157,7 @@ public: inline bool updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const minData& neighbourInfo, const scalar tol, TrackingData& td diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/minDataI.H b/src/parallel/decompose/decompositionMethods/decompositionMethod/minDataI.H index a079524cb89b960a5658388ceb44ac090666e4a7..350ac4871d229c9d909fb62c002095b89f8e37a8 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/minDataI.H +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/minDataI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -66,7 +66,7 @@ inline void Foam::minData::leaveDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& ) @@ -88,7 +88,7 @@ inline void Foam::minData::enterDomain ( const polyMesh&, const polyPatch& patch, - const label patchFaceI, + const label patchFacei, const point& faceCentre, TrackingData& ) @@ -99,8 +99,8 @@ template<class TrackingData> inline bool Foam::minData::updateCell ( const polyMesh&, - const label thisCellI, - const label neighbourFaceI, + const label thisCelli, + const label neighbourFacei, const minData& neighbourInfo, const scalar tol, TrackingData& @@ -122,8 +122,8 @@ template<class TrackingData> inline bool Foam::minData::updateFace ( const polyMesh& mesh, - const label thisFaceI, - const label neighbourCellI, + const label thisFacei, + const label neighbourCelli, const minData& neighbourInfo, const scalar tol, TrackingData& @@ -147,7 +147,7 @@ template<class TrackingData> inline bool Foam::minData::updateFace ( const polyMesh&, - const label thisFaceI, + const label thisFacei, const minData& neighbourInfo, const scalar tol, TrackingData& diff --git a/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C b/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C index 10f90af74f5b569d9972b31bc70ae871c67c3493..3adc6279def46586632b10a00a87f4dedb8b816f 100644 --- a/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C +++ b/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C @@ -90,17 +90,17 @@ void Foam::multiLevelDecomp::subsetGlobalCellCells cutConnections.setSize(nDomains); cutConnections = 0; - forAll(subCellCells, subCellI) + forAll(subCellCells, subCelli) { - labelList& cCells = subCellCells[subCellI]; + labelList& cCells = subCellCells[subCelli]; // Keep the connections to valid mapped cells label newI = 0; forAll(cCells, i) { // Get locally-compact cell index of neighbouring cell - label nbrCellI = oldToNew[cCells[i]]; - if (nbrCellI == -1) + label nbrCelli = oldToNew[cCells[i]]; + if (nbrCelli == -1) { cutConnections[allDist[cCells[i]]]++; } @@ -109,12 +109,12 @@ void Foam::multiLevelDecomp::subsetGlobalCellCells // Reconvert local cell index into global one // Get original neighbour - label celli = set[subCellI]; - label oldNbrCellI = cellCells[celli][i]; + label celli = set[subCelli]; + label oldNbrCelli = cellCells[celli][i]; // Get processor from original neighbour - label procI = globalCells.whichProcID(oldNbrCellI); + label proci = globalCells.whichProcID(oldNbrCelli); // Convert into global compact numbering - cCells[newI++] = globalSubCells.toGlobal(procI, nbrCellI); + cCells[newI++] = globalSubCells.toGlobal(proci, nbrCelli); } } cCells.setSize(newI); diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C index 47863d90cb77c4a9276ac29bf9e11529c2341b70..4c6d2939cea6d35c50e6fed15c17f735826544df 100644 --- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C @@ -84,9 +84,9 @@ void Foam::ptscotchDecomp::check(const int retVal, const char* str) // globalIndex globalCells(initxadj.size()-1); // // bool hasZeroDomain = false; -// for (label procI = 0; procI < Pstream::nProcs(); procI++) +// for (label proci = 0; proci < Pstream::nProcs(); proci++) // { -// if (globalCells.localSize(procI) == 0) +// if (globalCells.localSize(proci) == 0) // { // hasZeroDomain = true; // break; @@ -123,12 +123,12 @@ void Foam::ptscotchDecomp::check(const int retVal, const char* str) // // (is same as number of cells next processor has to receive) // List<label> nSendCells(Pstream::nProcs(), 0); // -// for (label procI = nSendCells.size()-1; procI >=1; procI--) +// for (label proci = nSendCells.size()-1; proci >=1; proci--) // { -// label nLocalCells = globalCells.localSize(procI); -// if (nLocalCells-nSendCells[procI] < 1) +// label nLocalCells = globalCells.localSize(proci); +// if (nLocalCells-nSendCells[proci] < 1) // { -// nSendCells[procI-1] = nSendCells[procI]-nLocalCells+1; +// nSendCells[proci-1] = nSendCells[proci]-nLocalCells+1; // } // } // diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C index 729f453ceaf0518313c4f6c6186e32f7ca5c0caf..2978e4e84b63b57ef307557ec3515446d9098e26 100644 --- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C +++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C @@ -134,7 +134,7 @@ bool Foam::distributedTriSurfaceMesh::isLocal // { // // segment from start to clippedStart passes // // through proc. -// sendMap[procI].append(allSegments.size()); +// sendMap[proci].append(allSegments.size()); // allSegmentMap.append(segmentI); // allSegments.append(segment(start, clipPt0)); // } @@ -146,7 +146,7 @@ bool Foam::distributedTriSurfaceMesh::isLocal // // if (clipped) // { -// sendMap[procI].append(allSegments.size()); +// sendMap[proci].append(allSegments.size()); // allSegmentMap.append(segmentI); // allSegments.append(segment(clipPt0, end)); // } @@ -163,7 +163,7 @@ bool Foam::distributedTriSurfaceMesh::isLocal // if (clippedEnd) // { // // middle part of segment passes through proc. -// sendMap[procI].append(allSegments.size()); +// sendMap[proci].append(allSegments.size()); // allSegmentMap.append(segmentI); // allSegments.append(segment(clipPt0, clipPt1)); // } @@ -193,15 +193,15 @@ void Foam::distributedTriSurfaceMesh::distributeSegment // 2. If fully inside one other processor, then only need to send // to that one processor even if it intersects another. Rare occurrence // but cheap to test. - forAll(procBb_, procI) + forAll(procBb_, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - const List<treeBoundBox>& bbs = procBb_[procI]; + const List<treeBoundBox>& bbs = procBb_[proci]; if (isLocal(bbs, start, end)) { - sendMap[procI].append(allSegments.size()); + sendMap[proci].append(allSegments.size()); allSegmentMap.append(segmentI); allSegments.append(segment(start, end)); return; @@ -212,9 +212,9 @@ void Foam::distributedTriSurfaceMesh::distributeSegment // 3. If not contained in single processor send to all intersecting // processors. - forAll(procBb_, procI) + forAll(procBb_, proci) { - const List<treeBoundBox>& bbs = procBb_[procI]; + const List<treeBoundBox>& bbs = procBb_[proci]; forAll(bbs, bbI) { @@ -228,7 +228,7 @@ void Foam::distributedTriSurfaceMesh::distributeSegment if (bb.intersects(start, end, clipPt)) { - sendMap[procI].append(allSegments.size()); + sendMap[proci].append(allSegments.size()); allSegmentMap.append(segmentI); allSegments.append(segment(start, end)); } @@ -245,7 +245,7 @@ void Foam::distributedTriSurfaceMesh::distributeSegment // // allSegments, // allSegmentMap, - // sendMap[procI] + // sendMap[proci] //); } } @@ -295,10 +295,10 @@ Foam::distributedTriSurfaceMesh::distributeSegments // Convert dynamicList to labelList sendMap.setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - dynSendMap[procI].shrink(); - sendMap[procI].transfer(dynSendMap[procI]); + dynSendMap[proci].shrink(); + sendMap[proci].transfer(dynSendMap[proci]); } allSegments.transfer(dynAllSegments.shrink()); @@ -309,9 +309,9 @@ Foam::distributedTriSurfaceMesh::distributeSegments // Send over how many I need to receive. labelListList sendSizes(Pstream::nProcs()); sendSizes[Pstream::myProcNo()].setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - sendSizes[Pstream::myProcNo()][procI] = sendMap[procI].size(); + sendSizes[Pstream::myProcNo()][proci] = sendMap[proci].size(); } Pstream::gatherList(sendSizes); Pstream::scatterList(sendSizes); @@ -327,17 +327,17 @@ Foam::distributedTriSurfaceMesh::distributeSegments ); label segmentI = constructMap[Pstream::myProcNo()].size(); - forAll(constructMap, procI) + forAll(constructMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { // What I need to receive is what other processor is sending to me. - label nRecv = sendSizes[procI][Pstream::myProcNo()]; - constructMap[procI].setSize(nRecv); + label nRecv = sendSizes[proci][Pstream::myProcNo()]; + constructMap[proci].setSize(nRecv); for (label i = 0; i < nRecv; i++) { - constructMap[procI][i] = segmentI++; + constructMap[proci][i] = segmentI++; } } } @@ -562,17 +562,17 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries { if (info[i].hit()) { - label procI = triIndexer.whichProcID(info[i].index()); - nSend[procI]++; + label proci = triIndexer.whichProcID(info[i].index()); + nSend[proci]++; } } // 2. Size sendMap labelListList sendMap(Pstream::nProcs()); - forAll(nSend, procI) + forAll(nSend, proci) { - sendMap[procI].setSize(nSend[procI]); - nSend[procI] = 0; + sendMap[proci].setSize(nSend[proci]); + nSend[proci] = 0; } // 3. Fill sendMap @@ -580,9 +580,9 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries { if (info[i].hit()) { - label procI = triIndexer.whichProcID(info[i].index()); - triangleIndex[i] = triIndexer.toLocal(procI, info[i].index()); - sendMap[procI][nSend[procI]++] = i; + label proci = triIndexer.whichProcID(info[i].index()); + triangleIndex[i] = triIndexer.toLocal(proci, info[i].index()); + sendMap[proci][nSend[proci]++] = i; } else { @@ -596,9 +596,9 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries labelListList sendSizes(Pstream::nProcs()); sendSizes[Pstream::myProcNo()].setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - sendSizes[Pstream::myProcNo()][procI] = sendMap[procI].size(); + sendSizes[Pstream::myProcNo()][proci] = sendMap[proci].size(); } Pstream::gatherList(sendSizes); Pstream::scatterList(sendSizes); @@ -616,17 +616,17 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries ); label segmentI = constructMap[Pstream::myProcNo()].size(); - forAll(constructMap, procI) + forAll(constructMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { // What I need to receive is what other processor is sending to me. - label nRecv = sendSizes[procI][Pstream::myProcNo()]; - constructMap[procI].setSize(nRecv); + label nRecv = sendSizes[proci][Pstream::myProcNo()]; + constructMap[proci].setSize(nRecv); for (label i = 0; i < nRecv; i++) { - constructMap[procI][i] = segmentI++; + constructMap[proci][i] = segmentI++; } } } @@ -667,15 +667,15 @@ Foam::label Foam::distributedTriSurfaceMesh::calcOverlappingProcs overlaps = false; label nOverlaps = 0; - forAll(procBb_, procI) + forAll(procBb_, proci) { - const List<treeBoundBox>& bbs = procBb_[procI]; + const List<treeBoundBox>& bbs = procBb_[proci]; forAll(bbs, bbI) { if (bbs[bbI].overlaps(centre, radiusSqr)) { - overlaps[procI] = true; + overlaps[proci] = true; nOverlaps++; break; } @@ -726,11 +726,11 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries procBbOverlaps ); - forAll(procBbOverlaps, procI) + forAll(procBbOverlaps, proci) { - if (procI != Pstream::myProcNo() && procBbOverlaps[procI]) + if (proci != Pstream::myProcNo() && procBbOverlaps[proci]) { - dynSendMap[procI].append(dynAllCentres.size()); + dynSendMap[proci].append(dynAllCentres.size()); dynAllSegmentMap.append(centreI); dynAllCentres.append(centres[centreI]); dynAllRadiusSqr.append(radiusSqr[centreI]); @@ -740,10 +740,10 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries // Convert dynamicList to labelList sendMap.setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - dynSendMap[procI].shrink(); - sendMap[procI].transfer(dynSendMap[procI]); + dynSendMap[proci].shrink(); + sendMap[proci].transfer(dynSendMap[proci]); } allCentres.transfer(dynAllCentres.shrink()); @@ -755,9 +755,9 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries // Send over how many I need to receive. labelListList sendSizes(Pstream::nProcs()); sendSizes[Pstream::myProcNo()].setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - sendSizes[Pstream::myProcNo()][procI] = sendMap[procI].size(); + sendSizes[Pstream::myProcNo()][proci] = sendMap[proci].size(); } Pstream::gatherList(sendSizes); Pstream::scatterList(sendSizes); @@ -773,17 +773,17 @@ Foam::distributedTriSurfaceMesh::calcLocalQueries ); label segmentI = constructMap[Pstream::myProcNo()].size(); - forAll(constructMap, procI) + forAll(constructMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { // What I need to receive is what other processor is sending to me. - label nRecv = sendSizes[procI][Pstream::myProcNo()]; - constructMap[procI].setSize(nRecv); + label nRecv = sendSizes[proci][Pstream::myProcNo()]; + constructMap[proci].setSize(nRecv); for (label i = 0; i < nRecv; i++) { - constructMap[procI][i] = segmentI++; + constructMap[proci][i] = segmentI++; } } } @@ -867,12 +867,12 @@ Foam::distributedTriSurfaceMesh::independentlyDistributedBbs // Initialise to inverted box (VGREAT, -VGREAT) List<List<treeBoundBox>> bbs(Pstream::nProcs()); - forAll(bbs, procI) + forAll(bbs, proci) { - bbs[procI].setSize(1); - //bbs[procI][0] = boundBox::invertedBox; - bbs[procI][0].min() = point( VGREAT, VGREAT, VGREAT); - bbs[procI][0].max() = point(-VGREAT, -VGREAT, -VGREAT); + bbs[proci].setSize(1); + //bbs[proci][0] = boundBox::invertedBox; + bbs[proci][0].min() = point( VGREAT, VGREAT, VGREAT); + bbs[proci][0].max() = point(-VGREAT, -VGREAT, -VGREAT); } forAll(s, triI) @@ -890,12 +890,12 @@ Foam::distributedTriSurfaceMesh::independentlyDistributedBbs } // Now combine for all processors and convert to correct format. - forAll(bbs, procI) + forAll(bbs, proci) { - forAll(bbs[procI], i) + forAll(bbs[proci], i) { - reduce(bbs[procI][i].min(), minOp<point>()); - reduce(bbs[procI][i].max(), maxOp<point>()); + reduce(bbs[proci][i].min(), minOp<point>()); + reduce(bbs[proci][i].max(), maxOp<point>()); } } return bbs; @@ -1322,10 +1322,10 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh Pstream::scatterList(nTris); Info<< endl<< "\tproc\ttris\tbb" << endl; - forAll(nTris, procI) + forAll(nTris, proci) { - Info<< '\t' << procI << '\t' << nTris[procI] - << '\t' << procBb_[procI] << endl; + Info<< '\t' << proci << '\t' << nTris[proci] + << '\t' << procBb_[proci] << endl; } Info<< endl; } @@ -1400,10 +1400,10 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh(const IOobject& io) Pstream::scatterList(nTris); Info<< endl<< "\tproc\ttris\tbb" << endl; - forAll(nTris, procI) + forAll(nTris, proci) { - Info<< '\t' << procI << '\t' << nTris[procI] - << '\t' << procBb_[procI] << endl; + Info<< '\t' << proci << '\t' << nTris[proci] + << '\t' << procBb_[proci] << endl; } Info<< endl; } @@ -1483,10 +1483,10 @@ Foam::distributedTriSurfaceMesh::distributedTriSurfaceMesh Pstream::scatterList(nTris); Info<< endl<< "\tproc\ttris\tbb" << endl; - forAll(nTris, procI) + forAll(nTris, proci) { - Info<< '\t' << procI << '\t' << nTris[procI] - << '\t' << procBb_[procI] << endl; + Info<< '\t' << proci << '\t' << nTris[proci] + << '\t' << procBb_[proci] << endl; } Info<< endl; } @@ -2107,9 +2107,9 @@ void Foam::distributedTriSurfaceMesh::distribute InfoInFunction << "before distribution:" << endl << "\tproc\ttris" << endl; - forAll(nTris, procI) + forAll(nTris, proci) { - Info<< '\t' << procI << '\t' << nTris[procI] << endl; + Info<< '\t' << proci << '\t' << nTris[proci] << endl; } Info<< endl; } @@ -2121,21 +2121,21 @@ void Foam::distributedTriSurfaceMesh::distribute labelListList faceSendMap(Pstream::nProcs()); labelListList pointSendMap(Pstream::nProcs()); - forAll(procBb_, procI) + forAll(procBb_, proci) { overlappingSurface ( *this, - procBb_[procI], - pointSendMap[procI], - faceSendMap[procI] + procBb_[proci], + pointSendMap[proci], + faceSendMap[proci] ); if (debug) { - //Pout<< "Overlapping with proc " << procI - // << " faces:" << faceSendMap[procI].size() - // << " points:" << pointSendMap[procI].size() << endl << endl; + //Pout<< "Overlapping with proc " << proci + // << " faces:" << faceSendMap[proci].size() + // << " points:" << pointSendMap[proci].size() << endl << endl; } } @@ -2148,13 +2148,13 @@ void Foam::distributedTriSurfaceMesh::distribute boolList includedFace(s.size(), true); - forAll(faceSendMap, procI) + forAll(faceSendMap, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - forAll(faceSendMap[procI], i) + forAll(faceSendMap[proci], i) { - includedFace[faceSendMap[procI][i]] = false; + includedFace[faceSendMap[proci][i]] = false; } } } @@ -2182,9 +2182,9 @@ void Foam::distributedTriSurfaceMesh::distribute labelListList faceSendSizes(Pstream::nProcs()); faceSendSizes[Pstream::myProcNo()].setSize(Pstream::nProcs()); - forAll(faceSendMap, procI) + forAll(faceSendMap, proci) { - faceSendSizes[Pstream::myProcNo()][procI] = faceSendMap[procI].size(); + faceSendSizes[Pstream::myProcNo()][proci] = faceSendMap[proci].size(); } Pstream::gatherList(faceSendSizes); Pstream::scatterList(faceSendSizes); @@ -2235,13 +2235,13 @@ void Foam::distributedTriSurfaceMesh::distribute // Send all // ~~~~~~~~ - forAll(faceSendSizes, procI) + forAll(faceSendSizes, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - if (faceSendSizes[Pstream::myProcNo()][procI] > 0) + if (faceSendSizes[Pstream::myProcNo()][proci] > 0) { - OPstream str(Pstream::blocking, procI); + OPstream str(Pstream::blocking, proci); labelList pointMap; triSurface subSurface @@ -2249,15 +2249,15 @@ void Foam::distributedTriSurfaceMesh::distribute subsetMesh ( *this, - faceSendMap[procI], + faceSendMap[proci], pointMap ) ); //if (debug) //{ - // Pout<< "Sending to " << procI - // << " faces:" << faceSendMap[procI].size() + // Pout<< "Sending to " << proci + // << " faces:" << faceSendMap[proci].size() // << " points:" << subSurface.points().size() << endl // << endl; //} @@ -2271,20 +2271,20 @@ void Foam::distributedTriSurfaceMesh::distribute // Receive and merge all // ~~~~~~~~~~~~~~~~~~~~~ - forAll(faceSendSizes, procI) + forAll(faceSendSizes, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - if (faceSendSizes[procI][Pstream::myProcNo()] > 0) + if (faceSendSizes[proci][Pstream::myProcNo()] > 0) { - IPstream str(Pstream::blocking, procI); + IPstream str(Pstream::blocking, proci); // Receive triSurface subSurface(str); //if (debug) //{ - // Pout<< "Received from " << procI + // Pout<< "Received from " << proci // << " faces:" << subSurface.size() // << " points:" << subSurface.points().size() << endl // << endl; @@ -2299,8 +2299,8 @@ void Foam::distributedTriSurfaceMesh::distribute allTris, allPoints, - faceConstructMap[procI], - pointConstructMap[procI] + faceConstructMap[proci], + pointConstructMap[proci] ); //if (debug) @@ -2363,9 +2363,9 @@ void Foam::distributedTriSurfaceMesh::distribute InfoInFunction << "after distribution:" << endl << "\tproc\ttris" << endl; - forAll(nTris, procI) + forAll(nTris, proci) { - Info<< '\t' << procI << '\t' << nTris[procI] << endl; + Info<< '\t' << proci << '\t' << nTris[proci] << endl; } Info<< endl; } diff --git a/src/parallel/reconstruct/reconstruct/fvFieldReconstructor.C b/src/parallel/reconstruct/reconstruct/fvFieldReconstructor.C index c0ff1684e37e85650134134bb766a18ee0f4850d..41cdf7989a276f3d669681f18f5201e0741536cb 100644 --- a/src/parallel/reconstruct/reconstruct/fvFieldReconstructor.C +++ b/src/parallel/reconstruct/reconstruct/fvFieldReconstructor.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,25 +43,25 @@ Foam::fvFieldReconstructor::fvFieldReconstructor boundaryProcAddressing_(boundaryProcAddressing), nReconstructed_(0) { - forAll(procMeshes_, procI) + forAll(procMeshes_, proci) { - const fvMesh& procMesh = procMeshes_[procI]; + const fvMesh& procMesh = procMeshes_[proci]; if ( - faceProcAddressing[procI].size() != procMesh.nFaces() - || cellProcAddressing[procI].size() != procMesh.nCells() - || boundaryProcAddressing[procI].size() != procMesh.boundary().size() + faceProcAddressing[proci].size() != procMesh.nFaces() + || cellProcAddressing[proci].size() != procMesh.nCells() + || boundaryProcAddressing[proci].size() != procMesh.boundary().size() ) { FatalErrorInFunction << "Size of maps does not correspond to size of mesh" - << " for processor " << procI << endl - << "faceProcAddressing : " << faceProcAddressing[procI].size() + << " for processor " << proci << endl + << "faceProcAddressing : " << faceProcAddressing[proci].size() << " nFaces : " << procMesh.nFaces() << endl - << "cellProcAddressing : " << cellProcAddressing[procI].size() + << "cellProcAddressing : " << cellProcAddressing[proci].size() << " nCell : " << procMesh.nCells() << endl << "boundaryProcAddressing : " - << boundaryProcAddressing[procI].size() + << boundaryProcAddressing[proci].size() << " nFaces : " << procMesh.boundary().size() << exit(FatalError); } diff --git a/src/parallel/reconstruct/reconstruct/fvFieldReconstructorReconstructFields.C b/src/parallel/reconstruct/reconstruct/fvFieldReconstructorReconstructFields.C index e3337619341bc1f09ab1ef9418fc0b004e1f4bae..e6f48fc807be6505977e2abe4cbe8fe6faa33635 100644 --- a/src/parallel/reconstruct/reconstruct/fvFieldReconstructorReconstructFields.C +++ b/src/parallel/reconstruct/reconstruct/fvFieldReconstructorReconstructFields.C @@ -44,15 +44,15 @@ Foam::fvFieldReconstructor::reconstructFvVolumeInternalField // Create the internalField Field<Type> internalField(mesh_.nCells()); - forAll(procMeshes_, procI) + forAll(procMeshes_, proci) { - const DimensionedField<Type, volMesh>& procField = procFields[procI]; + const DimensionedField<Type, volMesh>& procField = procFields[proci]; // Set the cell values in the reconstructed field internalField.rmap ( procField.field(), - cellProcAddressing_[procI] + cellProcAddressing_[proci] ); } @@ -82,22 +82,22 @@ Foam::fvFieldReconstructor::reconstructFvVolumeInternalField procMeshes_.size() ); - forAll(procMeshes_, procI) + forAll(procMeshes_, proci) { procFields.set ( - procI, + proci, new DimensionedField<Type, volMesh> ( IOobject ( fieldIoObject.name(), - procMeshes_[procI].time().timeName(), - procMeshes_[procI], + procMeshes_[proci].time().timeName(), + procMeshes_[proci], IOobject::MUST_READ, IOobject::NO_WRITE ), - procMeshes_[procI] + procMeshes_[proci] ) ); } @@ -132,29 +132,29 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField // Create the patch fields PtrList<fvPatchField<Type>> patchFields(mesh_.boundary().size()); - forAll(procFields, procI) + forAll(procFields, proci) { const GeometricField<Type, fvPatchField, volMesh>& procField = - procFields[procI]; + procFields[proci]; // Set the cell values in the reconstructed field internalField.rmap ( procField.internalField(), - cellProcAddressing_[procI] + cellProcAddressing_[proci] ); // Set the boundary patch values in the reconstructed field - forAll(boundaryProcAddressing_[procI], patchi) + forAll(boundaryProcAddressing_[proci], patchi) { // Get patch index of the original patch - const label curBPatch = boundaryProcAddressing_[procI][patchi]; + const label curBPatch = boundaryProcAddressing_[proci][patchi]; // Get addressing slice for this patch const labelList::subList cp = procField.mesh().boundary()[patchi].patchSlice ( - faceProcAddressing_[procI] + faceProcAddressing_[proci] ); // check if the boundary patch is not a processor patch @@ -191,7 +191,7 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField if (cp[facei] <= 0) { FatalErrorInFunction - << "Processor " << procI + << "Processor " << proci << " patch " << procField.mesh().boundary()[patchi].name() << " face " << facei @@ -309,22 +309,22 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField procMeshes_.size() ); - forAll(procMeshes_, procI) + forAll(procMeshes_, proci) { procFields.set ( - procI, + proci, new GeometricField<Type, fvPatchField, volMesh> ( IOobject ( fieldIoObject.name(), - procMeshes_[procI].time().timeName(), - procMeshes_[procI], + procMeshes_[proci].time().timeName(), + procMeshes_[proci], IOobject::MUST_READ, IOobject::NO_WRITE ), - procMeshes_[procI] + procMeshes_[proci] ) ); } @@ -359,10 +359,10 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField PtrList<fvsPatchField<Type>> patchFields(mesh_.boundary().size()); - forAll(procMeshes_, procI) + forAll(procMeshes_, proci) { const GeometricField<Type, fvsPatchField, surfaceMesh>& procField = - procFields[procI]; + procFields[proci]; // Set the face values in the reconstructed field @@ -370,7 +370,7 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField // take care of the face direction offset trick. // { - const labelList& faceMap = faceProcAddressing_[procI]; + const labelList& faceMap = faceProcAddressing_[proci]; // Correctly oriented copy of internal field Field<Type> procInternalField(procField.internalField()); @@ -391,16 +391,16 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField } // Set the boundary patch values in the reconstructed field - forAll(boundaryProcAddressing_[procI], patchi) + forAll(boundaryProcAddressing_[proci], patchi) { // Get patch index of the original patch - const label curBPatch = boundaryProcAddressing_[procI][patchi]; + const label curBPatch = boundaryProcAddressing_[proci][patchi]; // Get addressing slice for this patch const labelList::subList cp = - procMeshes_[procI].boundary()[patchi].patchSlice + procMeshes_[proci].boundary()[patchi].patchSlice ( - faceProcAddressing_[procI] + faceProcAddressing_[proci] ); // check if the boundary patch is not a processor patch @@ -550,22 +550,22 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField procMeshes_.size() ); - forAll(procMeshes_, procI) + forAll(procMeshes_, proci) { procFields.set ( - procI, + proci, new GeometricField<Type, fvsPatchField, surfaceMesh> ( IOobject ( fieldIoObject.name(), - procMeshes_[procI].time().timeName(), - procMeshes_[procI], + procMeshes_[proci].time().timeName(), + procMeshes_[proci], IOobject::MUST_READ, IOobject::NO_WRITE ), - procMeshes_[procI] + procMeshes_[proci] ) ); } diff --git a/src/parallel/reconstruct/reconstruct/processorMeshes.C b/src/parallel/reconstruct/reconstruct/processorMeshes.C index c2c98717569f99d67cd5a6c638c89ff4ccd484bd..9fa58ecdb663d3b886a3a75bf9df77128555df8f 100644 --- a/src/parallel/reconstruct/reconstruct/processorMeshes.C +++ b/src/parallel/reconstruct/reconstruct/processorMeshes.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -33,42 +33,42 @@ void Foam::processorMeshes::read() { // Make sure to clear (and hence unregister) any previously loaded meshes // and fields - forAll(databases_, procI) + forAll(databases_, proci) { - meshes_.set(procI, NULL); - pointProcAddressing_.set(procI, NULL); - faceProcAddressing_.set(procI, NULL); - cellProcAddressing_.set(procI, NULL); - boundaryProcAddressing_.set(procI, NULL); + meshes_.set(proci, NULL); + pointProcAddressing_.set(proci, NULL); + faceProcAddressing_.set(proci, NULL); + cellProcAddressing_.set(proci, NULL); + boundaryProcAddressing_.set(proci, NULL); } - forAll(databases_, procI) + forAll(databases_, proci) { meshes_.set ( - procI, + proci, new fvMesh ( IOobject ( meshName_, - databases_[procI].timeName(), - databases_[procI] + databases_[proci].timeName(), + databases_[proci] ) ) ); pointProcAddressing_.set ( - procI, + proci, new labelIOList ( IOobject ( "pointProcAddressing", - meshes_[procI].facesInstance(), - meshes_[procI].meshSubDir, - meshes_[procI], + meshes_[proci].facesInstance(), + meshes_[proci].meshSubDir, + meshes_[proci], IOobject::MUST_READ, IOobject::NO_WRITE ) @@ -77,15 +77,15 @@ void Foam::processorMeshes::read() faceProcAddressing_.set ( - procI, + proci, new labelIOList ( IOobject ( "faceProcAddressing", - meshes_[procI].facesInstance(), - meshes_[procI].meshSubDir, - meshes_[procI], + meshes_[proci].facesInstance(), + meshes_[proci].meshSubDir, + meshes_[proci], IOobject::MUST_READ, IOobject::NO_WRITE ) @@ -94,15 +94,15 @@ void Foam::processorMeshes::read() cellProcAddressing_.set ( - procI, + proci, new labelIOList ( IOobject ( "cellProcAddressing", - meshes_[procI].facesInstance(), - meshes_[procI].meshSubDir, - meshes_[procI], + meshes_[proci].facesInstance(), + meshes_[proci].meshSubDir, + meshes_[proci], IOobject::MUST_READ, IOobject::NO_WRITE ) @@ -111,15 +111,15 @@ void Foam::processorMeshes::read() boundaryProcAddressing_.set ( - procI, + proci, new labelIOList ( IOobject ( "boundaryProcAddressing", - meshes_[procI].facesInstance(), - meshes_[procI].meshSubDir, - meshes_[procI], + meshes_[proci].facesInstance(), + meshes_[proci].meshSubDir, + meshes_[proci], IOobject::MUST_READ, IOobject::NO_WRITE ) @@ -155,16 +155,16 @@ Foam::fvMesh::readUpdateState Foam::processorMeshes::readUpdate() { fvMesh::readUpdateState stat = fvMesh::UNCHANGED; - forAll(databases_, procI) + forAll(databases_, proci) { // Check if any new meshes need to be read. - fvMesh::readUpdateState procStat = meshes_[procI].readUpdate(); + fvMesh::readUpdateState procStat = meshes_[proci].readUpdate(); /* if (procStat != fvMesh::UNCHANGED) { - Info<< "Processor " << procI - << " at time " << databases_[procI].timeName() + Info<< "Processor " << proci + << " at time " << databases_[proci].timeName() << " detected mesh change " << procStat << endl; } @@ -178,11 +178,11 @@ Foam::fvMesh::readUpdateState Foam::processorMeshes::readUpdate() else if (stat != procStat) { FatalErrorInFunction - << "Processor " << procI + << "Processor " << proci << " has a different polyMesh at time " - << databases_[procI].timeName() + << databases_[proci].timeName() << " compared to any previous processors." << nl - << "Please check time " << databases_[procI].timeName() + << "Please check time " << databases_[proci].timeName() << " directories on all processors for consistent" << " mesh files." << exit(FatalError); @@ -207,19 +207,19 @@ void Foam::processorMeshes::reconstructPoints(fvMesh& mesh) // Read the field for all the processors PtrList<pointIOField> procsPoints(meshes_.size()); - forAll(meshes_, procI) + forAll(meshes_, proci) { procsPoints.set ( - procI, + proci, new pointIOField ( IOobject ( "points", - meshes_[procI].time().timeName(), + meshes_[proci].time().timeName(), polyMesh::meshSubDir, - meshes_[procI], + meshes_[proci], IOobject::MUST_READ, IOobject::NO_WRITE, false @@ -231,13 +231,13 @@ void Foam::processorMeshes::reconstructPoints(fvMesh& mesh) // Create the new points vectorField newPoints(mesh.nPoints()); - forAll(meshes_, procI) + forAll(meshes_, proci) { - const vectorField& procPoints = procsPoints[procI]; + const vectorField& procPoints = procsPoints[proci]; // Set the cell values in the reconstructed field - const labelList& pointProcAddressingI = pointProcAddressing_[procI]; + const labelList& pointProcAddressingI = pointProcAddressing_[proci]; if (pointProcAddressingI.size() != procPoints.size()) { diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H index 05438c88d74e07488daff2e39627e95cf5413d73..92a48257e9f4772c9c0a29357f10a984462b3bd2 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H @@ -148,8 +148,8 @@ protected: const word& outputName, const vector& minC, const vector& maxC, - const label minProcI, - const label maxProcI, + const label minProci, + const label maxProci, const Type& minValue, const Type& maxValue ); diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C index 481c494236dc94fe345baf162edf6c95994a1ea2..86bfc212443624252d7fbbf753817573a1e630d3 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C @@ -35,8 +35,8 @@ void Foam::fieldMinMax::output const word& outputName, const vector& minC, const vector& maxC, - const label minProcI, - const label maxProcI, + const label minProci, + const label maxProci, const Type& minValue, const Type& maxValue ) @@ -54,7 +54,7 @@ void Foam::fieldMinMax::output if (Pstream::parRun()) { - file<< token::TAB << minProcI; + file<< token::TAB << minProci; } file<< token::TAB << maxValue @@ -62,7 +62,7 @@ void Foam::fieldMinMax::output if (Pstream::parRun()) { - file<< token::TAB << maxProcI; + file<< token::TAB << maxProci; } file<< endl; @@ -73,7 +73,7 @@ void Foam::fieldMinMax::output if (Pstream::parRun()) { - if (log_) Info<< " on processor " << minProcI; + if (log_) Info<< " on processor " << minProci; } if (log_) Info @@ -82,7 +82,7 @@ void Foam::fieldMinMax::output if (Pstream::parRun()) { - if (log_) Info<< " on processor " << maxProcI; + if (log_) Info<< " on processor " << maxProci; } } else @@ -109,7 +109,7 @@ void Foam::fieldMinMax::calcMinMaxFields if (obr_.foundObject<fieldType>(fieldName)) { - const label procI = Pstream::myProcNo(); + const label proci = Pstream::myProcNo(); const fieldType& field = obr_.lookupObject<fieldType>(fieldName); const fvMesh& mesh = field.mesh(); @@ -127,17 +127,17 @@ void Foam::fieldMinMax::calcMinMaxFields scalarList minVs(Pstream::nProcs()); List<vector> minCs(Pstream::nProcs()); - label minProcI = findMin(magField); - minVs[procI] = magField[minProcI]; - minCs[procI] = field.mesh().C()[minProcI]; + label minProci = findMin(magField); + minVs[proci] = magField[minProci]; + minCs[proci] = field.mesh().C()[minProci]; labelList maxIs(Pstream::nProcs()); scalarList maxVs(Pstream::nProcs()); List<vector> maxCs(Pstream::nProcs()); - label maxProcI = findMax(magField); - maxVs[procI] = magField[maxProcI]; - maxCs[procI] = field.mesh().C()[maxProcI]; + label maxProci = findMax(magField); + maxVs[proci] = magField[maxProci]; + maxCs[proci] = field.mesh().C()[maxProci]; forAll(magFieldBoundary, patchi) { @@ -147,17 +147,17 @@ void Foam::fieldMinMax::calcMinMaxFields const vectorField& Cfp = CfBoundary[patchi]; label minPI = findMin(mfp); - if (mfp[minPI] < minVs[procI]) + if (mfp[minPI] < minVs[proci]) { - minVs[procI] = mfp[minPI]; - minCs[procI] = Cfp[minPI]; + minVs[proci] = mfp[minPI]; + minCs[proci] = Cfp[minPI]; } label maxPI = findMax(mfp); - if (mfp[maxPI] > maxVs[procI]) + if (mfp[maxPI] > maxVs[proci]) { - maxVs[procI] = mfp[maxPI]; - maxCs[procI] = Cfp[maxPI]; + maxVs[proci] = mfp[maxPI]; + maxCs[proci] = Cfp[maxPI]; } } } @@ -199,18 +199,18 @@ void Foam::fieldMinMax::calcMinMaxFields List<Type> minVs(Pstream::nProcs()); List<vector> minCs(Pstream::nProcs()); - label minProcI = findMin(field); - minVs[procI] = field[minProcI]; - minCs[procI] = field.mesh().C()[minProcI]; + label minProci = findMin(field); + minVs[proci] = field[minProci]; + minCs[proci] = field.mesh().C()[minProci]; Pstream::gatherList(minVs); Pstream::gatherList(minCs); List<Type> maxVs(Pstream::nProcs()); List<vector> maxCs(Pstream::nProcs()); - label maxProcI = findMax(field); - maxVs[procI] = field[maxProcI]; - maxCs[procI] = field.mesh().C()[maxProcI]; + label maxProci = findMax(field); + maxVs[proci] = field[maxProci]; + maxCs[proci] = field.mesh().C()[maxProci]; forAll(fieldBoundary, patchi) { @@ -220,17 +220,17 @@ void Foam::fieldMinMax::calcMinMaxFields const vectorField& Cfp = CfBoundary[patchi]; label minPI = findMin(fp); - if (fp[minPI] < minVs[procI]) + if (fp[minPI] < minVs[proci]) { - minVs[procI] = fp[minPI]; - minCs[procI] = Cfp[minPI]; + minVs[proci] = fp[minPI]; + minCs[proci] = Cfp[minPI]; } label maxPI = findMax(fp); - if (fp[maxPI] > maxVs[procI]) + if (fp[maxPI] > maxVs[proci]) { - maxVs[procI] = fp[maxPI]; - maxCs[procI] = Cfp[maxPI]; + maxVs[proci] = fp[maxPI]; + maxCs[proci] = Cfp[maxPI]; } } } diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C index 885ca04ef373921c3b207bc831b3381bc5084a51..f37d0b484638bd566af94d602d821a74be89ad5b 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C @@ -253,10 +253,10 @@ void Foam::fieldValues::faceSource::combineMeshGeometry // Renumber and flatten label nFaces = 0; label nPoints = 0; - forAll(allFaces, procI) + forAll(allFaces, proci) { - nFaces += allFaces[procI].size(); - nPoints += allPoints[procI].size(); + nFaces += allFaces[proci].size(); + nPoints += allPoints[proci].size(); } faces.setSize(nFaces); @@ -287,11 +287,11 @@ void Foam::fieldValues::faceSource::combineMeshGeometry } // Other proc data follows - forAll(allFaces, procI) + forAll(allFaces, proci) { - if (procI != Pstream::myProcNo()) + if (proci != Pstream::myProcNo()) { - const faceList& fcs = allFaces[procI]; + const faceList& fcs = allFaces[proci]; forAll(fcs, i) { const face& f = fcs[i]; @@ -303,7 +303,7 @@ void Foam::fieldValues::faceSource::combineMeshGeometry } } - const pointField& pts = allPoints[procI]; + const pointField& pts = allPoints[proci]; forAll(pts, i) { points[nPoints++] = pts[i]; diff --git a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.C b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.C index 89603c19ca833480ad50264602c597fcd263baba..0386cf57056c7da0278190d9243efaa31aa18452 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.C @@ -32,13 +32,13 @@ Foam::findCellParticle::findCellParticle const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const point& end, const label data ) : - particle(mesh, position, celli, tetFaceI, tetPtI), + particle(mesh, position, celli, tetFacei, tetPtI), end_(end), data_(data) {} diff --git a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H index 96a2fbed9650c1428287725827461ccd94bdf47b..edd69fadf03e2a168dcb4041a1e9ee322e61f00e 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H +++ b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H @@ -113,7 +113,7 @@ public: const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const point& end, const label data diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C index 598cf0fe228ebf08779e6c26d461184739849a14..d3cea4570933f01bc61a05743ac3c8e5392ab60d 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C @@ -73,9 +73,9 @@ void Foam::nearWallFields::calcAddressing() vectorField nf(patch.nf()); vectorField faceCellCentres(patch.patch().faceCellCentres()); - forAll(patch, patchFaceI) + forAll(patch, patchFacei) { - label meshFaceI = patch.start()+patchFaceI; + label meshFacei = patch.start()+patchFacei; // Find starting point on face (since faceCentre might not // be on face-diagonal decomposition) @@ -84,7 +84,7 @@ void Foam::nearWallFields::calcAddressing() mappedPatchBase::facePoint ( mesh, - meshFaceI, + meshFacei, polyMesh::FACE_DIAG_TRIS ) ); @@ -98,16 +98,16 @@ void Foam::nearWallFields::calcAddressing() else { // Fallback: start tracking from neighbouring cell centre - start = faceCellCentres[patchFaceI]; + start = faceCellCentres[patchFacei]; } - const point end = start-distance_*nf[patchFaceI]; + const point end = start-distance_*nf[patchFacei]; // Find tet for starting location label celli = -1; - label tetFaceI = -1; + label tetFacei = -1; label tetPtI = -1; - mesh.findCellFacePt(start, celli, tetFaceI, tetPtI); + mesh.findCellFacePt(start, celli, tetFacei, tetPtI); // Add to cloud. Add originating face as passive data cloud.addParticle @@ -117,7 +117,7 @@ void Foam::nearWallFields::calcAddressing() mesh, start, celli, - tetFaceI, + tetFacei, tetPtI, end, globalWalls.toGlobal(nPatchFaces) // passive data diff --git a/src/postProcessing/functionObjects/field/processorField/processorField.C b/src/postProcessing/functionObjects/field/processorField/processorField.C index c5873c7ccc1f18cd43778e90c23a5f3d63e7f3f2..f15f3b6a8fb75d8c04eca557fa21265dfc3cf582 100644 --- a/src/postProcessing/functionObjects/field/processorField/processorField.C +++ b/src/postProcessing/functionObjects/field/processorField/processorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -107,7 +107,7 @@ void Foam::processorField::execute() obr_.lookupObject<volScalarField>("processorID"); const_cast<volScalarField&>(procField) == - dimensionedScalar("procI", dimless, Pstream::myProcNo()); + dimensionedScalar("proci", dimless, Pstream::myProcNo()); } } diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLine.C b/src/postProcessing/functionObjects/field/streamLine/streamLine.C index db00431ee52921f7281507641710a1f46a86e142..94e490630e46588e87a024c51200a152c1e48811 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLine.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLine.C @@ -544,10 +544,10 @@ void Foam::streamLine::write() // processors. label trackI = 0; - forAll(recvMap, procI) + forAll(recvMap, proci) { - labelList& fromProc = recvMap[procI]; - fromProc.setSize(globalTrackIDs.localSize(procI)); + labelList& fromProc = recvMap[proci]; + fromProc.setSize(globalTrackIDs.localSize(proci)); forAll(fromProc, i) { fromProc[i] = trackI++; diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.C index e9a0ec48ce0935dcef4d4e4cc2fbd64fd440ee24..beb9167673c9b654adf68dde59c158f4da638be1 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.C +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.C @@ -303,13 +303,13 @@ Foam::wallBoundedParticle::wallBoundedParticle const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label meshEdgeStart, const label diagEdge ) : - particle(mesh, position, celli, tetFaceI, tetPtI), + particle(mesh, position, celli, tetFacei, tetPtI), meshEdgeStart_(meshEdgeStart), diagEdge_(diagEdge) {} diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H index 32245162d4c17765e941422763da93a943601af7..e3766f2e0bbd0c4b5026c702b61e441ff6231795 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H @@ -225,7 +225,7 @@ public: const polyMesh& c, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label meshEdgeStart, const label diagEdge diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C index 8f8b8c5f4317d6eccdac6cf6b434a89576169833..ddbe21109a72d8429c6a9d4f3a28f4e4361bc53d 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C @@ -42,10 +42,10 @@ void Foam::wallBoundedParticle::patchInteraction if (!internalFace(facei_)) { - label origFaceI = facei_; + label origFacei = facei_; label patchi = patch(facei_); - // No action taken for tetPtI_ for tetFaceI_ here, handled by + // No action taken for tetPtI_ for tetFacei_ here, handled by // patch interaction call or later during processor transfer. @@ -66,7 +66,7 @@ void Foam::wallBoundedParticle::patchInteraction { // Did patch interaction model switch patches? // Note: recalculate meshEdgeStart_, diagEdge_! - if (facei_ != origFaceI) + if (facei_ != origFacei) { patchi = patch(facei_); } @@ -166,7 +166,7 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge // check to the other internal tet on the edge. if (mesh_.isInternalFace(tetFace())) { - label nbrCellI = + label nbrCelli = ( celli_ == mesh_.faceOwner()[facei_] ? mesh_.faceNeighbour()[facei_] @@ -175,13 +175,13 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge // Check angle to nbrCell tet. Is it in the direction of the // endposition? I.e. since volume of nbr tet is positive the // tracking direction should be into the tet. - tetIndices nbrTi(nbrCellI, tetFaceI_, tetPtI_, mesh_); + tetIndices nbrTi(nbrCelli, tetFacei_, tetPtI_, mesh_); if ((nbrTi.faceTri(mesh_).normal() & (endPosition-position())) < 0) { // Change into nbrCell. No need to change tetFace, tetPt. //Pout<< " crossed from cell:" << celli_ - // << " into " << nbrCellI << endl; - celli_ = nbrCellI; + // << " into " << nbrCelli << endl; + celli_ = nbrCelli; patchInteraction(td, trackFraction); } else diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C index 8659ef71e2564260c14e726a9e26cecb9877d87b..823c52b6a0e7cc4657889625294793d37465a57a 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C @@ -110,13 +110,13 @@ Foam::tetIndices Foam::wallBoundedStreamLine::findNearestTet const cell& cFaces = mesh.cells()[celli]; - label minFaceI = -1; + label minFacei = -1; label minTetPtI = -1; scalar minDistSqr = sqr(GREAT); - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; if (isWallPatch[facei]) { @@ -137,7 +137,7 @@ Foam::tetIndices Foam::wallBoundedStreamLine::findNearestTet if (d2 < minDistSqr) { minDistSqr = d2; - minFaceI = facei; + minFacei = facei; minTetPtI = i-1; } fp = nextFp; @@ -149,7 +149,7 @@ Foam::tetIndices Foam::wallBoundedStreamLine::findNearestTet return tetIndices ( celli, - minFaceI, + minFacei, minTetPtI, mesh ); @@ -589,9 +589,9 @@ void Foam::wallBoundedStreamLine::read(const dictionary& dict) numFacesPerEdge.clear(); - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; const face& f = mesh.faces()[facei]; forAll(f, fp) { @@ -665,10 +665,10 @@ void Foam::wallBoundedStreamLine::write() // processors. label trackI = 0; - forAll(recvMap, procI) + forAll(recvMap, proci) { - labelList& fromProc = recvMap[procI]; - fromProc.setSize(globalTrackIDs.localSize(procI)); + labelList& fromProc = recvMap[proci]; + fromProc.setSize(globalTrackIDs.localSize(proci)); forAll(fromProc, i) { fromProc[i] = trackI++; diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.C index b0b87f2a775afceac5076455d7006b05f5d10d89..2e54a5d5e10c64182eb7167a3f5de7df355ac5bf 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.C +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.C @@ -135,7 +135,7 @@ Foam::wallBoundedStreamLineParticle::wallBoundedStreamLineParticle const polyMesh& mesh, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label meshEdgeStart, const label diagEdge, @@ -147,7 +147,7 @@ Foam::wallBoundedStreamLineParticle::wallBoundedStreamLineParticle mesh, position, celli, - tetFaceI, + tetFacei, tetPtI, meshEdgeStart, diagEdge diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.H b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.H index 25dd5f57e7132fdd6f05e7c1fa9c7e7b7ff83d3c..f84402bd638019943d94a5f7a0bfc5706bef6c26 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.H +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.H @@ -161,7 +161,7 @@ public: const polyMesh& c, const vector& position, const label celli, - const label tetFaceI, + const label tetFacei, const label tetPtI, const label meshEdgeStart, const label diagEdge, diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C index 44e62de53b352ebf137b75aead54192842ffb6a3..b54f79e7610cc9596f61c92977f40b0a7d7b0f7d 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C @@ -119,7 +119,7 @@ void reactingOneDim::updateQr() tmp<volScalarField> kappa = kappaRad(); // Propagate Qr through 1-D regions - label localPyrolysisFaceI = 0; + label localPyrolysisFacei = 0; forAll(intCoupledPatchIDs_, i) { const label patchi = intCoupledPatchIDs_[i]; @@ -131,7 +131,7 @@ void reactingOneDim::updateQr() { const scalar Qr0 = Qrp[facei]; point Cf0 = Cf[facei]; - const labelList& cells = boundaryFaceCells_[localPyrolysisFaceI++]; + const labelList& cells = boundaryFaceCells_[localPyrolysisFacei++]; scalar kappaInt = 0.0; forAll(cells, k) { diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C index dca7846ca6143b604626da699e65ac540a9a2e42..81c5ba9f04c67fa02e53e7869e1cb854009e9f0d 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisRadiativeCoupledMixed/filmPyrolysisRadiativeCoupledMixedFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -228,11 +228,11 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() refCast<const mappedPatchBase>(patch().patch()); const label patchI = patch().index(); - const label nbrPatchI = mpp.samplePolyPatch().index(); + const label nbrPatchi = mpp.samplePolyPatch().index(); const polyMesh& mesh = patch().boundaryMesh().mesh(); const polyMesh& nbrMesh = mpp.sampleMesh(); const fvPatch& nbrPatch = - refCast<const fvMesh>(nbrMesh).boundary()[nbrPatchI]; + refCast<const fvMesh>(nbrMesh).boundary()[nbrPatchi]; scalarField intFld(patchInternalField()); @@ -271,10 +271,10 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() // Obtain Rad heat (Qr) scalarField Qr(patch().size(), 0.0); - label coupledPatchI = -1; + label coupledPatchi = -1; if (pyrolysisRegionName_ == mesh.name()) { - coupledPatchI = patchI; + coupledPatchi = patchI; if (QrName_ != "none") { Qr = nbrPatch.lookupPatchField<volScalarField, scalar>(QrName_); @@ -283,7 +283,7 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() } else if (pyrolysis.primaryMesh().name() == mesh.name()) { - coupledPatchI = nbrPatch.index(); + coupledPatchi = nbrPatch.index(); if (QrName_ != "none") { Qr = patch().lookupPatchField<volScalarField, scalar>(QrName_); @@ -297,17 +297,17 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() << exit(FatalError); } - const label filmPatchI = pyrolysis.nbrCoupledPatchID(film, coupledPatchI); + const label filmPatchi = pyrolysis.nbrCoupledPatchID(film, coupledPatchi); - const scalarField htcw(film.htcw().h()().boundaryField()[filmPatchI]); + const scalarField htcw(film.htcw().h()().boundaryField()[filmPatchi]); // Obtain htcw htcwfilm = pyrolysis.mapRegionPatchField ( film, - coupledPatchI, - filmPatchI, + coupledPatchi, + filmPatchi, htcw, true ); @@ -315,8 +315,8 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() // Obtain Tfilm at the boundary through Ts. // NOTE: Tf is not good as at the boundary it will retrieve Tp - Tfilm = film.Ts().boundaryField()[filmPatchI]; - film.toPrimary(filmPatchI, Tfilm); + Tfilm = film.Ts().boundaryField()[filmPatchi]; + film.toPrimary(filmPatchi, Tfilm); // Obtain delta filmDelta = @@ -324,7 +324,7 @@ void filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs() ( film, "deltaf", - coupledPatchI, + coupledPatchi, true ); diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C index db0c0cc5e6996e65dfc6e052363100a01d7089cd..fc3ab80322b0e95df7a5bd0e286ad6cbcfa83b1d 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisTemperatureCoupled/filmPyrolysisTemperatureCoupledFvPatchScalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -152,22 +152,22 @@ void Foam::filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs() const filmModelType& filmModel = db().time().lookupObject<filmModelType>(filmRegionName_); - const label filmPatchI = filmModel.regionPatchID(patchI); + const label filmPatchi = filmModel.regionPatchID(patchI); - scalarField alphaFilm = filmModel.alpha().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, alphaFilm); + scalarField alphaFilm = filmModel.alpha().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, alphaFilm); - scalarField TFilm = filmModel.Ts().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, TFilm); + scalarField TFilm = filmModel.Ts().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, TFilm); // Retrieve pyrolysis model const pyrModelType& pyrModel = db().time().lookupObject<pyrModelType>(pyrolysisRegionName_); - const label pyrPatchI = pyrModel.regionPatchID(patchI); + const label pyrPatchi = pyrModel.regionPatchID(patchI); - scalarField TPyr = pyrModel.T().boundaryField()[pyrPatchI]; - pyrModel.toPrimary(pyrPatchI, TPyr); + scalarField TPyr = pyrModel.T().boundaryField()[pyrPatchi]; + pyrModel.toPrimary(pyrPatchi, TPyr); // Evaluate temperature diff --git a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C index 0547612288e03581192d15316fb664390eca9b96..6db83b0b0a1b32332d49a4f19dbbb2a11a89c597 100644 --- a/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C +++ b/src/regionModels/regionCoupling/derivedFvPatchFields/filmPyrolysisVelocityCoupled/filmPyrolysisVelocityCoupledFvPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -152,22 +152,22 @@ void Foam::filmPyrolysisVelocityCoupledFvPatchVectorField::updateCoeffs() const filmModelType& filmModel = db().time().lookupObject<filmModelType>(filmRegionName_); - const label filmPatchI = filmModel.regionPatchID(patchI); + const label filmPatchi = filmModel.regionPatchID(patchI); - scalarField alphaFilm = filmModel.alpha().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, alphaFilm); + scalarField alphaFilm = filmModel.alpha().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, alphaFilm); - vectorField UFilm = filmModel.Us().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, UFilm); + vectorField UFilm = filmModel.Us().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, UFilm); // Retrieve pyrolysis model const pyrModelType& pyrModel = db().time().lookupObject<pyrModelType>(pyrolysisRegionName_); - const label pyrPatchI = pyrModel.regionPatchID(patchI); + const label pyrPatchi = pyrModel.regionPatchID(patchI); - scalarField phiPyr = pyrModel.phiGas().boundaryField()[pyrPatchI]; - pyrModel.toPrimary(pyrPatchI, phiPyr); + scalarField phiPyr = pyrModel.phiGas().boundaryField()[pyrPatchi]; + pyrModel.toPrimary(pyrPatchi, phiPyr); const surfaceScalarField& phi = diff --git a/src/regionModels/regionModel/regionModel/regionModel.C b/src/regionModels/regionModel/regionModel/regionModel.C index 8dffa3d76f538826e37dd9ca115e0ecfbc6bec37..282d976ba88314ccc29be143a49b59f98c2627db 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.C +++ b/src/regionModels/regionModel/regionModel/regionModel.C @@ -127,8 +127,8 @@ void Foam::regionModels::regionModel::initialise() ) { - const label primaryPatchI = mapPatch.samplePolyPatch().index(); - primaryPatchIDs.append(primaryPatchI); + const label primaryPatchi = mapPatch.samplePolyPatch().index(); + primaryPatchIDs.append(primaryPatchi); } } } @@ -215,8 +215,8 @@ const Foam::AMIPatchToPatchInterpolation& Foam::regionModels::regionModel::interRegionAMI ( const regionModel& nbrRegion, - const label regionPatchI, - const label nbrPatchI, + const label regionPatchi, + const label nbrPatchi, const bool flip ) const { @@ -226,17 +226,17 @@ Foam::regionModels::regionModel::interRegionAMI if (nbrRegionID != -1) { - if (!interRegionAMI_[nbrRegionID].set(regionPatchI)) + if (!interRegionAMI_[nbrRegionID].set(regionPatchi)) { - const polyPatch& p = regionMesh().boundaryMesh()[regionPatchI]; - const polyPatch& nbrP = nbrRegionMesh.boundaryMesh()[nbrPatchI]; + const polyPatch& p = regionMesh().boundaryMesh()[regionPatchi]; + const polyPatch& nbrP = nbrRegionMesh.boundaryMesh()[nbrPatchi]; int oldTag = UPstream::msgType(); UPstream::msgType() = oldTag + 1; interRegionAMI_[nbrRegionID].set ( - regionPatchI, + regionPatchi, new AMIPatchToPatchInterpolation ( p, @@ -252,7 +252,7 @@ Foam::regionModels::regionModel::interRegionAMI UPstream::msgType() = oldTag; } - return interRegionAMI_[nbrRegionID][regionPatchI]; + return interRegionAMI_[nbrRegionID][regionPatchi]; } else { @@ -260,8 +260,8 @@ Foam::regionModels::regionModel::interRegionAMI interRegionAMINames_.append(nbrRegion.name()); - const polyPatch& p = regionMesh().boundaryMesh()[regionPatchI]; - const polyPatch& nbrP = nbrRegionMesh.boundaryMesh()[nbrPatchI]; + const polyPatch& p = regionMesh().boundaryMesh()[regionPatchi]; + const polyPatch& nbrP = nbrRegionMesh.boundaryMesh()[nbrPatchi]; label nPatch = regionMesh().boundaryMesh().size(); @@ -279,7 +279,7 @@ Foam::regionModels::regionModel::interRegionAMI interRegionAMI_[nbrRegionID].set ( - regionPatchI, + regionPatchi, new AMIPatchToPatchInterpolation ( p, @@ -294,7 +294,7 @@ Foam::regionModels::regionModel::interRegionAMI UPstream::msgType() = oldTag; - return interRegionAMI_[nbrRegionID][regionPatchI]; + return interRegionAMI_[nbrRegionID][regionPatchi]; } } @@ -302,10 +302,10 @@ Foam::regionModels::regionModel::interRegionAMI Foam::label Foam::regionModels::regionModel::nbrCoupledPatchID ( const regionModel& nbrRegion, - const label regionPatchI + const label regionPatchi ) const { - label nbrPatchI = -1; + label nbrPatchi = -1; // region const fvMesh& nbrRegionMesh = nbrRegion.regionMesh(); @@ -315,16 +315,16 @@ Foam::label Foam::regionModels::regionModel::nbrCoupledPatchID const polyBoundaryMesh& pbm = regionMesh().boundaryMesh(); - if (regionPatchI > pbm.size() - 1) + if (regionPatchi > pbm.size() - 1) { FatalErrorInFunction << "region patch index out of bounds: " - << "region patch index = " << regionPatchI + << "region patch index = " << regionPatchi << ", maximum index = " << pbm.size() - 1 << abort(FatalError); } - const polyPatch& pp = regionMesh().boundaryMesh()[regionPatchI]; + const polyPatch& pp = regionMesh().boundaryMesh()[regionPatchi]; if (!isA<mappedPatchBase>(pp)) { @@ -341,21 +341,21 @@ Foam::label Foam::regionModels::regionModel::nbrCoupledPatchID // find patch on nbr region that has the same sample patch name forAll(nbrRegion.intCoupledPatchIDs(), j) { - const label nbrRegionPatchI = nbrRegion.intCoupledPatchIDs()[j]; + const label nbrRegionPatchi = nbrRegion.intCoupledPatchIDs()[j]; const mappedPatchBase& mpb = - refCast<const mappedPatchBase>(nbrPbm[nbrRegionPatchI]); + refCast<const mappedPatchBase>(nbrPbm[nbrRegionPatchi]); if (mpb.samplePatch() == primaryPatchName) { - nbrPatchI = nbrRegionPatchI; + nbrPatchi = nbrRegionPatchi; break; } } - if (nbrPatchI == -1) + if (nbrPatchi == -1) { - const polyPatch& p = regionMesh().boundaryMesh()[regionPatchI]; + const polyPatch& p = regionMesh().boundaryMesh()[regionPatchi]; FatalErrorInFunction << "Unable to find patch pair for local patch " @@ -363,7 +363,7 @@ Foam::label Foam::regionModels::regionModel::nbrCoupledPatchID << abort(FatalError); } - return nbrPatchI; + return nbrPatchi; } diff --git a/src/regionModels/regionModel/regionModel/regionModel.H b/src/regionModels/regionModel/regionModel/regionModel.H index a93e49282b168b6e0589616e2da981d043c6ce5b..7cdd2c83c64d16606ce3f8cf0fc8fe6cedab334e 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.H +++ b/src/regionModels/regionModel/regionModel/regionModel.H @@ -147,8 +147,8 @@ protected: virtual const AMIPatchToPatchInterpolation& interRegionAMI ( const regionModel& nbrRegion, - const label regionPatchI, - const label nbrPatchI, + const label regionPatchi, + const label nbrPatchi, const bool flip ) const; @@ -230,11 +230,11 @@ public: //- Return true if patchI on the local region is a coupled // patch to the primary region - inline bool isCoupledPatch(const label regionPatchI) const; + inline bool isCoupledPatch(const label regionPatchi) const; //- Return true if patchI on the primary region is a coupled // patch to the local region - inline bool isRegionPatch(const label primaryPatchI) const; + inline bool isRegionPatch(const label primaryPatchi) const; //- Return the list of patch IDs on the primary region coupled // to this region @@ -251,11 +251,11 @@ public: // Helper //- Return the coupled patch ID paired with coupled patch - // regionPatchI + // regionPatchi label nbrCoupledPatchID ( const regionModel& nbrRegion, - const label regionPatchI + const label regionPatchi ) const; //- Map patch field from another region model to local patch @@ -263,8 +263,8 @@ public: tmp<Foam::Field<Type>> mapRegionPatchField ( const regionModel& nbrRegion, - const label regionPatchI, - const label nbrPatchI, + const label regionPatchi, + const label nbrPatchi, const Field<Type>& nbrField, const bool flip = false ) const; @@ -275,7 +275,7 @@ public: ( const regionModel& nbrRegion, const word& fieldName, - const label regionPatchI, + const label regionPatchi, const bool flip = false ) const; @@ -286,7 +286,7 @@ public: ( const regionModel& nbrRegion, const word& fieldName, - const label regionPatchI, + const label regionPatchi, const bool flip = false ) const; @@ -294,7 +294,7 @@ public: template<class Type> void toPrimary ( - const label regionPatchI, + const label regionPatchi, List<Type>& regionField ) const; @@ -302,7 +302,7 @@ public: template<class Type> void toRegion ( - const label regionPatchI, + const label regionPatchi, List<Type>& primaryFieldField ) const; @@ -310,7 +310,7 @@ public: template<class Type, class CombineOp> void toPrimary ( - const label regionPatchI, + const label regionPatchi, List<Type>& regionField, const CombineOp& cop ) const; @@ -319,7 +319,7 @@ public: template<class Type, class CombineOp> void toRegion ( - const label regionPatchI, + const label regionPatchi, List<Type>& primaryFieldField, const CombineOp& cop ) const; diff --git a/src/regionModels/regionModel/regionModel/regionModelI.H b/src/regionModels/regionModel/regionModel/regionModelI.H index e04513125a53a40525b9acf87ff0293aab439b04..471eb9e376981c3d1ebd5143107a9193897ac3f8 100644 --- a/src/regionModels/regionModel/regionModel/regionModelI.H +++ b/src/regionModels/regionModel/regionModel/regionModelI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,12 +136,12 @@ Foam::regionModels::regionModel::outputProperties() inline bool Foam::regionModels::regionModel::isCoupledPatch ( - const label regionPatchI + const label regionPatchi ) const { forAll(intCoupledPatchIDs_, i) { - if (intCoupledPatchIDs_[i] == regionPatchI) + if (intCoupledPatchIDs_[i] == regionPatchi) { return true; } @@ -153,12 +153,12 @@ inline bool Foam::regionModels::regionModel::isCoupledPatch inline bool Foam::regionModels::regionModel::isRegionPatch ( - const label primaryPatchI + const label primaryPatchi ) const { forAll(primaryPatchIDs_, i) { - if (primaryPatchIDs_[i] == primaryPatchI) + if (primaryPatchIDs_[i] == primaryPatchi) { return true; } diff --git a/src/regionModels/regionModel/regionModel/regionModelTemplates.C b/src/regionModels/regionModel/regionModel/regionModelTemplates.C index 03ef4f601e19851cdeebc3eea2df84d817c43fca..a1ef447e499d5a8985bfd4a7cbe25911792550db 100644 --- a/src/regionModels/regionModel/regionModel/regionModelTemplates.C +++ b/src/regionModels/regionModel/regionModel/regionModelTemplates.C @@ -28,8 +28,8 @@ Foam::tmp<Foam::Field<Type>> Foam::regionModels::regionModel::mapRegionPatchField ( const regionModel& nbrRegion, - const label regionPatchI, - const label nbrPatchI, + const label regionPatchi, + const label nbrPatchi, const Field<Type>& nbrField, const bool flip ) const @@ -38,7 +38,7 @@ Foam::regionModels::regionModel::mapRegionPatchField UPstream::msgType() = oldTag + 1; const AMIPatchToPatchInterpolation& ami = - interRegionAMI(nbrRegion, regionPatchI, nbrPatchI, flip); + interRegionAMI(nbrRegion, regionPatchi, nbrPatchi, flip); tmp<Field<Type>> tresult(ami.interpolateToSource(nbrField)); @@ -54,7 +54,7 @@ Foam::regionModels::regionModel::mapRegionPatchField ( const regionModel& nbrRegion, const word& fieldName, - const label regionPatchI, + const label regionPatchi, const bool flip ) const { @@ -64,18 +64,18 @@ Foam::regionModels::regionModel::mapRegionPatchField if (nbrRegionMesh.foundObject<fieldType>(fieldName)) { - const label nbrPatchI = nbrCoupledPatchID(nbrRegion, regionPatchI); + const label nbrPatchi = nbrCoupledPatchID(nbrRegion, regionPatchi); int oldTag = UPstream::msgType(); UPstream::msgType() = oldTag + 1; const AMIPatchToPatchInterpolation& ami = - interRegionAMI(nbrRegion, regionPatchI, nbrPatchI, flip); + interRegionAMI(nbrRegion, regionPatchi, nbrPatchi, flip); const fieldType& nbrField = nbrRegionMesh.lookupObject<fieldType>(fieldName); - const Field<Type>& nbrFieldp = nbrField.boundaryField()[nbrPatchI]; + const Field<Type>& nbrFieldp = nbrField.boundaryField()[nbrPatchi]; tmp<Field<Type>> tresult(ami.interpolateToSource(nbrFieldp)); @@ -85,7 +85,7 @@ Foam::regionModels::regionModel::mapRegionPatchField } else { - const polyPatch& p = regionMesh().boundaryMesh()[regionPatchI]; + const polyPatch& p = regionMesh().boundaryMesh()[regionPatchi]; return tmp<Field<Type>> @@ -106,7 +106,7 @@ Foam::regionModels::regionModel::mapRegionPatchInternalField ( const regionModel& nbrRegion, const word& fieldName, - const label regionPatchI, + const label regionPatchi, const bool flip ) const { @@ -116,19 +116,19 @@ Foam::regionModels::regionModel::mapRegionPatchInternalField if (nbrRegionMesh.foundObject<fieldType>(fieldName)) { - const label nbrPatchI = nbrCoupledPatchID(nbrRegion, regionPatchI); + const label nbrPatchi = nbrCoupledPatchID(nbrRegion, regionPatchi); int oldTag = UPstream::msgType(); UPstream::msgType() = oldTag + 1; const AMIPatchToPatchInterpolation& ami = - interRegionAMI(nbrRegion, regionPatchI, nbrPatchI, flip); + interRegionAMI(nbrRegion, regionPatchi, nbrPatchi, flip); const fieldType& nbrField = nbrRegionMesh.lookupObject<fieldType>(fieldName); const fvPatchField<Type>& nbrFieldp = - nbrField.boundaryField()[nbrPatchI]; + nbrField.boundaryField()[nbrPatchi]; tmp<Field<Type>> tresult ( @@ -141,7 +141,7 @@ Foam::regionModels::regionModel::mapRegionPatchInternalField } else { - const polyPatch& p = regionMesh().boundaryMesh()[regionPatchI]; + const polyPatch& p = regionMesh().boundaryMesh()[regionPatchi]; return tmp<Field<Type>> @@ -159,18 +159,18 @@ Foam::regionModels::regionModel::mapRegionPatchInternalField template<class Type> void Foam::regionModels::regionModel::toPrimary ( - const label regionPatchI, + const label regionPatchi, List<Type>& regionField ) const { forAll(intCoupledPatchIDs_, i) { - if (intCoupledPatchIDs_[i] == regionPatchI) + if (intCoupledPatchIDs_[i] == regionPatchi) { const mappedPatchBase& mpb = refCast<const mappedPatchBase> ( - regionMesh().boundaryMesh()[regionPatchI] + regionMesh().boundaryMesh()[regionPatchi] ); mpb.reverseDistribute(regionField); return; @@ -178,7 +178,7 @@ void Foam::regionModels::regionModel::toPrimary } FatalErrorInFunction - << "Region patch ID " << regionPatchI << " not found in region mesh" + << "Region patch ID " << regionPatchi << " not found in region mesh" << abort(FatalError); } @@ -186,18 +186,18 @@ void Foam::regionModels::regionModel::toPrimary template<class Type> void Foam::regionModels::regionModel::toRegion ( - const label regionPatchI, + const label regionPatchi, List<Type>& primaryField ) const { forAll(intCoupledPatchIDs_, i) { - if (intCoupledPatchIDs_[i] == regionPatchI) + if (intCoupledPatchIDs_[i] == regionPatchi) { const mappedPatchBase& mpb = refCast<const mappedPatchBase> ( - regionMesh().boundaryMesh()[regionPatchI] + regionMesh().boundaryMesh()[regionPatchi] ); mpb.distribute(primaryField); return; @@ -205,7 +205,7 @@ void Foam::regionModels::regionModel::toRegion } FatalErrorInFunction - << "Region patch ID " << regionPatchI << " not found in region mesh" + << "Region patch ID " << regionPatchi << " not found in region mesh" << abort(FatalError); } @@ -213,19 +213,19 @@ void Foam::regionModels::regionModel::toRegion template<class Type, class CombineOp> void Foam::regionModels::regionModel::toPrimary ( - const label regionPatchI, + const label regionPatchi, List<Type>& regionField, const CombineOp& cop ) const { forAll(intCoupledPatchIDs_, i) { - if (intCoupledPatchIDs_[i] == regionPatchI) + if (intCoupledPatchIDs_[i] == regionPatchi) { const mappedPatchBase& mpb = refCast<const mappedPatchBase> ( - regionMesh().boundaryMesh()[regionPatchI] + regionMesh().boundaryMesh()[regionPatchi] ); mpb.reverseDistribute(regionField, cop); return; @@ -233,7 +233,7 @@ void Foam::regionModels::regionModel::toPrimary } FatalErrorInFunction - << "Region patch ID " << regionPatchI << " not found in region mesh" + << "Region patch ID " << regionPatchi << " not found in region mesh" << abort(FatalError); } @@ -241,19 +241,19 @@ void Foam::regionModels::regionModel::toPrimary template<class Type, class CombineOp> void Foam::regionModels::regionModel::toRegion ( - const label regionPatchI, + const label regionPatchi, List<Type>& primaryField, const CombineOp& cop ) const { forAll(intCoupledPatchIDs_, i) { - if (intCoupledPatchIDs_[i] == regionPatchI) + if (intCoupledPatchIDs_[i] == regionPatchi) { const mappedPatchBase& mpb = refCast<const mappedPatchBase> ( - regionMesh().boundaryMesh()[regionPatchI] + regionMesh().boundaryMesh()[regionPatchi] ); mpb.distribute(primaryField, cop); return; @@ -261,7 +261,7 @@ void Foam::regionModels::regionModel::toRegion } FatalErrorInFunction - << "Region patch ID " << regionPatchI << " not found in region mesh" + << "Region patch ID " << regionPatchi << " not found in region mesh" << abort(FatalError); } diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C index c6c1c1ce11f06ee140d06fbd6812ec7cdae29eb6..f6a82cac4291b3619396052b8e7522ae41f220df 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C @@ -71,7 +71,7 @@ void Foam::regionModels::regionModel1D::initialise() DynamicList<label> faceIDs; DynamicList<label> cellIDs; - label localPyrolysisFaceI = 0; + label localPyrolysisFacei = 0; const polyBoundaryMesh& rbm = regionMesh().boundaryMesh(); @@ -79,18 +79,18 @@ void Foam::regionModels::regionModel1D::initialise() { const label patchi = intCoupledPatchIDs_[i]; const polyPatch& ppCoupled = rbm[patchi]; - forAll(ppCoupled, localFaceI) + forAll(ppCoupled, localFacei) { - label facei = ppCoupled.start() + localFaceI; + label facei = ppCoupled.start() + localFacei; label celli = -1; label nFaces = 0; label nCells = 0; do { - label ownCellI = regionMesh().faceOwner()[facei]; - if (ownCellI != celli) + label ownCelli = regionMesh().faceOwner()[facei]; + if (ownCelli != celli) { - celli = ownCellI; + celli = ownCelli; } else { @@ -104,28 +104,28 @@ void Foam::regionModels::regionModel1D::initialise() nFaces++; } while (regionMesh().isInternalFace(facei)); - boundaryFaceOppositeFace_[localPyrolysisFaceI] = facei; + boundaryFaceOppositeFace_[localPyrolysisFacei] = facei; faceIDs.remove(); //remove boundary face. nFaces--; - boundaryFaceFaces_[localPyrolysisFaceI].transfer(faceIDs); - boundaryFaceCells_[localPyrolysisFaceI].transfer(cellIDs); + boundaryFaceFaces_[localPyrolysisFacei].transfer(faceIDs); + boundaryFaceCells_[localPyrolysisFacei].transfer(cellIDs); - localPyrolysisFaceI++; + localPyrolysisFacei++; nLayers_ = nCells; } } - boundaryFaceOppositeFace_.setSize(localPyrolysisFaceI); - boundaryFaceFaces_.setSize(localPyrolysisFaceI); - boundaryFaceCells_.setSize(localPyrolysisFaceI); + boundaryFaceOppositeFace_.setSize(localPyrolysisFacei); + boundaryFaceFaces_.setSize(localPyrolysisFacei); + boundaryFaceCells_.setSize(localPyrolysisFacei); surfaceScalarField& nMagSf = nMagSfPtr_(); surfaceScalarField::GeometricBoundaryField nMagSfBf = nMagSf.boundaryFieldRef(); - localPyrolysisFaceI = 0; + localPyrolysisFacei = 0; forAll(intCoupledPatchIDs_, i) { @@ -133,10 +133,10 @@ void Foam::regionModels::regionModel1D::initialise() const polyPatch& ppCoupled = rbm[patchi]; const vectorField& pNormals = ppCoupled.faceNormals(); nMagSfBf[patchi] = regionMesh().Sf().boundaryField()[patchi] & pNormals; - forAll(pNormals, localFaceI) + forAll(pNormals, localFacei) { - const vector& n = pNormals[localFaceI]; - const labelList& faces = boundaryFaceFaces_[localPyrolysisFaceI++]; + const vector& n = pNormals[localFacei]; + const labelList& faces = boundaryFaceFaces_[localPyrolysisFacei++]; forAll(faces, facei) { const label faceID = faces[facei]; @@ -199,22 +199,22 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh const polyBoundaryMesh& bm = regionMesh().boundaryMesh(); label totalFaceId = 0; - forAll(intCoupledPatchIDs_, localPatchI) + forAll(intCoupledPatchIDs_, localPatchi) { - label patchi = intCoupledPatchIDs_[localPatchI]; + label patchi = intCoupledPatchIDs_[localPatchi]; const polyPatch pp = bm[patchi]; const vectorField& cf = regionMesh().Cf().boundaryField()[patchi]; - forAll(pp, patchFaceI) + forAll(pp, patchFacei) { const labelList& faces = boundaryFaceFaces_[totalFaceId]; const labelList& cells = boundaryFaceCells_[totalFaceId]; - const vector n = pp.faceNormals()[patchFaceI]; - const vector sf = pp.faceAreas()[patchFaceI]; + const vector n = pp.faceNormals()[patchFacei]; + const vector sf = pp.faceAreas()[patchFacei]; List<point> oldCf(faces.size() + 1); - oldCf[0] = cf[patchFaceI]; + oldCf[0] = cf[patchFacei]; forAll(faces, i) { oldCf[i + 1] = regionMesh().faceCentres()[faces[i]]; @@ -251,8 +251,8 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh nbrCf = oldCf[i + 1] + localDelta; } // Modify boundary - const label bFaceI = boundaryFaceOppositeFace_[totalFaceId]; - const face f = regionMesh().faces()[bFaceI]; + const label bFacei = boundaryFaceOppositeFace_[totalFaceId]; + const face f = regionMesh().faces()[bFacei]; const label celli = cells[cells.size() - 1]; newDelta += (deltaV[celli]/mag(sf))*n; forAll(f, pti) diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C index 44b54b0a8b10825c61d360ebaf1a4c9f3d27713a..360607e4cfa82e79f58fda3a74563a13b8bd9846 100644 --- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C +++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C @@ -131,9 +131,9 @@ void Foam::regionModels::singleLayerRegion::initialise() label facei = ppIntCoupled.start(); label faceO = cFaces.opposingFaceLabel(facei, regionMesh().faces()); - label passivePatchI = rbm.whichPatch(faceO); - passivePatchIDs_[i] = passivePatchI; - const polyPatch& ppPassive = rbm[passivePatchI]; + label passivePatchi = rbm.whichPatch(faceO); + passivePatchIDs_[i] = passivePatchi; + const polyPatch& ppPassive = rbm[passivePatchi]; UIndirectList<scalar>(passiveMagSf, ppPassive.faceCells()) = mag(ppPassive.faceAreas()); } diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C index beaedbdea06eea818d69f6a29aa60bf86d6cb37f..2f90ad626c3733c9d4f97b4b454c9cc29c074d75 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C @@ -156,11 +156,11 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs() const modelType& filmModel = db().time().lookupObject<modelType>("surfaceFilmProperties"); - const label filmPatchI = filmModel.regionPatchID(patchi); + const label filmPatchi = filmModel.regionPatchID(patchi); tmp<volScalarField> mDotFilm(filmModel.primaryMassTrans()); - scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, mDotFilmp); + scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, mDotFilmp); // Retrieve RAS turbulence model const turbulenceModel& turbModel = db().lookupObject<turbulenceModel> @@ -187,9 +187,9 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs() scalarField& alphat = *this; forAll(alphat, facei) { - label faceCellI = patch().faceCells()[facei]; + label faceCelli = patch().faceCells()[facei]; - scalar uTau = Cmu25*sqrt(k[faceCellI]); + scalar uTau = Cmu25*sqrt(k[faceCelli]); scalar yPlus = y[facei]*uTau/(muw[facei]/rhow[facei]); diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C index 862b678d2ddd40368235bc6cfafac1911eb842db..d14bf497382f35b70aa116f94af4d437301a6740 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C @@ -68,11 +68,11 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::calcUTau const modelType& filmModel = db().time().lookupObject<modelType>("surfaceFilmProperties"); - const label filmPatchI = filmModel.regionPatchID(patchi); + const label filmPatchi = filmModel.regionPatchID(patchi); tmp<volScalarField> mDotFilm(filmModel.primaryMassTrans()); - scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchI]; - filmModel.toPrimary(filmPatchI, mDotFilmp); + scalarField mDotFilmp = mDotFilm().boundaryField()[filmPatchi]; + filmModel.toPrimary(filmPatchi, mDotFilmp); // Retrieve RAS turbulence model @@ -95,9 +95,9 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::calcUTau forAll(uTau, facei) { - label faceCellI = patch().faceCells()[facei]; + label faceCelli = patch().faceCells()[facei]; - scalar ut = Cmu25*sqrt(k[faceCellI]); + scalar ut = Cmu25*sqrt(k[faceCelli]); scalar yPlus = y[facei]*ut/nuw[facei]; diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index 02d91951c28a6d7f46acc3eb2d30c2a89345747f..6fd7aad9545eab7cafc5d9112fe1dd2bc5a5beac 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -764,16 +764,16 @@ tmp<DimensionedField<scalar, volMesh>> thermoSingleLayer::Srho() const forAll(intCoupledPatchIDs(), i) { - const label filmPatchI = intCoupledPatchIDs()[i]; + const label filmPatchi = intCoupledPatchIDs()[i]; scalarField patchMass = - primaryMassPCTrans_.boundaryField()[filmPatchI]; + primaryMassPCTrans_.boundaryField()[filmPatchi]; - toPrimary(filmPatchI, patchMass); + toPrimary(filmPatchi, patchMass); - const label primaryPatchI = primaryPatchIDs()[i]; + const label primaryPatchi = primaryPatchIDs()[i]; const unallocLabelList& cells = - primaryMesh().boundaryMesh()[primaryPatchI].faceCells(); + primaryMesh().boundaryMesh()[primaryPatchi].faceCells(); forAll(patchMass, j) { @@ -818,16 +818,16 @@ tmp<DimensionedField<scalar, volMesh>> thermoSingleLayer::Srho forAll(intCoupledPatchIDs_, i) { - const label filmPatchI = intCoupledPatchIDs_[i]; + const label filmPatchi = intCoupledPatchIDs_[i]; scalarField patchMass = - primaryMassPCTrans_.boundaryField()[filmPatchI]; + primaryMassPCTrans_.boundaryField()[filmPatchi]; - toPrimary(filmPatchI, patchMass); + toPrimary(filmPatchi, patchMass); - const label primaryPatchI = primaryPatchIDs()[i]; + const label primaryPatchi = primaryPatchIDs()[i]; const unallocLabelList& cells = - primaryMesh().boundaryMesh()[primaryPatchI].faceCells(); + primaryMesh().boundaryMesh()[primaryPatchi].faceCells(); forAll(patchMass, j) { @@ -868,16 +868,16 @@ tmp<DimensionedField<scalar, volMesh>> thermoSingleLayer::Sh() const forAll(intCoupledPatchIDs_, i) { - const label filmPatchI = intCoupledPatchIDs_[i]; + const label filmPatchi = intCoupledPatchIDs_[i]; scalarField patchEnergy = - primaryEnergyPCTrans_.boundaryField()[filmPatchI]; + primaryEnergyPCTrans_.boundaryField()[filmPatchi]; - toPrimary(filmPatchI, patchEnergy); + toPrimary(filmPatchi, patchEnergy); - const label primaryPatchI = primaryPatchIDs()[i]; + const label primaryPatchi = primaryPatchIDs()[i]; const unallocLabelList& cells = - primaryMesh().boundaryMesh()[primaryPatchI].faceCells(); + primaryMesh().boundaryMesh()[primaryPatchi].faceCells(); forAll(patchEnergy, j) { diff --git a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C index 1a6a191417a446ec9487d9e133fe84c507d93a37..5ebe085f2d15247122b043b780267235c619a842 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C @@ -104,20 +104,20 @@ void thermalBaffle::solveEnergy() const label patchi = intCoupledPatchIDs_[0]; const polyPatch& ppCoupled = rbm[patchi]; - forAll(ppCoupled, localFaceI) + forAll(ppCoupled, localFacei) { - const labelList& cells = boundaryFaceCells_[localFaceI]; + const labelList& cells = boundaryFaceCells_[localFacei]; forAll(cells, i) { const label cellId = cells[i]; Q[cellId] = - Qs_.boundaryField()[patchi][localFaceI] - /thickness_[localFaceI]; + Qs_.boundaryField()[patchi][localFacei] + /thickness_[localFacei]; - rho[cellId] *= delta_.value()/thickness_[localFaceI]; + rho[cellId] *= delta_.value()/thickness_[localFacei]; - alpha[cellId] *= delta_.value()/thickness_[localFaceI]; + alpha[cellId] *= delta_.value()/thickness_[localFacei]; } } } diff --git a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C index c2fffd5a8ecbde341f93291aa44e8472d1cf4691..39f3e48e0cbead6f24b3880e5fef31df4e2e1486 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C @@ -157,12 +157,12 @@ void thermalBaffleModel::init() // Calculate thickness of the baffle on the first face only. if (delta_.value() == 0.0) { - forAll(ppCoupled, localFaceI) + forAll(ppCoupled, localFacei) { - label facei = ppCoupled.start() + localFaceI; + label facei = ppCoupled.start() + localFacei; label faceO = - boundaryFaceOppositeFace_[localFaceI]; + boundaryFaceOppositeFace_[localFacei]; delta_.value() = mag ( diff --git a/src/renumber/SloanRenumber/SloanRenumber.C b/src/renumber/SloanRenumber/SloanRenumber.C index 2f41299b56fba1806509d3efe24c084b69582928..ff1a123ee577bfe4d10d694cc2daf720fa7895c9 100644 --- a/src/renumber/SloanRenumber/SloanRenumber.C +++ b/src/renumber/SloanRenumber/SloanRenumber.C @@ -148,16 +148,16 @@ Foam::labelList Foam::SloanRenumber::renumber const labelUList& faceCells = pbm[patchi].faceCells(); forAll(faceCells, i) { - label bFaceI = pbm[patchi].start()+i-mesh.nInternalFaces(); - label nbrCellI = nbr[bFaceI]; + label bFacei = pbm[patchi].start()+i-mesh.nInternalFaces(); + label nbrCelli = nbr[bFacei]; - if (faceCells[i] < nbrCellI) + if (faceCells[i] < nbrCelli) { - add_edge(faceCells[i], nbrCellI, G); + add_edge(faceCells[i], nbrCelli, G); } else { - add_edge(nbrCellI, faceCells[i], G); + add_edge(nbrCelli, faceCells[i], G); } } } diff --git a/src/renumber/renumberMethods/manualRenumber/manualRenumber.C b/src/renumber/renumberMethods/manualRenumber/manualRenumber.C index c530b7884765c8139c959dfb8cb5d35d01c18fc2..5db43311640b4b162bafaef7095bf14ca1ee1584 100644 --- a/src/renumber/renumberMethods/manualRenumber/manualRenumber.C +++ b/src/renumber/renumberMethods/manualRenumber/manualRenumber.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -94,28 +94,28 @@ Foam::labelList Foam::manualRenumber::renumber labelList oldToNew(points.size(), -1); forAll(newToOld, i) { - label origCellI = newToOld[i]; + label origCelli = newToOld[i]; - if (origCellI < 0 || origCellI >= points.size()) + if (origCelli < 0 || origCelli >= points.size()) { FatalErrorInFunction << "Renumbering is not one-to-one. Index " - << i << " maps onto original cell " << origCellI + << i << " maps onto original cell " << origCelli << ".\n" << "Manual renumbering data read from file " << dataFile_ << "." << endl << exit(FatalError); } - if (oldToNew[origCellI] == -1) + if (oldToNew[origCelli] == -1) { - oldToNew[origCellI] = i; + oldToNew[origCelli] = i; } else { FatalErrorInFunction << "Renumbering is not one-to-one. Both index " - << oldToNew[origCellI] - << " and " << i << " map onto " << origCellI + << oldToNew[origCelli] + << " and " << i << " map onto " << origCelli << ".\n" << "Manual renumbering data read from file " << dataFile_ << "." << endl << exit(FatalError); diff --git a/src/renumber/renumberMethods/springRenumber/springRenumber.C b/src/renumber/renumberMethods/springRenumber/springRenumber.C index 8158796d435d05661a74ecd9ca0d2494e568e821..dc45768139c186f176fdd5b7397311fb251fb0e7 100644 --- a/src/renumber/renumberMethods/springRenumber/springRenumber.C +++ b/src/renumber/renumberMethods/springRenumber/springRenumber.C @@ -109,16 +109,16 @@ Foam::labelList Foam::springRenumber::renumber // Sum force per cell. scalarField sumForce(cellCells.size(), 0.0); - forAll(cellCells, oldCellI) + forAll(cellCells, oldCelli) { - const labelList& cCells = cellCells[oldCellI]; - label celli = oldToNew[oldCellI]; + const labelList& cCells = cellCells[oldCelli]; + label celli = oldToNew[oldCelli]; forAll(cCells, i) { - label nbrCellI = oldToNew[cCells[i]]; + label nbrCelli = oldToNew[cCells[i]]; - sumForce[celli] += (position[nbrCellI]-position[celli]); + sumForce[celli] += (position[nbrCelli]-position[celli]); } } diff --git a/src/renumber/zoltanRenumber/zoltanRenumber.C b/src/renumber/zoltanRenumber/zoltanRenumber.C index f12f53bb227f93a7da7476ad4e1608224e5ee9de..73c7c5f95399dcee62079a7f1e65422b173068eb 100644 --- a/src/renumber/zoltanRenumber/zoltanRenumber.C +++ b/src/renumber/zoltanRenumber/zoltanRenumber.C @@ -123,10 +123,10 @@ static void get_num_edges_list(void *data, int sizeGID, int sizeLID, { Foam::label celli = localID[i]; const Foam::cell& cFaces = mesh.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { Foam::label n = 0; - if (mesh.isInternalFace(cFaces[cFaceI])) + if (mesh.isInternalFace(cFaces[cFacei])) { n++; } @@ -167,11 +167,11 @@ static void get_edge_list(void *data, int sizeGID, int sizeLID, Foam::label celli = localID[i]; const Foam::cell& cFaces = mesh.cells()[celli]; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { Foam::label n = 0; - Foam::label facei = cFaces[cFaceI]; + Foam::label facei = cFaces[cFacei]; if (mesh.isInternalFace(facei)) { Foam::label nbr = mesh.faceOwner()[facei]; diff --git a/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.C b/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.C index a6b02c5e13259b25b9ba33e5b86a81d83304cc55..32286b5c5ded15ecde465053f5f07939b2c258cd 100644 --- a/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.C +++ b/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.C @@ -103,8 +103,8 @@ void Foam::cellVolumeWeightMethod::calculateAddressing label& startSeedI ) { - label srcCellI = srcSeedI; - label tgtCellI = tgtSeedI; + label srcCelli = srcSeedI; + label tgtCelli = tgtSeedI; List<DynamicList<label>> srcToTgtAddr(src_.nCells()); List<DynamicList<scalar>> srcToTgtWght(src_.nCells()); @@ -115,12 +115,12 @@ void Foam::cellVolumeWeightMethod::calculateAddressing // list of tgt cell neighbour cells DynamicList<label> nbrTgtCells(10); - // list of tgt cells currently visited for srcCellI to avoid multiple hits + // list of tgt cells currently visited for srcCelli to avoid multiple hits DynamicList<label> visitedTgtCells(10); // list to keep track of tgt cells used to seed src cells labelList seedCells(src_.nCells(), -1); - seedCells[srcCellI] = tgtCellI; + seedCells[srcCelli] = tgtCelli; const scalarField& srcVol = src_.cellVolumes(); @@ -130,27 +130,27 @@ void Foam::cellVolumeWeightMethod::calculateAddressing visitedTgtCells.clear(); // append initial target cell and neighbours - nbrTgtCells.append(tgtCellI); - appendNbrCells(tgtCellI, tgt_, visitedTgtCells, nbrTgtCells); + nbrTgtCells.append(tgtCelli); + appendNbrCells(tgtCelli, tgt_, visitedTgtCells, nbrTgtCells); do { - tgtCellI = nbrTgtCells.remove(); - visitedTgtCells.append(tgtCellI); + tgtCelli = nbrTgtCells.remove(); + visitedTgtCells.append(tgtCelli); - scalar vol = interVol(srcCellI, tgtCellI); + scalar vol = interVol(srcCelli, tgtCelli); // accumulate addressing and weights for valid intersection - if (vol/srcVol[srcCellI] > tolerance_) + if (vol/srcVol[srcCelli] > tolerance_) { // store src/tgt cell pair - srcToTgtAddr[srcCellI].append(tgtCellI); - srcToTgtWght[srcCellI].append(vol); + srcToTgtAddr[srcCelli].append(tgtCelli); + srcToTgtWght[srcCelli].append(vol); - tgtToSrcAddr[tgtCellI].append(srcCellI); - tgtToSrcWght[tgtCellI].append(vol); + tgtToSrcAddr[tgtCelli].append(srcCelli); + tgtToSrcWght[tgtCelli].append(vol); - appendNbrCells(tgtCellI, tgt_, visitedTgtCells, nbrTgtCells); + appendNbrCells(tgtCelli, tgt_, visitedTgtCells, nbrTgtCells); // accumulate intersection volume V_ += vol; @@ -158,21 +158,21 @@ void Foam::cellVolumeWeightMethod::calculateAddressing } while (!nbrTgtCells.empty()); - mapFlag[srcCellI] = false; + mapFlag[srcCelli] = false; // find new source seed cell setNextCells ( startSeedI, - srcCellI, - tgtCellI, + srcCelli, + tgtCelli, srcCellIDs, mapFlag, visitedTgtCells, seedCells ); } - while (srcCellI != -1); + while (srcCelli != -1); // transfer addressing into persistent storage forAll(srcToTgtCellAddr, i) @@ -192,15 +192,15 @@ void Foam::cellVolumeWeightMethod::calculateAddressing void Foam::cellVolumeWeightMethod::setNextCells ( label& startSeedI, - label& srcCellI, - label& tgtCellI, + label& srcCelli, + label& tgtCelli, const labelList& srcCellIDs, const boolList& mapFlag, const DynamicList<label>& visitedCells, labelList& seedCells ) const { - const labelList& srcNbrCells = src_.cellCells()[srcCellI]; + const labelList& srcNbrCells = src_.cellCells()[srcCelli]; // set possible seeds for later use by querying all src cell neighbours // with all visited target cells @@ -221,8 +221,8 @@ void Foam::cellVolumeWeightMethod::setNextCells if (!valuesSet) { - srcCellI = cellS; - tgtCellI = cellT; + srcCelli = cellS; + tgtCelli = cellT; valuesSet = true; } } @@ -253,8 +253,8 @@ void Foam::cellVolumeWeightMethod::setNextCells if (seedCells[cellS] != -1) { - srcCellI = cellS; - tgtCellI = seedCells[cellS]; + srcCelli = cellS; + tgtCelli = seedCells[cellS]; return; } @@ -274,8 +274,8 @@ void Foam::cellVolumeWeightMethod::setNextCells srcCellIDs, mapFlag, startSeedI, - srcCellI, - tgtCellI + srcCelli, + tgtCelli ); if (restart) @@ -286,8 +286,8 @@ void Foam::cellVolumeWeightMethod::setNextCells } // if we have got to here, there are no more src/tgt cell intersections - srcCellI = -1; - tgtCellI = -1; + srcCelli = -1; + tgtCelli = -1; } diff --git a/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.H b/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.H index 02e533503552f11de1d4c1090e8ca213742932a5..dcfa5d7641e5b79a372ae9d92b3ead20c55d78e0 100644 --- a/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.H +++ b/src/sampling/meshToMesh/calcMethod/cellVolumeWeight/cellVolumeWeightMethod.H @@ -85,8 +85,8 @@ protected: void setNextCells ( label& startSeedI, - label& srcCellI, - label& tgtCellI, + label& srcCelli, + label& tgtCelli, const labelList& srcCellIDs, const boolList& mapFlag, const DynamicList<label>& visitedCells, diff --git a/src/sampling/meshToMesh/calcMethod/direct/directMethod.C b/src/sampling/meshToMesh/calcMethod/direct/directMethod.C index af4203002e5c4ecafbac007b8a8ffe25e092891f..46d5706b75b8da4bed58c6997c949624015073a4 100644 --- a/src/sampling/meshToMesh/calcMethod/direct/directMethod.C +++ b/src/sampling/meshToMesh/calcMethod/direct/directMethod.C @@ -40,14 +40,14 @@ namespace Foam bool Foam::directMethod::intersect ( - const label srcCellI, - const label tgtCellI + const label srcCelli, + const label tgtCelli ) const { return tgt_.pointInCell ( - src_.cellCentres()[srcCellI], - tgtCellI, + src_.cellCentres()[srcCelli], + tgtCelli, polyMesh::FACE_PLANES ); } @@ -124,20 +124,20 @@ void Foam::directMethod::calculateAddressing const scalarField& srcVc = src_.cellVolumes(); const scalarField& tgtVc = tgt_.cellVolumes(); - label srcCellI = srcSeedI; - label tgtCellI = tgtSeedI; + label srcCelli = srcSeedI; + label tgtCelli = tgtSeedI; do { // store src/tgt cell pair - srcToTgt[srcCellI].append(tgtCellI); - tgtToSrc[tgtCellI].append(srcCellI); + srcToTgt[srcCelli].append(tgtCelli); + tgtToSrc[tgtCelli].append(srcCelli); // mark source cell srcSeedI as matched - mapFlag[srcCellI] = false; + mapFlag[srcCelli] = false; // accumulate intersection volume - V_ += srcVc[srcCellI]; + V_ += srcVc[srcCelli]; // find new source seed cell appendToDirectSeeds @@ -145,11 +145,11 @@ void Foam::directMethod::calculateAddressing mapFlag, srcTgtSeed, srcSeeds, - srcCellI, - tgtCellI + srcCelli, + tgtCelli ); } - while (srcCellI >= 0); + while (srcCelli >= 0); // transfer addressing into persistent storage forAll(srcToTgtCellAddr, i) diff --git a/src/sampling/meshToMesh/calcMethod/direct/directMethod.H b/src/sampling/meshToMesh/calcMethod/direct/directMethod.H index 15ee8d715e9cdd9aec6ac5239445d035e1ded5e9..915849d5531ad695340ddca397190fbcc0fc6dbf 100644 --- a/src/sampling/meshToMesh/calcMethod/direct/directMethod.H +++ b/src/sampling/meshToMesh/calcMethod/direct/directMethod.H @@ -59,8 +59,8 @@ protected: //- Return the true if cells intersect virtual bool intersect ( - const label srcCellI, - const label tgtCellI + const label srcCelli, + const label tgtCelli ) const; //- Find indices of overlapping cells in src and tgt meshes - returns diff --git a/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.C b/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.C index 9b7b40187509ca995bfbefc4d31bf6f80e45cfea..794edd2ca67ef5b8d63ac0ca00275d05b22f979f 100644 --- a/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.C +++ b/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.C @@ -109,35 +109,35 @@ void Foam::mapNearestMethod::calculateAddressing const scalarField& tgtVc = tgt_.cellVolumes(); { - label srcCellI = srcSeedI; - label tgtCellI = tgtSeedI; + label srcCelli = srcSeedI; + label tgtCelli = tgtSeedI; do { // find nearest tgt cell - findNearestCell(src_, tgt_, srcCellI, tgtCellI); + findNearestCell(src_, tgt_, srcCelli, tgtCelli); // store src/tgt cell pair - srcToTgt[srcCellI].append(tgtCellI); - tgtToSrc[tgtCellI].append(srcCellI); + srcToTgt[srcCelli].append(tgtCelli); + tgtToSrc[tgtCelli].append(srcCelli); - // mark source cell srcCellI and tgtCellI as matched - mapFlag[srcCellI] = false; + // mark source cell srcCelli and tgtCelli as matched + mapFlag[srcCelli] = false; // accumulate intersection volume - V_ += srcVc[srcCellI]; + V_ += srcVc[srcCelli]; // find new source cell setNextNearestCells ( startSeedI, - srcCellI, - tgtCellI, + srcCelli, + tgtCelli, mapFlag, srcCellIDs ); } - while (srcCellI >= 0); + while (srcCelli >= 0); } // for the case of multiple source cells per target cell, select the @@ -145,16 +145,16 @@ void Foam::mapNearestMethod::calculateAddressing const vectorField& srcCc = src_.cellCentres(); const vectorField& tgtCc = tgt_.cellCentres(); - forAll(tgtToSrc, targetCellI) + forAll(tgtToSrc, targetCelli) { - if (tgtToSrc[targetCellI].size() > 1) + if (tgtToSrc[targetCelli].size() > 1) { - const vector& tgtC = tgtCc[targetCellI]; + const vector& tgtC = tgtCc[targetCelli]; - DynamicList<label>& srcCells = tgtToSrc[targetCellI]; + DynamicList<label>& srcCells = tgtToSrc[targetCelli]; - label srcCellI = srcCells[0]; - scalar d = magSqr(tgtC - srcCc[srcCellI]); + label srcCelli = srcCells[0]; + scalar d = magSqr(tgtC - srcCc[srcCelli]); for (label i = 1; i < srcCells.size(); i++) { @@ -163,26 +163,26 @@ void Foam::mapNearestMethod::calculateAddressing if (dNew < d) { d = dNew; - srcCellI = srcI; + srcCelli = srcI; } } srcCells.clear(); - srcCells.append(srcCellI); + srcCells.append(srcCelli); } } // If there are more target cells than source cells, some target cells // might not yet be mapped - forAll(tgtToSrc, tgtCellI) + forAll(tgtToSrc, tgtCelli) { - if (tgtToSrc[tgtCellI].empty()) + if (tgtToSrc[tgtCelli].empty()) { - label srcCellI = findMappedSrcCell(tgtCellI, tgtToSrc); + label srcCelli = findMappedSrcCell(tgtCelli, tgtToSrc); - findNearestCell(tgt_, src_, tgtCellI, srcCellI); + findNearestCell(tgt_, src_, tgtCelli, srcCelli); - tgtToSrc[tgtCellI].append(srcCellI); + tgtToSrc[tgtCelli].append(srcCelli); } } @@ -241,21 +241,21 @@ void Foam::mapNearestMethod::findNearestCell void Foam::mapNearestMethod::setNextNearestCells ( label& startSeedI, - label& srcCellI, - label& tgtCellI, + label& srcCelli, + label& tgtCelli, boolList& mapFlag, const labelList& srcCellIDs ) const { - const labelList& srcNbr = src_.cellCells()[srcCellI]; + const labelList& srcNbr = src_.cellCells()[srcCelli]; - srcCellI = -1; + srcCelli = -1; forAll(srcNbr, i) { label celli = srcNbr[i]; if (mapFlag[celli]) { - srcCellI = celli; + srcCelli = celli; return; } } @@ -275,26 +275,26 @@ void Foam::mapNearestMethod::setNextNearestCells srcCellIDs, mapFlag, startSeedI, - srcCellI, - tgtCellI + srcCelli, + tgtCelli ); } Foam::label Foam::mapNearestMethod::findMappedSrcCell ( - const label tgtCellI, + const label tgtCelli, const List<DynamicList<label>>& tgtToSrc ) const { DynamicList<label> testCells(10); DynamicList<label> visitedCells(10); - testCells.append(tgtCellI); + testCells.append(tgtCelli); do { - // search target tgtCellI neighbours for match with source cell + // search target tgtCelli neighbours for match with source cell label tgtI = testCells.remove(); if (findIndex(visitedCells, tgtI) == -1) diff --git a/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.H b/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.H index 2cbee3182cc5bd1ef3fc566ce459a777c604650b..f0e4c73130f7205c914ee9479d16ff95140c7f7f 100644 --- a/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.H +++ b/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.H @@ -98,16 +98,16 @@ protected: virtual void setNextNearestCells ( label& startSeedI, - label& srcCellI, - label& tgtCellI, + label& srcCelli, + label& tgtCelli, boolList& mapFlag, const labelList& srcCellIDs ) const; - //- Find a source cell mapped to target cell tgtCellI + //- Find a source cell mapped to target cell tgtCelli virtual label findMappedSrcCell ( - const label tgtCellI, + const label tgtCelli, const List<DynamicList<label>>& tgtToSrc ) const; diff --git a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.C b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.C index 1e6919978891cd478dfd2e92028901998b5e3636..960ee5c23a2c152c83a740853219d6a7804b6fa0 100644 --- a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.C +++ b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.C @@ -76,22 +76,22 @@ Foam::labelList Foam::meshToMeshMethod::maskCells() const bool Foam::meshToMeshMethod::intersect ( - const label srcCellI, - const label tgtCellI + const label srcCelli, + const label tgtCelli ) const { - scalar threshold = tolerance_*src_.cellVolumes()[srcCellI]; + scalar threshold = tolerance_*src_.cellVolumes()[srcCelli]; tetOverlapVolume overlapEngine; - treeBoundBox bbTgtCell(tgt_.points(), tgt_.cellPoints()[tgtCellI]); + treeBoundBox bbTgtCell(tgt_.points(), tgt_.cellPoints()[tgtCelli]); return overlapEngine.cellCellOverlapMinDecomp ( src_, - srcCellI, + srcCelli, tgt_, - tgtCellI, + tgtCelli, bbTgtCell, threshold ); @@ -100,20 +100,20 @@ bool Foam::meshToMeshMethod::intersect Foam::scalar Foam::meshToMeshMethod::interVol ( - const label srcCellI, - const label tgtCellI + const label srcCelli, + const label tgtCelli ) const { tetOverlapVolume overlapEngine; - treeBoundBox bbTgtCell(tgt_.points(), tgt_.cellPoints()[tgtCellI]); + treeBoundBox bbTgtCell(tgt_.points(), tgt_.cellPoints()[tgtCelli]); scalar vol = overlapEngine.cellCellOverlapVolumeMinDecomp ( src_, - srcCellI, + srcCelli, tgt_, - tgtCellI, + tgtCelli, bbTgtCell ); @@ -134,15 +134,15 @@ void Foam::meshToMeshMethod::appendNbrCells // filter out cells already visited from cell neighbours forAll(nbrCells, i) { - label nbrCellI = nbrCells[i]; + label nbrCelli = nbrCells[i]; if ( - (findIndex(visitedCells, nbrCellI) == -1) - && (findIndex(nbrCellIDs, nbrCellI) == -1) + (findIndex(visitedCells, nbrCelli) == -1) + && (findIndex(nbrCellIDs, nbrCelli) == -1) ) { - nbrCellIDs.append(nbrCellI); + nbrCellIDs.append(nbrCelli); } } } diff --git a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.H b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.H index 6cde5ed11c32f3e5d7408487fccb411f1594f6f0..06ee61fe0fe52034ba3bc99a7383f19203471c17 100644 --- a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.H +++ b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.H @@ -74,21 +74,21 @@ protected: //- Return the true if cells intersect virtual bool intersect ( - const label srcCellI, - const label tgtCellI + const label srcCelli, + const label tgtCelli ) const; //- Return the intersection volume between two cells virtual scalar interVol ( - const label srcCellI, - const label tgtCellI + const label srcCelli, + const label tgtCelli ) const; //- Append target cell neihgbour cells to cellIDs list virtual void appendNbrCells ( - const label tgtCellI, + const label tgtCelli, const polyMesh& mesh, const DynamicList<label>& visitedTgtCells, DynamicList<label>& nbrTgtCellIDs diff --git a/src/sampling/meshToMesh/meshToMesh.C b/src/sampling/meshToMesh/meshToMesh.C index 22ece113d1b1600f9bc005593638a9e79a231d5c..6f2c5c0f596aae42ae40b0240c052bc412806cc2 100644 --- a/src/sampling/meshToMesh/meshToMesh.C +++ b/src/sampling/meshToMesh/meshToMesh.C @@ -387,11 +387,11 @@ void Foam::meshToMesh::calculatePatchAMIs(const word& AMIMethodName) forAll(srcPatchID_, i) { - label srcPatchI = srcPatchID_[i]; - label tgtPatchI = tgtPatchID_[i]; + label srcPatchi = srcPatchID_[i]; + label tgtPatchi = tgtPatchID_[i]; - const polyPatch& srcPP = srcRegion_.boundaryMesh()[srcPatchI]; - const polyPatch& tgtPP = tgtRegion_.boundaryMesh()[tgtPatchI]; + const polyPatch& srcPP = srcRegion_.boundaryMesh()[srcPatchi]; + const polyPatch& tgtPP = tgtRegion_.boundaryMesh()[tgtPatchi]; Info<< "Creating AMI between source patch " << srcPP.name() << " and target patch " << tgtPP.name() @@ -441,11 +441,11 @@ void Foam::meshToMesh::constructNoCuttingPatches { srcPatchID.append(pp.index()); - label tgtPatchI = tgtBM.findPatchID(pp.name()); + label tgtPatchi = tgtBM.findPatchID(pp.name()); - if (tgtPatchI != -1) + if (tgtPatchi != -1) { - tgtPatchID.append(tgtPatchI); + tgtPatchID.append(tgtPatchi); } else { diff --git a/src/sampling/meshToMesh/meshToMeshParallelOps.C b/src/sampling/meshToMesh/meshToMeshParallelOps.C index 8e730842db9221703a02be832925b731ef10c2ef..554403adf192a712b191b031ac6dfe063ee70ee2 100644 --- a/src/sampling/meshToMesh/meshToMeshParallelOps.C +++ b/src/sampling/meshToMesh/meshToMeshParallelOps.C @@ -39,7 +39,7 @@ Foam::label Foam::meshToMesh::calcDistribution const polyMesh& tgt ) const { - label procI = 0; + label proci = 0; if (Pstream::parRun()) { @@ -60,7 +60,7 @@ Foam::label Foam::meshToMesh::calcDistribution if (nHaveCells > 1) { - procI = -1; + proci = -1; if (debug) { InfoInFunction @@ -69,16 +69,16 @@ Foam::label Foam::meshToMesh::calcDistribution } else if (nHaveCells == 1) { - procI = findIndex(cellsPresentOnProc, 1); + proci = findIndex(cellsPresentOnProc, 1); if (debug) { InfoInFunction - << "Meshes local to processor" << procI << endl; + << "Meshes local to processor" << proci << endl; } } } - return procI; + return proci; } @@ -93,13 +93,13 @@ Foam::label Foam::meshToMesh::calcOverlappingProcs label nOverlaps = 0; - forAll(procBb, procI) + forAll(procBb, proci) { - const boundBox& bbp = procBb[procI]; + const boundBox& bbp = procBb[proci]; if (bbp.overlaps(bb)) { - overlaps[procI] = true; + overlaps[proci] = true; nOverlaps++; } } @@ -141,9 +141,9 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap InfoInFunction << "Determining extent of src mesh per processor:" << nl << "\tproc\tbb" << endl; - forAll(procBb, procI) + forAll(procBb, proci) { - Info<< '\t' << procI << '\t' << procBb[procI] << endl; + Info<< '\t' << proci << '\t' << procBb[proci] << endl; } } @@ -160,9 +160,9 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap List<DynamicList<label>> dynSendMap(Pstream::nProcs()); label iniSize = floor(tgt.nCells()/Pstream::nProcs()); - forAll(dynSendMap, procI) + forAll(dynSendMap, proci) { - dynSendMap[procI].setCapacity(iniSize); + dynSendMap[proci].setCapacity(iniSize); } // work array - whether src processor bb overlaps the tgt cell bounds @@ -186,20 +186,20 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap // find the overlapping tgt cells on each src processor (void)calcOverlappingProcs(procBb, cellBb, procBbOverlaps); - forAll(procBbOverlaps, procI) + forAll(procBbOverlaps, proci) { - if (procBbOverlaps[procI]) + if (procBbOverlaps[proci]) { - dynSendMap[procI].append(celli); + dynSendMap[proci].append(celli); } } } // convert dynamicList to labelList sendMap.setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - sendMap[procI].transfer(dynSendMap[procI]); + sendMap[proci].transfer(dynSendMap[proci]); } } @@ -208,9 +208,9 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap { Pout<< "Of my " << cells.size() << " target cells I need to send to:" << nl << "\tproc\tcells" << endl; - forAll(sendMap, procI) + forAll(sendMap, proci) { - Pout<< '\t' << procI << '\t' << sendMap[procI].size() << endl; + Pout<< '\t' << proci << '\t' << sendMap[proci].size() << endl; } } @@ -218,9 +218,9 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap // send over how many tgt cells I need to receive from each processor labelListList sendSizes(Pstream::nProcs()); sendSizes[Pstream::myProcNo()].setSize(Pstream::nProcs()); - forAll(sendMap, procI) + forAll(sendMap, proci) { - sendSizes[Pstream::myProcNo()][procI] = sendMap[procI].size(); + sendSizes[Pstream::myProcNo()][proci] = sendMap[proci].size(); } Pstream::gatherList(sendSizes); Pstream::scatterList(sendSizes); @@ -230,15 +230,15 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap labelListList constructMap(Pstream::nProcs()); label segmentI = 0; - forAll(constructMap, procI) + forAll(constructMap, proci) { // what I need to receive is what other processor is sending to me - label nRecv = sendSizes[procI][Pstream::myProcNo()]; - constructMap[procI].setSize(nRecv); + label nRecv = sendSizes[proci][Pstream::myProcNo()]; + constructMap[proci].setSize(nRecv); for (label i = 0; i < nRecv; i++) { - constructMap[procI][i] = segmentI++; + constructMap[proci][i] = segmentI++; } } @@ -292,9 +292,9 @@ void Foam::meshToMesh::distributeCells { // reverse cell map labelList reverseCellMap(tgtMesh.nCells(), -1); - forAll(sendElems, subCellI) + forAll(sendElems, subCelli) { - reverseCellMap[sendElems[subCellI]] = subCellI; + reverseCellMap[sendElems[subCelli]] = subCelli; } DynamicList<face> subFaces(tgtMesh.nFaces()); @@ -368,7 +368,7 @@ void Foam::meshToMesh::distributeCells { const polyPatch& pp = tgtMesh.boundaryMesh()[patchi]; - label nbrProcI = -1; + label nbrProci = -1; // store info for faces on processor patches if (isA<processorPolyPatch>(pp)) @@ -376,7 +376,7 @@ void Foam::meshToMesh::distributeCells const processorPolyPatch& ppp = dynamic_cast<const processorPolyPatch&>(pp); - nbrProcI = ppp.neighbProcNo(); + nbrProci = ppp.neighbProcNo(); } forAll(pp, i) @@ -389,7 +389,7 @@ void Foam::meshToMesh::distributeCells subFaces.append(tgtMesh.faces()[facei]); subFaceOwner.append(reverseCellMap[own]); subFaceNeighbour.append(-1); - subNbrProcIDs.append(nbrProcI); + subNbrProcIDs.append(nbrProci); subProcLocalFaceIDs.append(i); } } @@ -398,9 +398,9 @@ void Foam::meshToMesh::distributeCells // reverse point map labelList reversePointMap(tgtMesh.nPoints(), -1); DynamicList<point> subPoints(tgtMesh.nPoints()); - forAll(subFaces, subFaceI) + forAll(subFaces, subFacei) { - face& f = subFaces[subFaceI]; + face& f = subFaces[subFacei]; forAll(f, fp) { label pointI = f[fp]; @@ -563,19 +563,19 @@ void Foam::meshToMesh::distributeAndMergeCells // Starting offset for points label nPoints = 0; labelList pointOffset(Pstream::nProcs(), 0); - forAll(allPoints, procI) + forAll(allPoints, proci) { - pointOffset[procI] = nPoints; - nPoints += allPoints[procI].size(); + pointOffset[proci] = nPoints; + nPoints += allPoints[proci].size(); } // Starting offset for cells label nCells = 0; labelList cellOffset(Pstream::nProcs(), 0); - forAll(allTgtCellIDs, procI) + forAll(allTgtCellIDs, proci) { - cellOffset[procI] = nCells; - nCells += allTgtCellIDs[procI].size(); + cellOffset[proci] = nCells; + nCells += allTgtCellIDs[proci].size(); } // Count any coupled faces @@ -583,19 +583,19 @@ void Foam::meshToMesh::distributeAndMergeCells typedef HashTable<label, label3, label3::Hash<>> procCoupleInfo; procCoupleInfo procFaceToGlobalCell; - forAll(allNbrProcIDs, procI) + forAll(allNbrProcIDs, proci) { - const labelList& nbrProcI = allNbrProcIDs[procI]; - const labelList& localFaceI = allProcLocalFaceIDs[procI]; + const labelList& nbrProci = allNbrProcIDs[proci]; + const labelList& localFacei = allProcLocalFaceIDs[proci]; - forAll(nbrProcI, i) + forAll(nbrProci, i) { - if (nbrProcI[i] != -1 && localFaceI[i] != -1) + if (nbrProci[i] != -1 && localFacei[i] != -1) { label3 key; - key[0] = min(procI, nbrProcI[i]); - key[1] = max(procI, nbrProcI[i]); - key[2] = localFaceI[i]; + key[0] = min(proci, nbrProci[i]); + key[1] = max(proci, nbrProci[i]); + key[2] = localFacei[i]; procCoupleInfo::const_iterator fnd = procFaceToGlobalCell.find(key); @@ -613,7 +613,7 @@ void Foam::meshToMesh::distributeAndMergeCells << " across local face " << key[2] << endl; } - allNIntCoupledFaces[procI]++; + allNIntCoupledFaces[proci]++; } } } @@ -624,14 +624,14 @@ void Foam::meshToMesh::distributeAndMergeCells label nIntFaces = 0; label nFacesTotal = 0; labelList internalFaceOffset(Pstream::nProcs(), 0); - forAll(allNIntCoupledFaces, procI) + forAll(allNIntCoupledFaces, proci) { label nCoupledFaces = - allNIntCoupledFaces[procI] - allNInternalFaces[procI]; + allNIntCoupledFaces[proci] - allNInternalFaces[proci]; - internalFaceOffset[procI] = nIntFaces; - nIntFaces += allNIntCoupledFaces[procI]; - nFacesTotal += allFaceOwners[procI].size() - nCoupledFaces; + internalFaceOffset[proci] = nIntFaces; + nIntFaces += allNIntCoupledFaces[proci]; + nFacesTotal += allFaceOwners[proci].size() - nCoupledFaces; } tgtPoints.setSize(nPoints); @@ -641,99 +641,99 @@ void Foam::meshToMesh::distributeAndMergeCells tgtCellIDs.setSize(nCells); // Insert points - forAll(allPoints, procI) + forAll(allPoints, proci) { - const pointField& pts = allPoints[procI]; - SubList<point>(tgtPoints, pts.size(), pointOffset[procI]) = pts; + const pointField& pts = allPoints[proci]; + SubList<point>(tgtPoints, pts.size(), pointOffset[proci]) = pts; } // Insert cellIDs - forAll(allTgtCellIDs, procI) + forAll(allTgtCellIDs, proci) { - const labelList& cellIDs = allTgtCellIDs[procI]; - SubList<label>(tgtCellIDs, cellIDs.size(), cellOffset[procI]) = cellIDs; + const labelList& cellIDs = allTgtCellIDs[proci]; + SubList<label>(tgtCellIDs, cellIDs.size(), cellOffset[proci]) = cellIDs; } // Insert internal faces (from internal faces) - forAll(allFaces, procI) + forAll(allFaces, proci) { - const faceList& fcs = allFaces[procI]; - const labelList& faceOs = allFaceOwners[procI]; - const labelList& faceNs = allFaceNeighbours[procI]; + const faceList& fcs = allFaces[proci]; + const labelList& faceOs = allFaceOwners[proci]; + const labelList& faceNs = allFaceNeighbours[proci]; SubList<face> slice ( tgtFaces, - allNInternalFaces[procI], - internalFaceOffset[procI] + allNInternalFaces[proci], + internalFaceOffset[proci] ); - slice = SubList<face>(fcs, allNInternalFaces[procI]); + slice = SubList<face>(fcs, allNInternalFaces[proci]); forAll(slice, i) { - add(slice[i], pointOffset[procI]); + add(slice[i], pointOffset[proci]); } SubField<label> ownSlice ( tgtFaceOwners, - allNInternalFaces[procI], - internalFaceOffset[procI] + allNInternalFaces[proci], + internalFaceOffset[proci] ); - ownSlice = SubField<label>(faceOs, allNInternalFaces[procI]); - add(ownSlice, cellOffset[procI]); + ownSlice = SubField<label>(faceOs, allNInternalFaces[proci]); + add(ownSlice, cellOffset[proci]); SubField<label> nbrSlice ( tgtFaceNeighbours, - allNInternalFaces[procI], - internalFaceOffset[procI] + allNInternalFaces[proci], + internalFaceOffset[proci] ); - nbrSlice = SubField<label>(faceNs, allNInternalFaces[procI]); - add(nbrSlice, cellOffset[procI]); + nbrSlice = SubField<label>(faceNs, allNInternalFaces[proci]); + add(nbrSlice, cellOffset[proci]); - internalFaceOffset[procI] += allNInternalFaces[procI]; + internalFaceOffset[proci] += allNInternalFaces[proci]; } // Insert internal faces (from coupled face-pairs) - forAll(allNbrProcIDs, procI) + forAll(allNbrProcIDs, proci) { - const labelList& nbrProcI = allNbrProcIDs[procI]; - const labelList& localFaceI = allProcLocalFaceIDs[procI]; - const labelList& faceOs = allFaceOwners[procI]; - const faceList& fcs = allFaces[procI]; + const labelList& nbrProci = allNbrProcIDs[proci]; + const labelList& localFacei = allProcLocalFaceIDs[proci]; + const labelList& faceOs = allFaceOwners[proci]; + const faceList& fcs = allFaces[proci]; - forAll(nbrProcI, i) + forAll(nbrProci, i) { - if (nbrProcI[i] != -1 && localFaceI[i] != -1) + if (nbrProci[i] != -1 && localFacei[i] != -1) { label3 key; - key[0] = min(procI, nbrProcI[i]); - key[1] = max(procI, nbrProcI[i]); - key[2] = localFaceI[i]; + key[0] = min(proci, nbrProci[i]); + key[1] = max(proci, nbrProci[i]); + key[2] = localFacei[i]; procCoupleInfo::iterator fnd = procFaceToGlobalCell.find(key); if (fnd != procFaceToGlobalCell.end()) { - label tgtFaceI = fnd(); - if (tgtFaceI == -1) + label tgtFacei = fnd(); + if (tgtFacei == -1) { // on first visit store the new cell on this side - fnd() = cellOffset[procI] + faceOs[i]; + fnd() = cellOffset[proci] + faceOs[i]; } else { // get owner and neighbour in new cell numbering - label newOwn = cellOffset[procI] + faceOs[i]; + label newOwn = cellOffset[proci] + faceOs[i]; label newNbr = fnd(); - label tgtFaceI = internalFaceOffset[procI]++; + label tgtFacei = internalFaceOffset[proci]++; if (debug) { - Pout<< " proc " << procI - << "\tinserting face:" << tgtFaceI + Pout<< " proc " << proci + << "\tinserting face:" << tgtFacei << " connection between owner " << newOwn << " and neighbour " << newNbr << endl; @@ -742,19 +742,19 @@ void Foam::meshToMesh::distributeAndMergeCells if (newOwn < newNbr) { // we have correct orientation - tgtFaces[tgtFaceI] = fcs[i]; - tgtFaceOwners[tgtFaceI] = newOwn; - tgtFaceNeighbours[tgtFaceI] = newNbr; + tgtFaces[tgtFacei] = fcs[i]; + tgtFaceOwners[tgtFacei] = newOwn; + tgtFaceNeighbours[tgtFacei] = newNbr; } else { // reverse orientation - tgtFaces[tgtFaceI] = fcs[i].reverseFace(); - tgtFaceOwners[tgtFaceI] = newNbr; - tgtFaceNeighbours[tgtFaceI] = newOwn; + tgtFaces[tgtFacei] = fcs[i].reverseFace(); + tgtFaceOwners[tgtFacei] = newNbr; + tgtFaceNeighbours[tgtFacei] = newOwn; } - add(tgtFaces[tgtFaceI], pointOffset[procI]); + add(tgtFaces[tgtFacei], pointOffset[proci]); // mark with unique value fnd() = -2; @@ -765,50 +765,50 @@ void Foam::meshToMesh::distributeAndMergeCells } - forAll(allNbrProcIDs, procI) + forAll(allNbrProcIDs, proci) { - const labelList& nbrProcI = allNbrProcIDs[procI]; - const labelList& localFaceI = allProcLocalFaceIDs[procI]; - const labelList& faceOs = allFaceOwners[procI]; - const labelList& faceNs = allFaceNeighbours[procI]; - const faceList& fcs = allFaces[procI]; + const labelList& nbrProci = allNbrProcIDs[proci]; + const labelList& localFacei = allProcLocalFaceIDs[proci]; + const labelList& faceOs = allFaceOwners[proci]; + const labelList& faceNs = allFaceNeighbours[proci]; + const faceList& fcs = allFaces[proci]; - forAll(nbrProcI, i) + forAll(nbrProci, i) { // coupled boundary face - if (nbrProcI[i] != -1 && localFaceI[i] != -1) + if (nbrProci[i] != -1 && localFacei[i] != -1) { label3 key; - key[0] = min(procI, nbrProcI[i]); - key[1] = max(procI, nbrProcI[i]); - key[2] = localFaceI[i]; + key[0] = min(proci, nbrProci[i]); + key[1] = max(proci, nbrProci[i]); + key[2] = localFacei[i]; - label tgtFaceI = procFaceToGlobalCell[key]; + label tgtFacei = procFaceToGlobalCell[key]; - if (tgtFaceI == -1) + if (tgtFacei == -1) { FatalErrorInFunction << "Unvisited " << key << abort(FatalError); } - else if (tgtFaceI != -2) + else if (tgtFacei != -2) { - label newOwn = cellOffset[procI] + faceOs[i]; - label tgtFaceI = nIntFaces++; + label newOwn = cellOffset[proci] + faceOs[i]; + label tgtFacei = nIntFaces++; if (debug) { - Pout<< " proc " << procI - << "\tinserting boundary face:" << tgtFaceI + Pout<< " proc " << proci + << "\tinserting boundary face:" << tgtFacei << " from coupled face " << key << endl; } - tgtFaces[tgtFaceI] = fcs[i]; - add(tgtFaces[tgtFaceI], pointOffset[procI]); + tgtFaces[tgtFacei] = fcs[i]; + add(tgtFaces[tgtFacei], pointOffset[proci]); - tgtFaceOwners[tgtFaceI] = newOwn; - tgtFaceNeighbours[tgtFaceI] = -1; + tgtFaceOwners[tgtFacei] = newOwn; + tgtFaceNeighbours[tgtFacei] = -1; } } // normal boundary face @@ -818,14 +818,14 @@ void Foam::meshToMesh::distributeAndMergeCells label nbr = faceNs[i]; if ((own != -1) && (nbr == -1)) { - label newOwn = cellOffset[procI] + faceOs[i]; - label tgtFaceI = nIntFaces++; + label newOwn = cellOffset[proci] + faceOs[i]; + label tgtFacei = nIntFaces++; - tgtFaces[tgtFaceI] = fcs[i]; - add(tgtFaces[tgtFaceI], pointOffset[procI]); + tgtFaces[tgtFacei] = fcs[i]; + add(tgtFaces[tgtFacei], pointOffset[proci]); - tgtFaceOwners[tgtFaceI] = newOwn; - tgtFaceNeighbours[tgtFaceI] = -1; + tgtFaceOwners[tgtFacei] = newOwn; + tgtFaceNeighbours[tgtFacei] = -1; } } } diff --git a/src/sampling/probes/patchProbes.C b/src/sampling/probes/patchProbes.C index 450cbadeacc0fd11e76e391cf7d07d767931acc8..0d4acb2de6d6e189618858dc5d4003666d4e839c 100644 --- a/src/sampling/probes/patchProbes.C +++ b/src/sampling/probes/patchProbes.C @@ -154,11 +154,11 @@ void Foam::patchProbes::findElements(const fvMesh& mesh) InfoInFunction << endl; forAll(nearest, sampleI) { - label procI = nearest[sampleI].second().second(); + label proci = nearest[sampleI].second().second(); label localI = nearest[sampleI].first().index(); Info<< " " << sampleI << " coord:"<< operator[](sampleI) - << " found on processor:" << procI + << " found on processor:" << proci << " in local cell/face:" << localI << " with fc:" << nearest[sampleI].first().rawPoint() << endl; } diff --git a/src/sampling/probes/patchProbesTemplates.C b/src/sampling/probes/patchProbesTemplates.C index b6c348993d46b84fb78e2311e21174cbde8e7daf..f891925d3f5380dfd20c19d02a0510398355dd6e 100644 --- a/src/sampling/probes/patchProbesTemplates.C +++ b/src/sampling/probes/patchProbesTemplates.C @@ -213,8 +213,8 @@ Foam::patchProbes::sample if (facei >= 0) { label patchi = patches.whichPatch(facei); - label localFaceI = patches[patchi].whichFace(facei); - values[probeI] = vField.boundaryField()[patchi][localFaceI]; + label localFacei = patches[patchi].whichFace(facei); + values[probeI] = vField.boundaryField()[patchi][localFacei]; } } @@ -264,8 +264,8 @@ Foam::patchProbes::sample if (facei >= 0) { label patchi = patches.whichPatch(facei); - label localFaceI = patches[patchi].whichFace(facei); - values[probeI] = sField.boundaryField()[patchi][localFaceI]; + label localFacei = patches[patchi].whichFace(facei); + values[probeI] = sField.boundaryField()[patchi][localFacei]; } } diff --git a/src/sampling/probes/probes.C b/src/sampling/probes/probes.C index 01f6497936c3f5d233297ac304f51d88da0b490f..8d4b50f97f612632e4b0f34236084a5b74345585 100644 --- a/src/sampling/probes/probes.C +++ b/src/sampling/probes/probes.C @@ -382,20 +382,20 @@ void Foam::probes::updateMesh(const mapPolyMesh& mpm) forAll(elementList_, i) { label celli = elementList_[i]; - label newCellI = reverseMap[celli]; - if (newCellI == -1) + label newCelli = reverseMap[celli]; + if (newCelli == -1) { // cell removed } - else if (newCellI < -1) + else if (newCelli < -1) { // cell merged - elems.append(-newCellI - 2); + elems.append(-newCelli - 2); } else { // valid new cell - elems.append(newCellI); + elems.append(newCelli); } } @@ -410,20 +410,20 @@ void Foam::probes::updateMesh(const mapPolyMesh& mpm) forAll(faceList_, i) { label facei = faceList_[i]; - label newFaceI = reverseMap[facei]; - if (newFaceI == -1) + label newFacei = reverseMap[facei]; + if (newFacei == -1) { // face removed } - else if (newFaceI < -1) + else if (newFacei < -1) { // face merged - elems.append(-newFaceI - 2); + elems.append(-newFacei - 2); } else { // valid new face - elems.append(newFaceI); + elems.append(newFacei); } } diff --git a/src/sampling/sampledSet/face/faceOnlySet.C b/src/sampling/sampledSet/face/faceOnlySet.C index fea0cb109c0ece4afd921a87e0a1df9d85ce4ab9..9dbeee3dbb110b16883891e6f70b6e2071cf3345 100644 --- a/src/sampling/sampledSet/face/faceOnlySet.C +++ b/src/sampling/sampledSet/face/faceOnlySet.C @@ -124,40 +124,40 @@ void Foam::faceOnlySet::calcSamples ); point bPoint(GREAT, GREAT, GREAT); - label bFaceI = -1; + label bFacei = -1; if (bHits.size()) { bPoint = bHits[0].hitPoint(); - bFaceI = bHits[0].index(); + bFacei = bHits[0].index(); } - // Get first tracking point. Use bPoint, bFaceI if provided. + // Get first tracking point. Use bPoint, bFacei if provided. point trackPt; - label trackCellI = -1; - label trackFaceI = -1; + label trackCelli = -1; + label trackFacei = -1; // Pout<< "before getTrackingPoint : bPoint:" << bPoint - // << " bFaceI:" << bFaceI << endl; + // << " bFacei:" << bFacei << endl; getTrackingPoint ( start_, bPoint, - bFaceI, + bFacei, smallDist, trackPt, - trackCellI, - trackFaceI + trackCelli, + trackFacei ); // Pout<< "after getTrackingPoint : " // << " trackPt:" << trackPt - // << " trackCellI:" << trackCellI - // << " trackFaceI:" << trackFaceI + // << " trackCelli:" << trackCelli + // << " trackFacei:" << trackFacei // << endl; - if (trackCellI == -1) + if (trackCelli == -1) { // Line start_ - end_ does not intersect domain at all. // (or is along edge) @@ -169,16 +169,16 @@ void Foam::faceOnlySet::calcSamples return; } - if (trackFaceI == -1) + if (trackFacei == -1) { // No boundary face. Check for nearish internal face - trackFaceI = findNearFace(trackCellI, trackPt, smallDist); + trackFacei = findNearFace(trackCelli, trackPt, smallDist); } // Pout<< "calcSamples : got first point to track from :" // << " trackPt:" << trackPt - // << " trackCell:" << trackCellI - // << " trackFace:" << trackFaceI + // << " trackCell:" << trackCelli + // << " trackFace:" << trackFacei // << endl; // @@ -196,12 +196,12 @@ void Foam::faceOnlySet::calcSamples while (true) { - if (trackFaceI != -1) + if (trackFacei != -1) { // Pout<< "trackPt:" << trackPt << " on face so use." << endl; samplingPts.append(trackPt); - samplingCells.append(trackCellI); - samplingFaces.append(trackFaceI); + samplingCells.append(trackCelli); + samplingFaces.append(trackFacei); samplingCurveDist.append(mag(trackPt - start_)); } @@ -210,7 +210,7 @@ void Foam::faceOnlySet::calcSamples ( mesh(), trackPt, - trackCellI + trackCelli ); bool reachedBoundary = trackToBoundary @@ -271,9 +271,9 @@ void Foam::faceOnlySet::calcSamples } // Update starting point for tracking - trackFaceI = bHits[bHitI].index(); - trackPt = pushIn(bHits[bHitI].hitPoint(), trackFaceI); - trackCellI = getBoundaryCell(trackFaceI); + trackFacei = bHits[bHitI].index(); + trackPt = pushIn(bHits[bHitI].hitPoint(), trackFacei); + trackCelli = getBoundaryCell(trackFacei); segmentI++; diff --git a/src/sampling/sampledSet/face/faceOnlySet.H b/src/sampling/sampledSet/face/faceOnlySet.H index 009c3b66e7b771ae262fbfbdd0b10da936f98e6a..39c1dcda59cf48a7d79d1f7ccba0d69f687b500a 100644 --- a/src/sampling/sampledSet/face/faceOnlySet.H +++ b/src/sampling/sampledSet/face/faceOnlySet.H @@ -62,7 +62,7 @@ class faceOnlySet // Private Member Functions - //- Samples from startTrackPt/CellI. Updates particle/samplePt/sampleI + //- Samples from startTrackPt/Celli. Updates particle/samplePt/sampleI // and puts // samples in the DynamicLists. Returns false if end of all samples // reached diff --git a/src/sampling/sampledSet/polyLine/polyLineSet.C b/src/sampling/sampledSet/polyLine/polyLineSet.C index f5ff5b461bbc5c5d0a5df6512a6b45a65758e020..816945ec5b5eb4cd8c237387d5335d3895af100c 100644 --- a/src/sampling/sampledSet/polyLine/polyLineSet.C +++ b/src/sampling/sampledSet/polyLine/polyLineSet.C @@ -176,8 +176,8 @@ void Foam::polyLineSet::calcSamples { // Get boundary intersection point trackPt; - label trackCellI = -1; - label trackFaceI = -1; + label trackCelli = -1; + label trackFacei = -1; do { @@ -194,12 +194,12 @@ void Foam::polyLineSet::calcSamples ); point bPoint(GREAT, GREAT, GREAT); - label bFaceI = -1; + label bFacei = -1; if (bHits.size()) { bPoint = bHits[0].hitPoint(); - bFaceI = bHits[0].index(); + bFacei = bHits[0].index(); } // Get tracking point @@ -209,27 +209,27 @@ void Foam::polyLineSet::calcSamples ( sampleCoords_[sampleI], bPoint, - bFaceI, + bFacei, smallDist, trackPt, - trackCellI, - trackFaceI + trackCelli, + trackFacei ); if (isSample && (mag(lastSample - trackPt) > smallDist)) { //Info<< "calcSamples : getTrackingPoint returned valid sample " // << " trackPt:" << trackPt - // << " trackFaceI:" << trackFaceI - // << " trackCellI:" << trackCellI + // << " trackFacei:" << trackFacei + // << " trackCelli:" << trackCelli // << " sampleI:" << sampleI // << " dist:" << dist // << endl; samplingPts.append(trackPt); - samplingCells.append(trackCellI); - samplingFaces.append(trackFaceI); + samplingCells.append(trackCelli); + samplingFaces.append(trackFacei); // Convert sampling position to unique curve parameter. Get // fraction of distance between sampleI and sampleI+1. @@ -241,12 +241,12 @@ void Foam::polyLineSet::calcSamples lastSample = trackPt; } - if (trackCellI == -1) + if (trackCelli == -1) { // No intersection found. Go to next point sampleI++; } - } while ((trackCellI == -1) && (sampleI < sampleCoords_.size() - 1)); + } while ((trackCelli == -1) && (sampleI < sampleCoords_.size() - 1)); if (sampleI == sampleCoords_.size() - 1) { @@ -265,7 +265,7 @@ void Foam::polyLineSet::calcSamples ( mesh(), trackPt, - trackCellI + trackCelli ); bool bReached = trackToBoundary diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.C b/src/sampling/sampledSet/sampledSet/sampledSet.C index a7b367e0c01f127a9e47fb7dac65641f12c94c7f..50979b68bec7014a8c8de493ea4f0adb6e244933 100644 --- a/src/sampling/sampledSet/sampledSet/sampledSet.C +++ b/src/sampling/sampledSet/sampledSet/sampledSet.C @@ -167,9 +167,9 @@ Foam::label Foam::sampledSet::findNearFace { const cell& myFaces = mesh().cells()[celli]; - forAll(myFaces, myFaceI) + forAll(myFaces, myFacei) { - const face& f = mesh().faces()[myFaces[myFaceI]]; + const face& f = mesh().faces()[myFaces[myFacei]]; pointHit inter = f.nearestPoint(sample, mesh().points()); @@ -186,7 +186,7 @@ Foam::label Foam::sampledSet::findNearFace if (dist < smallDist) { - return myFaces[myFaceI]; + return myFaces[myFacei]; } } return -1; @@ -205,11 +205,11 @@ Foam::point Foam::sampledSet::pushIn point newPosition = facePt; // Taken from particle::initCellFacePt() - label tetFaceI; + label tetFacei; label tetPtI; - mesh().findTetFacePt(celli, facePt, tetFaceI, tetPtI); + mesh().findTetFacePt(celli, facePt, tetFacei, tetPtI); - if (tetFaceI == -1 || tetPtI == -1) + if (tetFacei == -1 || tetPtI == -1) { newPosition = facePt; @@ -225,16 +225,16 @@ Foam::point Foam::sampledSet::pushIn ( celli, newPosition, - tetFaceI, + tetFacei, tetPtI ); iterNo++; - } while (tetFaceI < 0 && iterNo <= trap); + } while (tetFacei < 0 && iterNo <= trap); } - if (tetFaceI == -1) + if (tetFacei == -1) { FatalErrorInFunction << "After pushing " << facePt << " to " << newPosition @@ -254,28 +254,28 @@ bool Foam::sampledSet::getTrackingPoint ( const point& samplePt, const point& bPoint, - const label bFaceI, + const label bFacei, const scalar smallDist, point& trackPt, - label& trackCellI, - label& trackFaceI + label& trackCelli, + label& trackFacei ) const { bool isGoodSample = false; - if (bFaceI == -1) + if (bFacei == -1) { // No boundary intersection. Try and find cell samplePt is in - trackCellI = mesh().findCell(samplePt, searchEngine_.decompMode()); + trackCelli = mesh().findCell(samplePt, searchEngine_.decompMode()); if ( - (trackCellI == -1) + (trackCelli == -1) || !mesh().pointInCell ( samplePt, - trackCellI, + trackCelli, searchEngine_.decompMode() ) ) @@ -283,8 +283,8 @@ bool Foam::sampledSet::getTrackingPoint // Line samplePt - end_ does not intersect domain at all. // (or is along edge) - trackCellI = -1; - trackFaceI = -1; + trackCelli = -1; + trackFacei = -1; isGoodSample = false; } @@ -293,7 +293,7 @@ bool Foam::sampledSet::getTrackingPoint // Start is inside. Use it as tracking point trackPt = samplePt; - trackFaceI = -1; + trackFacei = -1; isGoodSample = true; } @@ -301,31 +301,31 @@ bool Foam::sampledSet::getTrackingPoint else if (mag(samplePt - bPoint) < smallDist) { // samplePt close to bPoint. Snap to it - trackPt = pushIn(bPoint, bFaceI); - trackFaceI = bFaceI; - trackCellI = getBoundaryCell(trackFaceI); + trackPt = pushIn(bPoint, bFacei); + trackFacei = bFacei; + trackCelli = getBoundaryCell(trackFacei); isGoodSample = true; } else { - scalar sign = calcSign(bFaceI, samplePt); + scalar sign = calcSign(bFacei, samplePt); if (sign < 0) { // samplePt inside or marginally outside. trackPt = samplePt; - trackFaceI = -1; - trackCellI = mesh().findCell(trackPt, searchEngine_.decompMode()); + trackFacei = -1; + trackCelli = mesh().findCell(trackPt, searchEngine_.decompMode()); isGoodSample = true; } else { // samplePt outside. use bPoint - trackPt = pushIn(bPoint, bFaceI); - trackFaceI = bFaceI; - trackCellI = getBoundaryCell(trackFaceI); + trackPt = pushIn(bPoint, bFacei); + trackFacei = bFacei; + trackCelli = getBoundaryCell(trackFacei); isGoodSample = false; } @@ -336,11 +336,11 @@ bool Foam::sampledSet::getTrackingPoint InfoInFunction << " samplePt:" << samplePt << " bPoint:" << bPoint - << " bFaceI:" << bFaceI + << " bFacei:" << bFacei << endl << " Calculated first tracking point :" << " trackPt:" << trackPt - << " trackCellI:" << trackCellI - << " trackFaceI:" << trackFaceI + << " trackCelli:" << trackCelli + << " trackFacei:" << trackFacei << " isGoodSample:" << isGoodSample << endl; } diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.H b/src/sampling/sampledSet/sampledSet/sampledSet.H index 566ac019f40cd1e0730da2af3f9f63fb203f3145..56a63b2f235a11a77a5f2d2f6ba0d9adb431ea69 100644 --- a/src/sampling/sampledSet/sampledSet/sampledSet.H +++ b/src/sampling/sampledSet/sampledSet/sampledSet.H @@ -120,19 +120,19 @@ protected: //- Calculates start of tracking given samplePt and first boundary // intersection - // (bPoint, bFaceI) (bFaceI == -1 if no boundary intersection) + // (bPoint, bFacei) (bFacei == -1 if no boundary intersection) // Returns true if trackPt is valid sampling point. Sets trackPt, - // trackFaceI, trackCellI (-1 if no tracking point found) + // trackFacei, trackCelli (-1 if no tracking point found) bool getTrackingPoint ( const point& samplePt, const point& bPoint, - const label bFaceI, + const label bFacei, const scalar smallDist, point& trackPt, - label& trackCellI, - label& trackFaceI + label& trackCelli, + label& trackFacei ) const; //- Sets sample data diff --git a/src/sampling/sampledSet/uniform/uniformSet.C b/src/sampling/sampledSet/uniform/uniformSet.C index 75376d277871f67d916a16e6592d98dcfda19db2..f56b92d6dfb43d0e12d917fc6b80bce7c0cf0f3e 100644 --- a/src/sampling/sampledSet/uniform/uniformSet.C +++ b/src/sampling/sampledSet/uniform/uniformSet.C @@ -149,7 +149,7 @@ bool Foam::uniformSet::trackToBoundary { Pout<< "Searching along trajectory from " << " trackPt:" << trackPt - << " trackCellI:" << singleParticle.cell() + << " trackCelli:" << singleParticle.cell() << " to:" << samplePt << endl; } @@ -164,8 +164,8 @@ bool Foam::uniformSet::trackToBoundary { Pout<< "Result of tracking " << " trackPt:" << trackPt - << " trackCellI:" << singleParticle.cell() - << " trackFaceI:" << singleParticle.face() + << " trackCelli:" << singleParticle.cell() + << " trackFacei:" << singleParticle.face() << " onBoundary:" << singleParticle.onBoundary() << " samplePt:" << samplePt << " smallDist:" << smallDist @@ -245,34 +245,34 @@ void Foam::uniformSet::calcSamples ); point bPoint(GREAT, GREAT, GREAT); - label bFaceI = -1; + label bFacei = -1; if (bHits.size()) { bPoint = bHits[0].hitPoint(); - bFaceI = bHits[0].index(); + bFacei = bHits[0].index(); } - // Get first tracking point. Use bPoint, bFaceI if provided. + // Get first tracking point. Use bPoint, bFacei if provided. point trackPt; - label trackCellI = -1; - label trackFaceI = -1; + label trackCelli = -1; + label trackFacei = -1; bool isSample = getTrackingPoint ( start_, bPoint, - bFaceI, + bFacei, smallDist, trackPt, - trackCellI, - trackFaceI + trackCelli, + trackFacei ); - if (trackCellI == -1) + if (trackCelli == -1) { // Line start_ - end_ does not intersect domain at all. // (or is along edge) @@ -284,8 +284,8 @@ void Foam::uniformSet::calcSamples if (isSample) { samplingPts.append(start_); - samplingCells.append(trackCellI); - samplingFaces.append(trackFaceI); + samplingCells.append(trackCelli); + samplingFaces.append(trackFacei); samplingCurveDist.append(0.0); } @@ -308,7 +308,7 @@ void Foam::uniformSet::calcSamples while(true) { // Initialize tracking starting from trackPt - passiveParticle singleParticle(mesh(), trackPt, trackCellI); + passiveParticle singleParticle(mesh(), trackPt, trackCelli); bool reachedBoundary = trackToBoundary ( @@ -378,9 +378,9 @@ void Foam::uniformSet::calcSamples } // Update starting point for tracking - trackFaceI = bFaceI; - trackPt = pushIn(bPoint, trackFaceI); - trackCellI = getBoundaryCell(trackFaceI); + trackFacei = bFacei; + trackPt = pushIn(bPoint, trackFacei); + trackCelli = getBoundaryCell(trackFacei); segmentI++; diff --git a/src/sampling/sampledSet/uniform/uniformSet.H b/src/sampling/sampledSet/uniform/uniformSet.H index a9f29ed2b9a97911b218f8a933d0c4d29f9bb372..990b433eb381fcb0128863c5c9fa962861fb562a 100644 --- a/src/sampling/sampledSet/uniform/uniformSet.H +++ b/src/sampling/sampledSet/uniform/uniformSet.H @@ -76,7 +76,7 @@ class uniformSet label& sampleI ) const; - //- Samples from startTrackPt/CellI. Updates particle/samplePt/sampleI + //- Samples from startTrackPt/Celli. Updates particle/samplePt/sampleI // and puts // samples in the DynamicLists. Returns false if end of all samples // reached diff --git a/src/sampling/sampledSurface/isoSurface/isoSurface.C b/src/sampling/sampledSurface/isoSurface/isoSurface.C index 57b3720ca31a2753d6352c65aad2b56639a14dfb..ddd73a1f32de23a3a64100f62860a45106c74680 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurface.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurface.C @@ -317,13 +317,13 @@ void Foam::isoSurface::getNeighbour } else { - label bFaceI = facei-mesh_.nInternalFaces(); - label patchi = boundaryRegion[bFaceI]; + label bFacei = facei-mesh_.nInternalFaces(); + label patchi = boundaryRegion[bFacei]; const polyPatch& pp = mesh_.boundaryMesh()[patchi]; - label patchFaceI = facei-pp.start(); + label patchFacei = facei-pp.start(); - nbrValue = cVals.boundaryField()[patchi][patchFaceI]; - nbrPoint = meshC.boundaryField()[patchi][patchFaceI]; + nbrValue = cVals.boundaryField()[patchi][patchFacei]; + nbrPoint = meshC.boundaryField()[patchi][patchFacei]; } } @@ -515,9 +515,9 @@ void Foam::isoSurface::calcSnappedCc // Create points for all intersections close to cell centre // (i.e. from pyramid edges) - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; scalar nbrValue; point nbrPoint; @@ -540,7 +540,7 @@ void Foam::isoSurface::calcSnappedCc s[2] = isoFraction(cVal, nbrValue); pt[2] = (1.0-s[2])*cc[celli] + s[2]*nbrPoint; - const face& f = mesh_.faces()[cFaces[cFaceI]]; + const face& f = mesh_.faces()[cFaces[cFacei]]; forAll(f, fp) { @@ -698,12 +698,12 @@ void Foam::isoSurface::calcSnappedPoint label nOther = 0; point otherPointSum = Zero; - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { // Create points for all intersections close to point // (i.e. from pyramid edges) - label facei = pFaces[pFaceI]; + label facei = pFaces[pFacei]; const face& f = mesh_.faces()[facei]; label own = mesh_.faceOwner()[facei]; @@ -989,15 +989,15 @@ Foam::triSurface Foam::isoSurface::stitchTriPoints forAll(fFaces, i) { - label nbrFaceI = fFaces[i]; + label nbrFacei = fFaces[i]; - if (nbrFaceI <= facei) + if (nbrFacei <= facei) { // lower numbered faces already checked continue; } - const labelledTri& nbrF = surf[nbrFaceI]; + const labelledTri& nbrF = surf[nbrFacei]; if (f == nbrF) { @@ -1005,7 +1005,7 @@ Foam::triSurface Foam::isoSurface::stitchTriPoints << "Check : " << " triangle " << facei << " vertices " << f << " fc:" << f.centre(surf.points()) - << " has the same vertices as triangle " << nbrFaceI + << " has the same vertices as triangle " << nbrFacei << " vertices " << nbrF << " fc:" << nbrF.centre(surf.points()) << abort(FatalError); @@ -1057,15 +1057,15 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label facei) // Note: discards normal information - sides of baffle are merged. forAll(fFaces, i) { - label nbrFaceI = fFaces[i]; + label nbrFacei = fFaces[i]; - if (nbrFaceI <= facei) + if (nbrFacei <= facei) { // lower numbered faces already checked continue; } - const labelledTri& nbrF = surf[nbrFaceI]; + const labelledTri& nbrF = surf[nbrFacei]; if ( @@ -1077,7 +1077,7 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label facei) WarningInFunction << "triangle " << facei << " vertices " << f << " fc:" << f.centre(surf.points()) - << " has the same vertices as triangle " << nbrFaceI + << " has the same vertices as triangle " << nbrFacei << " vertices " << nbrF << " fc:" << nbrF.centre(surf.points()) << endl; diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C index d2bc06954973212ba3b3227c329073cd01617962..c5393411d7441bca96da40da0adbd16acfd6cb0f 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C @@ -86,9 +86,9 @@ Foam::isoSurfaceCell::cellCutType Foam::isoSurfaceCell::calcCutType if (isTet.get(celli) == 1) { - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh_.faces()[cFaces[cFaceI]]; + const face& f = mesh_.faces()[cFaces[cFacei]]; for (label fp = 1; fp < f.size() - 1; fp++) { @@ -109,9 +109,9 @@ Foam::isoSurfaceCell::cellCutType Foam::isoSurfaceCell::calcCutType // First check if there is any cut in cell bool edgeCut = false; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; const face& f = mesh_.faces()[facei]; // Check pyramids cut @@ -389,9 +389,9 @@ void Foam::isoSurfaceCell::calcSnappedCc // Create points for all intersections close to cell centre // (i.e. from pyramid edges) - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f = mesh_.faces()[cFaces[cFaceI]]; + const face& f = mesh_.faces()[cFaces[cFacei]]; forAll(f, fp) { @@ -436,9 +436,9 @@ void Foam::isoSurfaceCell::calcSnappedCc else if (localPoints.size()) { // Need to analyse - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; const face& f = mesh_.faces()[facei]; // Do a tetrahedralisation. Each face to cc becomes pyr. @@ -619,9 +619,9 @@ void Foam::isoSurfaceCell::genPointTris // Find 4th point label ccPointI = -1; - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - const face& f1 = mesh_.faces()[cFaces[cFaceI]]; + const face& f1 = mesh_.faces()[cFaces[cFacei]]; forAll(f1, fp) { label p1 = f1[fp]; @@ -763,9 +763,9 @@ void Foam::isoSurfaceCell::calcSnappedPoint localPointCells.clear(); localTriPoints.clear(); - forAll(pFaces, pFaceI) + forAll(pFaces, pFacei) { - label facei = pFaces[pFaceI]; + label facei = pFaces[pFacei]; label own = mesh_.faceOwner()[facei]; if (isTet.get(own) == 1) @@ -1082,15 +1082,15 @@ bool Foam::isoSurfaceCell::validTri(const triSurface& surf, const label facei) // Note: discards normal information - sides of baffle are merged. forAll(fFaces, i) { - label nbrFaceI = fFaces[i]; + label nbrFacei = fFaces[i]; - if (nbrFaceI <= facei) + if (nbrFacei <= facei) { // lower numbered faces already checked continue; } - const labelledTri& nbrF = surf[nbrFaceI]; + const labelledTri& nbrF = surf[nbrFacei]; if ( @@ -1102,7 +1102,7 @@ bool Foam::isoSurfaceCell::validTri(const triSurface& surf, const label facei) WarningInFunction << "triangle " << facei << " vertices " << f << " coords:" << f.points(surf.points()) - << " has the same vertices as triangle " << nbrFaceI + << " has the same vertices as triangle " << nbrFacei << " vertices " << nbrF << endl; diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C index ab4574cd7723430f477d4d05ad6e008e70251ae7..419ecfe9c903a8a2b59c57d3eef2b79d1a02d15a 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C @@ -421,9 +421,9 @@ void Foam::isoSurfaceCell::generateTriPoints } else { - forAll(cFaces, cFaceI) + forAll(cFaces, cFacei) { - label facei = cFaces[cFaceI]; + label facei = cFaces[cFacei]; const face& f = mesh_.faces()[facei]; label fp0 = mesh_.tetBasePtIs()[facei]; diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C index e2ec9b5f8b0f3628e5085ed0c31ed8368534eb0a..0d26eee2fa5c3941c8fc2f9dc5490e3b74ba050f 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C @@ -607,13 +607,13 @@ void Foam::isoSurface::generateTriPoints label facei = pp.start(); forAll(pp, i) { - label bFaceI = facei-mesh_.nInternalFaces(); + label bFacei = facei-mesh_.nInternalFaces(); label snappedIndex = snappedCc[own[facei]]; if (snappedIndex != -1) { - neiSnapped[bFaceI] = true; - neiSnappedPoint[bFaceI] = snappedPoints[snappedIndex]; + neiSnapped[bFacei] = true; + neiSnappedPoint[bFacei] = snappedPoints[snappedIndex]; } facei++; } diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C index d789abed83ff5d2629e790897326b35b5701620e..bfeb2cd1b59ce3f26e68edeb6c8668f42b012236 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C @@ -347,14 +347,14 @@ bool Foam::sampledIsoSurface::updateGeometry() const const polyBoundaryMesh& patches = mesh().boundaryMesh(); // Patch to put exposed internal faces into - const label exposedPatchI = patches.findPatchID(exposedPatchName_); + const label exposedPatchi = patches.findPatchID(exposedPatchName_); if (debug) { Info<< "Allocating subset of size " << mesh().cellZones()[zoneID_.index()].size() << " with exposed faces into patch " - << patches[exposedPatchI].name() << endl; + << patches[exposedPatchi].name() << endl; } subMeshPtr_.reset @@ -364,7 +364,7 @@ bool Foam::sampledIsoSurface::updateGeometry() const subMeshPtr_().setLargeCellSubset ( labelHashSet(mesh().cellZones()[zoneID_.index()]), - exposedPatchI + exposedPatchi ); } diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCellTemplates.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCellTemplates.C index 72bcbbf701bcdc11770a3755ab1649cc4350d6f3..12a17abc49698e4111b641b43dd3aa139bb18dd2 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCellTemplates.C +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCellTemplates.C @@ -61,9 +61,9 @@ Foam::sampledIsoSurfaceCell::interpolateField boolList pointDone(points().size(), false); - forAll(faces(), cutFaceI) + forAll(faces(), cutFacei) { - const face& f = faces()[cutFaceI]; + const face& f = faces()[cutFacei]; forAll(f, faceVertI) { @@ -74,7 +74,7 @@ Foam::sampledIsoSurfaceCell::interpolateField values[pointI] = interpolator.interpolate ( points()[pointI], - meshCells_[cutFaceI] + meshCells_[cutFacei] ); pointDone[pointI] = true; } diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C index 2cdecfd6f808b93f23acec72a194ee7ec3f671d1..b30a090937cd9a1f1148e6aec768aa02f7b8e366 100644 --- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C +++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C @@ -69,14 +69,14 @@ void Foam::sampledCuttingPlane::createGeometry() const polyBoundaryMesh& patches = mesh().boundaryMesh(); // Patch to put exposed internal faces into - const label exposedPatchI = patches.findPatchID(exposedPatchName_); + const label exposedPatchi = patches.findPatchID(exposedPatchName_); if (debug) { Info<< "Allocating subset of size " << mesh().cellZones()[zoneID_.index()].size() << " with exposed faces into patch " - << patches[exposedPatchI].name() << endl; + << patches[exposedPatchi].name() << endl; } subMeshPtr_.reset @@ -86,7 +86,7 @@ void Foam::sampledCuttingPlane::createGeometry() subMeshPtr_().setLargeCellSubset ( labelHashSet(mesh().cellZones()[zoneID_.index()]), - exposedPatchI + exposedPatchi ); } diff --git a/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C b/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C index 15674ed19c0c791532fdfd2695a9228b03daa720..a2c0166858b3368b68d9b13026c7373a87caba21 100644 --- a/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C +++ b/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C @@ -84,12 +84,12 @@ Foam::sampledPatch::interpolateField boolList pointDone(points().size(), false); - forAll(faces(), cutFaceI) + forAll(faces(), cutFacei) { - label patchi = patchIDs_[patchIndex_[cutFaceI]]; + label patchi = patchIDs_[patchIndex_[cutFacei]]; const polyPatch& pp = mesh().boundaryMesh()[patchi]; - label patchFaceI = patchFaceLabels()[cutFaceI]; - const face& f = faces()[cutFaceI]; + label patchFacei = patchFaceLabels()[cutFacei]; + const face& f = faces()[cutFacei]; forAll(f, faceVertI) { @@ -97,7 +97,7 @@ Foam::sampledPatch::interpolateField if (!pointDone[pointI]) { - label facei = patchFaceI + pp.start(); + label facei = patchFacei + pp.start(); label celli = own[facei]; values[pointI] = interpolator.interpolate diff --git a/src/sampling/sampledSurface/sampledPlane/sampledPlaneTemplates.C b/src/sampling/sampledSurface/sampledPlane/sampledPlaneTemplates.C index 60e6b5a489b1f6647c8c6e0d993b1f097afff97f..53518039fd2394fd544a0b05c197cd504c33ec81 100644 --- a/src/sampling/sampledSurface/sampledPlane/sampledPlaneTemplates.C +++ b/src/sampling/sampledSurface/sampledPlane/sampledPlaneTemplates.C @@ -51,9 +51,9 @@ Foam::sampledPlane::interpolateField boolList pointDone(points().size(), false); - forAll(faces(), cutFaceI) + forAll(faces(), cutFacei) { - const face& f = faces()[cutFaceI]; + const face& f = faces()[cutFacei]; forAll(f, faceVertI) { @@ -64,7 +64,7 @@ Foam::sampledPlane::interpolateField values[pointI] = interpolator.interpolate ( points()[pointI], - meshCells()[cutFaceI] + meshCells()[cutFacei] ); pointDone[pointI] = true; } diff --git a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C index ae4cef7b0cbf79bd2bf83a951f2464d54f65f78c..7187624c9972153a640040e89aad9779b2838d53 100644 --- a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C +++ b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C @@ -272,13 +272,13 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher) { label newPointI = 0; - label newFaceI = 0; + label newFacei = 0; forAll(s, facei) { if (cellOrFaceLabels[facei] != -1) { - faceMap[newFaceI++] = facei; + faceMap[newFacei++] = facei; const triSurface::FaceType& f = s[facei]; forAll(f, fp) @@ -291,7 +291,7 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher) } } } - faceMap.setSize(newFaceI); + faceMap.setSize(newFacei); pointMap.setSize(newPointI); } diff --git a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C index baf71065d9eae68cff6079827677d4d03e1fbfdc..b12bd6b91f19392238f88dd4506c9b2d669307d7 100644 --- a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C +++ b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C @@ -60,13 +60,13 @@ Foam::sampledTriSurfaceMesh::sampleField forAll(vField.boundaryField(), patchi) { - label bFaceI = pbm[patchi].start() - mesh().nInternalFaces(); + label bFacei = pbm[patchi].start() - mesh().nInternalFaces(); SubList<Type> ( bVals, vField.boundaryField()[patchi].size(), - bFaceI + bFacei ) = vField.boundaryField()[patchi]; } diff --git a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFacesTemplates.C b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFacesTemplates.C index 03c2fffb4adeb32ae980338cd2e2b235c19349ab..0ea47500450f2291dd7da04918178195fb42a2e7 100644 --- a/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFacesTemplates.C +++ b/src/sampling/sampledSurface/thresholdCellFaces/sampledThresholdCellFacesTemplates.C @@ -62,9 +62,9 @@ Foam::sampledThresholdCellFaces::interpolateField boolList pointDone(points().size(), false); - forAll(faces(), cutFaceI) + forAll(faces(), cutFacei) { - const face& f = faces()[cutFaceI]; + const face& f = faces()[cutFacei]; forAll(f, faceVertI) { @@ -75,7 +75,7 @@ Foam::sampledThresholdCellFaces::interpolateField values[pointI] = interpolator.interpolate ( points()[pointI], - meshCells_[cutFaceI] + meshCells_[cutFacei] ); pointDone[pointI] = true; } diff --git a/src/sampling/sampledSurface/thresholdCellFaces/thresholdCellFaces.C b/src/sampling/sampledSurface/thresholdCellFaces/thresholdCellFaces.C index a1e55e88129c085aca9a4a9b25532e2093adbf2e..aee0758812d19b5b97f2df4b6677adbb0d266bdb 100644 --- a/src/sampling/sampledSurface/thresholdCellFaces/thresholdCellFaces.C +++ b/src/sampling/sampledSurface/thresholdCellFaces/thresholdCellFaces.C @@ -192,7 +192,7 @@ void Foam::thresholdCellFaces::calculate label facei = p.start(); // patch faces - forAll(p, localFaceI) + forAll(p, localFacei) { if ( diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.C b/src/surfMesh/MeshedSurface/MeshedSurface.C index 493d8b8103b85111b6465e53ba5c62ae5428e749..fab8bb67fc83df22abe899eb28fc38e797240341 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurface.C +++ b/src/surfMesh/MeshedSurface/MeshedSurface.C @@ -294,7 +294,7 @@ Foam::MeshedSurface<Face>::MeshedSurface // create zone list surfZoneList newZones(bPatches.size()); - label startFaceI = 0; + label startFacei = 0; label nZone = 0; forAll(bPatches, patchi) { @@ -306,12 +306,12 @@ Foam::MeshedSurface<Face>::MeshedSurface ( p.name(), p.size(), - startFaceI, + startFacei, nZone ); nZone++; - startFaceI += p.size(); + startFacei += p.size(); } } @@ -438,21 +438,21 @@ void Foam::MeshedSurface<Face>::remapFaces } else if (zones.size()) { - label newFaceI = 0; + label newFacei = 0; label origEndI = 0; forAll(zones, zoneI) { surfZone& zone = zones[zoneI]; // adjust zone start - zone.start() = newFaceI; + zone.start() = newFacei; origEndI += zone.size(); - for (label facei = newFaceI; facei < faceMap.size(); ++facei) + for (label facei = newFacei; facei < faceMap.size(); ++facei) { if (faceMap[facei] < origEndI) { - ++newFaceI; + ++newFacei; } else { @@ -461,7 +461,7 @@ void Foam::MeshedSurface<Face>::remapFaces } // adjust zone size - zone.size() = newFaceI - zone.start(); + zone.size() = newFacei - zone.start(); } } } @@ -611,7 +611,7 @@ bool Foam::MeshedSurface<Face>::stitchFaces List<label> faceMap(faceLst.size()); // Reset the point labels to the unique points array - label newFaceI = 0; + label newFacei = 0; forAll(faceLst, facei) { Face& f = faceLst[facei]; @@ -623,12 +623,12 @@ bool Foam::MeshedSurface<Face>::stitchFaces // for extra safety: collapse face as well if (f.collapse() >= 3) { - if (newFaceI != facei) + if (newFacei != facei) { - faceLst[newFaceI] = f; + faceLst[newFacei] = f; } - faceMap[newFaceI] = facei; - newFaceI++; + faceMap[newFacei] = facei; + newFacei++; } else if (verbose) { @@ -639,16 +639,16 @@ bool Foam::MeshedSurface<Face>::stitchFaces } pointMap.clear(); - if (newFaceI != faceLst.size()) + if (newFacei != faceLst.size()) { if (verbose) { Pout<< "MeshedSurface::stitchFaces : " - << "Removed " << faceLst.size() - newFaceI + << "Removed " << faceLst.size() - newFacei << " faces" << endl; } - faceLst.setSize(newFaceI); - faceMap.setSize(newFaceI); + faceLst.setSize(newFacei); + faceMap.setSize(newFacei); remapFaces(faceMap); } faceMap.clear(); @@ -671,7 +671,7 @@ bool Foam::MeshedSurface<Face>::checkFaces List<label> faceMap(faceLst.size()); - label newFaceI = 0; + label newFacei = 0; // Detect badly labelled faces and mark degenerate faces const label maxPointI = this->points().size() - 1; forAll(faceLst, facei) @@ -694,7 +694,7 @@ bool Foam::MeshedSurface<Face>::checkFaces } faceMap[facei] = facei; - newFaceI++; + newFacei++; } else { @@ -714,7 +714,7 @@ bool Foam::MeshedSurface<Face>::checkFaces // Detect doubled faces // do not touch the faces const labelListList& fFaces = this->faceFaces(); - newFaceI = 0; + newFacei = 0; forAll(faceLst, facei) { // skip already collapsed faces: @@ -733,16 +733,16 @@ bool Foam::MeshedSurface<Face>::checkFaces // Note: discards normal information - sides of baffle are merged. forAll(neighbours, neighI) { - const label neiFaceI = neighbours[neighI]; + const label neiFacei = neighbours[neighI]; - if (neiFaceI <= facei || faceMap[neiFaceI] < 0) + if (neiFacei <= facei || faceMap[neiFacei] < 0) { // lower numbered faces already checked // skip neighbours that are themselves collapsed continue; } - const Face& nei = faceLst[neiFaceI]; + const Face& nei = faceLst[neiFacei]; if (f == nei) { @@ -753,7 +753,7 @@ bool Foam::MeshedSurface<Face>::checkFaces WarningInFunction << "faces share the same vertices:" << nl << " face[" << facei << "] : " << f << nl - << " face[" << neiFaceI << "] : " << nei << endl; + << " face[" << neiFacei << "] : " << nei << endl; // printFace(Warning, " ", f, points()); // printFace(Warning, " ", nei, points()); } @@ -765,7 +765,7 @@ bool Foam::MeshedSurface<Face>::checkFaces if (okay) { faceMap[facei] = facei; - newFaceI++; + newFacei++; } else { @@ -776,33 +776,33 @@ bool Foam::MeshedSurface<Face>::checkFaces // Phase 1: pack // Done to keep numbering constant in phase 1 - if (changed || newFaceI < faceLst.size()) + if (changed || newFacei < faceLst.size()) { changed = true; if (verbose) { WarningInFunction - << "Removed " << faceLst.size() - newFaceI + << "Removed " << faceLst.size() - newFacei << " illegal faces." << endl; } // compress the face list - newFaceI = 0; + newFacei = 0; forAll(faceLst, facei) { if (faceMap[facei] >= 0) { - if (newFaceI != facei) + if (newFacei != facei) { - faceLst[newFaceI] = faceLst[facei]; + faceLst[newFacei] = faceLst[facei]; } - faceMap[newFaceI] = facei; - newFaceI++; + faceMap[newFacei] = facei; + newFacei++; } } - faceLst.setSize(newFaceI); + faceLst.setSize(newFacei); remapFaces(faceMap); } faceMap.clear(); @@ -871,7 +871,7 @@ Foam::label Foam::MeshedSurface<Face>::triangulate { // triangulate without points // simple face triangulation around f[0] - label newFaceI = 0; + label newFacei = 0; forAll(faceLst, facei) { const Face& f = faceLst[facei]; @@ -880,9 +880,9 @@ Foam::label Foam::MeshedSurface<Face>::triangulate { label fp1 = f.fcIndex(fp); - newFaces[newFaceI] = triFace(f[0], f[fp], f[fp1]); - faceMap[newFaceI] = facei; - newFaceI++; + newFaces[newFacei] = triFace(f[0], f[fp], f[fp1]); + faceMap[newFacei] = facei; + newFacei++; } } } @@ -891,7 +891,7 @@ Foam::label Foam::MeshedSurface<Face>::triangulate // triangulate with points List<face> tmpTri(maxTri); - label newFaceI = 0; + label newFacei = 0; forAll(faceLst, facei) { // 'face' not '<Face>' @@ -901,12 +901,12 @@ Foam::label Foam::MeshedSurface<Face>::triangulate f.triangles(this->points(), nTmp, tmpTri); for (label triI = 0; triI < nTmp; triI++) { - newFaces[newFaceI] = Face + newFaces[newFacei] = Face ( static_cast<labelUList&>(tmpTri[triI]) ); - faceMap[newFaceI] = facei; - newFaceI++; + faceMap[newFacei] = facei; + newFacei++; } } } @@ -964,8 +964,8 @@ Foam::MeshedSurface<Face> Foam::MeshedSurface<Face>::subsetMesh List<Face> newFaces(faceMap.size()); forAll(faceMap, facei) { - const label origFaceI = faceMap[facei]; - newFaces[facei] = Face(locFaces[origFaceI]); + const label origFacei = faceMap[facei]; + newFaces[facei] = Face(locFaces[origFacei]); // Renumber labels for face Face& f = newFaces[facei]; @@ -977,7 +977,7 @@ Foam::MeshedSurface<Face> Foam::MeshedSurface<Face>::subsetMesh oldToNew.clear(); // recalculate the zones start/size - label newFaceI = 0; + label newFacei = 0; label origEndI = 0; // adjust zone sizes @@ -986,14 +986,14 @@ Foam::MeshedSurface<Face> Foam::MeshedSurface<Face>::subsetMesh surfZone& zone = newZones[zoneI]; // adjust zone start - zone.start() = newFaceI; + zone.start() = newFacei; origEndI += zone.size(); - for (label facei = newFaceI; facei < faceMap.size(); ++facei) + for (label facei = newFacei; facei < faceMap.size(); ++facei) { if (faceMap[facei] < origEndI) { - ++newFaceI; + ++newFacei; } else { @@ -1002,7 +1002,7 @@ Foam::MeshedSurface<Face> Foam::MeshedSurface<Face>::subsetMesh } // adjust zone size - zone.size() = newFaceI - zone.start(); + zone.size() = newFacei - zone.start(); } diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C index fa72e70fb2a20f65ee6b7a722c876389da0453ac..104b36be81d956dd94b71d8b161398d0c8620fc5 100644 --- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C +++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C @@ -555,8 +555,8 @@ Foam::UnsortedMeshedSurface<Face>::subsetMesh forAll(faceMap, facei) { - const label origFaceI = faceMap[facei]; - newFaces[facei] = Face(locFaces[origFaceI]); + const label origFacei = faceMap[facei]; + newFaces[facei] = Face(locFaces[origFacei]); // Renumber labels for face Face& f = newFaces[facei]; @@ -565,7 +565,7 @@ Foam::UnsortedMeshedSurface<Face>::subsetMesh f[fp] = oldToNew[f[fp]]; } - newZones[facei] = zoneIds_[origFaceI]; + newZones[facei] = zoneIds_[origFacei]; } oldToNew.clear(); diff --git a/src/surfMesh/surfZone/surfZone/surfZoneIOList.C b/src/surfMesh/surfZone/surfZone/surfZoneIOList.C index 55d0d6ef5f68954814880ee4021425604a8f98ca..0f7d69474531090ace59a82515c14a84c1b0c650 100644 --- a/src/surfMesh/surfZone/surfZone/surfZoneIOList.C +++ b/src/surfMesh/surfZone/surfZone/surfZoneIOList.C @@ -67,13 +67,13 @@ Foam::surfZoneIOList::surfZoneIOList const dictionary& dict = dictEntries[zoneI].dict(); label zoneSize = readLabel(dict.lookup("nFaces")); - label startFaceI = readLabel(dict.lookup("startFace")); + label startFacei = readLabel(dict.lookup("startFace")); zones[zoneI] = surfZone ( dictEntries[zoneI].keyword(), zoneSize, - startFaceI, + startFacei, zoneI ); @@ -83,7 +83,7 @@ Foam::surfZoneIOList::surfZoneIOList zones[zoneI].geometricType() = geoType; } - if (startFaceI != facei) + if (startFacei != facei) { FatalErrorInFunction << "surfZones are not ordered. Start of zone " << zoneI diff --git a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C index 18676aa853b54e51c3cdc4c32c70bbf31a976ce5..d589c9a79e8164bfff5f7e6b3b5892c6a6a127ea 100644 --- a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C @@ -321,9 +321,9 @@ void Foam::fileFormats::AC3DsurfaceFormat<Face>::write os << "numsurf " << patch.localFaces().size() << endl; - forAll(patch.localFaces(), localFaceI) + forAll(patch.localFaces(), localFacei) { - const Face& f = patch.localFaces()[localFaceI]; + const Face& f = patch.localFaces()[localFacei]; os << "SURF 0x20" << nl // polygon << "mat " << zoneI << nl @@ -386,7 +386,7 @@ void Foam::fileFormats::AC3DsurfaceFormat<Face>::write // Create zone with only zone faces included for ease of addressing labelHashSet include(surf.size()); - forAll(zone, localFaceI) + forAll(zone, localFacei) { const label facei = faceMap[faceIndex++]; include.insert(facei); @@ -406,9 +406,9 @@ void Foam::fileFormats::AC3DsurfaceFormat<Face>::write os << "numsurf " << subm.localFaces().size() << endl; - forAll(subm.localFaces(), localFaceI) + forAll(subm.localFaces(), localFacei) { - const Face& f = subm.localFaces()[localFaceI]; + const Face& f = subm.localFaces()[localFacei]; os << "SURF 0x20" << nl // polygon << "mat " << zoneI << nl diff --git a/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.C b/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.C index e23ecb38542ccab6fb864f3fdce0247db35f977c..8fcd47e9fd2306793f120f89c260b846bb5cd269 100644 --- a/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.C @@ -302,7 +302,7 @@ void Foam::fileFormats::GTSsurfaceFormat<Face>::write { const surfZone& zone = zones[zoneI]; - forAll(zone, localFaceI) + forAll(zone, localFacei) { const labelList& fEdges = faceEs[faceIndex++]; diff --git a/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.C b/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.C index fdce18b1451264a884c9ece6ec3b5325dd71d33a..7a4eacde00b5ea6c7e7f399007aa68efe1fa8d25 100644 --- a/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/obj/OBJsurfaceFormat.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -279,7 +279,7 @@ void Foam::fileFormats::OBJsurfaceFormat<Face>::write if (useFaceMap) { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceMap[faceIndex++]]; @@ -293,7 +293,7 @@ void Foam::fileFormats::OBJsurfaceFormat<Face>::write } else { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceIndex++]; diff --git a/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.C b/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.C index 285d4e95cc09c9f82e5fbf2f55ebfdbacf7eff73..1760d4c8b528f5a6e2fbedeb273089782c26fb09 100644 --- a/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.C @@ -201,7 +201,7 @@ void Foam::fileFormats::OFFsurfaceFormat<Face>::write if (surf.useFaceMap()) { - forAll(zoneLst[zoneI], localFaceI) + forAll(zoneLst[zoneI], localFacei) { const Face& f = faceLst[faceMap[faceIndex++]]; @@ -217,7 +217,7 @@ void Foam::fileFormats::OFFsurfaceFormat<Face>::write } else { - forAll(zoneLst[zoneI], localFaceI) + forAll(zoneLst[zoneI], localFacei) { const Face& f = faceLst[faceIndex++]; diff --git a/src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormat.C b/src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormat.C index 1ebc0c12fff282240f84ccc3bd487ae2711c8cfe..6f9d2595f7068bf8402c24c9c26b07aff59e30f4 100644 --- a/src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormat.C @@ -221,7 +221,7 @@ void Foam::fileFormats::OFSsurfaceFormat<Face>::write // Print all faces belonging to this zone const surfZone& zone = zones[zoneI]; - forAll(zone, localFaceI) + forAll(zone, localFacei) { os << faceLst[faceMap[facei++]] << nl; } diff --git a/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.C b/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.C index 99bb93d50302312ba8ab111c0fcda5668060bd75..2530cf8ed491c97ad66ee079d6a30f2e1c0a8730 100644 --- a/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/smesh/SMESHsurfaceFormat.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -94,7 +94,7 @@ void Foam::fileFormats::SMESHsurfaceFormat<Face>::write if (useFaceMap) { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceMap[faceIndex++]]; @@ -108,7 +108,7 @@ void Foam::fileFormats::SMESHsurfaceFormat<Face>::write } else { - forAll(zones[zoneI], localFaceI) + forAll(zones[zoneI], localFacei) { const Face& f = faceLst[faceIndex++]; diff --git a/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.C b/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.C index a5433a197aceb572069059dca879f07aaf133558..4ddd88c404d034fc420fece87c3a060aa0cb759a 100644 --- a/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.C @@ -273,7 +273,7 @@ void Foam::fileFormats::STARCDsurfaceFormat<Face>::write if (useFaceMap) { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceMap[faceIndex++]]; writeShell(os, f, faceIndex, zoneI + 1); @@ -281,7 +281,7 @@ void Foam::fileFormats::STARCDsurfaceFormat<Face>::write } else { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceIndex++]; writeShell(os, f, faceIndex, zoneI + 1); diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.C b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.C index 42be796eb58baa47e4f4c310c4cc23a525485a76..e3c53dabcc45fb255d60f7c257e7e24e651d5ff9 100644 --- a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.C @@ -225,7 +225,7 @@ void Foam::fileFormats::STLsurfaceFormat<Face>::writeAscii if (useFaceMap) { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const label facei = faceMap[faceIndex++]; writeShell(os, pointLst, faceLst[facei]); @@ -233,7 +233,7 @@ void Foam::fileFormats::STLsurfaceFormat<Face>::writeAscii } else { - forAll(zone, localFaceI) + forAll(zone, localFacei) { writeShell(os, pointLst, faceLst[faceIndex++]); } @@ -297,7 +297,7 @@ void Foam::fileFormats::STLsurfaceFormat<Face>::writeBinary if (useFaceMap) { - forAll(zone, localFaceI) + forAll(zone, localFacei) { writeShell ( @@ -310,7 +310,7 @@ void Foam::fileFormats::STLsurfaceFormat<Face>::writeBinary } else { - forAll(zone, localFaceI) + forAll(zone, localFacei) { writeShell ( diff --git a/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.C b/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.C index d090d0923c5f68fafe0eaff9ee7b618cc20b70ff..b95f2605be1d39b6126ce2891c560008667ab968 100644 --- a/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.C @@ -160,7 +160,7 @@ void Foam::fileFormats::TRIsurfaceFormat<Face>::write if (useFaceMap) { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceMap[faceIndex++]]; writeShell(os, pointLst, f, zoneI); @@ -168,7 +168,7 @@ void Foam::fileFormats::TRIsurfaceFormat<Face>::write } else { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceIndex++]; writeShell(os, pointLst, f, zoneI); @@ -215,7 +215,7 @@ void Foam::fileFormats::TRIsurfaceFormat<Face>::write label faceIndex = 0; forAll(zoneLst, zoneI) { - forAll(zoneLst[zoneI], localFaceI) + forAll(zoneLst[zoneI], localFacei) { const Face& f = faceLst[faceMap[faceIndex++]]; writeShell(os, pointLst, f, zoneI); diff --git a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C index 3c26763c03644ad5de6ee114479f6d1ec54bb8d5..f5e5a889204cb48ecd0c3082f9701c1690d6b22b 100644 --- a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C @@ -254,7 +254,7 @@ void Foam::fileFormats::VTKsurfaceFormat<Face>::write if (useFaceMap) { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceMap[faceIndex++]]; @@ -268,7 +268,7 @@ void Foam::fileFormats::VTKsurfaceFormat<Face>::write } else { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceIndex++]; diff --git a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatCore.C b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatCore.C index 513d5f08a50fc19db4c27cc4660bfab1b7f8deff..501806c4174e074859a043eb83e10cdb56e54453 100644 --- a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatCore.C +++ b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatCore.C @@ -73,11 +73,11 @@ void Foam::fileFormats::VTKsurfaceFormatCore::writeTail forAll(zoneLst, zoneI) { - forAll(zoneLst[zoneI], localFaceI) + forAll(zoneLst[zoneI], localFacei) { - if (localFaceI) + if (localFacei) { - if (localFaceI % 20) + if (localFacei % 20) { os << ' '; } diff --git a/src/surfMesh/surfaceFormats/wrl/WRLsurfaceFormat.C b/src/surfMesh/surfaceFormats/wrl/WRLsurfaceFormat.C index c95a0c0e897696f7bb4eee8dd0b6c8067a4d3c69..e3d44d8281b1ee1de87eee3762cc22b17e8322f0 100644 --- a/src/surfMesh/surfaceFormats/wrl/WRLsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/wrl/WRLsurfaceFormat.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -101,7 +101,7 @@ void Foam::fileFormats::WRLsurfaceFormat<Face>::write if (useFaceMap) { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceMap[faceIndex++]]; @@ -114,7 +114,7 @@ void Foam::fileFormats::WRLsurfaceFormat<Face>::write } else { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceIndex++]; diff --git a/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.C b/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.C index c346bc1632df0e0d15d0d95899d500b399e2293a..2c296d6ab7ca51b8cc6c30e51b745c283c128d6c 100644 --- a/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/x3d/X3DsurfaceFormat.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -91,7 +91,7 @@ void Foam::fileFormats::X3DsurfaceFormat<Face>::write if (useFaceMap) { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceMap[faceIndex++]]; @@ -104,7 +104,7 @@ void Foam::fileFormats::X3DsurfaceFormat<Face>::write } else { - forAll(zone, localFaceI) + forAll(zone, localFacei) { const Face& f = faceLst[faceIndex++]; diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C index 60f009b75661e41e65fedeb618c916d00386f498..ca4056789569469e9f35a799858157feec9461b8 100644 --- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C +++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C @@ -55,11 +55,11 @@ void Foam::radiation::viewFactor::initialise() forAll(Qrp, patchi) { //const polyPatch& pp = mesh_.boundaryMesh()[patchi]; - const fvPatchScalarField& QrPatchI = Qrp[patchi]; + const fvPatchScalarField& QrPatchi = Qrp[patchi]; - if ((isA<fixedValueFvPatchScalarField>(QrPatchI))) + if ((isA<fixedValueFvPatchScalarField>(QrPatchi))) { - selectedPatches_[count] = QrPatchI.patch().index(); + selectedPatches_[count] = QrPatchi.patch().index(); nLocalCoarseFaces_ += coarsePatches[patchi].size(); count++; } @@ -182,14 +182,14 @@ void Foam::radiation::viewFactor::initialise() << "Insert elements in the matrix..." << endl; } - for (label procI = 0; procI < Pstream::nProcs(); procI++) + for (label proci = 0; proci < Pstream::nProcs(); proci++) { insertMatrixElements ( globalNumbering, - procI, - globalFaceFacesProc[procI], - F[procI], + proci, + globalFaceFacesProc[proci], + F[proci], Fmatrix_() ); } @@ -371,7 +371,7 @@ bool Foam::radiation::viewFactor::read() void Foam::radiation::viewFactor::insertMatrixElements ( const globalIndex& globalNumbering, - const label procI, + const label proci, const labelListList& globalFaceFaces, const scalarListList& viewFactors, scalarSquareMatrix& Fmatrix @@ -382,7 +382,7 @@ void Foam::radiation::viewFactor::insertMatrixElements const scalarList& vf = viewFactors[facei]; const labelList& globalFaces = globalFaceFaces[facei]; - label globalI = globalNumbering.toGlobal(procI, facei); + label globalI = globalNumbering.toGlobal(proci, facei); forAll(globalFaces, i) { Fmatrix[globalI][globalFaces[i]] = vf[i]; diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.H b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.H index 012f94036ee0f92b9d6f387e958b7af07f238957..ce63ea30922caa7b8003013d0cbee520f2d12c59 100644 --- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.H +++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.H @@ -116,7 +116,7 @@ class viewFactor void insertMatrixElements ( const globalIndex& index, - const label fromProcI, + const label fromProci, const labelListList& globalFaceFaces, const scalarListList& viewFactors, scalarSquareMatrix& matrix diff --git a/src/triSurface/triSurface/interfaces/AC3D/writeAC.C b/src/triSurface/triSurface/interfaces/AC3D/writeAC.C index eec3cec436755cc6c7e4391ead12d20cfdf19983..edddefab2a35e095aa0852c9e2a26963f547ba40 100644 --- a/src/triSurface/triSurface/interfaces/AC3D/writeAC.C +++ b/src/triSurface/triSurface/interfaces/AC3D/writeAC.C @@ -93,7 +93,7 @@ void Foam::triSurface::writeAC(Ostream& os) const boolList include(size(), false); - forAll(sp, patchFaceI) + forAll(sp, patchFacei) { const label facei = faceMap[faceIndex++]; diff --git a/src/triSurface/triSurface/interfaces/DX/writeDX.C b/src/triSurface/triSurface/interfaces/DX/writeDX.C index 65d9d08a2c749498c84dedeb2b16574bc564459e..1b91756c44ed9732f930a05e2c1ab4c8f8213dc8 100644 --- a/src/triSurface/triSurface/interfaces/DX/writeDX.C +++ b/src/triSurface/triSurface/interfaces/DX/writeDX.C @@ -81,9 +81,9 @@ void triSurface::writeDXGeometry for ( - label patchFaceI = 0; - patchFaceI < myPatches[patchi].size(); - patchFaceI++ + label patchFacei = 0; + patchFacei < myPatches[patchi].size(); + patchFacei++ ) { const label facei = faceMap[faceIndex++]; @@ -136,7 +136,7 @@ void triSurface::writeDX(const bool writeSorted, Ostream& os) const forAll(myPatches, patchi) { - forAll(myPatches[patchi], patchFaceI) + forAll(myPatches[patchi], patchFacei) { os << patchi << endl; } diff --git a/src/triSurface/triSurface/interfaces/GTS/writeGTS.C b/src/triSurface/triSurface/interfaces/GTS/writeGTS.C index 4639d6d01dce0f5fba9fa0d976adf3bccfc59b96..6b8f3b0deb9c9fd8d59b0bfb2d8b1a6c51782cb1 100644 --- a/src/triSurface/triSurface/interfaces/GTS/writeGTS.C +++ b/src/triSurface/triSurface/interfaces/GTS/writeGTS.C @@ -86,9 +86,9 @@ void triSurface::writeGTS(const bool writeSorted, Ostream& os) const { for ( - label patchFaceI = 0; - patchFaceI < myPatches[patchi].size(); - patchFaceI++ + label patchFacei = 0; + patchFacei < myPatches[patchi].size(); + patchFacei++ ) { const label facei = faceMap[faceIndex++]; diff --git a/src/triSurface/triSurface/interfaces/OBJ/writeOBJ.C b/src/triSurface/triSurface/interfaces/OBJ/writeOBJ.C index e4ce56f60a8c2ea47e68f650789edca5e2436d31..1111e8b1488e99c6474bd67e8597e971eb01497a 100644 --- a/src/triSurface/triSurface/interfaces/OBJ/writeOBJ.C +++ b/src/triSurface/triSurface/interfaces/OBJ/writeOBJ.C @@ -83,9 +83,9 @@ void triSurface::writeOBJ(const bool writeSorted, Ostream& os) const for ( - label patchFaceI = 0; - patchFaceI < myPatches[patchi].size(); - patchFaceI++ + label patchFacei = 0; + patchFacei < myPatches[patchi].size(); + patchFacei++ ) { const label facei = faceMap[faceIndex++]; @@ -114,13 +114,13 @@ void triSurface::writeOBJ(const bool writeSorted, Ostream& os) const } - label prevPatchI = -1; + label prevPatchi = -1; forAll(*this, facei) { - if (prevPatchI != patchIDs[facei]) + if (prevPatchi != patchIDs[facei]) { - prevPatchI = patchIDs[facei]; + prevPatchi = patchIDs[facei]; os << "g " << myPatches[patchIDs[facei]].name() << nl; } os << "f " diff --git a/src/triSurface/triSurface/interfaces/OFF/readOFF.C b/src/triSurface/triSurface/interfaces/OFF/readOFF.C index 290d7b0405778b531c6a25a39c9eeea1c9136b33..c846cab12e462c5801117df60987ad933777b94e 100644 --- a/src/triSurface/triSurface/interfaces/OFF/readOFF.C +++ b/src/triSurface/triSurface/interfaces/OFF/readOFF.C @@ -113,9 +113,9 @@ bool Foam::triSurface::readOFF(const fileName& OFFfileName) f.triangles(points, nTri, triFaces); - forAll(triFaces, triFaceI) + forAll(triFaces, triFacei) { - const face& f = triFaces[triFaceI]; + const face& f = triFaces[triFacei]; tris.append(labelledTri(f[0], f[1], f[2], 0)); } diff --git a/src/triSurface/triSurface/interfaces/OFF/writeOFF.C b/src/triSurface/triSurface/interfaces/OFF/writeOFF.C index 1f7b9d83efdd9eb608e6cfa5e859b62a0c3febe8..686e6357c2d3a3e01ff9cc43e23ebddb3acc46ee 100644 --- a/src/triSurface/triSurface/interfaces/OFF/writeOFF.C +++ b/src/triSurface/triSurface/interfaces/OFF/writeOFF.C @@ -78,9 +78,9 @@ void triSurface::writeOFF(const bool writeSorted, Ostream& os) const for ( - label patchFaceI = 0; - patchFaceI < myPatches[patchi].size(); - patchFaceI++ + label patchFacei = 0; + patchFacei < myPatches[patchi].size(); + patchFacei++ ) { const label facei = faceMap[faceIndex++]; diff --git a/src/triSurface/triSurface/interfaces/SMESH/writeSMESH.C b/src/triSurface/triSurface/interfaces/SMESH/writeSMESH.C index 5d8d81aadcfa86131b385dc764ddae20b703bd49..8651f55d05c7602c1073eb1fbda15e667e990b33 100644 --- a/src/triSurface/triSurface/interfaces/SMESH/writeSMESH.C +++ b/src/triSurface/triSurface/interfaces/SMESH/writeSMESH.C @@ -65,9 +65,9 @@ void triSurface::writeSMESH(const bool writeSorted, Ostream& os) const for ( - label patchFaceI = 0; - patchFaceI < myPatches[patchi].size(); - patchFaceI++ + label patchFacei = 0; + patchFacei < myPatches[patchi].size(); + patchFacei++ ) { const label facei = faceMap[faceIndex++]; diff --git a/src/triSurface/triSurface/interfaces/STL/writeSTL.C b/src/triSurface/triSurface/interfaces/STL/writeSTL.C index a5b74edc252590392b5e1c134e67c9f90b2f6406..bb74d31cd0fcae1ee73a9b13e5dd207e24442ed3 100644 --- a/src/triSurface/triSurface/interfaces/STL/writeSTL.C +++ b/src/triSurface/triSurface/interfaces/STL/writeSTL.C @@ -49,9 +49,9 @@ void Foam::triSurface::writeSTLASCII(const bool writeSorted, Ostream& os) const for ( - label patchFaceI = 0; - patchFaceI < patch.size(); - patchFaceI++ + label patchFacei = 0; + patchFacei < patch.size(); + patchFacei++ ) { const label facei = faceMap[faceIndex++]; @@ -94,20 +94,20 @@ void Foam::triSurface::writeSTLASCII(const bool writeSorted, Ostream& os) const } } - label currentPatchI = -1; + label currentPatchi = -1; forAll(*this, facei) { - if (currentPatchI != patchIDs[facei]) + if (currentPatchi != patchIDs[facei]) { - if (currentPatchI != -1) + if (currentPatchi != -1) { // Have already valid patch. Close it. - os << "endsolid " << myPatches[currentPatchI].name() + os << "endsolid " << myPatches[currentPatchi].name() << nl; } - currentPatchI = patchIDs[facei]; - os << "solid " << myPatches[currentPatchI].name() << nl; + currentPatchi = patchIDs[facei]; + os << "solid " << myPatches[currentPatchi].name() << nl; } const vector& n = faceNormals()[facei]; @@ -131,9 +131,9 @@ void Foam::triSurface::writeSTLASCII(const bool writeSorted, Ostream& os) const << " endfacet" << endl; } - if (currentPatchI != -1) + if (currentPatchi != -1) { - os << "endsolid " << myPatches[currentPatchI].name() + os << "endsolid " << myPatches[currentPatchi].name() << nl; } } diff --git a/src/triSurface/triSurface/interfaces/TRI/writeTRI.C b/src/triSurface/triSurface/interfaces/TRI/writeTRI.C index 7c8ace5b0fb5278d61e859409f43032e386f2fef..0050463cf3f171db780012c439138b212627dafb 100644 --- a/src/triSurface/triSurface/interfaces/TRI/writeTRI.C +++ b/src/triSurface/triSurface/interfaces/TRI/writeTRI.C @@ -51,9 +51,9 @@ void triSurface::writeTRI(const bool writeSorted, Ostream& os) const { for ( - label patchFaceI = 0; - patchFaceI < myPatches[patchi].size(); - patchFaceI++ + label patchFacei = 0; + patchFacei < myPatches[patchi].size(); + patchFacei++ ) { const label facei = faceMap[faceIndex++]; diff --git a/src/triSurface/triSurface/interfaces/VTK/writeVTK.C b/src/triSurface/triSurface/interfaces/VTK/writeVTK.C index 409c1429632f1b3639374290833a9d704597e11e..33bc7de5566d5f067dae1f69f1f9e34818724be9 100644 --- a/src/triSurface/triSurface/interfaces/VTK/writeVTK.C +++ b/src/triSurface/triSurface/interfaces/VTK/writeVTK.C @@ -77,9 +77,9 @@ void triSurface::writeVTK(const bool writeSorted, Ostream& os) const for ( - label patchFaceI = 0; - patchFaceI < myPatches[patchi].size(); - patchFaceI++ + label patchFacei = 0; + patchFacei < myPatches[patchi].size(); + patchFacei++ ) { if (faceIndex > 0 && (faceIndex % 10) == 0) @@ -114,9 +114,9 @@ void triSurface::writeVTK(const bool writeSorted, Ostream& os) const { for ( - label patchFaceI = 0; - patchFaceI < myPatches[patchi].size(); - patchFaceI++ + label patchFacei = 0; + patchFacei < myPatches[patchi].size(); + patchFacei++ ) { if (faceIndex > 0 && (faceIndex % 10) == 0) diff --git a/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C b/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C index a4d6f5a48741d1a90f07b0c08d7afe9d74843eb6..3e274ed9f664c381ed3a2b3021bd8c5fee3e41f3 100644 --- a/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C +++ b/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C @@ -79,7 +79,7 @@ Foam::surfacePatchIOList::surfacePatchIOList const dictionary& dict = patchEntries[patchi].dict(); label patchSize = readLabel(dict.lookup("nFaces")); - label startFaceI = readLabel(dict.lookup("startFace")); + label startFacei = readLabel(dict.lookup("startFace")); patches[patchi] = surfacePatch @@ -87,12 +87,12 @@ Foam::surfacePatchIOList::surfacePatchIOList word(dict.lookup("geometricType")), patchEntries[patchi].keyword(), patchSize, - startFaceI, + startFacei, patchi ); - if (startFaceI != facei) + if (startFacei != facei) { FatalErrorInFunction << "Patches are not ordered. Start of patch " << patchi diff --git a/src/triSurface/triSurface/triSurface.C b/src/triSurface/triSurface/triSurface.C index 8077974443a786920fcbabb20dca9682a1971cba..d6ae673116e2dccd848c680e49438ea7fc1d7c97 100644 --- a/src/triSurface/triSurface/triSurface.C +++ b/src/triSurface/triSurface/triSurface.C @@ -285,23 +285,23 @@ void Foam::triSurface::checkTriangles(const bool verbose) if (hasInvalid) { // Pack - label newFaceI = 0; + label newFacei = 0; forAll(*this, facei) { if (valid[facei]) { const labelledTri& f = (*this)[facei]; - (*this)[newFaceI++] = f; + (*this)[newFacei++] = f; } } if (verbose) { WarningInFunction - << "Removing " << size() - newFaceI + << "Removing " << size() - newFacei << " illegal faces." << endl; } - (*this).setSize(newFaceI); + (*this).setSize(newFacei); // Topology can change because of renumbering clearOut(); @@ -527,43 +527,43 @@ Foam::surfacePatchList Foam::triSurface::calcPatches(labelList& faceMap) const // Fill rest of patch info - label startFaceI = 0; - forAll(newPatches, newPatchI) + label startFacei = 0; + forAll(newPatches, newPatchi) { - surfacePatch& newPatch = newPatches[newPatchI]; + surfacePatch& newPatch = newPatches[newPatchi]; - newPatch.index() = newPatchI; + newPatch.index() = newPatchi; - label oldPatchI = newPatchI; + label oldPatchi = newPatchi; // start of patch - newPatch.start() = startFaceI; + newPatch.start() = startFacei; // Take over any information from existing patches - if ((oldPatchI < patches_.size()) && (patches_[oldPatchI].name() != "")) + if ((oldPatchi < patches_.size()) && (patches_[oldPatchi].name() != "")) { - newPatch.name() = patches_[oldPatchI].name(); + newPatch.name() = patches_[oldPatchi].name(); } else { - newPatch.name() = word("patch") + name(newPatchI); + newPatch.name() = word("patch") + name(newPatchi); } if ( - (oldPatchI < patches_.size()) - && (patches_[oldPatchI].geometricType() != "") + (oldPatchi < patches_.size()) + && (patches_[oldPatchi].geometricType() != "") ) { - newPatch.geometricType() = patches_[oldPatchI].geometricType(); + newPatch.geometricType() = patches_[oldPatchi].geometricType(); } else { newPatch.geometricType() = "empty"; } - startFaceI += newPatch.size(); + startFacei += newPatch.size(); } return newPatches; @@ -863,18 +863,18 @@ void Foam::triSurface::markZone forAll(eFaces, j) { - label nbrFaceI = eFaces[j]; + label nbrFacei = eFaces[j]; - if (faceZone[nbrFaceI] == -1) + if (faceZone[nbrFacei] == -1) { - faceZone[nbrFaceI] = currentZone; - newChangedFaces.append(nbrFaceI); + faceZone[nbrFacei] = currentZone; + newChangedFaces.append(nbrFacei); } - else if (faceZone[nbrFaceI] != currentZone) + else if (faceZone[nbrFacei] != currentZone) { FatalErrorInFunction - << "Zones " << faceZone[nbrFaceI] - << " at face " << nbrFaceI + << "Zones " << faceZone[nbrFacei] + << " at face " << nbrFacei << " connects to zone " << currentZone << " at face " << facei << abort(FatalError); @@ -916,25 +916,25 @@ Foam::label Foam::triSurface::markZones label zoneI = 0; - for (label startFaceI = 0;; zoneI++) + for (label startFacei = 0;; zoneI++) { // Find first non-coloured face - for (; startFaceI < size(); startFaceI++) + for (; startFacei < size(); startFacei++) { - if (faceZone[startFaceI] == -1) + if (faceZone[startFacei] == -1) { break; } } - if (startFaceI >= size()) + if (startFacei >= size()) { break; } - faceZone[startFaceI] = zoneI; + faceZone[startFacei] = zoneI; - markZone(borderEdge, startFaceI, zoneI, faceZone); + markZone(borderEdge, startFacei, zoneI, faceZone); } return zoneI; @@ -959,15 +959,15 @@ void Foam::triSurface::subsetMeshMap boolList pointHad(nPoints(), false); - forAll(include, oldFaceI) + forAll(include, oldFacei) { - if (include[oldFaceI]) + if (include[oldFacei]) { // Store new faces compact - faceMap[facei++] = oldFaceI; + faceMap[facei++] = oldFacei; // Renumber labels for face - const triSurface::FaceType& f = locFaces[oldFaceI]; + const triSurface::FaceType& f = locFaces[oldFacei]; forAll(f, fp) {