diff --git a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C index 4e561052fd0206b7ec9a3ce82a2c3df2d0f9d7ce..c84a3114230c73c7cf5d8831c7ec6c3bd819c4e8 100644 --- a/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.C +++ b/applications/solvers/combustion/PDRFoam/PDRFoamAutoRefine.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 @@ -131,11 +131,11 @@ int main(int argc, char *argv[]) protectedCell = 0; } - forAll(betav, cellI) + forAll(betav, celli) { - if (betav[cellI] < 0.99) + if (betav[celli] < 0.99) { - protectedCell[cellI] = 1; + protectedCell[celli] = 1; } } diff --git a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C index ff5d3e5a6ed8e9b9fa762ed84dec9f7b7ab717e8..c33df3cf5c0fd04da300e301df015c3a6f287c0c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/interfacialCompositionModels/interfaceCompositionModels/InterfaceCompositionModel/InterfaceCompositionModel.C @@ -155,11 +155,11 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::D volScalarField& D(tmpD.ref()); - forAll(p, cellI) + forAll(p, celli) { - D[cellI] = - localThermo.alphah(p[cellI], T[cellI]) - /localThermo.rho(p[cellI], T[cellI]); + D[celli] = + localThermo.alphah(p[celli], T[celli]) + /localThermo.rho(p[celli], T[celli]); } D /= Le_; @@ -209,11 +209,11 @@ Foam::InterfaceCompositionModel<Thermo, OtherThermo>::L volScalarField& L(tmpL.ref()); - forAll(p, cellI) + forAll(p, celli) { - L[cellI] = - localThermo.Ha(p[cellI], Tf[cellI]) - - otherLocalThermo.Ha(otherP[cellI], Tf[cellI]); + L[celli] = + localThermo.Ha(p[celli], Tf[celli]) + - otherLocalThermo.Ha(otherP[celli], Tf[celli]); } return tmpL; diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C index 996f96cecfa8d1be6a5f8801b0ac7f069a827d4d..46de9ec4f18d743efd3db79de477c7cabc383bcf 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatPhaseChangeJayatillekeWallFunction/alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField.C @@ -85,23 +85,23 @@ alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::yPlusTherm tmp<scalarField> typsf(new scalarField(this->size())); scalarField& ypsf = typsf.ref(); - forAll(ypsf, faceI) + forAll(ypsf, facei) { scalar ypt = 11.0; for (int i=0; i<maxIters_; i++) { - scalar f = ypt - (log(E_*ypt)/kappa_ + P[faceI])/Prat[faceI]; - scalar df = 1 - 1.0/(ypt*kappa_*Prat[faceI]); + scalar f = ypt - (log(E_*ypt)/kappa_ + P[facei])/Prat[facei]; + scalar df = 1 - 1.0/(ypt*kappa_*Prat[facei]); scalar yptNew = ypt - f/df; if (yptNew < VSMALL) { - ypsf[faceI] = 0; + ypsf[facei] = 0; } else if (mag(yptNew - ypt) < tolerance_) { - ypsf[faceI] = yptNew; + ypsf[facei] = yptNew; } else { @@ -109,7 +109,7 @@ alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::yPlusTherm } } - ypsf[faceI] = ypt; + ypsf[facei] = ypt; } return typsf; @@ -200,32 +200,32 @@ alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat scalarField& alphatConv = talphatConv.ref(); // Populate boundary values - forAll(alphatConv, faceI) + forAll(alphatConv, facei) { // Evaluate new effective thermal diffusivity scalar alphaEff = 0.0; - if (yPlus[faceI] < yPlusTherm[faceI]) + if (yPlus[facei] < yPlusTherm[facei]) { - scalar A = qDot[faceI]*rhow[faceI]*uTau[faceI]*y[faceI]; - scalar B = qDot[faceI]*Pr[faceI]*yPlus[faceI]; - scalar C = Pr[faceI]*0.5*rhow[faceI]*uTau[faceI]*sqr(magUp[faceI]); + scalar A = qDot[facei]*rhow[facei]*uTau[facei]*y[facei]; + scalar B = qDot[facei]*Pr[facei]*yPlus[facei]; + scalar C = Pr[facei]*0.5*rhow[facei]*uTau[facei]*sqr(magUp[facei]); alphaEff = A/(B + C + VSMALL); } else { - scalar A = qDot[faceI]*rhow[faceI]*uTau[faceI]*y[faceI]; + scalar A = qDot[facei]*rhow[facei]*uTau[facei]*y[facei]; scalar B = - qDot[faceI]*Prt_*(1.0/kappa_*log(E_*yPlus[faceI]) + P[faceI]); + qDot[facei]*Prt_*(1.0/kappa_*log(E_*yPlus[facei]) + P[facei]); scalar magUc = - uTau[faceI]/kappa_*log(E_*yPlusTherm[faceI]) - mag(Uw[faceI]); + uTau[facei]/kappa_*log(E_*yPlusTherm[facei]) - mag(Uw[facei]); scalar C = - 0.5*rhow[faceI]*uTau[faceI] - *(Prt_*sqr(magUp[faceI]) + (Pr[faceI] - Prt_)*sqr(magUc)); + 0.5*rhow[facei]*uTau[facei] + *(Prt_*sqr(magUp[facei]) + (Pr[facei] - Prt_)*sqr(magUc)); alphaEff = A/(B + C + VSMALL); } // Update convective heat transfer turbulent thermal diffusivity - alphatConv[faceI] = max(0.0, alphaEff - alphaw[faceI]); + alphatConv[facei] = max(0.0, alphaEff - alphaw[facei]); } return talphatConv; diff --git a/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C b/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C index 940bc871abb1095b4ca24149526fdf7ca1097a4b..c388a0b221ea8c06a312baee1e1eec62b6409e47 100644 --- a/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C +++ b/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.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,9 +88,9 @@ int main(int argc, char *argv[]) dimensionedScalar("aggomeration", dimless, 0.0) ); scalarField& fld = scalarAgglomeration.internalField(); - forAll(fld, cellI) + forAll(fld, celli) { - fld[cellI] = cellToCoarse[cellI]; + fld[celli] = cellToCoarse[celli]; } fld /= max(fld); scalarAgglomeration.correctBoundaryConditions(); @@ -167,9 +167,9 @@ int main(int argc, char *argv[]) dimensionedScalar("aggomeration", dimless, 0.0) ); scalarField& fld = scalarAgglomeration.internalField(); - forAll(fld, cellI) + forAll(fld, celli) { - fld[cellI] = cellToCoarse[cellI]; + fld[celli] = cellToCoarse[celli]; } if (normalise) { @@ -185,9 +185,9 @@ int main(int argc, char *argv[]) label vertI = 0; // Write all mesh cc - forAll(mesh.cellCentres(), cellI) + forAll(mesh.cellCentres(), celli) { - meshTools::writeOBJ(str, mesh.cellCentres()[cellI]); + meshTools::writeOBJ(str, mesh.cellCentres()[celli]); vertI++; } @@ -205,9 +205,9 @@ int main(int argc, char *argv[]) forAll(cellLabels, i) { - label cellI = cellLabels[i]; + label celli = cellLabels[i]; - str << "l " << cellI+1 << ' ' << vertI << nl; + str << "l " << celli+1 << ' ' << vertI << nl; } } } diff --git a/applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C b/applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C index 2e5bcbc36cfab313ca8b178067231e555bf4b817..3dbe981b1baf77ba7c89cb44c76cb05a1863a6c1 100644 --- a/applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C +++ b/applications/test/PatchEdgeFaceWave/Test-PatchEdgeFaceWave.C @@ -114,9 +114,9 @@ int main(int argc, char *argv[]) dimensionedScalar("patchDist", dimLength, 0.0) ); scalarField pf(vsf.boundaryField()[patch.index()].size()); - forAll(pf, faceI) + forAll(pf, facei) { - pf[faceI] = Foam::sqrt(allFaceInfo[faceI].distSqr()); + pf[facei] = Foam::sqrt(allFaceInfo[facei].distSqr()); } vsf.boundaryFieldRef()[patch.index()] = pf; diff --git a/applications/test/PatchTools/Test-PatchTools.C b/applications/test/PatchTools/Test-PatchTools.C index ec193ec3f587872fd9f0e83d7fc7d9c1449e1a85..65ba97362011ccd386ce901690076e319756148e 100644 --- a/applications/test/PatchTools/Test-PatchTools.C +++ b/applications/test/PatchTools/Test-PatchTools.C @@ -72,10 +72,10 @@ using namespace Foam; // const faceList& localFaces = p.localFaces(); // const vectorField& faceAreas = mesh.faceAreas(); // -// forAll(localFaces, faceI) +// forAll(localFaces, facei) // { -// const face& f = localFaces[faceI]; -// const vector& n = faceAreas[meshFaces[faceI]]; +// const face& f = localFaces[facei]; +// const vector& n = faceAreas[meshFaces[facei]]; // forAll(f, fp) // { // extrudeN[f[fp]] += n; diff --git a/applications/test/extendedStencil/Test-ExtendedStencil.C b/applications/test/extendedStencil/Test-ExtendedStencil.C index e0e343eed4d479e4de2baccb7b55ab7ff2624a31..6374014b9ecf69cd602407e47a59e197d738b9c2 100644 --- a/applications/test/extendedStencil/Test-ExtendedStencil.C +++ b/applications/test/extendedStencil/Test-ExtendedStencil.C @@ -168,13 +168,13 @@ int main(int argc, char *argv[]) // stencilPoints // ); // -// forAll(stencilPoints, faceI) +// forAll(stencilPoints, facei) // { // writeStencilOBJ // ( -// runTime.path()/"faceEdgeCell" + Foam::name(faceI) + ".obj", -// mesh.faceCentres()[faceI], -// stencilPoints[faceI] +// runTime.path()/"faceEdgeCell" + Foam::name(facei) + ".obj", +// mesh.faceCentres()[facei], +// stencilPoints[facei] // ); // } // } @@ -200,14 +200,14 @@ int main(int argc, char *argv[]) // //{ // // const labelListList& stencil = addressing.stencil(); // // List<List<scalar>> stencilWeights(stencil.size()); -// // forAll(stencil, faceI) +// // forAll(stencil, facei) // // { -// // const labelList& fStencil = stencil[faceI]; +// // const labelList& fStencil = stencil[facei]; // // // // if (fStencil.size() > 0) // // { // // // Uniform weights -// // stencilWeights[faceI] = scalarList +// // stencilWeights[facei] = scalarList // // ( // // fStencil.size(), // // 1.0/fStencil.size() @@ -230,15 +230,15 @@ int main(int argc, char *argv[]) // stencilPoints // ); // -// forAll(stencilPoints, faceI) +// forAll(stencilPoints, facei) // { -// if (stencilPoints[faceI].size() >= 15) +// if (stencilPoints[facei].size() >= 15) // { // writeStencilOBJ // ( -// runTime.path()/"centredFace" + Foam::name(faceI) + ".obj", -// mesh.faceCentres()[faceI], -// stencilPoints[faceI] +// runTime.path()/"centredFace" + Foam::name(facei) + ".obj", +// mesh.faceCentres()[facei], +// stencilPoints[facei] // ); // } // } @@ -267,13 +267,13 @@ int main(int argc, char *argv[]) // // stencilPoints // //); // // -// //forAll(stencilPoints, faceI) +// //forAll(stencilPoints, facei) // //{ // // writeStencilOBJ // // ( -// // runTime.path()/"centredPoint" + Foam::name(faceI) + ".obj", -// // mesh.faceCentres()[faceI], -// // stencilPoints[faceI] +// // runTime.path()/"centredPoint" + Foam::name(facei) + ".obj", +// // mesh.faceCentres()[facei], +// // stencilPoints[facei] // // ); // //} // } @@ -302,13 +302,13 @@ int main(int argc, char *argv[]) // // stencilPoints // //); // // -// //forAll(stencilPoints, faceI) +// //forAll(stencilPoints, facei) // //{ // // writeStencilOBJ // // ( -// // runTime.path()/"centredEdge" + Foam::name(faceI) + ".obj", -// // mesh.faceCentres()[faceI], -// // stencilPoints[faceI] +// // runTime.path()/"centredEdge" + Foam::name(facei) + ".obj", +// // mesh.faceCentres()[facei], +// // stencilPoints[facei] // // ); // //} // } @@ -340,13 +340,13 @@ int main(int argc, char *argv[]) // ownPoints // ); // - // forAll(ownPoints, faceI) + // forAll(ownPoints, facei) // { // writeStencilOBJ // ( - // runTime.path()/"ownFEC" + Foam::name(faceI) + ".obj", - // mesh.faceCentres()[faceI], - // ownPoints[faceI] + // runTime.path()/"ownFEC" + Foam::name(facei) + ".obj", + // mesh.faceCentres()[facei], + // ownPoints[facei] // ); // } // } @@ -361,13 +361,13 @@ int main(int argc, char *argv[]) // neiPoints // ); // - // forAll(neiPoints, faceI) + // forAll(neiPoints, facei) // { // writeStencilOBJ // ( - // runTime.path()/"neiFEC" + Foam::name(faceI) + ".obj", - // mesh.faceCentres()[faceI], - // neiPoints[faceI] + // runTime.path()/"neiFEC" + Foam::name(facei) + ".obj", + // mesh.faceCentres()[facei], + // neiPoints[facei] // ); // } // } @@ -400,13 +400,13 @@ int main(int argc, char *argv[]) // ownPoints // ); // - // forAll(ownPoints, faceI) + // forAll(ownPoints, facei) // { // writeStencilOBJ // ( - // runTime.path()/"ownCFC" + Foam::name(faceI) + ".obj", - // mesh.faceCentres()[faceI], - // ownPoints[faceI] + // runTime.path()/"ownCFC" + Foam::name(facei) + ".obj", + // mesh.faceCentres()[facei], + // ownPoints[facei] // ); // } // } @@ -421,13 +421,13 @@ int main(int argc, char *argv[]) // neiPoints // ); // - // forAll(neiPoints, faceI) + // forAll(neiPoints, facei) // { // writeStencilOBJ // ( - // runTime.path()/"neiCFC" + Foam::name(faceI) + ".obj", - // mesh.faceCentres()[faceI], - // neiPoints[faceI] + // runTime.path()/"neiCFC" + Foam::name(facei) + ".obj", + // mesh.faceCentres()[facei], + // neiPoints[facei] // ); // } // } @@ -458,13 +458,13 @@ int main(int argc, char *argv[]) stencilPoints ); - forAll(stencilPoints, cellI) + forAll(stencilPoints, celli) { writeStencilOBJ ( - runTime.path()/"centredCECCell" + Foam::name(cellI) + ".obj", - mesh.cellCentres()[cellI], - stencilPoints[cellI] + runTime.path()/"centredCECCell" + Foam::name(celli) + ".obj", + mesh.cellCentres()[celli], + stencilPoints[celli] ); } } @@ -486,13 +486,13 @@ int main(int argc, char *argv[]) stencilPoints ); - forAll(stencilPoints, cellI) + forAll(stencilPoints, celli) { writeStencilOBJ ( - runTime.path()/"centredCPCCell" + Foam::name(cellI) + ".obj", - mesh.cellCentres()[cellI], - stencilPoints[cellI] + runTime.path()/"centredCPCCell" + Foam::name(celli) + ".obj", + mesh.cellCentres()[celli], + stencilPoints[celli] ); } } @@ -514,13 +514,13 @@ int main(int argc, char *argv[]) stencilPoints ); - forAll(stencilPoints, cellI) + forAll(stencilPoints, celli) { writeStencilOBJ ( - runTime.path()/"centredCFCCell" + Foam::name(cellI) + ".obj", - mesh.cellCentres()[cellI], - stencilPoints[cellI] + runTime.path()/"centredCFCCell" + Foam::name(celli) + ".obj", + mesh.cellCentres()[celli], + stencilPoints[celli] ); } } @@ -538,12 +538,12 @@ int main(int argc, char *argv[]) // ); // for (label faci = 0; faci < mesh.nInternalFaces(); faci++) // { -// const scalarList& stData = stencilData[faceI]; -// const scalarList& stWeight = fit[faceI]; +// const scalarList& stData = stencilData[facei]; +// const scalarList& stWeight = fit[facei]; // // forAll(stData, i) // { -// sf[faceI] += stWeight[i]*stData[i]; +// sf[facei] += stWeight[i]*stData[i]; // } // } // See finiteVolume/lnInclude/leastSquaresGrad.C diff --git a/applications/test/extendedStencil/Test-ExtendedStencil2.C b/applications/test/extendedStencil/Test-ExtendedStencil2.C index b1928bc6d2fbc731c90e10ffb094356ec00cd432..8b6e6ac279d7b4e24388735c982cdd9dffe62df1 100644 --- a/applications/test/extendedStencil/Test-ExtendedStencil2.C +++ b/applications/test/extendedStencil/Test-ExtendedStencil2.C @@ -150,9 +150,9 @@ int main(int argc, char *argv[]) List<point> compactFld(map.constructSize(), Zero); // Insert my internal values - forAll(fld, cellI) + forAll(fld, celli) { - compactFld[cellI] = fld[cellI]; + compactFld[celli] = fld[celli]; } // Insert my boundary values label nCompact = fld.size(); @@ -172,27 +172,27 @@ int main(int argc, char *argv[]) // 2. Pull to stencil stencilPoints.setSize(stencil.size()); - forAll(stencil, cellI) + forAll(stencil, celli) { - const labelList& compactCells = stencil[cellI]; + const labelList& compactCells = stencil[celli]; - stencilPoints[cellI].setSize(compactCells.size()); + stencilPoints[celli].setSize(compactCells.size()); forAll(compactCells, i) { - stencilPoints[cellI][i] = compactFld[compactCells[i]]; + stencilPoints[celli][i] = compactFld[compactCells[i]]; } } } - forAll(stencilPoints, cellI) + forAll(stencilPoints, celli) { writeStencilOBJ ( - runTime.path()/"centredCell" + Foam::name(cellI) + ".obj", - mesh.cellCentres()[cellI], - stencilPoints[cellI] + runTime.path()/"centredCell" + Foam::name(celli) + ".obj", + mesh.cellCentres()[celli], + stencilPoints[celli] ); } } diff --git a/applications/test/globalIndex/Test-globalIndex.C b/applications/test/globalIndex/Test-globalIndex.C index 0de4f04b3c37a2c54bbd6ba6e2431f0349779b3f..0a93b9756cbf5f90f825162ddee771d6152a4ed5 100644 --- a/applications/test/globalIndex/Test-globalIndex.C +++ b/applications/test/globalIndex/Test-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 @@ -66,26 +66,26 @@ int main(int argc, char *argv[]) } // convert from local to global and back. - for (label cellI = 0; cellI < mesh.nCells(); cellI++) + 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); - if (procI != Pstream::myProcNo() || localCellI != cellI) + if (procI != Pstream::myProcNo() || localCellI != celli) { FatalErrorInFunction - << "Problem. cellI:" << cellI << " localCellI:" << localCellI + << "Problem. celli:" << celli << " localCellI:" << localCellI << " procI:" << procI << abort(FatalError); } if (!globalNumbering.isLocal(globalCellI)) { FatalErrorInFunction - << "Problem. cellI:" << cellI << " globalCellI:" << globalCellI + << "Problem. celli:" << celli << " globalCellI:" << globalCellI << " not local" << abort(FatalError); } } diff --git a/applications/test/momentOfInertia/Test-momentOfInertia.C b/applications/test/momentOfInertia/Test-momentOfInertia.C index 726454e3a14447a130ec3de6f0b3b73bd2331f99..5abba3d382a4e58894c60905a654f8e27c9488bd 100644 --- a/applications/test/momentOfInertia/Test-momentOfInertia.C +++ b/applications/test/momentOfInertia/Test-momentOfInertia.C @@ -196,16 +196,16 @@ int main(int argc, char *argv[]) } { - const label cellI = args.optionLookupOrDefault("cell", 0); + const label celli = args.optionLookupOrDefault("cell", 0); tensorField mI(momentOfInertia::meshInertia(mesh)); - tensor& J = mI[cellI]; + tensor& J = mI[celli]; vector eVal = eigenValues(J); Info<< nl - << "Inertia tensor of cell " << cellI << " " << J << nl + << "Inertia tensor of cell " << celli << " " << J << nl << "eigenValues (principal moments) " << eVal << endl; J /= cmptMax(eVal); @@ -215,16 +215,16 @@ int main(int argc, char *argv[]) Info<< "eigenVectors (principal axes, from normalised inertia) " << eVec << endl; - OFstream str("cell_" + name(cellI) + "_inertia.obj"); + OFstream str("cell_" + name(celli) + "_inertia.obj"); - Info<< nl << "Writing scaled principal axes of cell " << cellI << " to " + Info<< nl << "Writing scaled principal axes of cell " << celli << " to " << str.name() << endl; - const point& cC = mesh.cellCentres()[cellI]; + const point& cC = mesh.cellCentres()[celli]; scalar scale = mag ( - (cC - mesh.faceCentres()[mesh.cells()[cellI][0]]) + (cC - mesh.faceCentres()[mesh.cells()[celli][0]]) /eVal.component(findMin(eVal)) ); diff --git a/applications/test/patchRegion/Test-patchRegion.C b/applications/test/patchRegion/Test-patchRegion.C index d25573fe76201b5eb3d9549502be47fc920392ab..44099ec8a6fb6526e2c95200c6ec292144c6ad7f 100644 --- a/applications/test/patchRegion/Test-patchRegion.C +++ b/applications/test/patchRegion/Test-patchRegion.C @@ -76,11 +76,11 @@ int main(int argc, char *argv[]) DynamicList<label> changedEdges(4*patch.size()); DynamicList<patchEdgeFaceRegions> changedInfo(changedEdges.size()); - forAll(patch, faceI) + forAll(patch, facei) { - const labelList& fEdges = patch.faceEdges()[faceI]; + const labelList& fEdges = patch.faceEdges()[facei]; - label globalFaceI = globalNumbering.toGlobal(faceI); + label globalFaceI = globalNumbering.toGlobal(facei); forAll(fEdges, i) { @@ -117,13 +117,13 @@ int main(int argc, char *argv[]) { labelList currentRegion(patch.nPoints(), -1); - forAll(patch.localFaces(), faceI) + forAll(patch.localFaces(), facei) { - const face& f = patch.localFaces()[faceI]; + const face& f = patch.localFaces()[facei]; forAll(f, fp) { - label faceRegion = allFaceInfo[faceI].regions()[fp]; + label faceRegion = allFaceInfo[facei].regions()[fp]; label pointI = f[fp]; diff --git a/applications/test/primitivePatch/Test-PrimitivePatch.C b/applications/test/primitivePatch/Test-PrimitivePatch.C index c575782f4cf25c06f727bbd8a2e40e2dadae4ae0..549dbbababe7d18fef444f2f3304409b9dfb5495 100644 --- a/applications/test/primitivePatch/Test-PrimitivePatch.C +++ b/applications/test/primitivePatch/Test-PrimitivePatch.C @@ -59,11 +59,11 @@ void checkFaceEdges const labelListList& faceEdges ) { - forAll(faceEdges, faceI) + forAll(faceEdges, facei) { - const face& f = localFaces[faceI]; + const face& f = localFaces[facei]; - const labelList& myEdges = faceEdges[faceI]; + const labelList& myEdges = faceEdges[facei]; forAll(f, fp) { @@ -73,7 +73,7 @@ void checkFaceEdges { FatalErrorInFunction << "Edges of face not in face point order:" - << "face:" << faceI << " localF:" << f + << "face:" << facei << " localF:" << f << " faceEdges:" << myEdges << abort(FatalError); } @@ -130,9 +130,9 @@ void writeFaceEdges writeObj(feStream, localPoints); - forAll(faceEdges, faceI) + forAll(faceEdges, facei) { - const labelList& myEdges = faceEdges[faceI]; + const labelList& myEdges = faceEdges[facei]; forAll(myEdges, i) { @@ -158,9 +158,9 @@ void writeEdgeFaces pointField ctrs(localFaces.size(), Zero); - forAll(localFaces, faceI) + forAll(localFaces, facei) { - ctrs[faceI] = localFaces[faceI].centre(localPoints); + ctrs[facei] = localFaces[facei].centre(localPoints); } writeObj(efStream, ctrs); @@ -190,19 +190,19 @@ void writeFaceFaces pointField ctrs(localFaces.size(), Zero); - forAll(localFaces, faceI) + forAll(localFaces, facei) { - ctrs[faceI] = localFaces[faceI].centre(localPoints); + ctrs[facei] = localFaces[facei].centre(localPoints); } writeObj(ffStream, ctrs); - forAll(faceFaces, faceI) + forAll(faceFaces, facei) { - const labelList& nbrs = faceFaces[faceI]; + const labelList& nbrs = faceFaces[facei]; forAll(nbrs, nbI) { - ffStream << "l " << faceI+1 << ' ' << nbrs[nbI]+1 << endl; + ffStream << "l " << facei+1 << ' ' << nbrs[nbI]+1 << endl; } } } diff --git a/applications/test/syncTools/Test-syncTools.C b/applications/test/syncTools/Test-syncTools.C index f9a77643844c31a5948f746407c9b72728784cd8..b5984a521541613034a60e9500323d4ba7e65840 100644 --- a/applications/test/syncTools/Test-syncTools.C +++ b/applications/test/syncTools/Test-syncTools.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 @@ -141,15 +141,15 @@ void testPackedList(const polyMesh& mesh, Random& rndGen) { PackedList<3> bits(mesh.nFaces()); - forAll(bits, faceI) + forAll(bits, facei) { - bits.set(faceI, rndGen.integer(0,3)); + bits.set(facei, rndGen.integer(0,3)); } labelList faceValues(mesh.nFaces()); - forAll(bits, faceI) + forAll(bits, facei) { - faceValues[faceI] = bits.get(faceI); + faceValues[facei] = bits.get(facei); } PackedList<3> maxBits(bits); @@ -161,20 +161,20 @@ void testPackedList(const polyMesh& mesh, Random& rndGen) syncTools::syncFaceList(mesh, maxBits, maxEqOp<unsigned int>()); syncTools::syncFaceList(mesh, maxFaceValues, maxEqOp<label>()); - forAll(bits, faceI) + forAll(bits, facei) { if ( - faceValues[faceI] != label(bits.get(faceI)) - || maxFaceValues[faceI] != label(maxBits.get(faceI)) + faceValues[facei] != label(bits.get(facei)) + || maxFaceValues[facei] != label(maxBits.get(facei)) ) { FatalErrorInFunction - << "face:" << faceI - << " minlabel:" << faceValues[faceI] - << " minbits:" << bits.get(faceI) - << " maxLabel:" << maxFaceValues[faceI] - << " maxBits:" << maxBits.get(faceI) + << "face:" << facei + << " minlabel:" << faceValues[facei] + << " minbits:" << bits.get(facei) + << " maxLabel:" << maxFaceValues[facei] + << " maxBits:" << maxBits.get(facei) << exit(FatalError); } } @@ -532,14 +532,14 @@ void testFaceSync(const polyMesh& mesh, Random& rndGen) maxMagSqrEqOp<point>() ); - forAll(syncedFc, faceI) + forAll(syncedFc, facei) { - if (mag(syncedFc[faceI] - mesh.faceCentres()[faceI]) > SMALL) + if (mag(syncedFc[facei] - mesh.faceCentres()[facei]) > SMALL) { FatalErrorInFunction - << "Face " << faceI - << " original centre " << mesh.faceCentres()[faceI] - << " synced centre " << syncedFc[faceI] + << "Face " << facei + << " original centre " << mesh.faceCentres()[facei] + << " synced centre " << syncedFc[facei] << exit(FatalError); } } @@ -552,11 +552,11 @@ void testFaceSync(const polyMesh& mesh, Random& rndGen) PackedBoolList isMasterFace(syncTools::getMasterFaces(mesh)); - forAll(isMasterFace, faceI) + forAll(isMasterFace, facei) { - if (isMasterFace[faceI]) + if (isMasterFace[facei]) { - nMasters[faceI] = 1; + nMasters[facei] = 1; } } @@ -567,14 +567,14 @@ void testFaceSync(const polyMesh& mesh, Random& rndGen) plusEqOp<label>() ); - forAll(nMasters, faceI) + forAll(nMasters, facei) { - if (nMasters[faceI] != 1) + if (nMasters[facei] != 1) { FatalErrorInFunction - << "Face " << faceI - << " centre " << mesh.faceCentres()[faceI] - << " has " << nMasters[faceI] + << "Face " << facei + << " centre " << mesh.faceCentres()[facei] + << " has " << nMasters[facei] << " masters." << exit(FatalError); } diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C index c6b184c231dc4122c530ad746a4499ec6b525eb0..fe03257a591477a41a17677982d330b3b3b1fbee 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C @@ -68,7 +68,7 @@ void modifyOrAddFace ( polyTopoChange& meshMod, const face& f, - const label faceI, + const label facei, const label own, const bool flipFaceFlux, const label newPatchI, @@ -78,7 +78,7 @@ void modifyOrAddFace PackedBoolList& modifiedFace ) { - if (!modifiedFace[faceI]) + if (!modifiedFace[facei]) { // First usage of face. Modify. meshMod.setAction @@ -86,7 +86,7 @@ void modifyOrAddFace polyModifyFace ( f, // modified face - faceI, // label of face + facei, // label of face own, // owner -1, // neighbour flipFaceFlux, // face flip @@ -96,7 +96,7 @@ void modifyOrAddFace zoneFlip // face flip in zone ) ); - modifiedFace[faceI] = 1; + modifiedFace[facei] = 1; } else { @@ -110,7 +110,7 @@ void modifyOrAddFace -1, // neighbour -1, // master point -1, // master edge - faceI, // master face + facei, // master face flipFaceFlux, // face flip newPatchI, // patch for face zoneID, // zone for face @@ -321,18 +321,18 @@ void createCoupledBaffles { const faceZoneMesh& faceZones = mesh.faceZones(); - forAll(coupledWantedPatch, faceI) + forAll(coupledWantedPatch, facei) { - if (coupledWantedPatch[faceI] != -1) + if (coupledWantedPatch[facei] != -1) { - const face& f = mesh.faces()[faceI]; - label zoneID = faceZones.whichZone(faceI); + const face& f = mesh.faces()[facei]; + label zoneID = faceZones.whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = faceZones[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } // Use owner side of face @@ -340,34 +340,34 @@ void createCoupledBaffles ( meshMod, f, // modified face - faceI, // label of face - mesh.faceOwner()[faceI], // owner + facei, // label of face + mesh.faceOwner()[facei], // owner false, // face flip - coupledWantedPatch[faceI], // patch for face + coupledWantedPatch[facei], // patch for face zoneID, // zone for face zoneFlip, // face flip in zone modifiedFace // modify or add status ); - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - label zoneID = faceZones.whichZone(faceI); + label zoneID = faceZones.whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = faceZones[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } // Use neighbour side of face modifyOrAddFace ( meshMod, f.reverseFace(), // modified face - faceI, // label of face - mesh.faceNeighbour()[faceI],// owner + facei, // label of face + mesh.faceNeighbour()[facei],// owner false, // face flip - coupledWantedPatch[faceI], // patch for face + coupledWantedPatch[facei], // patch for face zoneID, // zone for face zoneFlip, // face flip in zone modifiedFace // modify or add status @@ -389,29 +389,29 @@ void createCyclicCoupledBaffles { const faceZoneMesh& faceZones = mesh.faceZones(); - forAll(cyclicMasterPatch, faceI) + forAll(cyclicMasterPatch, facei) { - if (cyclicMasterPatch[faceI] != -1) + if (cyclicMasterPatch[facei] != -1) { - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; - label zoneID = faceZones.whichZone(faceI); + label zoneID = faceZones.whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = faceZones[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } modifyOrAddFace ( meshMod, f.reverseFace(), // modified face - faceI, // label of face - mesh.faceNeighbour()[faceI], // owner + facei, // label of face + mesh.faceNeighbour()[facei], // owner false, // face flip - cyclicMasterPatch[faceI], // patch for face + cyclicMasterPatch[facei], // patch for face zoneID, // zone for face zoneFlip, // face flip in zone modifiedFace // modify or add @@ -419,30 +419,30 @@ void createCyclicCoupledBaffles } } - forAll(cyclicSlavePatch, faceI) + forAll(cyclicSlavePatch, facei) { - if (cyclicSlavePatch[faceI] != -1) + if (cyclicSlavePatch[facei] != -1) { - const face& f = mesh.faces()[faceI]; - if (mesh.isInternalFace(faceI)) + const face& f = mesh.faces()[facei]; + if (mesh.isInternalFace(facei)) { - label zoneID = faceZones.whichZone(faceI); + label zoneID = faceZones.whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = faceZones[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } // Use owner side of face modifyOrAddFace ( meshMod, f, // modified face - faceI, // label of face - mesh.faceOwner()[faceI], // owner + facei, // label of face + mesh.faceOwner()[facei], // owner false, // face flip - cyclicSlavePatch[faceI], // patch for face + cyclicSlavePatch[facei], // patch for face zoneID, // zone for face zoneFlip, // face flip in zone modifiedFace // modify or add status @@ -462,19 +462,19 @@ void createBaffles { const faceZoneMesh& faceZones = mesh.faceZones(); Info << "faceZone:createBaffle " << faceZones << endl; - forAll(wantedPatch, faceI) + forAll(wantedPatch, facei) { - if (wantedPatch[faceI] != -1) + if (wantedPatch[facei] != -1) { - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; - label zoneID = faceZones.whichZone(faceI); + label zoneID = faceZones.whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = faceZones[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } meshMod.setAction @@ -482,26 +482,26 @@ void createBaffles polyModifyFace ( f, // modified face - faceI, // label of face - mesh.faceOwner()[faceI], // owner + facei, // label of face + mesh.faceOwner()[facei], // owner -1, // neighbour false, // face flip - wantedPatch[faceI], // patch for face + wantedPatch[facei], // patch for face false, // remove from zone zoneID, // zone for face zoneFlip // face flip in zone ) ); - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - label zoneID = faceZones.whichZone(faceI); + label zoneID = faceZones.whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = faceZones[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } meshMod.setAction @@ -509,13 +509,13 @@ void createBaffles polyAddFace ( f.reverseFace(), // modified face - mesh.faceNeighbour()[faceI],// owner + mesh.faceNeighbour()[facei],// owner -1, // neighbour -1, // masterPointID -1, // masterEdgeID - faceI, // masterFaceID, + facei, // masterFaceID, false, // face flip - wantedPatch[faceI], // patch for face + wantedPatch[facei], // patch for face zoneID, // zone for face zoneFlip // face flip in zone ) diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C b/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C index 84bdceac5841dec0dedb6a404b496c40c439f10d..98a15db2a4cf24abb66e72e827c8a6c0cf11adee 100644 --- a/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C +++ b/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C @@ -299,20 +299,20 @@ void addCutNeighbours forAllConstIter(labelHashSet, cutCells, iter) { - const label cellI = iter.key(); - const labelList& cFaces = mesh.cells()[cellI]; + const label celli = iter.key(); + const labelList& cFaces = mesh.cells()[celli]; forAll(cFaces, i) { - const label faceI = cFaces[i]; + const label facei = cFaces[i]; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - label nbr = mesh.faceOwner()[faceI]; + label nbr = mesh.faceOwner()[facei]; - if (nbr == cellI) + if (nbr == celli) { - nbr = mesh.faceNeighbour()[faceI]; + nbr = mesh.faceNeighbour()[facei]; } if (selectInside && inside.found(nbr)) @@ -351,11 +351,11 @@ bool limitRefinementLevel ) { // Do simple check on validity of refinement level. - forAll(refLevel, cellI) + forAll(refLevel, celli) { - if (!excludeCells.found(cellI)) + if (!excludeCells.found(celli)) { - const labelList& cCells = mesh.cellCells()[cellI]; + const labelList& cCells = mesh.cellCells()[celli]; forAll(cCells, i) { @@ -363,13 +363,13 @@ bool limitRefinementLevel if (!excludeCells.found(nbr)) { - if (refLevel[cellI] - refLevel[nbr] >= limitDiff) + if (refLevel[celli] - refLevel[nbr] >= limitDiff) { FatalErrorInFunction << "Level difference between neighbouring cells " - << cellI << " and " << nbr + << celli << " and " << nbr << " greater than or equal to " << limitDiff << endl - << "refLevels:" << refLevel[cellI] << ' ' + << "refLevels:" << refLevel[celli] << ' ' << refLevel[nbr] << abort(FatalError); } } @@ -382,9 +382,9 @@ bool limitRefinementLevel forAllConstIter(labelHashSet, cutCells, iter) { - // cellI will be refined. - const label cellI = iter.key(); - const labelList& cCells = mesh.cellCells()[cellI]; + // celli will be refined. + const label celli = iter.key(); + const labelList& cCells = mesh.cellCells()[celli]; forAll(cCells, i) { @@ -392,7 +392,7 @@ bool limitRefinementLevel if (!excludeCells.found(nbr) && !cutCells.found(nbr)) { - if (refLevel[cellI] + 1 - refLevel[nbr] >= limitDiff) + if (refLevel[celli] + 1 - refLevel[nbr] >= limitDiff) { addCutCells.insert(nbr); } @@ -451,9 +451,9 @@ void doRefinement refLevel.setSize(mesh.nCells()); - for (label cellI = oldCells; cellI < mesh.nCells(); cellI++) + for (label celli = oldCells; celli < mesh.nCells(); celli++) { - refLevel[cellI] = 0; + refLevel[celli] = 0; } const labelListList& addedCells = multiRef.addedCells(); diff --git a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C index 46954c120ce46d3b1ccc54a9accb6bcfaa1e1e7f..1ad700d8d9dc1d100800d6d8d31f9f120648bdec 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C +++ b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.C @@ -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 @@ -46,7 +46,7 @@ defineTypeNameAndDebug(cellSplitter, 0); void Foam::cellSplitter::getFaceInfo ( - const label faceI, + const label facei, label& patchID, label& zoneID, label& zoneFlip @@ -54,12 +54,12 @@ void Foam::cellSplitter::getFaceInfo { patchID = -1; - if (!mesh_.isInternalFace(faceI)) + if (!mesh_.isInternalFace(facei)) { - patchID = mesh_.boundaryMesh().whichPatch(faceI); + patchID = mesh_.boundaryMesh().whichPatch(facei); } - zoneID = mesh_.faceZones().whichZone(faceI); + zoneID = mesh_.faceZones().whichZone(facei); zoneFlip = false; @@ -67,20 +67,20 @@ void Foam::cellSplitter::getFaceInfo { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } } -// Find the new owner of faceI (since the original cell has been split into +// Find the new owner of facei (since the original cell has been split into // newCells Foam::label Foam::cellSplitter::newOwner ( - const label faceI, + const label facei, const Map<labelList>& cellToCells ) const { - label oldOwn = mesh_.faceOwner()[faceI]; + label oldOwn = mesh_.faceOwner()[facei]; Map<labelList>::const_iterator fnd = cellToCells.find(oldOwn); @@ -97,18 +97,18 @@ Foam::label Foam::cellSplitter::newOwner const cell& cFaces = mesh_.cells()[oldOwn]; - return newCells[findIndex(cFaces, faceI)]; + return newCells[findIndex(cFaces, facei)]; } } Foam::label Foam::cellSplitter::newNeighbour ( - const label faceI, + const label facei, const Map<labelList>& cellToCells ) const { - label oldNbr = mesh_.faceNeighbour()[faceI]; + label oldNbr = mesh_.faceNeighbour()[facei]; Map<labelList>::const_iterator fnd = cellToCells.find(oldNbr); @@ -125,7 +125,7 @@ Foam::label Foam::cellSplitter::newNeighbour const cell& cFaces = mesh_.cells()[oldNbr]; - return newCells[findIndex(cFaces, faceI)]; + return newCells[findIndex(cFaces, facei)]; } } @@ -164,9 +164,9 @@ void Foam::cellSplitter::setRefinement forAllConstIter(Map<point>, cellToMidPoint, iter) { - label cellI = iter.key(); + label celli = iter.key(); - label anchorPoint = mesh_.cellPoints()[cellI][0]; + label anchorPoint = mesh_.cellPoints()[celli][0]; label addedPointI = meshMod.setAction @@ -179,11 +179,11 @@ void Foam::cellSplitter::setRefinement true // supports a cell ) ); - addedPoints_.insert(cellI, addedPointI); + addedPoints_.insert(celli, addedPointI); //Pout<< "Added point " << addedPointI - // << iter() << " in cell " << cellI << " with centre " - // << mesh_.cellCentres()[cellI] << endl; + // << iter() << " in cell " << celli << " with centre " + // << mesh_.cellCentres()[celli] << endl; } @@ -195,15 +195,15 @@ void Foam::cellSplitter::setRefinement forAllConstIter(Map<point>, cellToMidPoint, iter) { - label cellI = iter.key(); + label celli = iter.key(); - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; // Cells created for this cell. labelList newCells(cFaces.size()); // First pyramid is the original cell - newCells[0] = cellI; + newCells[0] = celli; // Add other pyramids for (label i = 1; i < cFaces.size(); i++) @@ -216,7 +216,7 @@ void Foam::cellSplitter::setRefinement -1, // master point -1, // master edge -1, // master face - cellI, // master cell + celli, // master cell -1 // zone ) ); @@ -224,10 +224,10 @@ void Foam::cellSplitter::setRefinement newCells[i] = addedCellI; } - cellToCells.insert(cellI, newCells); + cellToCells.insert(celli, newCells); - //Pout<< "Split cell " << cellI - // << " with centre " << mesh_.cellCentres()[cellI] << nl + //Pout<< "Split cell " << celli + // << " with centre " << mesh_.cellCentres()[celli] << nl // << " faces:" << cFaces << nl // << " into :" << newCells << endl; } @@ -240,13 +240,13 @@ void Foam::cellSplitter::setRefinement forAllConstIter(Map<point>, cellToMidPoint, iter) { - label cellI = iter.key(); + label celli = iter.key(); - label midPointI = addedPoints_[cellI]; + label midPointI = addedPoints_[celli]; - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; - const labelList& cEdges = mesh_.cellEdges()[cellI]; + const labelList& cEdges = mesh_.cellEdges()[celli]; forAll(cEdges, i) { @@ -255,11 +255,11 @@ void Foam::cellSplitter::setRefinement // Get the faces on the cell using the edge label face0, face1; - meshTools::getEdgeFaces(mesh_, cellI, edgeI, face0, face1); + meshTools::getEdgeFaces(mesh_, celli, edgeI, face0, face1); // Get the cells on both sides of the face by indexing into cFaces. // (since newly created cells are stored in cFaces order) - const labelList& newCells = cellToCells[cellI]; + const labelList& newCells = cellToCells[celli]; label cell0 = newCells[findIndex(cFaces, face0)]; label cell1 = newCells[findIndex(cFaces, face1)]; @@ -267,7 +267,7 @@ void Foam::cellSplitter::setRefinement if (cell0 < cell1) { // Construct face to midpoint that is pointing away from - // (pyramid split off from) cellI + // (pyramid split off from) celli const face& f0 = mesh_.faces()[face0]; @@ -275,10 +275,10 @@ void Foam::cellSplitter::setRefinement bool edgeInFaceOrder = (f0[f0.fcIndex(index)] == e[1]); - // Check if cellI is the face owner + // Check if celli is the face owner face newF(3); - if (edgeInFaceOrder == (mesh_.faceOwner()[face0] == cellI)) + if (edgeInFaceOrder == (mesh_.faceOwner()[face0] == celli)) { // edge used in face order. newF[0] = e[1]; @@ -313,7 +313,7 @@ void Foam::cellSplitter::setRefinement else { // Construct face to midpoint that is pointing away from - // (pyramid split off from) cellI + // (pyramid split off from) celli const face& f1 = mesh_.faces()[face1]; @@ -321,10 +321,10 @@ void Foam::cellSplitter::setRefinement bool edgeInFaceOrder = (f1[f1.fcIndex(index)] == e[1]); - // Check if cellI is the face owner + // Check if celli is the face owner face newF(3); - if (edgeInFaceOrder == (mesh_.faceOwner()[face1] == cellI)) + if (edgeInFaceOrder == (mesh_.faceOwner()[face1] == celli)) { // edge used in face order. newF[0] = e[1]; @@ -370,28 +370,28 @@ void Foam::cellSplitter::setRefinement forAllConstIter(Map<point>, cellToMidPoint, iter) { - label cellI = iter.key(); + label celli = iter.key(); - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - faceUpToDate[faceI] = false; + faceUpToDate[facei] = false; } } - forAll(faceUpToDate, faceI) + forAll(faceUpToDate, facei) { - if (!faceUpToDate[faceI]) + if (!faceUpToDate[facei]) { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label newOwn = newOwner(faceI, cellToCells); - label newNbr = newNeighbour(faceI, cellToCells); + label newOwn = newOwner(facei, cellToCells); + label newNbr = newNeighbour(facei, cellToCells); if (newOwn < newNbr) { @@ -400,7 +400,7 @@ void Foam::cellSplitter::setRefinement polyModifyFace ( f, - faceI, + facei, newOwn, // owner newNbr, // neighbour false, // flux flip @@ -418,7 +418,7 @@ void Foam::cellSplitter::setRefinement polyModifyFace ( f.reverseFace(), - faceI, + facei, newNbr, // owner newOwn, // neighbour false, // flux flip @@ -433,17 +433,17 @@ void Foam::cellSplitter::setRefinement } else { - label newOwn = newOwner(faceI, cellToCells); + label newOwn = newOwner(facei, cellToCells); label patchID, zoneID, zoneFlip; - getFaceInfo(faceI, patchID, zoneID, zoneFlip); + getFaceInfo(facei, patchID, zoneID, zoneFlip); meshMod.setAction ( polyModifyFace ( - mesh_.faces()[faceI], - faceI, + mesh_.faces()[facei], + facei, newOwn, // owner -1, // neighbour false, // flux flip @@ -455,7 +455,7 @@ void Foam::cellSplitter::setRefinement ); } - faceUpToDate[faceI] = true; + faceUpToDate[facei] = true; } } } diff --git a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.H b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.H index 43bb29addc901b9f38aac76fd7b4677014c0e5e2..cf7df6963b0e76c61da291fe0349ed76e57c33c0 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.H +++ b/applications/utilities/mesh/advanced/modifyMesh/cellSplitter.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 @@ -71,7 +71,7 @@ class cellSplitter //- Get patch and zone info for face void getFaceInfo ( - const label faceI, + const label facei, label& patchID, label& zoneID, label& zoneFlip @@ -80,14 +80,14 @@ class cellSplitter //- Find the new owner (if any) of the face. label newOwner ( - const label faceI, + const label facei, const Map<labelList>& cellToCells ) const; //- Find the new neighbour (if any) of the face. label newNeighbour ( - const label faceI, + const label facei, const Map<labelList>& cellToCells ) const; diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index 766cd6a6e5ec5d20b4fa6e0f710cb1671dd01c24..5792f825a79311717ae5f8c8d89d83e0bd7f7698 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C @@ -279,13 +279,13 @@ label findFace // Find cell with cell centre close to given point. label findCell(const primitiveMesh& mesh, const point& nearPoint) { - label cellI = mesh.findCell(nearPoint); + label celli = mesh.findCell(nearPoint); - if (cellI != -1) + if (celli != -1) { - scalar distToCcSqr = magSqr(nearPoint - mesh.cellCentres()[cellI]); + scalar distToCcSqr = magSqr(nearPoint - mesh.cellCentres()[celli]); - const labelList& cPoints = mesh.cellPoints()[cellI]; + const labelList& cPoints = mesh.cellPoints()[celli]; label minI = -1; scalar minDistSqr = GREAT; @@ -305,9 +305,9 @@ label findCell(const primitiveMesh& mesh, const point& nearPoint) // Decide if nearPoint unique enough. Info<< "Found to point " << nearPoint << nl - << " nearest cell : " << cellI + << " nearest cell : " << celli << " distance " << Foam::sqrt(distToCcSqr) - << " to cell centre " << mesh.cellCentres()[cellI] << nl + << " to cell centre " << mesh.cellCentres()[celli] << nl << " nearest mesh point : " << minI << " distance " << Foam::sqrt(minDistSqr) << " to " << mesh.points()[minI] << nl @@ -318,11 +318,11 @@ label findCell(const primitiveMesh& mesh, const point& nearPoint) Info<< "Mesh point too close to nearest cell centre. Aborting" << endl; - cellI = -1; + celli = -1; } } - return cellI; + return celli; } @@ -470,11 +470,11 @@ int main(int argc, char *argv[]) { const Pair<point>& pts = facesToTriangulate[i]; - label faceI = findFace(mesh, allBoundary, pts.first()); + label facei = findFace(mesh, allBoundary, pts.first()); - if (faceI == -1 || !faceToDecompose.insert(faceI, pts.second())) + if (facei == -1 || !faceToDecompose.insert(facei, pts.second())) { - Info<< "Could not insert mesh face " << faceI + Info<< "Could not insert mesh face " << facei << " for input point " << pts.first() << nl << "Perhaps the face is already marked for splitting?" << endl; @@ -491,11 +491,11 @@ int main(int argc, char *argv[]) { const Pair<point>& pts = cellsToPyramidise[i]; - label cellI = findCell(mesh, pts.first()); + label celli = findCell(mesh, pts.first()); - if (cellI == -1 || !cellToPyrCentre.insert(cellI, pts.second())) + if (celli == -1 || !cellToPyrCentre.insert(celli, pts.second())) { - Info<< "Could not insert mesh cell " << cellI + Info<< "Could not insert mesh cell " << celli << " for input point " << pts.first() << nl << "Perhaps the cell is already marked for splitting?" << endl; diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C index e6e8740576c4faf169ca0725f20187fa00003a13..3cc479da98c55a9994ce97aca035fc52d7aa104a 100644 --- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C +++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C @@ -64,17 +64,17 @@ bool limitRefinementLevel label oldNCells = refCells.size(); - forAll(cellCells, cellI) + forAll(cellCells, celli) { - const labelList& cCells = cellCells[cellI]; + const labelList& cCells = cellCells[celli]; forAll(cCells, i) { - if (refLevel[cCells[i]] > (refLevel[cellI]+1)) + if (refLevel[cCells[i]] > (refLevel[celli]+1)) { // Found neighbour with >=2 difference in refLevel. - refCells.insert(cellI); - refLevel[cellI]++; + refCells.insert(celli); + refLevel[celli]++; break; } } @@ -308,11 +308,11 @@ int main(int argc, char *argv[]) Info<< "Setting field for patch "<< endl; - forAll(bField, faceI) + forAll(bField, facei) { - label own = mesh.faceOwner()[pp.start() + faceI]; + label own = mesh.faceOwner()[pp.start() + facei]; - bField[faceI] = postRefLevel[own]; + bField[facei] = postRefLevel[own]; } } diff --git a/applications/utilities/mesh/advanced/selectCells/selectCells.C b/applications/utilities/mesh/advanced/selectCells/selectCells.C index c71929e500328d52efda742aaa6eeb8d87dd14ce..695da9c1f4fad9444b9d6db061769ae4c45cf3a2 100644 --- a/applications/utilities/mesh/advanced/selectCells/selectCells.C +++ b/applications/utilities/mesh/advanced/selectCells/selectCells.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 @@ -135,41 +135,41 @@ void cutBySurface // Is a bit of a hack but allows us to reuse all the functionality // in cellClassification. - forAll(cellType, cellI) + forAll(cellType, celli) { - label cType = cellType[cellI]; + label cType = cellType[celli]; if (cType == cellClassification::CUT) { if (selectCut) { - cellType[cellI] = MESH; + cellType[celli] = MESH; } else { - cellType[cellI] = NONMESH; + cellType[celli] = NONMESH; } } else if (cType == cellClassification::INSIDE) { if (selectInside) { - cellType[cellI] = MESH; + cellType[celli] = MESH; } else { - cellType[cellI] = NONMESH; + cellType[celli] = NONMESH; } } else if (cType == cellClassification::OUTSIDE) { if (selectOutside) { - cellType[cellI] = MESH; + cellType[celli] = MESH; } else { - cellType[cellI] = NONMESH; + cellType[celli] = NONMESH; } } else @@ -269,27 +269,27 @@ label selectOutsideCells forAll(outsidePts, outsidePtI) { // Find cell containing point. Linear search. - label cellI = queryMesh.findCell(outsidePts[outsidePtI], -1, false); + label celli = queryMesh.findCell(outsidePts[outsidePtI], -1, false); - if (cellI != -1 && cellType[cellI] == MESH) + if (celli != -1 && cellType[celli] == MESH) { - Info<< "Marking cell " << cellI << " containing outside point " - << outsidePts[outsidePtI] << " with type " << cellType[cellI] + Info<< "Marking cell " << celli << " containing outside point " + << outsidePts[outsidePtI] << " with type " << cellType[celli] << " ..." << endl; // // Mark this cell and its faces to start walking from // - // Mark faces of cellI - const labelList& cFaces = mesh.cells()[cellI]; + // Mark faces of celli + const labelList& cFaces = mesh.cells()[celli]; forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (outsideFacesMap.insert(faceI)) + if (outsideFacesMap.insert(facei)) { - outsideFaces.append(faceI); + outsideFaces.append(facei); outsideFacesInfo.append(meshInfo); } } @@ -311,15 +311,15 @@ label selectOutsideCells label nChanged = 0; - forAll(allCellInfo, cellI) + forAll(allCellInfo, celli) { - if (cellType[cellI] == MESH) + if (cellType[celli] == MESH) { // Original cell was selected for meshing. Check if cell was // reached from outsidePoints - if (allCellInfo[cellI].type() != MESH) + if (allCellInfo[celli].type() != MESH) { - cellType[cellI] = NONMESH; + cellType[celli] = NONMESH; nChanged++; } } @@ -390,8 +390,8 @@ int main(int argc, char *argv[]) { const point& outsidePoint = outsidePts[outsideI]; - label cellI = queryMesh.findCell(outsidePoint, -1, false); - if (returnReduce(cellI, maxOp<label>()) == -1) + label celli = queryMesh.findCell(outsidePoint, -1, false); + if (returnReduce(celli, maxOp<label>()) == -1) { FatalErrorInFunction << "outsidePoint " << outsidePoint @@ -428,7 +428,7 @@ int main(int argc, char *argv[]) // Search engine on surface. querySurf.reset(new triSurfaceSearch(surf)); - // Set cellType[cellI] according to relation to surface + // Set cellType[celli] according to relation to surface cutBySurface ( mesh, diff --git a/applications/utilities/mesh/advanced/splitCells/splitCells.C b/applications/utilities/mesh/advanced/splitCells/splitCells.C index 0e1eb5b1e50c9e16facfed97846d454d90bd0ad8..5bb9f63d5f3442130ae2b030544b5f951d9d5980 100644 --- a/applications/utilities/mesh/advanced/splitCells/splitCells.C +++ b/applications/utilities/mesh/advanced/splitCells/splitCells.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 @@ -100,14 +100,14 @@ scalarField pack(const boolList& lst, const scalarField& elems) // Given sin and cos of max angle between normals calculate whether f0 and f1 -// on cellI make larger angle. Uses sinAngle only for quadrant detection. +// on celli make larger angle. Uses sinAngle only for quadrant detection. bool largerAngle ( const primitiveMesh& mesh, const scalar cosAngle, const scalar sinAngle, - const label cellI, + const label celli, const label f0, // face label const label f1, @@ -117,7 +117,7 @@ bool largerAngle { const labelList& own = mesh.faceOwner(); - bool sameFaceOrder = !((own[f0] == cellI) ^ (own[f1] == cellI)); + bool sameFaceOrder = !((own[f0] == celli) ^ (own[f1] == celli)); // Get cos between faceArea vectors. Correct so flat angle (180 degrees) // gives -1. @@ -137,7 +137,7 @@ bool largerAngle scalar fcCosAngle = n0 & c1c0; - if (own[f0] != cellI) + if (own[f0] != celli) { fcCosAngle = -fcCosAngle; } @@ -190,7 +190,7 @@ bool largerAngle bool splitHex ( const polyMesh& mesh, - const label cellI, + const label celli, const label edgeI, DynamicList<label>& cutCells, @@ -214,13 +214,13 @@ bool splitHex label leftFp = -1; label rightFp = -1; - const cell& cFaces = mesh.cells()[cellI]; + const cell& cFaces = mesh.cells()[celli]; forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - const face& f = faces[faceI]; + const face& f = faces[facei]; label fp0 = findIndex(f, e[0]); label fp1 = findIndex(f, e[1]); @@ -230,7 +230,7 @@ bool splitHex if (fp1 != -1) { // Face uses e[1] but not e[0] - rightI = faceI; + rightI = facei; rightFp = fp1; if (leftI != -1) @@ -248,7 +248,7 @@ bool splitHex } else { - leftI = faceI; + leftI = facei; leftFp = fp0; if (rightI != -1) @@ -287,7 +287,7 @@ bool splitHex loopWeights[2] = -GREAT; loopWeights[3] = -GREAT; - cutCells.append(cellI); + cutCells.append(celli); cellLoops.append(loop); cellEdgeWeights.append(loopWeights); @@ -295,13 +295,13 @@ bool splitHex } -// Split cellI along edgeI with a plane along halfNorm direction. +// Split celli along edgeI with a plane along halfNorm direction. bool splitCell ( const polyMesh& mesh, const geomCellLooper& cellCutter, - const label cellI, + const label celli, const label edgeI, const vector& halfNorm, @@ -339,7 +339,7 @@ bool splitCell cellCutter.cut ( cutPlane, - cellI, + celli, vertIsCut, edgeIsCut, edgeWeight, @@ -349,7 +349,7 @@ bool splitCell ) { // Did manage to cut cell. Copy into overall list. - cutCells.append(cellI); + cutCells.append(celli); cellLoops.append(loop); cellEdgeWeights.append(loopWeights); @@ -397,15 +397,15 @@ void collectCuts forAllConstIter(cellSet, cellsToCut, iter) { - const label cellI = iter.key(); - const labelList& cEdges = cellEdges[cellI]; + const label celli = iter.key(); + const labelList& cEdges = cellEdges[celli]; forAll(cEdges, i) { label edgeI = cEdges[i]; label f0, f1; - meshTools::getEdgeFaces(mesh, cellI, edgeI, f0, f1); + meshTools::getEdgeFaces(mesh, celli, edgeI, f0, f1); vector n0 = faceAreas[f0]; n0 /= mag(n0); @@ -421,7 +421,7 @@ void collectCuts minCos, minSin, - cellI, + celli, f0, f1, n0, @@ -431,13 +431,13 @@ void collectCuts { bool splitOk = false; - if (!geometry && cellShapes[cellI].model() == hex) + if (!geometry && cellShapes[celli].model() == hex) { splitOk = splitHex ( mesh, - cellI, + celli, edgeI, cutCells, @@ -449,7 +449,7 @@ void collectCuts { vector halfNorm; - if ((own[f0] == cellI) ^ (own[f1] == cellI)) + if ((own[f0] == celli) ^ (own[f1] == celli)) { // Opposite owner orientation halfNorm = 0.5*(n0 - n1); @@ -466,7 +466,7 @@ void collectCuts ( mesh, cellCutter, - cellI, + celli, edgeI, halfNorm, @@ -603,9 +603,9 @@ int main(int argc, char *argv[]) if (!readSet) { // Try all cells for cutting - for (label cellI = 0; cellI < mesh.nCells(); cellI++) + for (label celli = 0; celli < mesh.nCells(); celli++) { - cellsToCut.insert(cellI); + cellsToCut.insert(celli); } } @@ -658,13 +658,13 @@ int main(int argc, char *argv[]) } // Remove cut cells from cellsToCut (Note:only relevant if -readSet) - forAll(cuts.cellLoops(), cellI) + forAll(cuts.cellLoops(), celli) { - if (cuts.cellLoops()[cellI].size()) + if (cuts.cellLoops()[celli].size()) { - //Info<< "Removing cut cell " << cellI << " from wishlist" + //Info<< "Removing cut cell " << celli << " from wishlist" // << endl; - cellsToCut.erase(cellI); + cellsToCut.erase(celli); } } diff --git a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C index ac9c2c8abcce7a4de97362221fbd661c2d495f68..18c3ac6b8b40b2ab3220fd5714f8d6db654d4954 100644 --- a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C +++ b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C @@ -67,27 +67,27 @@ labelList getInternalFaceOrder // First unassigned face label newFaceI = 0; - forAll(cells, cellI) + forAll(cells, celli) { - const labelList& cFaces = cells[cellI]; + const labelList& cFaces = cells[celli]; SortableList<label> nbr(cFaces.size()); forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - label nbrCellI = neighbour[faceI]; + label nbrCellI = neighbour[facei]; 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; @@ -117,9 +117,9 @@ labelList getInternalFaceOrder } // 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; + oldToNew[facei] = facei; } return oldToNew; @@ -128,7 +128,7 @@ labelList getInternalFaceOrder void storeCellInZone ( - const label cellI, + const label celli, const label cellType, Map<label>& typeToZone, List<DynamicList<label>>& zoneCells @@ -149,12 +149,12 @@ void storeCellInZone << zoneI << endl; typeToZone.insert(cellType, zoneI); - zoneCells[zoneI].append(cellI); + zoneCells[zoneI].append(celli); } else { // Existing zone for type - zoneCells[zoneFnd()].append(cellI); + zoneCells[zoneFnd()].append(celli); } } } @@ -482,12 +482,12 @@ void ReadCells unsigned int pos = 0; - for (unsigned int faceI = 0; faceI < nInternalFaces; faceI++) + for (unsigned int facei = 0; facei < nInternalFaces; facei++) { - foamFaceMap[faceI] = mapData[faceI]; - foamOwner[faceI] = faceCells[2*faceI]; - foamNeighbour[faceI] = faceCells[2*faceI+1]; - face& f = foamFaces[faceI]; + foamFaceMap[facei] = mapData[facei]; + foamOwner[facei] = faceCells[2*facei]; + foamNeighbour[facei] = faceCells[2*facei+1]; + face& f = foamFaces[facei]; f.setSize(faces[pos++]); forAll(f, fp) @@ -804,9 +804,9 @@ int main(int argc, char *argv[]) label maxCCMPointI = max(foamPointMap); labelList toFoamPoints(invert(maxCCMPointI+1, foamPointMap)); - forAll(foamFaces, faceI) + forAll(foamFaces, facei) { - inplaceRenumber(toFoamPoints, foamFaces[faceI]); + inplaceRenumber(toFoamPoints, foamFaces[facei]); } } @@ -831,15 +831,15 @@ int main(int argc, char *argv[]) // Set owner/neighbour so owner < neighbour // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - forAll(foamNeighbour, faceI) + forAll(foamNeighbour, facei) { - label nbr = foamNeighbour[faceI]; - label own = foamOwner[faceI]; + label nbr = foamNeighbour[facei]; + label own = foamOwner[facei]; if (nbr >= foamCellType.size() || own >= foamCellType.size()) { FatalErrorInFunction - << "face:" << faceI + << "face:" << facei << " nbr:" << nbr << " own:" << own << " nCells:" << foamCellType.size() @@ -850,15 +850,15 @@ int main(int argc, char *argv[]) { if (nbr < own) { - foamOwner[faceI] = foamNeighbour[faceI]; - foamNeighbour[faceI] = own; - foamFaces[faceI].flip(); + foamOwner[facei] = foamNeighbour[facei]; + foamNeighbour[facei] = own; + foamFaces[facei].flip(); } } // And check the face - const face& f = foamFaces[faceI]; + const face& f = foamFaces[facei]; forAll(f, fp) { @@ -897,9 +897,9 @@ int main(int argc, char *argv[]) ); // Reorder faces accordingly - forAll(foamCells, cellI) + forAll(foamCells, celli) { - inplaceRenumber(oldToNew, foamCells[cellI]); + inplaceRenumber(oldToNew, foamCells[celli]); } // Reorder faces. @@ -1024,12 +1024,12 @@ int main(int argc, char *argv[]) // Storage for cell zones. List<DynamicList<label>> zoneCells(0); - forAll(foamCellType, cellI) + forAll(foamCellType, celli) { storeCellInZone ( - cellI, - foamCellType[cellI], + celli, + foamCellType[celli], typeToZone, zoneCells ); @@ -1094,9 +1094,9 @@ int main(int argc, char *argv[]) dimensionedScalar("cellId", dimless, 0.0) ); - forAll(foamCellMap, cellI) + forAll(foamCellMap, celli) { - cellIdField[cellI] = foamCellMap[cellI]; + cellIdField[celli] = foamCellMap[celli]; } // Construct field with calculated bc to hold cell type. @@ -1114,9 +1114,9 @@ int main(int argc, char *argv[]) dimensionedScalar("cellType", dimless, 0.0) ); - forAll(foamCellType, cellI) + forAll(foamCellType, celli) { - cellTypeField[cellI] = foamCellType[cellI]; + cellTypeField[celli] = foamCellType[celli]; } Info<< "Writing cellIds as volScalarField to " << cellIdField.objectPath() diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 6ea4017d7f3b5688689d0c72b46101e7a9b420a1..4b33ed3a9f0b61abac3fbff9c9a96436f959a83b 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -277,11 +277,11 @@ label findFace(const polyMesh& mesh, const face& f) forAll(pFaces, i) { - label faceI = pFaces[i]; + label facei = pFaces[i]; - if (mesh.faces()[faceI] == f) + if (mesh.faces()[facei] == f) { - return faceI; + return facei; } } diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C index 1d9af1a8732c8f384d28eee8cdc0ba3492d6f206..d5a4a338cfd8cabc490e99adae73db6c0dcee354 100644 --- a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C +++ b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C @@ -611,11 +611,11 @@ int main(int argc, char *argv[]) label oldSize = renumberedPatch.size(); renumberedPatch.setSize(oldSize + curRawPatch.size()); - forAll(curRawPatch, faceI) + forAll(curRawPatch, facei) { - const face& oldFace = curRawPatch[faceI]; + const face& oldFace = curRawPatch[facei]; - face& newFace = renumberedPatch[oldSize + faceI]; + face& newFace = renumberedPatch[oldSize + facei]; newFace.setSize(oldFace.size()); forAll(oldFace, pointI) @@ -635,11 +635,11 @@ int main(int argc, char *argv[]) faceList& renumberedPatch = boundary[nCreatedPatches]; renumberedPatch.setSize(curRawPatch.size()); - forAll(curRawPatch, faceI) + forAll(curRawPatch, facei) { - const face& oldFace = curRawPatch[faceI]; + const face& oldFace = curRawPatch[facei]; - face& newFace = renumberedPatch[faceI]; + face& newFace = renumberedPatch[facei]; newFace.setSize(oldFace.size()); forAll(oldFace, pointI) diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/hexBlock.C b/applications/utilities/mesh/conversion/cfx4ToFoam/hexBlock.C index 094627f7dab841722f34a83d0817441ca554a3e8..75f4f2eaa853c9aab0191499d524857fce61ba45 100644 --- a/applications/utilities/mesh/conversion/cfx4ToFoam/hexBlock.C +++ b/applications/utilities/mesh/conversion/cfx4ToFoam/hexBlock.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 @@ -367,9 +367,9 @@ faceList hexBlock::patchFaces(const label direc, const labelList& range) const else if (blockHandedness_ == left) { // turn all faces inside out - forAll(result, faceI) + forAll(result, facei) { - result[faceI].flip(); + result[facei].flip(); } } diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/create3DCellShape.C b/applications/utilities/mesh/conversion/fluentMeshToFoam/create3DCellShape.C index c0da25a0151105b8dcf52c5f4a92b9d3a0755ea4..65c017a2969df3ecb7b1ee5bd189b382448e76aa 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/create3DCellShape.C +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/create3DCellShape.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 @@ -85,24 +85,24 @@ cellShape create3DCellShape // make a list of outward-pointing faces labelListList localFaces(faceLabels.size()); - forAll(faceLabels, faceI) + forAll(faceLabels, facei) { - const label curFaceLabel = faceLabels[faceI]; + const label curFaceLabel = faceLabels[facei]; const labelList& curFace = faces[curFaceLabel]; if (owner[curFaceLabel] == cellIndex) { - localFaces[faceI] = curFace; + localFaces[facei] = curFace; } else if (neighbour[curFaceLabel] == cellIndex) { // Reverse the face - localFaces[faceI].setSize(curFace.size()); + localFaces[facei].setSize(curFace.size()); forAllReverse(curFace, i) { - localFaces[faceI][curFace.size() - i - 1] = + localFaces[facei][curFace.size() - i - 1] = curFace[i]; } } diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedQuadCellShape.C b/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedQuadCellShape.C index c7aec883907f71ce9bd1232ea16f5ba63d3a51ef..013481821b5615b114b7eaf30c66a735ad5b0938 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedQuadCellShape.C +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedQuadCellShape.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 @@ -67,9 +67,9 @@ cellShape extrudedQuadCellShape // make a list of outward-pointing faces labelListList localFaces(4); - forAll(faceLabels, faceI) + forAll(faceLabels, facei) { - const label curFaceLabel = faceLabels[faceI]; + const label curFaceLabel = faceLabels[facei]; const face& curFace = faces[curFaceLabel]; @@ -83,18 +83,18 @@ cellShape extrudedQuadCellShape if (owner[curFaceLabel] == cellIndex) { - localFaces[faceI] = curFace; + localFaces[facei] = curFace; } else if (neighbour[curFaceLabel] == cellIndex) { // Reverse the face. Note: it is necessary to reverse by // hand to preserve connectivity of a 2-D mesh. // - localFaces[faceI].setSize(curFace.size()); + localFaces[facei].setSize(curFace.size()); forAllReverse(curFace, i) { - localFaces[faceI][curFace.size() - i - 1] = + localFaces[facei][curFace.size() - i - 1] = curFace[i]; } } diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedTriangleCellShape.C b/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedTriangleCellShape.C index ccf77d8258da5cc584eddfa332a0c373cb370686..e781a66f1f53bb331f4add204c09bca8204b60aa 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedTriangleCellShape.C +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/extrudedTriangleCellShape.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 @@ -69,9 +69,9 @@ cellShape extrudedTriangleCellShape // make a list of outward-pointing faces labelListList localFaces(3); - forAll(faceLabels, faceI) + forAll(faceLabels, facei) { - const label curFaceLabel = faceLabels[faceI]; + const label curFaceLabel = faceLabels[facei]; const face& curFace = faces[curFaceLabel]; @@ -85,18 +85,18 @@ cellShape extrudedTriangleCellShape if (owner[curFaceLabel] == cellIndex) { - localFaces[faceI] = curFace; + localFaces[facei] = curFace; } else if (neighbour[curFaceLabel] == cellIndex) { // Reverse the face. Note: it is necessary to reverse by // hand to preserve connectivity of a 2-D mesh. // - localFaces[faceI].setSize(curFace.size()); + localFaces[facei].setSize(curFace.size()); forAllReverse(curFace, i) { - localFaces[faceI][curFace.size() - i - 1] = + localFaces[facei][curFace.size() - i - 1] = curFace[i]; } } diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index 690afc084ef6aa57bc604eba912caedfbfd2c7e7..b134b3de24c9998ed9570a5160d8f73ee82cba52 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -241,7 +241,7 @@ endOfSection {space}")"{space} // Face data label faceGroupElementType = -1; - label faceI = 0; + label facei = 0; // Cell data label cellGroupElementType = -1; @@ -458,7 +458,7 @@ endOfSection {space}")"{space} faceGroupElementType = readHexLabel(faceGroupDataStream); // In FOAM, indices start from zero - adjust - faceI = faceGroupStartIndex.last() - 1; + facei = faceGroupStartIndex.last() - 1; } <readNumberOfFaces,readFaceGroupData>{spaceNl}{endOfSection} { @@ -483,7 +483,7 @@ endOfSection {space}")"{space} IStringStream mixedFaceStream(YYText()); - face& curFaceLabels = faces[faceI]; + face& curFaceLabels = faces[facei]; // set size of label list curFaceLabels.setSize(readLabel(mixedFaceStream)); @@ -494,16 +494,16 @@ endOfSection {space}")"{space} } // read neighbour and owner. Neighbour comes first - neighbour[faceI] = readHexLabel(mixedFaceStream) - 1; - owner[faceI] = readHexLabel(mixedFaceStream) - 1; - faceI++; + neighbour[facei] = readHexLabel(mixedFaceStream) - 1; + owner[facei] = readHexLabel(mixedFaceStream) - 1; + facei++; } <readFacesUniform>{spaceNl}{hexLabelList} { IStringStream mixedFaceStream(YYText()); - face& curFaceLabels = faces[faceI]; + face& curFaceLabels = faces[facei]; // set size of label list. This is OK because in Fluent the type // for edge is 2, for triangle is 3 and for quad is 4 @@ -515,20 +515,20 @@ endOfSection {space}")"{space} } // read neighbour and owner. Neighbour comes first - neighbour[faceI] = readHexLabel(mixedFaceStream) - 1; - owner[faceI] = readHexLabel(mixedFaceStream) - 1; - faceI++; + neighbour[facei] = readHexLabel(mixedFaceStream) - 1; + owner[facei] = readHexLabel(mixedFaceStream) - 1; + facei++; } <readFacesMixed,readFacesUniform>{spaceNl}{endOfSection} { // check read of fluentFaces - if (faceI != faceGroupEndIndex.last()) + if (facei != faceGroupEndIndex.last()) { Info<< "problem with reading fluentFaces: " << "start index: " << faceGroupStartIndex.last() << " end index: " << faceGroupEndIndex.last() - << " last fluentFaces read: " << faceI << endl; + << " last fluentFaces read: " << facei << endl; } yy_pop_state(); @@ -844,11 +844,11 @@ label findFace(const primitiveMesh& mesh, const face& f) forAll(pFaces, i) { - label faceI = pFaces[i]; + label facei = pFaces[i]; - if (f == mesh.faces()[faceI]) + if (f == mesh.faces()[facei]) { - return faceI; + return facei; } } @@ -932,23 +932,23 @@ int main(int argc, char *argv[]) // fill in owner and neighbour - forAll(owner, faceI) + forAll(owner, facei) { - if (owner[faceI] > -1) + if (owner[facei] > -1) { - label curCell = owner[faceI]; - cellFaces[curCell][nFacesInCell[curCell] ] = faceI; + label curCell = owner[facei]; + cellFaces[curCell][nFacesInCell[curCell] ] = facei; nFacesInCell[curCell]++; } } - forAll(neighbour, faceI) + forAll(neighbour, facei) { - if (neighbour[faceI] > -1) + if (neighbour[facei] > -1) { - label curCell = neighbour[faceI]; - cellFaces[curCell][nFacesInCell[curCell] ] = faceI; + label curCell = neighbour[facei]; + cellFaces[curCell][nFacesInCell[curCell] ] = facei; nFacesInCell[curCell]++; } @@ -1062,17 +1062,17 @@ int main(int argc, char *argv[]) } // Create new faces - forAll(faces, faceI) + forAll(faces, facei) { - if (faces[faceI].size() != 2) + if (faces[facei].size() != 2) { FatalErrorInFunction << "fluentMeshToFoam: a 2-D face defined with " - << faces[faceI].size() << " points." << endl; + << faces[facei].size() << " points." << endl; } - labelList& newFace = faces[faceI]; + labelList& newFace = faces[facei]; newFace.setSize(4); @@ -1125,16 +1125,16 @@ int main(int argc, char *argv[]) // area vector points into the domain. Turn them round before making patches // for Foam compatibility - forAll(faces, faceI) + forAll(faces, facei) { - if (owner[faceI] == -1) + if (owner[facei] == -1) { // reverse face - labelList oldFace = faces[faceI]; + labelList oldFace = faces[facei]; forAllReverse(oldFace, i) { - faces[faceI][oldFace.size() - i - 1] = + faces[facei][oldFace.size() - i - 1] = oldFace[i]; } } @@ -1241,7 +1241,7 @@ int main(int argc, char *argv[]) faceList patchFaces(faceGroupEndIndexIter() - faceLabel); - forAll(patchFaces, faceI) + forAll(patchFaces, facei) { if ( @@ -1249,14 +1249,14 @@ int main(int argc, char *argv[]) || faces[faceLabel].size() == 4 ) { - patchFaces[faceI] = face(faces[faceLabel]); + patchFaces[facei] = face(faces[faceLabel]); faceLabel++; } else { FatalErrorInFunction << "unrecognised face shape with " - << patchFaces[faceI].size() << " vertices" + << patchFaces[facei].size() << " vertices" << abort(FatalError); } } @@ -1412,28 +1412,28 @@ int main(int argc, char *argv[]) //and mark patch number to global list forAll(meshFaces, i) { - label faceI = meshFaces[i]; + label facei = meshFaces[i]; - if (pShapeMesh.isInternalFace(faceI)) + if (pShapeMesh.isInternalFace(facei)) { FatalErrorInFunction - << "Face " << faceI << " on new patch " + << "Face " << facei << " on new patch " << patchNames[patchi] << " is not an external face of the mesh." << endl << exit(FatalError); } - if (facePatchID[faceI - pShapeMesh.nInternalFaces()]!= -1) + if (facePatchID[facei - pShapeMesh.nInternalFaces()]!= -1) { FatalErrorInFunction - << "Face " << faceI << " on new patch " + << "Face " << facei << " on new patch " << patchNames[patchi] << " has already been marked for repatching to" << " patch " - << facePatchID[faceI - pShapeMesh.nInternalFaces()] + << facePatchID[facei - pShapeMesh.nInternalFaces()] << exit(FatalError); } - facePatchID[faceI - pShapeMesh.nInternalFaces()] = nBoundaries; + facePatchID[facei - pShapeMesh.nInternalFaces()] = nBoundaries; } //add to boundary patch @@ -1521,9 +1521,9 @@ int main(int argc, char *argv[]) // Change patch ids forAll(facePatchID, idI) { - label faceI = idI + pShapeMesh.nInternalFaces(); + label facei = idI + pShapeMesh.nInternalFaces(); - repatcher.changePatchID(faceI, facePatchID[idI]); + repatcher.changePatchID(facei, facePatchID[idI]); } repatcher.repatch(); @@ -1626,15 +1626,15 @@ int main(int argc, char *argv[]) ); DynamicList<label> zoneFaces(pShapeMesh.nFaces()); - forAll(pShapeMesh.faceNeighbour(), faceI) + forAll(pShapeMesh.faceNeighbour(), facei) { - label nei = pShapeMesh.faceNeighbour()[faceI]; - label own = pShapeMesh.faceOwner()[faceI]; + label nei = pShapeMesh.faceNeighbour()[facei]; + label own = pShapeMesh.faceOwner()[facei]; if (nei != -1) { if (zoneCell[nei] && zoneCell[own]) { - zoneFaces.append(faceI); + zoneFaces.append(facei); } } } diff --git a/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C b/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C index 12dfbcb9a928195afc2db3c72e81e0ebe648aeca..3a140878ef18a59ada9517473f11517f6a1b3421 100644 --- a/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C +++ b/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C @@ -135,9 +135,9 @@ void Foam::fluentFvMesh::writeFluentMesh() const << "(13 (2 1 " << own.size() << " 2 0)" << std::endl << "(" << std::endl; - forAll(own, faceI) + forAll(own, facei) { - const labelList& l = fcs[faceI]; + const labelList& l = fcs[facei]; fluentMeshFile << " "; @@ -148,8 +148,8 @@ void Foam::fluentFvMesh::writeFluentMesh() const fluentMeshFile << l[lI] + 1 << " "; } - fluentMeshFile << nei[faceI] + 1 << " "; - fluentMeshFile << own[faceI] + 1 << std::endl; + fluentMeshFile << nei[facei] + 1 << " "; + fluentMeshFile << own[facei] + 1 << std::endl; } fluentMeshFile << "))" << std::endl; @@ -194,9 +194,9 @@ void Foam::fluentFvMesh::writeFluentMesh() const fluentMeshFile <<" 0)" << std::endl << "(" << std::endl; - forAll(patchFaces, faceI) + forAll(patchFaces, facei) { - const labelList& l = patchFaces[faceI]; + const labelList& l = patchFaces[facei]; fluentMeshFile << " "; @@ -210,7 +210,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const fluentMeshFile << l[lI] + 1 << " "; } - fluentMeshFile << patchFaceCells[faceI] + 1 << " 0" << std::endl; + fluentMeshFile << patchFaceCells[facei] + 1 << " 0" << std::endl; } fluentMeshFile << "))" << std::endl; @@ -230,21 +230,21 @@ void Foam::fluentFvMesh::writeFluentMesh() const bool hasWarned = false; - forAll(cells, cellI) + forAll(cells, celli) { - if (cells[cellI].model() == tet) + if (cells[celli].model() == tet) { fluentMeshFile << " " << 2; } - else if (cells[cellI].model() == hex) + else if (cells[celli].model() == hex) { fluentMeshFile << " " << 4; } - else if (cells[cellI].model() == pyr) + else if (cells[celli].model() == pyr) { fluentMeshFile << " " << 5; } - else if (cells[cellI].model() == prism) + else if (cells[celli].model() == prism) { fluentMeshFile << " " << 6; } @@ -256,7 +256,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const WarningInFunction << "foamMeshToFluent: cell shape for cell " - << cellI << " only supported by Fluent polyhedral meshes." + << celli << " only supported by Fluent polyhedral meshes." << nl << " Suppressing any further messages for polyhedral" << " cells." << endl; diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L index 79873bfcd51cd419f8cac1b767bc9f1d4957bbb4..52c7f3485dd5f38210556da76780b0d83629ef0e 100644 --- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L +++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L @@ -328,14 +328,14 @@ mtype {space}"MTYPE:"{space} IStringStream elementStream(YYText()); - label cellI(readLabel(elementStream)); + label celli(readLabel(elementStream)); label cellType(readLabel(elementStream)); label nVertices(readLabel(elementStream)); // reset number of continuation lines nCellContinuationLines = 0; - cellMap[curNumberOfCells] = cellI; + cellMap[curNumberOfCells] = celli; cellTypes[curNumberOfCells] = cellType; cellLabels.set(curNumberOfCells, new labelList(nVertices)); @@ -682,19 +682,19 @@ int main(int argc, char *argv[]) // make a cell mapping array label maxCellIndex = 0; - forAll(cellMap, cellI) + forAll(cellMap, celli) { - if (cellMap[cellI] > maxCellIndex) + if (cellMap[celli] > maxCellIndex) { - maxCellIndex = cellMap[cellI]; + maxCellIndex = cellMap[celli]; } } labelList cellLookup(maxCellIndex + 1); - forAll(cellMap, cellI) + forAll(cellMap, celli) { - cellLookup[cellMap[cellI] ] = cellI; + cellLookup[cellMap[celli] ] = celli; } const cellModel& hex = *(cellModeller::lookup("hex")); @@ -709,23 +709,23 @@ int main(int argc, char *argv[]) cellShapeList cells(cellLabels.size()); - forAll(cellTypes, cellI) + forAll(cellTypes, celli) { - const labelList& curCellLabels = cellLabels[cellI]; + const labelList& curCellLabels = cellLabels[celli]; // Tetrahedron - if (cellTypes[cellI] == 6) + if (cellTypes[celli] == 6) { labelsTet[0] = pointLookup[curCellLabels[0] ]; labelsTet[1] = pointLookup[curCellLabels[2] ]; labelsTet[2] = pointLookup[curCellLabels[3] ]; labelsTet[3] = pointLookup[curCellLabels[1] ]; - cells[cellI] = cellShape(tet, labelsTet); + cells[celli] = cellShape(tet, labelsTet); } // Square-based pyramid - else if (cellTypes[cellI] == 7) + else if (cellTypes[celli] == 7) { labelsPyramid[0] = pointLookup[curCellLabels[0] ]; labelsPyramid[1] = pointLookup[curCellLabels[1] ]; @@ -733,11 +733,11 @@ int main(int argc, char *argv[]) labelsPyramid[3] = pointLookup[curCellLabels[2] ]; labelsPyramid[4] = pointLookup[curCellLabels[4] ]; - cells[cellI] = cellShape(pyr, labelsPyramid); + cells[celli] = cellShape(pyr, labelsPyramid); } // Triangular prism - else if (cellTypes[cellI] == 5) + else if (cellTypes[celli] == 5) { labelsPrism[0] = pointLookup[curCellLabels[0] ]; labelsPrism[1] = pointLookup[curCellLabels[1] ]; @@ -746,11 +746,11 @@ int main(int argc, char *argv[]) labelsPrism[4] = pointLookup[curCellLabels[4] ]; labelsPrism[5] = pointLookup[curCellLabels[5] ]; - cells[cellI] = cellShape(prism, labelsPrism); + cells[celli] = cellShape(prism, labelsPrism); } // Hex - else if (cellTypes[cellI] == 4) + else if (cellTypes[celli] == 4) { labelsHex[0] = pointLookup[curCellLabels[0] ]; labelsHex[1] = pointLookup[curCellLabels[1] ]; @@ -761,7 +761,7 @@ int main(int argc, char *argv[]) labelsHex[6] = pointLookup[curCellLabels[7] ]; labelsHex[7] = pointLookup[curCellLabels[6] ]; - cells[cellI] = cellShape(hex, labelsHex); + cells[celli] = cellShape(hex, labelsHex); } } @@ -788,18 +788,18 @@ int main(int argc, char *argv[]) faceList& patchFaces = boundary[patchi]; patchFaces.setSize(curCells.size()); - forAll(curCells, faceI) + forAll(curCells, facei) { - patchFaces[faceI] = - cells[cellLookup[curCells[faceI] ] ].faces() + patchFaces[facei] = + cells[cellLookup[curCells[facei] ] ].faces() [ faceIndex [ // this picks a cell type - cells[cellLookup[curCells[faceI] ] ] + cells[cellLookup[curCells[facei] ] ] .model().index() ] - [curFaces[faceI] - 1] // this gives a fluent face - 1 + [curFaces[facei] - 1] // this gives a fluent face - 1 ]; } diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C index 4c05fb4a6ab73ab9aeb84a8a92525bf73046da4d..305287fd3fa1a5067318a70154a6c099846a923f 100644 --- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C +++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C @@ -120,9 +120,9 @@ label findFace(const primitivePatch& pp, const labelList& meshF) // meshF vertices (in any order ;-) forAll(pFaces, i) { - label faceI = pFaces[i]; + label facei = pFaces[i]; - const face& f = pp[faceI]; + const face& f = pp[facei]; // Count uses of vertices of meshF for f label nMatched = 0; @@ -137,7 +137,7 @@ label findFace(const primitivePatch& pp, const labelList& meshF) if (nMatched == meshF.size()) { - return faceI; + return facei; } } @@ -152,9 +152,9 @@ label findInternalFace(const primitiveMesh& mesh, const labelList& meshF) forAll(pFaces, i) { - label faceI = pFaces[i]; + label facei = pFaces[i]; - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; // Count uses of vertices of meshF for f label nMatched = 0; @@ -169,7 +169,7 @@ label findInternalFace(const primitiveMesh& mesh, const labelList& meshF) if (nMatched == meshF.size()) { - return faceI; + return facei; } } return -1; @@ -207,7 +207,7 @@ bool correctOrientation(const pointField& points, const cellShape& shape) void storeCellInZone ( const label regPhys, - const label cellI, + const label celli, Map<label>& physToZone, labelList& zoneToPhys, @@ -228,12 +228,12 @@ void storeCellInZone physToZone.insert(regPhys, zoneI); zoneToPhys[zoneI] = regPhys; - zoneCells[zoneI].append(cellI); + zoneCells[zoneI].append(celli); } else { // Existing zone for region - zoneCells[zoneFnd()].append(cellI); + zoneCells[zoneFnd()].append(celli); } } @@ -449,7 +449,7 @@ void readCells // Storage for all cells. Too big. Shrink later cells.setSize(nElems); - label cellI = 0; + label celli = 0; label nTet = 0; label nPyr = 0; label nPrism = 0; @@ -566,7 +566,7 @@ void readCells storeCellInZone ( regPhys, - cellI, + celli, physToZone, zoneToPhys, zoneCells @@ -578,7 +578,7 @@ void readCells renumber(mshToFoam, tetPoints); - cells[cellI++] = cellShape(tet, tetPoints); + cells[celli++] = cellShape(tet, tetPoints); nTet++; } @@ -587,7 +587,7 @@ void readCells storeCellInZone ( regPhys, - cellI, + celli, physToZone, zoneToPhys, zoneCells @@ -599,7 +599,7 @@ void readCells renumber(mshToFoam, pyrPoints); - cells[cellI++] = cellShape(pyr, pyrPoints); + cells[celli++] = cellShape(pyr, pyrPoints); nPyr++; } @@ -608,7 +608,7 @@ void readCells storeCellInZone ( regPhys, - cellI, + celli, physToZone, zoneToPhys, zoneCells @@ -620,13 +620,13 @@ void readCells renumber(mshToFoam, prismPoints); - cells[cellI] = cellShape(prism, prismPoints); + cells[celli] = cellShape(prism, prismPoints); - const cellShape& cell = cells[cellI]; + const cellShape& cell = cells[celli]; if (!keepOrientation && !correctOrientation(points, cell)) { - Info<< "Inverting prism " << cellI << endl; + Info<< "Inverting prism " << celli << endl; // Reorder prism. prismPoints[0] = cell[0]; prismPoints[1] = cell[2]; @@ -635,10 +635,10 @@ void readCells prismPoints[4] = cell[4]; prismPoints[5] = cell[5]; - cells[cellI] = cellShape(prism, prismPoints); + cells[celli] = cellShape(prism, prismPoints); } - cellI++; + celli++; nPrism++; } @@ -647,7 +647,7 @@ void readCells storeCellInZone ( regPhys, - cellI, + celli, physToZone, zoneToPhys, zoneCells @@ -661,13 +661,13 @@ void readCells renumber(mshToFoam, hexPoints); - cells[cellI] = cellShape(hex, hexPoints); + cells[celli] = cellShape(hex, hexPoints); - const cellShape& cell = cells[cellI]; + const cellShape& cell = cells[celli]; if (!keepOrientation && !correctOrientation(points, cell)) { - Info<< "Inverting hex " << cellI << endl; + Info<< "Inverting hex " << celli << endl; // Reorder hex. hexPoints[0] = cell[4]; hexPoints[1] = cell[5]; @@ -678,10 +678,10 @@ void readCells hexPoints[6] = cell[2]; hexPoints[7] = cell[3]; - cells[cellI] = cellShape(hex, hexPoints); + cells[celli] = cellShape(hex, hexPoints); } - cellI++; + celli++; nHex++; } @@ -705,7 +705,7 @@ void readCells } - cells.setSize(cellI); + cells.setSize(celli); forAll(patchFaces, patchi) { diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C index 67c07921ee999478b2af286c1a0d0a6f2167d79f..451827676717d6eed9806ddc730f9044a764a128 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C @@ -250,15 +250,15 @@ void readPoints void addAndExtend ( DynamicList<label>& indizes, - label cellI, + label celli, label val ) { - if (indizes.size() < (cellI+1)) + if (indizes.size() < (celli+1)) { - indizes.setSize(cellI+1,-1); + indizes.setSize(celli+1,-1); } - indizes[cellI] = val; + indizes[celli] = val; } // Reads cells section. Read region as well? Not handled yet but should just @@ -304,16 +304,16 @@ void readCells break; } - label cellI, feID, physProp, matProp, colour, nNodes; + label celli, feID, physProp, matProp, colour, nNodes; IStringStream lineStr(line); lineStr - >> cellI >> feID >> physProp >> matProp >> colour >> nNodes; + >> celli >> feID >> physProp >> matProp >> colour >> nNodes; if (foundFeType.insert(feID)) { Info<< "First occurrence of element type " << feID - << " for cell " << cellI << " at line " + << " for cell " << celli << " at line " << is.lineNumber() << endl; } @@ -338,7 +338,7 @@ void readCells lineStr >> cVerts[0] >> cVerts[1] >> cVerts[2]; boundaryFaces.append(cVerts); - boundaryFaceIndices.append(cellI); + boundaryFaceIndices.append(celli); } else if (feID == 44 || feID == 94) { @@ -350,7 +350,7 @@ void readCells lineStr >> cVerts[0] >> cVerts[1] >> cVerts[2] >> cVerts[3]; boundaryFaces.append(cVerts); - boundaryFaceIndices.append(cellI); + boundaryFaceIndices.append(celli); } else if (feID == 111) { @@ -364,12 +364,12 @@ void readCells cellVerts.append(cellShape(tet, cVerts, true)); cellMaterial.append(physProp); - addAndExtend(cellCorrespondence,cellI,cellMaterial.size()-1); + addAndExtend(cellCorrespondence,celli,cellMaterial.size()-1); if (cellVerts.last().size() != cVerts.size()) { Info<< "Line:" << is.lineNumber() - << " element:" << cellI + << " element:" << celli << " type:" << feID << " collapsed from " << cVerts << nl << " to:" << cellVerts.last() @@ -389,12 +389,12 @@ void readCells cellVerts.append(cellShape(prism, cVerts, true)); cellMaterial.append(physProp); - addAndExtend(cellCorrespondence,cellI,cellMaterial.size()-1); + addAndExtend(cellCorrespondence,celli,cellMaterial.size()-1); if (cellVerts.last().size() != cVerts.size()) { Info<< "Line:" << is.lineNumber() - << " element:" << cellI + << " element:" << celli << " type:" << feID << " collapsed from " << cVerts << nl << " to:" << cellVerts.last() @@ -414,12 +414,12 @@ void readCells cellVerts.append(cellShape(hex, cVerts, true)); cellMaterial.append(physProp); - addAndExtend(cellCorrespondence,cellI,cellMaterial.size()-1); + addAndExtend(cellCorrespondence,celli,cellMaterial.size()-1); if (cellVerts.last().size() != cVerts.size()) { Info<< "Line:" << is.lineNumber() - << " element:" << cellI + << " element:" << celli << " type:" << feID << " collapsed from " << cVerts << nl << " to:" << cellVerts.last() @@ -446,12 +446,12 @@ void readCells cellVerts.append(cellShape(tet, cVerts, true)); cellMaterial.append(physProp); - addAndExtend(cellCorrespondence,cellI,cellMaterial.size()-1); + addAndExtend(cellCorrespondence,celli,cellMaterial.size()-1); if (cellVerts.last().size() != cVerts.size()) { Info<< "Line:" << is.lineNumber() - << " element:" << cellI + << " element:" << celli << " type:" << feID << " collapsed from " << cVerts << nl << " to:" << cellVerts.last() @@ -790,28 +790,28 @@ int main(int argc, char *argv[]) // Renumber vertex numbers on cells - forAll(cellVerts, cellI) + forAll(cellVerts, celli) { labelList foamVerts ( renumber ( unvToFoam, - static_cast<labelList&>(cellVerts[cellI]) + static_cast<labelList&>(cellVerts[celli]) ) ); if (findIndex(foamVerts, -1) != -1) { FatalErrorInFunction - << "Cell " << cellI - << " unv vertices " << cellVerts[cellI] + << "Cell " << celli + << " unv vertices " << cellVerts[celli] << " has some undefined vertices " << foamVerts << abort(FatalError); } // Bit nasty: replace vertex list. - cellVerts[cellI].transfer(foamVerts); + cellVerts[celli].transfer(foamVerts); } // Renumber vertex numbers on boundaryFaces @@ -850,15 +850,15 @@ int main(int argc, char *argv[]) { HashTable<label, face, Hash<face>> faceToFaceID(boundaryFaces.size()); - forAll(boundaryFaces, faceI) + forAll(boundaryFaces, facei) { - SortableList<label> sortedVerts(boundaryFaces[faceI]); - faceToFaceID.insert(face(sortedVerts), faceI); + SortableList<label> sortedVerts(boundaryFaces[facei]); + faceToFaceID.insert(face(sortedVerts), facei); } - forAll(cellVerts, cellI) + forAll(cellVerts, celli) { - faceList faces = cellVerts[cellI].faces(); + faceList faces = cellVerts[celli].faces(); forAll(faces, i) { SortableList<label> sortedVerts(faces[i]); @@ -867,31 +867,31 @@ int main(int argc, char *argv[]) if (fnd != faceToFaceID.end()) { - label faceI = fnd(); - int stat = face::compare(faces[i], boundaryFaces[faceI]); + label facei = fnd(); + int stat = face::compare(faces[i], boundaryFaces[facei]); if (stat == 1) { // Same orientation. Cell is owner. - own[faceI] = cellI; + own[facei] = celli; } else if (stat == -1) { // Opposite orientation. Cell is neighbour. - nei[faceI] = cellI; + nei[facei] = celli; } } } } label nReverse = 0; - forAll(own, faceI) + forAll(own, facei) { - if (own[faceI] == -1 && nei[faceI] != -1) + if (own[facei] == -1 && nei[facei] != -1) { // Boundary face with incorrect orientation - boundaryFaces[faceI] = boundaryFaces[faceI].reverseFace(); - Swap(own[faceI], nei[faceI]); + boundaryFaces[facei] = boundaryFaces[facei].reverseFace(); + Swap(own[facei], nei[facei]); nReverse++; } } @@ -903,12 +903,12 @@ int main(int argc, char *argv[]) label cnt = 0; - forAll(own, faceI) + forAll(own, facei) { - if (own[faceI] != -1 && nei[faceI] != -1) + if (own[facei] != -1 && nei[facei] != -1) { - faceToCell[1].insert(faceI, own[faceI]); - faceToCell[0].insert(faceI, nei[faceI]); + faceToCell[1].insert(facei, own[facei]); + faceToCell[0].insert(facei, nei[facei]); cnt++; } } @@ -958,9 +958,9 @@ int main(int argc, char *argv[]) List<DynamicList<face>> dynPatchFaces(dofVertIndices.size()); - forAll(cellVerts, cellI) + forAll(cellVerts, celli) { - const cellShape& shape = cellVerts[cellI]; + const cellShape& shape = cellVerts[celli]; const faceList shapeFaces(shape.faces()); diff --git a/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C b/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C index a69f6047a593f48d4a0f550b2db303cd266ee609..4e6127dae450571f94f3645729d60d4799df3fac 100644 --- a/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C +++ b/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.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 @@ -92,24 +92,24 @@ int main(int argc, char *argv[]) if (readHex) { - for (label cellI = 0; cellI < nCells; cellI++) + for (label celli = 0; celli < nCells; celli++) { for (label cp = 0; cp < 8; cp++) { mshStream >> hexPoints[cp]; } - cells[cellI] = cellShape(hex, hexPoints); + cells[celli] = cellShape(hex, hexPoints); } } else { - for (label cellI = 0; cellI < nCells; cellI++) + for (label celli = 0; celli < nCells; celli++) { for (label cp = 0; cp < 4; cp++) { mshStream >> tetPoints[cp]; } - cells[cellI] = cellShape(tet, tetPoints); + cells[celli] = cellShape(tet, tetPoints); } } diff --git a/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C b/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C index 199bb7cdba56addb646d9341c13e72291c633cf5..2f3f320c7214fe790ded43920e87e66b45fd3b94 100644 --- a/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C +++ b/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C @@ -127,7 +127,7 @@ int main(int argc, char *argv[]) labelList tetPoints(4); - forAll(cells, cellI) + forAll(cells, celli) { label domain(readLabel(str)); @@ -144,7 +144,7 @@ int main(int argc, char *argv[]) tetPoints[2] = readLabel(str) - 1; tetPoints[3] = readLabel(str) - 1; - cells[cellI] = cellShape(tet, tetPoints); + cells[celli] = cellShape(tet, tetPoints); } @@ -165,7 +165,7 @@ int main(int argc, char *argv[]) // Boundary faces as three vertices HashTable<label, triFace, Hash<triFace>> vertsToBoundary(nFaces); - forAll(boundaryFaces, faceI) + forAll(boundaryFaces, facei) { label patchi(readLabel(str)); @@ -183,13 +183,13 @@ int main(int argc, char *argv[]) triFace tri(readLabel(str)-1, readLabel(str)-1, readLabel(str)-1); // Store boundary face as is for now. Later on reverse it. - boundaryFaces[faceI].setSize(3); - boundaryFaces[faceI][0] = tri[0]; - boundaryFaces[faceI][1] = tri[1]; - boundaryFaces[faceI][2] = tri[2]; - boundaryPatch[faceI] = patchi; + boundaryFaces[facei].setSize(3); + boundaryFaces[facei][0] = tri[0]; + boundaryFaces[facei][1] = tri[1]; + boundaryFaces[facei][2] = tri[2]; + boundaryPatch[facei] = patchi; - vertsToBoundary.insert(tri, faceI); + vertsToBoundary.insert(tri, facei); } label nPatches = maxPatch + 1; @@ -199,9 +199,9 @@ int main(int argc, char *argv[]) // For storage reasons I store the triangles and loop over the cells instead // of the other way around (store cells and loop over triangles) though // that would be faster. - forAll(cells, cellI) + forAll(cells, celli) { - const cellShape& cll = cells[cellI]; + const cellShape& cll = cells[celli]; // Get the four (outwards pointing) faces of the cell faceList tris(cll.faces()); @@ -217,7 +217,7 @@ int main(int argc, char *argv[]) if (iter != vertsToBoundary.end()) { - label faceI = iter(); + label facei = iter(); const triFace& tri = iter.key(); // Determine orientation of tri v.s. cell centre. @@ -228,7 +228,7 @@ int main(int argc, char *argv[]) if (((fc - cc) & fn) < 0) { // Boundary face points inwards. Flip. - boundaryFaces[faceI].flip(); + boundaryFaces[facei].flip(); } // Done this face so erase from hash @@ -268,11 +268,11 @@ int main(int argc, char *argv[]) // Sort boundaryFaces by patch. List<DynamicList<face>> allPatchFaces(nPatches); - forAll(boundaryPatch, faceI) + forAll(boundaryPatch, facei) { - label patchi = boundaryPatch[faceI]; + label patchi = boundaryPatch[facei]; - allPatchFaces[patchi].append(boundaryFaces[faceI]); + allPatchFaces[patchi].append(boundaryFaces[facei]); } Info<< "Patches:" << nl diff --git a/applications/utilities/mesh/conversion/plot3dToFoam/hexBlock.C b/applications/utilities/mesh/conversion/plot3dToFoam/hexBlock.C index 73060e1d2c8e52352b828b4a282dd2b5a32af77f..15f7edb53172e9d6fca73b264e0a3f84eb5529f8 100644 --- a/applications/utilities/mesh/conversion/plot3dToFoam/hexBlock.C +++ b/applications/utilities/mesh/conversion/plot3dToFoam/hexBlock.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 @@ -464,9 +464,9 @@ faceList hexBlock::patchFaces(const label direc, const labelList& range) const else if (blockHandedness_ == left) { // turn all faces inside out - forAll(result, faceI) + forAll(result, facei) { - result[faceI].flip(); + result[facei].flip(); } } diff --git a/applications/utilities/mesh/conversion/sammToFoam/calcPointCells.C b/applications/utilities/mesh/conversion/sammToFoam/calcPointCells.C index d646428ade754d50476a39c3d339479bb2f591be..1204fb810f4ba874961e7958dabdd8ed1f1f1f0d 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/calcPointCells.C +++ b/applications/utilities/mesh/conversion/sammToFoam/calcPointCells.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 @@ -69,9 +69,9 @@ void Foam::sammMesh::calcPointCells() const // // For each cell - forAll(cellShapes_, cellI) + forAll(cellShapes_, celli) { - const faceList& faces = cellFaces_[cellI]; + const faceList& faces = cellFaces_[celli]; forAll(faces, i) { @@ -90,7 +90,7 @@ void Foam::sammMesh::calcPointCells() const for (label f = 0; f < curCount; f++) { - if (curPointCells[f] == cellI) + if (curPointCells[f] == celli) { found = true; @@ -108,7 +108,7 @@ void Foam::sammMesh::calcPointCells() const } // Enter the cell label in the point's cell list - curPointCells[curCount] = cellI; + curPointCells[curCount] = celli; // Increment the cell count for the point addressed cellCount[curPoint]++; diff --git a/applications/utilities/mesh/conversion/sammToFoam/createBoundaryFaces.C b/applications/utilities/mesh/conversion/sammToFoam/createBoundaryFaces.C index 20aeb4245d50f9cc635c6daeb6aa3c002f53405f..a264dcfb38ca3213f81457aec6900c6b57c4cafe 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/createBoundaryFaces.C +++ b/applications/utilities/mesh/conversion/sammToFoam/createBoundaryFaces.C @@ -76,11 +76,11 @@ void Foam::sammMesh::createBoundaryFaces() const labelListList& PointCells = pointCells(); - forAll(patchFaces, faceI) + forAll(patchFaces, facei) { bool found = false; - face& curFace = patchFaces[faceI]; + face& curFace = patchFaces[facei]; const labelList& facePoints = curFace; forAll(facePoints, pointI) @@ -88,10 +88,10 @@ void Foam::sammMesh::createBoundaryFaces() const labelList& facePointCells = PointCells[facePoints[pointI]]; - forAll(facePointCells, cellI) + forAll(facePointCells, celli) { const faceList& curCellFaces = - cellFaces_[facePointCells[cellI]]; + cellFaces_[facePointCells[celli]]; forAll(curCellFaces, cellFaceI) { @@ -113,7 +113,7 @@ void Foam::sammMesh::createBoundaryFaces() if (!found) { FatalErrorInFunction - << "Face " << faceI + << "Face " << facei << " does not have neighbour cell." << endl << " face : " << endl << curFace << abort(FatalError); diff --git a/applications/utilities/mesh/conversion/sammToFoam/createPolyBoundary.C b/applications/utilities/mesh/conversion/sammToFoam/createPolyBoundary.C index e996362e2fa9ec5dc51f2bfd92f3d01a4877857e..95d838a8955e7d10d7ed01665c64ae7ee3d102b5 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/createPolyBoundary.C +++ b/applications/utilities/mesh/conversion/sammToFoam/createPolyBoundary.C @@ -47,11 +47,11 @@ void Foam::sammMesh::createPolyBoundary() polyBoundaryPatchStartIndices_[patchi] = nCreatedFaces; - forAll(curShapePatch, faceI) + forAll(curShapePatch, facei) { bool found = false; - const face& curFace = curShapePatch[faceI]; + const face& curFace = curShapePatch[facei]; meshFaces_[nCreatedFaces] = curFace; @@ -64,10 +64,10 @@ void Foam::sammMesh::createPolyBoundary() const labelList& facePointCells = PointCells[facePoints[pointI]]; - forAll(facePointCells, cellI) + forAll(facePointCells, celli) { const faceList& curCellFaces = - cellFaces_[facePointCells[cellI]]; + cellFaces_[facePointCells[celli]]; forAll(curCellFaces, cellFaceI) { @@ -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 0e2d71bd5c827bb83c7dea4a1e3cda91b9de9feb..ad7c306e4b99c445fbb147032b4f37b40b8ceb54 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/createPolyCells.C +++ b/applications/utilities/mesh/conversion/sammToFoam/createPolyCells.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 @@ -40,18 +40,18 @@ void Foam::sammMesh::createPolyCells() label maxFaces = 0; - forAll(cellPolys_, cellI) + forAll(cellPolys_, celli) { - cell& curCell = cellPolys_[cellI]; + cell& curCell = cellPolys_[celli]; - curCell.setSize(cellFaces_[cellI].size()); + curCell.setSize(cellFaces_[celli].size()); forAll(curCell, fI) { curCell[fI] = -1; } - maxFaces += cellFaces_[cellI].size(); + maxFaces += cellFaces_[celli].size(); } Info<< "Maximum possible number of faces in mesh: " << maxFaces << endl; @@ -65,7 +65,7 @@ void Foam::sammMesh::createPolyCells() nInternalFaces_ = 0; - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { // Note: // Insertion cannot be done in one go as the faces need to be @@ -73,7 +73,7 @@ void Foam::sammMesh::createPolyCells() // cells. Therefore, all neighbours will be detected first // and then added in the correct order. - const faceList& curFaces = cellFaces_[cellI]; + const faceList& curFaces = cellFaces_[celli]; // Record the neighbour cell labelList neiCells(curFaces.size(), -1); @@ -84,14 +84,14 @@ void Foam::sammMesh::createPolyCells() label nNeighbours = 0; // For all faces ... - forAll(curFaces, faceI) + forAll(curFaces, facei) { // Skip faces that have already been matched - if (cellPolys_[cellI][faceI] >= 0) continue; + if (cellPolys_[celli][facei] >= 0) continue; found = false; - const face& curFace = curFaces[faceI]; + const face& curFace = curFaces[facei]; // get the list of labels const labelList& curPoints = curFace; @@ -109,7 +109,7 @@ void Foam::sammMesh::createPolyCells() // reject neighbours with the lower label. This should // also reject current cell. - if (curNei > cellI) + if (curNei > celli) { // get the list of search faces const faceList& searchFaces = cellFaces_[curNei]; @@ -122,8 +122,8 @@ void Foam::sammMesh::createPolyCells() found = true; // Record the neighbour cell and face - neiCells[faceI] = curNei; - faceOfNeiCell[faceI] = neiFaceI; + neiCells[facei] = curNei; + faceOfNeiCell[facei] = neiFaceI; nNeighbours++; break; @@ -159,7 +159,7 @@ void Foam::sammMesh::createPolyCells() meshFaces_[nInternalFaces_] = curFaces[nextNei]; // Mark for owner - cellPolys_[cellI][nextNei] = nInternalFaces_; + cellPolys_[celli][nextNei] = nInternalFaces_; // Mark for neighbour cellPolys_[neiCells[nextNei]][faceOfNeiCell[nextNei]] = diff --git a/applications/utilities/mesh/conversion/sammToFoam/fixCollapsedEdges.C b/applications/utilities/mesh/conversion/sammToFoam/fixCollapsedEdges.C index edaf23a1cd5c23881943fc89add5895e3759bca9..8cebcb272896458f96c8eff681d4ef6c58fb49b9 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/fixCollapsedEdges.C +++ b/applications/utilities/mesh/conversion/sammToFoam/fixCollapsedEdges.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 @@ -34,21 +34,21 @@ void Foam::sammMesh::fixCollapsedEdges() { cellFaces_.setSize(cellShapes_.size()); - forAll(cellShapes_, cellI) + forAll(cellShapes_, celli) { - cellFaces_[cellI] = cellShapes_[cellI].faces(); + cellFaces_[celli] = cellShapes_[celli].faces(); } // go through the faces and find if there exist faces with duplicate // vertices. If so, purge the duplicates and mark the mesh as a polyMesh - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { - faceList& curFaces = cellFaces_[cellI]; + faceList& curFaces = cellFaces_[celli]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - face& vertexLabels = curFaces[faceI]; + face& vertexLabels = curFaces[facei]; bool duplicatesFound = false; @@ -129,7 +129,7 @@ void Foam::sammMesh::fixCollapsedEdges() if (nNewVertices < 3) { FatalErrorInFunction - << "face " << faceI << " of cell " << cellI + << "face " << facei << " of cell " << celli << " is colapsed down to a point or edge, which is " << "not permitted" << endl << "original face: " << vertexLabels << endl diff --git a/applications/utilities/mesh/conversion/sammToFoam/purgeCellShapes.C b/applications/utilities/mesh/conversion/sammToFoam/purgeCellShapes.C index f1a83194691ab3a1a12c5d7931d2d453680a515b..83b01bf72da87cbd76aaaa15e3cd3369eb10a407 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/purgeCellShapes.C +++ b/applications/utilities/mesh/conversion/sammToFoam/purgeCellShapes.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 @@ -32,20 +32,20 @@ Description void Foam::sammMesh::purgeCellShapes() { - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { - const faceList& curFaces = cellFaces_[cellI]; + const faceList& curFaces = cellFaces_[celli]; // Get model faces - faceList shapeFaces = cellShapes_[cellI].faces(); + faceList shapeFaces = cellShapes_[celli].faces(); - forAll(shapeFaces, faceI) + forAll(shapeFaces, facei) { bool found = false; forAll(curFaces, i) { - if (shapeFaces[faceI] == curFaces[i]) + if (shapeFaces[facei] == curFaces[i]) { found = true; break; @@ -54,8 +54,8 @@ void Foam::sammMesh::purgeCellShapes() if (!found) { - Info<< "Purging cell shape " << cellI << endl; - cellShapes_[cellI] = cellShape(*unknownPtr_, labelList(0)); + Info<< "Purging cell shape " << celli << endl; + cellShapes_[celli] = cellShape(*unknownPtr_, labelList(0)); break; } } diff --git a/applications/utilities/mesh/conversion/sammToFoam/readBoundary.C b/applications/utilities/mesh/conversion/sammToFoam/readBoundary.C index fcf3ef67873f9e1e276dbcadf8cfc305dba0dd96..8502c312ae80c48d7a767dea4c1faaf3c05612c2 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/readBoundary.C +++ b/applications/utilities/mesh/conversion/sammToFoam/readBoundary.C @@ -139,7 +139,7 @@ void Foam::sammMesh::readBoundary() IFstream boundaryFile(boundaryFileName); - for (label faceI=0; faceI<nFaces; faceI++) + for (label facei=0; facei<nFaces; facei++) { boundaryFile >> lineIndex; @@ -172,7 +172,7 @@ void Foam::sammMesh::readBoundary() ) { //Info<< "Converting collapsed quad into triangle" - // << " for face " << faceI + // << " for face " << facei // << " in Samm boundary " << lineIndex << endl; pointLabelsTri[0] = pointLabels[0]; diff --git a/applications/utilities/mesh/conversion/sammToFoam/readCells.C b/applications/utilities/mesh/conversion/sammToFoam/readCells.C index c46270c312bcb7c3bd9b72dadbda6a1b934fbcc9..355596b711441d1f20a89afa830cf37892f57ee8 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/readCells.C +++ b/applications/utilities/mesh/conversion/sammToFoam/readCells.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 @@ -230,7 +230,7 @@ void Foam::sammMesh::readCells() labelList labels(24, label(-1)); label lineLabel, sammLabel, regionLabel, typeFlag; - for (label cellI = 0; cellI < nCells; cellI++) + for (label celli = 0; celli < nCells; celli++) { label nLabels = 0; @@ -294,15 +294,15 @@ void Foam::sammMesh::readCells() } while (typeFlag == -1 || addOnToCell); - starCellLabelLookup_[lineLabel] = cellI; + starCellLabelLookup_[lineLabel] = celli; if (nLabels == 8) { - addRegularCell(labels, cellI); + addRegularCell(labels, celli); } else { - addSAMMcell(typeFlag, labels, cellI); + addSAMMcell(typeFlag, labels, celli); } } } diff --git a/applications/utilities/mesh/conversion/sammToFoam/readCouples.C b/applications/utilities/mesh/conversion/sammToFoam/readCouples.C index eee39a4d4dfe4c6b6f0c7ff46f979a914c4d87c4..542aa7be31c2ddb0c85fd92764c9a87a504571df 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/readCouples.C +++ b/applications/utilities/mesh/conversion/sammToFoam/readCouples.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 @@ -127,15 +127,15 @@ void Foam::sammMesh::readCouples() } // Once all couples are read, remove zero size faces from all cells - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { - faceList& curFaces = cellFaces_[cellI]; + faceList& curFaces = cellFaces_[celli]; label zeroSizeFound = 0; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - if (curFaces[faceI].empty()) + if (curFaces[facei].empty()) { zeroSizeFound++; } @@ -150,11 +150,11 @@ void Foam::sammMesh::readCouples() label nFaces = 0; - forAll(oldFaces, faceI) + forAll(oldFaces, facei) { - if (oldFaces[faceI].size()) + if (oldFaces[facei].size()) { - curFaces[nFaces] = oldFaces[faceI]; + curFaces[nFaces] = oldFaces[facei]; nFaces++; } diff --git a/applications/utilities/mesh/conversion/sammToFoam/sammMesh.C b/applications/utilities/mesh/conversion/sammToFoam/sammMesh.C index 3ec7358e0679eb6435ab94c3ddd57438b8d38355..188d1d35a12f48248a726a2f81301fdc0b8bef45 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/sammMesh.C +++ b/applications/utilities/mesh/conversion/sammToFoam/sammMesh.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 @@ -128,21 +128,21 @@ void Foam::sammMesh::createPolyMeshData() label nProblemCells = 0; // check that there is no zeros in the cellPolys_ - forAll(cellPolys_, cellI) + forAll(cellPolys_, celli) { - const labelList& curFaceLabels = cellPolys_[cellI]; + const labelList& curFaceLabels = cellPolys_[celli]; - forAll(curFaceLabels, faceI) + forAll(curFaceLabels, facei) { - if (curFaceLabels[faceI] == -1) + if (curFaceLabels[facei] == -1) { - Info<< "cell " << cellI + Info<< "cell " << celli << " has got an unmatched face. " - << "Index: " << cellShapes_[cellI].model().index() << endl -// << "cell shape: " << cellShapes_[cellI] << endl -// << "shape faces: " << cellShapes_[cellI].faces() << endl - << "cellPolys: " << cellPolys_[cellI] << endl -// << "cell faces: " << cellFaces_[cellI] + << "Index: " << cellShapes_[celli].model().index() << endl +// << "cell shape: " << cellShapes_[celli] << endl +// << "shape faces: " << cellShapes_[celli].faces() << endl + << "cellPolys: " << cellPolys_[celli] << endl +// << "cell faces: " << cellFaces_[celli] << endl; nProblemCells++; diff --git a/applications/utilities/mesh/conversion/star3ToFoam/calcPointCells.C b/applications/utilities/mesh/conversion/star3ToFoam/calcPointCells.C index 044196c392a5d170ccdfa0b14dbc41738056c454..af9c763916eeb9331387a8e67eff274951b316dd 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/calcPointCells.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/calcPointCells.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 @@ -69,9 +69,9 @@ void Foam::starMesh::calcPointCells() const // // For each cell - forAll(cellShapes_, cellI) + forAll(cellShapes_, celli) { - const faceList& faces = cellFaces_[cellI]; + const faceList& faces = cellFaces_[celli]; forAll(faces, i) { @@ -90,7 +90,7 @@ void Foam::starMesh::calcPointCells() const for (label f = 0; f < curCount; f++) { - if (curPointCells[f] == cellI) + if (curPointCells[f] == celli) { found = true; @@ -108,7 +108,7 @@ void Foam::starMesh::calcPointCells() const } // Enter the cell label in the point's cell list - curPointCells[curCount] = cellI; + curPointCells[curCount] = celli; // Increment the cell count for the point addressed cellCount[curPoint]++; diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C b/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C index 2cf2ba46737a042f4d5f820ab947c41a579dd4fe..7956f17ac6846ff30f4d413800d40db8890237dd 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C @@ -110,11 +110,11 @@ void Foam::starMesh::markBoundaryFaces() const labelListList& PointCells = pointCells(); - forAll(patchFaces, faceI) + forAll(patchFaces, facei) { bool found = false; - const face& curFace = patchFaces[faceI]; + const face& curFace = patchFaces[facei]; const labelList& facePoints = curFace; forAll(facePoints, pointI) @@ -122,9 +122,9 @@ void Foam::starMesh::markBoundaryFaces() const labelList& facePointCells = PointCells[facePoints[pointI]]; - forAll(facePointCells, cellI) + forAll(facePointCells, celli) { - const label curCellIndex = facePointCells[cellI]; + const label curCellIndex = facePointCells[celli]; const faceList& curCellFaces = cellFaces_[curCellIndex]; @@ -137,8 +137,8 @@ void Foam::starMesh::markBoundaryFaces() found = true; // Set boundary face to the corresponding cell face - curBoundaryCellIDs[faceI] = curCellIndex; - curBoundaryCellFaceIDs[faceI] = cellFaceI; + curBoundaryCellIDs[facei] = curCellIndex; + curBoundaryCellFaceIDs[facei] = cellFaceI; } if (found) break; } @@ -149,7 +149,7 @@ void Foam::starMesh::markBoundaryFaces() if (!found) { FatalErrorInFunction - << "Face " << faceI + << "Face " << facei << " does not have neighbour cell." << " Face : " << endl << curFace << endl << "PROSTAR Command: vset,news,vlis"; @@ -186,11 +186,11 @@ void Foam::starMesh::collectBoundaryFaces() const labelList& curBoundaryCellIDs = boundaryCellIDs_[patchi]; const labelList& curBoundaryCellFaceIDs = boundaryCellFaceIDs_[patchi]; - forAll(curBoundaryCellIDs, faceI) + forAll(curBoundaryCellIDs, facei) { - patchFaces[faceI] = - cellFaces_[curBoundaryCellIDs[faceI]] - [curBoundaryCellFaceIDs[faceI]]; + patchFaces[facei] = + cellFaces_[curBoundaryCellIDs[facei]] + [curBoundaryCellFaceIDs[facei]]; } } diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C b/applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C index 70ca236c7c297fe40d311a84a14b666ef5891e21..b1058ec08df3f1ab844e05becde6f0148220cb82 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/createCoupleMatches.C @@ -1423,9 +1423,9 @@ void Foam::starMesh::createCoupleMatches() // Loop through all cells and reset faces for removal to zero size const labelList crfToc = cellRemovedFaces.toc(); - forAll(crfToc, cellI) + forAll(crfToc, celli) { - const label curCell = crfToc[cellI]; + const label curCell = crfToc[celli]; const SLList<label>& curRemovedFaces = cellRemovedFaces[curCell]; @@ -1450,9 +1450,9 @@ void Foam::starMesh::createCoupleMatches() const labelList cafToc = cellAddedFaces.toc(); // Insert the new faces into the list - forAll(cafToc, cellI) + forAll(cafToc, celli) { - const label curCell = cafToc[cellI]; + const label curCell = cafToc[celli]; const SLList<face>& curAddedFaces = cellAddedFaces[curCell]; @@ -1464,11 +1464,11 @@ void Foam::starMesh::createCoupleMatches() label nNewFaces = 0; // copy original faces that have not been removed - forAll(oldFaces, faceI) + forAll(oldFaces, facei) { - if (oldFaces[faceI].size()) + if (oldFaces[facei].size()) { - newFaces[nNewFaces] = oldFaces[faceI]; + newFaces[nNewFaces] = oldFaces[facei]; nNewFaces++; } } diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C b/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C index de2d5dff263bce520d44786146cade4b25a39ba5..25ab3bda4f8b3ec514e0f3c1de31d6e1a26e544a 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C @@ -47,11 +47,11 @@ void Foam::starMesh::createPolyBoundary() polyBoundaryPatchStartIndices_[patchi] = nCreatedFaces; - forAll(curShapePatch, faceI) + forAll(curShapePatch, facei) { bool found = false; - const face& curFace = curShapePatch[faceI]; + const face& curFace = curShapePatch[facei]; meshFaces_[nCreatedFaces] = curFace; @@ -64,10 +64,10 @@ void Foam::starMesh::createPolyBoundary() const labelList& facePointCells = PointCells[facePoints[pointI]]; - forAll(facePointCells, cellI) + forAll(facePointCells, celli) { const faceList& curCellFaces = - cellFaces_[facePointCells[cellI]]; + cellFaces_[facePointCells[celli]]; forAll(curCellFaces, cellFaceI) { @@ -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_ ) { @@ -157,7 +157,7 @@ void Foam::starMesh::createPolyBoundary() } } - cellPolys_[facePointCells[cellI]][cellFaceI] = + cellPolys_[facePointCells[celli]][cellFaceI] = nCreatedFaces; nBoundaryFacesFound++; @@ -176,20 +176,20 @@ void Foam::starMesh::createPolyBoundary() // check all cellPolys_ to see if there are any missing faces label nMissingFaceFound = 0; - forAll(cellPolys_, cellI) + forAll(cellPolys_, celli) { - const labelList& curFaces = cellPolys_[cellI]; + const labelList& curFaces = cellPolys_[celli]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - if (curFaces[faceI] < 0) + if (curFaces[facei] < 0) { - const face& missingFace = cellFaces_[cellI][faceI]; + const face& missingFace = cellFaces_[celli][facei]; InfoInFunction - << "Missing face found in cell " << cellI - << ".\nType: " << cellShapes_[cellI].model().name() - << ". STAR cell number: " << starCellID_[cellI] + << "Missing face found in cell " << celli + << ".\nType: " << cellShapes_[celli].model().name() + << ". STAR cell number: " << starCellID_[celli] << ". Face: " << missingFace << endl; nMissingFaceFound++; @@ -228,13 +228,13 @@ void Foam::starMesh::createPolyBoundary() // (faces addressed once or more than twice) labelList markupFaces(meshFaces_.size(), 0); - forAll(cellPolys_, cellI) + forAll(cellPolys_, celli) { - const labelList& curFaces = cellPolys_[cellI]; + const labelList& curFaces = cellPolys_[celli]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - markupFaces[curFaces[faceI]]++; + markupFaces[curFaces[facei]]++; } } @@ -245,15 +245,15 @@ void Foam::starMesh::createPolyBoundary() label nProblemFacesFound = 0; - forAll(markupFaces, faceI) + forAll(markupFaces, facei) { - if (markupFaces[faceI] != 2) + if (markupFaces[facei] != 2) { - const face& problemFace = meshFaces_[faceI]; + const face& problemFace = meshFaces_[facei]; InfoInFunction - << "Problem with face " << faceI << ": addressed " - << markupFaces[faceI] << " times (should be 2!). Face: " + << "Problem with face " << facei << ": addressed " + << markupFaces[facei] << " times (should be 2!). Face: " << problemFace << endl; nProblemFacesFound++; diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createPolyCells.C b/applications/utilities/mesh/conversion/star3ToFoam/createPolyCells.C index 084cf6eebdba619f770876bd3e6bee0129a36b3f..61d8915dc4af572c93249077afa55cafd893683e 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/createPolyCells.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/createPolyCells.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 @@ -40,18 +40,18 @@ void Foam::starMesh::createPolyCells() label maxFaces = 0; - forAll(cellPolys_, cellI) + forAll(cellPolys_, celli) { - cell& curCell = cellPolys_[cellI]; + cell& curCell = cellPolys_[celli]; - curCell.setSize(cellFaces_[cellI].size()); + curCell.setSize(cellFaces_[celli].size()); forAll(curCell, fI) { curCell[fI] = -1; } - maxFaces += cellFaces_[cellI].size(); + maxFaces += cellFaces_[celli].size(); } Info<< "Maximum possible number of faces in mesh: " << maxFaces << endl; @@ -65,7 +65,7 @@ void Foam::starMesh::createPolyCells() nInternalFaces_ = 0; - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { // Note: // Insertion cannot be done in one go as the faces need to be @@ -73,7 +73,7 @@ void Foam::starMesh::createPolyCells() // cells. Therefore, all neighbours will be detected first // and then added in the correct order. - const faceList& curFaces = cellFaces_[cellI]; + const faceList& curFaces = cellFaces_[celli]; // Record the neighbour cell labelList neiCells(curFaces.size(), -1); @@ -84,14 +84,14 @@ void Foam::starMesh::createPolyCells() label nNeighbours = 0; // For all faces ... - forAll(curFaces, faceI) + forAll(curFaces, facei) { // Skip faces that have already been matched - if (cellPolys_[cellI][faceI] >= 0) continue; + if (cellPolys_[celli][facei] >= 0) continue; found = false; - const face& curFace = curFaces[faceI]; + const face& curFace = curFaces[facei]; // get the list of labels const labelList& curPoints = curFace; @@ -109,7 +109,7 @@ void Foam::starMesh::createPolyCells() // reject neighbours with the lower label. This should // also reject current cell. - if (curNei > cellI) + if (curNei > celli) { // get the list of search faces const faceList& searchFaces = cellFaces_[curNei]; @@ -122,8 +122,8 @@ void Foam::starMesh::createPolyCells() found = true; // Record the neighbour cell and face - neiCells[faceI] = curNei; - faceOfNeiCell[faceI] = neiFaceI; + neiCells[facei] = curNei; + faceOfNeiCell[facei] = neiFaceI; nNeighbours++; break; @@ -159,7 +159,7 @@ void Foam::starMesh::createPolyCells() meshFaces_[nInternalFaces_] = curFaces[nextNei]; // Mark for owner - cellPolys_[cellI][nextNei] = nInternalFaces_; + cellPolys_[celli][nextNei] = nInternalFaces_; // Mark for neighbour cellPolys_[neiCells[nextNei]][faceOfNeiCell[nextNei]] = diff --git a/applications/utilities/mesh/conversion/star3ToFoam/fixCollapsedEdges.C b/applications/utilities/mesh/conversion/star3ToFoam/fixCollapsedEdges.C index 931d1a638d1b29aec26d7c8e69fda4ca0b56a218..1598ab80da6b23489cc610ac855363573f7fb5eb 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/fixCollapsedEdges.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/fixCollapsedEdges.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 @@ -34,21 +34,21 @@ void Foam::starMesh::fixCollapsedEdges() { cellFaces_.setSize(cellShapes_.size()); - forAll(cellShapes_, cellI) + forAll(cellShapes_, celli) { - cellFaces_[cellI] = cellShapes_[cellI].faces(); + cellFaces_[celli] = cellShapes_[celli].faces(); } // go through the faces and find if there exist faces with duplicate // vertices. If so, purge the duplicates and mark the mesh as a polyMesh - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { - faceList& curFaces = cellFaces_[cellI]; + faceList& curFaces = cellFaces_[celli]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - face& vertexLabels = curFaces[faceI]; + face& vertexLabels = curFaces[facei]; bool duplicatesFound = false; @@ -128,7 +128,7 @@ void Foam::starMesh::fixCollapsedEdges() if (nNewVertices < 3) { FatalErrorInFunction - << "Face " << faceI << " of cell " << cellI + << "Face " << facei << " of cell " << celli << " is colapsed down to a point or edge, which is " << "not permitted" << endl << "original face: " << vertexLabels << endl diff --git a/applications/utilities/mesh/conversion/star3ToFoam/mergeCoupleFacePoints.C b/applications/utilities/mesh/conversion/star3ToFoam/mergeCoupleFacePoints.C index 39e7a27b5d1ce4e2472c0457807bfc90e574af36..e109deec520a7f98e9b8b4b2bea01b34a3c3688a 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/mergeCoupleFacePoints.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/mergeCoupleFacePoints.C @@ -62,9 +62,9 @@ void Foam::starMesh::mergeCoupleFacePoints() label nMergeSets = 0; - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { - const faceList& curFaces = cellFaces_[cellI]; + const faceList& curFaces = cellFaces_[celli]; // create a list of all points for the cell with duplicates // and find the shortest edge length @@ -73,11 +73,11 @@ void Foam::starMesh::mergeCoupleFacePoints() scalar pointMergeTol = GREAT; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - nPointsInCell += curFaces[faceI].size(); + nPointsInCell += curFaces[facei].size(); - edgeList curEdges = curFaces[faceI].edges(); + edgeList curEdges = curFaces[facei].edges(); forAll(curEdges, edgeI) { @@ -97,9 +97,9 @@ void Foam::starMesh::mergeCoupleFacePoints() labelList cellPoints(nPointsInCell); label nAddedPoints = 0; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - const face& f = curFaces[faceI]; + const face& f = curFaces[facei]; forAll(f, fI) { @@ -252,15 +252,15 @@ void Foam::starMesh::mergeCoupleFacePoints() // renumbering of all faces. This will only be used to see which // points are still used! - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { - faceList& prelimFaces = cellFaces_[cellI]; + faceList& prelimFaces = cellFaces_[celli]; - forAll(prelimFaces, faceI) + forAll(prelimFaces, facei) { - face oldFacePoints = prelimFaces[faceI]; + face oldFacePoints = prelimFaces[facei]; - face& prelimFacePoints = prelimFaces[faceI]; + face& prelimFacePoints = prelimFaces[facei]; forAll(prelimFacePoints, pointI) { @@ -283,13 +283,13 @@ void Foam::starMesh::mergeCoupleFacePoints() // re-create the point list and renumber the whole lot renumberPoints = 0; - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { - const faceList& curFaces = cellFaces_[cellI]; + const faceList& curFaces = cellFaces_[celli]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - const face& curFacePoints = curFaces[faceI]; + const face& curFacePoints = curFaces[facei]; forAll(curFacePoints, pointI) { @@ -298,9 +298,9 @@ void Foam::starMesh::mergeCoupleFacePoints() } } - forAll(cellShapes_, cellI) + forAll(cellShapes_, celli) { - const labelList& curLabels = cellShapes_[cellI]; + const labelList& curLabels = cellShapes_[celli]; forAll(curLabels, pointI) { @@ -308,7 +308,7 @@ void Foam::starMesh::mergeCoupleFacePoints() { FatalErrorInFunction << "Error in point merging for cell " - << cellI << ". STAR index: " << starCellID_[cellI] + << celli << ". STAR index: " << starCellID_[celli] << ". " << endl << "Point index: " << curLabels[pointI] << " STAR index " << starPointID_[curLabels[pointI]] << endl @@ -346,15 +346,15 @@ void Foam::starMesh::mergeCoupleFacePoints() Info<< "Renumbering all faces" << endl; - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { - faceList& newFaces = cellFaces_[cellI]; + faceList& newFaces = cellFaces_[celli]; - forAll(newFaces, faceI) + forAll(newFaces, facei) { - face oldFacePoints = newFaces[faceI]; + face oldFacePoints = newFaces[facei]; - face& newFacePoints = newFaces[faceI]; + face& newFacePoints = newFaces[facei]; forAll(newFacePoints, pointI) { @@ -375,11 +375,11 @@ void Foam::starMesh::mergeCoupleFacePoints() Info<< "Renumbering all cell shapes" << endl; - forAll(cellShapes_, cellI) + forAll(cellShapes_, celli) { - labelList oldLabels = cellShapes_[cellI]; + labelList oldLabels = cellShapes_[celli]; - labelList& curLabels = cellShapes_[cellI]; + labelList& curLabels = cellShapes_[celli]; forAll(curLabels, pointI) { @@ -387,7 +387,7 @@ void Foam::starMesh::mergeCoupleFacePoints() { FatalErrorInFunction << "Error in point renumbering for cell " - << cellI << ". STAR index: " << starCellID_[cellI] + << celli << ". STAR index: " << starCellID_[celli] << ". " << endl << "Point index: " << curLabels[pointI] << " STAR index " << starPointID_[curLabels[pointI]] << " returns invalid " diff --git a/applications/utilities/mesh/conversion/star3ToFoam/purgeCellShapes.C b/applications/utilities/mesh/conversion/star3ToFoam/purgeCellShapes.C index dbaf5b9f51a48661f1f254cf38583473637cc3f8..8981016043be3879b60c76644f187fa4a26390c7 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/purgeCellShapes.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/purgeCellShapes.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 @@ -32,20 +32,20 @@ Description void Foam::starMesh::purgeCellShapes() { - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { - const faceList& curFaces = cellFaces_[cellI]; + const faceList& curFaces = cellFaces_[celli]; // Get model faces - faceList shapeFaces = cellShapes_[cellI].faces(); + faceList shapeFaces = cellShapes_[celli].faces(); - forAll(shapeFaces, faceI) + forAll(shapeFaces, facei) { bool found = false; forAll(curFaces, i) { - if (shapeFaces[faceI] == curFaces[i]) + if (shapeFaces[facei] == curFaces[i]) { found = true; break; @@ -54,8 +54,8 @@ void Foam::starMesh::purgeCellShapes() if (!found) { - Info<< "Purging cell shape " << cellI << endl; - cellShapes_[cellI] = cellShape(*unknownPtr_, labelList(0)); + Info<< "Purging cell shape " << celli << endl; + cellShapes_[celli] = cellShape(*unknownPtr_, labelList(0)); break; } } diff --git a/applications/utilities/mesh/conversion/star3ToFoam/readBoundary.C b/applications/utilities/mesh/conversion/star3ToFoam/readBoundary.C index aaef0db69a09b231d13412bfab1425b53ee17981..4f1831bb2a636432424875bb77c899189bb04b5d 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/readBoundary.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/readBoundary.C @@ -137,7 +137,7 @@ void Foam::starMesh::readBoundary() IFstream boundaryFile(boundaryFileName); - for (label faceI=0; faceI<nFaces; faceI++) + for (label facei=0; facei<nFaces; facei++) { boundaryFile >> lineIndex; @@ -170,7 +170,7 @@ void Foam::starMesh::readBoundary() ) { //Info<< "Converting collapsed quad into triangle" - // << " for face " << faceI + // << " for face " << facei // << " in Star boundary " << lineIndex << endl; pointLabelsTri[0] = pointLabels[0]; diff --git a/applications/utilities/mesh/conversion/star3ToFoam/readCells.C b/applications/utilities/mesh/conversion/star3ToFoam/readCells.C index 265de9c72fc1b3d0e9426e6790395c4b225f8475..92d75fa1224940d126ed1632d17a5d273df88fea 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/readCells.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/readCells.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 @@ -275,7 +275,7 @@ void Foam::starMesh::readCells() labelList labels(24, label(-1)); label lineLabel, starLabel, regionLabel, typeFlag; - for (label cellI = 0; cellI < nCells; cellI++) + for (label celli = 0; celli < nCells; celli++) { label nLabels = 0; @@ -346,29 +346,29 @@ void Foam::starMesh::readCells() } while (addOnToCell >= 0); // Record STAR cell number (used for debugging) - starCellID_[cellI] = lineLabel; + starCellID_[celli] = lineLabel; // insert STAR lookup addressing - starCellLabelLookup_[lineLabel] = cellI; + starCellLabelLookup_[lineLabel] = celli; if (nLabels == 8) { - addRegularCell(labels, cellI); + addRegularCell(labels, celli); } else { - addSAMMcell(labels, cellI); + addSAMMcell(labels, celli); } // check cell labels - const labelList& curShapeLabels = cellShapes_[cellI]; + const labelList& curShapeLabels = cellShapes_[celli]; forAll(curShapeLabels, i) { if (curShapeLabels[i] < 0) { FatalErrorInFunction - << "Invalid vertex found in cell " << cellI + << "Invalid vertex found in cell " << celli << ". STAR cell no: " << lineLabel << " labels: " << curShapeLabels << abort(FatalError); diff --git a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C index e28880fbcaa0ab103286cd5cd76129af8d91125c..b6c694b7bd09a2a0496184f4ec654ae0fa8b2b0d 100644 --- a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C +++ b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C @@ -80,11 +80,11 @@ label findFace(const primitiveMesh& mesh, const face& f) forAll(pFaces, i) { - label faceI = pFaces[i]; + label facei = pFaces[i]; - if (mesh.faces()[faceI] == f) + if (mesh.faces()[facei] == f) { - return faceI; + return facei; } } @@ -279,7 +279,7 @@ int main(int argc, char *argv[]) labelList tetPoints(4); cellShapeList cells(nTets); - label cellI = 0; + label celli = 0; while (eleStream.good()) { @@ -299,7 +299,7 @@ int main(int argc, char *argv[]) tetPoints[i] = nodeToPoint[nodeI]; } - cells[cellI++] = cellShape(tet, tetPoints); + cells[celli++] = cellShape(tet, tetPoints); // Skip attributes for (label i = 0; i < nElemAttr; i++) @@ -391,7 +391,7 @@ int main(int argc, char *argv[]) boundaryPatch.setSize(nFaces); boundaryPatch = -1; - label faceI = 0; + label facei = 0; // Region to patch conversion Map<label> regionToPatch; @@ -422,7 +422,7 @@ int main(int argc, char *argv[]) if (findFace(mesh, f) >= mesh.nInternalFaces()) { - boundaryFaces[faceI] = f; + boundaryFaces[facei] = f; if (nFaceAttr > 0) { @@ -451,7 +451,7 @@ int main(int argc, char *argv[]) patchi = patchFind(); } - boundaryPatch[faceI] = patchi; + boundaryPatch[facei] = patchi; // Skip remaining attributes for (label i = 1; i < nFaceAttr; i++) @@ -460,15 +460,15 @@ int main(int argc, char *argv[]) } } - faceI++; + facei++; } } } // Trim - boundaryFaces.setSize(faceI); - boundaryPatch.setSize(faceI); + boundaryFaces.setSize(facei); + boundaryPatch.setSize(facei); // Print region to patch mapping @@ -500,11 +500,11 @@ int main(int argc, char *argv[]) // Sort boundaryFaces by patch using boundaryPatch. List<DynamicList<face>> allPatchFaces(nPatches); - forAll(boundaryPatch, faceI) + forAll(boundaryPatch, facei) { - label patchi = boundaryPatch[faceI]; + label patchi = boundaryPatch[facei]; - allPatchFaces[patchi].append(boundaryFaces[faceI]); + allPatchFaces[patchi].append(boundaryFaces[facei]); } Info<< "Patch sizes:" << endl; diff --git a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C index 4129e7e56e4136efa0c972ce513b737be3f77dbf..231c93468ffb54306cb8b1aa74e46c22c9fd1937 100644 --- a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C +++ b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C @@ -106,9 +106,9 @@ void writePoints forAll(cellLabels, i) { - label cellI = cellLabels[i]; + label celli = cellLabels[i]; - const labelList& cEdges = mesh.cellEdges()[cellI]; + const labelList& cEdges = mesh.cellEdges()[celli]; forAll(cEdges, cEdgeI) { @@ -155,21 +155,21 @@ void writePoints void writePoints ( const polyMesh& mesh, - const label cellI, + const label celli, const fileName& timeName ) { fileName fName ( mesh.time().path() - / "meshPoints_" + timeName + '_' + name(cellI) + ".obj" + / "meshPoints_" + timeName + '_' + name(celli) + ".obj" ); Info<< "Writing mesh points and edges to " << fName << endl; OFstream pointStream(fName); - const cell& cFaces = mesh.cells()[cellI]; + const cell& cFaces = mesh.cells()[celli]; meshTools::writeOBJ(pointStream, mesh.faces(), mesh.points(), cFaces); } @@ -189,9 +189,9 @@ void writeFaceCentres(const polyMesh& mesh,const fileName& timeName) OFstream faceStream(faceFile); - forAll(mesh.faceCentres(), faceI) + forAll(mesh.faceCentres(), facei) { - writeOBJ(mesh.faceCentres()[faceI], faceStream); + writeOBJ(mesh.faceCentres()[facei], faceStream); } } @@ -207,9 +207,9 @@ void writeCellCentres(const polyMesh& mesh, const fileName& timeName) OFstream cellStream(cellFile); - forAll(mesh.cellCentres(), cellI) + forAll(mesh.cellCentres(), celli) { - writeOBJ(mesh.cellCentres()[cellI], cellStream); + writeOBJ(mesh.cellCentres()[celli], cellStream); } } @@ -235,9 +235,9 @@ void writePatchCentres OFstream patchFaceStream(faceFile); - forAll(pp.faceCentres(), faceI) + forAll(pp.faceCentres(), facei) { - writeOBJ(pp.faceCentres()[faceI], patchFaceStream); + writeOBJ(pp.faceCentres()[facei], patchFaceStream); } } } @@ -270,9 +270,9 @@ void writePatchFaces writeOBJ(pp.localPoints()[pointI], patchFaceStream); } - forAll(pp.localFaces(), faceI) + forAll(pp.localFaces(), facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; patchFaceStream<< 'f'; @@ -464,9 +464,9 @@ int main(int argc, char *argv[]) } if (doCell) { - label cellI = args.optionRead<label>("cell"); + label celli = args.optionRead<label>("cell"); - writePoints(mesh, cellI, runTime.timeName()); + writePoints(mesh, celli, runTime.timeName()); } if (doPoint) { @@ -476,7 +476,7 @@ int main(int argc, char *argv[]) } if (doFace) { - label faceI = args.optionRead<label>("face"); + label facei = args.optionRead<label>("face"); fileName fName ( @@ -484,7 +484,7 @@ int main(int argc, char *argv[]) / "meshPoints_" + runTime.timeName() + '_' - + name(faceI) + + name(facei) + ".obj" ); @@ -492,7 +492,7 @@ int main(int argc, char *argv[]) OFstream str(fName); - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; meshTools::writeOBJ(str, faceList(1, f), mesh.points()); } diff --git a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C index 3ccb09b610e916441872d2030257e6d5abc52799..8715dc39ff49ebcffe2bdf1f52efb2638a3af11a 100644 --- a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C +++ b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C @@ -188,10 +188,10 @@ int main(int argc, char *argv[]) const pointField& cellCentres = topo.cellCentres(); - forAll(cellCentres, cellI) + forAll(cellCentres, celli) { //point cc = b.blockShape().centre(b.points()); - const point& cc = cellCentres[cellI]; + const point& cc = cellCentres[celli]; str << "v " << cc.x() << ' ' << cc.y() << ' ' << cc.z() << nl; } @@ -257,7 +257,7 @@ int main(int argc, char *argv[]) List<DynamicList<label>> zoneCells(nZones); // Running cell counter - label cellI = 0; + label celli = 0; // Largest zone so far label freeZoneI = 0; @@ -289,12 +289,12 @@ int main(int argc, char *argv[]) forAll(blockCells, i) { - zoneCells[zoneI].append(cellI++); + zoneCells[zoneI].append(celli++); } } else { - cellI += b.cells().size(); + celli += b.cells().size(); } } diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C index db21b254acc5dfbb7f83f29b156aa8d2b2f5b7dc..62bf51eb9e54c58d7bc2d9ce2eb5ecb5c02521d3 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C @@ -744,9 +744,9 @@ int main(int argc, char *argv[]) layerExtrude.layerFaces() ) ); - forAll(addedCells, faceI) + forAll(addedCells, facei) { - const labelList& aCells = addedCells[faceI]; + const labelList& aCells = addedCells[facei]; forAll(aCells, i) { addedCellsSet.insert(aCells[i]); diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index 0e5421aedff6bdbac762ea46a782d78bc0fb83fe..c4f6aea5bbee42b8f6c2c9632e65978a90c515b4 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -426,14 +426,14 @@ void checkZoneInside forAll(extrudeMeshFaces, i) { - label faceI = extrudeMeshFaces[i]; + label facei = extrudeMeshFaces[i]; label zoneI = zoneID[i]; - if (isInternal[zoneI] != mesh.isInternalFace(faceI)) + if (isInternal[zoneI] != mesh.isInternalFace(facei)) { FatalErrorInFunction << "Zone " << zoneNames[zoneI] << " is not consistently all internal or all boundary faces." - << " Face " << faceI << " at " << mesh.faceCentres()[faceI] + << " Face " << facei << " at " << mesh.faceCentres()[facei] << " is the first occurrence." << exit(FatalError); } @@ -532,17 +532,17 @@ label findUncoveredPatchFace const labelList& eFaces = mesh.edgeFaces()[meshEdgeI]; forAll(eFaces, i) { - label faceI = eFaces[i]; - label patchi = pbm.whichPatch(faceI); + label facei = eFaces[i]; + label patchi = pbm.whichPatch(facei); if ( patchi != -1 && !pbm[patchi].coupled() - && !extrudeFaceSet.found(faceI) + && !extrudeFaceSet.found(facei) ) { - return faceI; + return facei; } } return -1; @@ -568,17 +568,17 @@ label findUncoveredCyclicPatchFace const labelList& eFaces = mesh.edgeFaces()[meshEdgeI]; forAll(eFaces, i) { - label faceI = eFaces[i]; - label patchi = pbm.whichPatch(faceI); + label facei = eFaces[i]; + label patchi = pbm.whichPatch(facei); if ( patchi != -1 && isA<cyclicPolyPatch>(pbm[patchi]) - && !extrudeFaceSet.found(faceI) + && !extrudeFaceSet.found(facei) ) { - return faceI; + return facei; } } return -1; @@ -705,14 +705,14 @@ void countExtrudePatches // so choose any uncovered one. If none found put face in // undetermined zone 'side' patch - label faceI = findUncoveredPatchFace + label facei = findUncoveredPatchFace ( mesh, UIndirectList<label>(extrudeMeshFaces, eFaces), extrudeMeshEdges[edgeI] ); - if (faceI == -1) + if (facei == -1) { zoneSidePatch[minZoneID[edgeI]]++; } @@ -927,21 +927,21 @@ void addCoupledPatches // Cyclic patch since both procs the same. This cyclic should // already exist in newPatches so no adding necessary. - label faceI = findUncoveredCyclicPatchFace + label facei = findUncoveredCyclicPatchFace ( mesh, UIndirectList<label>(extrudeMeshFaces, eFaces), extrudeMeshEdges[edgeI] ); - if (faceI != -1) + if (facei != -1) { const polyBoundaryMesh& patches = mesh.boundaryMesh(); label newPatchI = findPatchID ( newPatches, - patches[patches.whichPatch(faceI)].name() + patches[patches.whichPatch(facei)].name() ); sidePatchID[edgeI] = newPatchI; @@ -1305,26 +1305,26 @@ void extrudeGeometricProperties // Work out layers. Guaranteed in columns so no fancy parallel bits. - forAll(extruder.faceToFaceMap(), faceI) + forAll(extruder.faceToFaceMap(), facei) { - if (extruder.faceToFaceMap()[faceI] != 0) + 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)) + label celli = regionMesh.faceOwner()[facei]; + if (regionMesh.isInternalFace(facei)) { - cellI = max(cellI, regionMesh.faceNeighbour()[faceI]); + celli = max(celli, regionMesh.faceNeighbour()[facei]); } // Calculate layer from cell numbering (see createShellMesh) - label layerI = (cellI % model.nLayers()); + label layerI = (celli % model.nLayers()); if ( - !regionMesh.isInternalFace(faceI) - && extruder.faceToFaceMap()[faceI] > 0 + !regionMesh.isInternalFace(facei) + && extruder.faceToFaceMap()[facei] > 0 ) { // Top face @@ -1333,7 +1333,7 @@ void extrudeGeometricProperties // Recalculate based on extrusion model - faceCentres[faceI] = model + faceCentres[facei] = model ( patchFaceCentres[patchFaceI], extrudePatch.faceNormals()[patchFaceI], @@ -1343,10 +1343,10 @@ void extrudeGeometricProperties else { // 'vertical face - label patchEdgeI = extruder.faceToEdgeMap()[faceI]; + label patchEdgeI = extruder.faceToEdgeMap()[facei]; label layerI = ( - regionMesh.faceOwner()[faceI] + regionMesh.faceOwner()[facei] % model.nLayers() ); @@ -1366,7 +1366,7 @@ void extrudeGeometricProperties ); // Interpolate - faceCentres[faceI] = 0.5*(pt0+pt1); + faceCentres[facei] = 0.5*(pt0+pt1); } } @@ -1385,12 +1385,12 @@ void extrudeGeometricProperties regionMesh.nCells() ); - forAll(extruder.cellToFaceMap(), cellI) + 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()); + label layerI = (celli % model.nLayers()); // Recalculate based on extrusion model point pt0 = model @@ -1407,7 +1407,7 @@ void extrudeGeometricProperties ); // Interpolate - cellCentres[cellI] = 0.5*(pt0+pt1); + cellCentres[celli] = 0.5*(pt0+pt1); } @@ -1417,29 +1417,29 @@ void extrudeGeometricProperties OBJstream faceStr(regionMesh.time().path()/"faceCentres.obj"); OBJstream cellStr(regionMesh.time().path()/"cellCentres.obj"); - forAll(faceCentres, faceI) + forAll(faceCentres, facei) { - Pout<< "Model :" << faceCentres[faceI] << endl - << "regionMesh:" << regionMesh.faceCentres()[faceI] << endl; + Pout<< "Model :" << faceCentres[facei] << endl + << "regionMesh:" << regionMesh.faceCentres()[facei] << endl; faceStr.write ( linePointRef ( - faceCentres[faceI], - regionMesh.faceCentres()[faceI] + faceCentres[facei], + regionMesh.faceCentres()[facei] ) ); } - forAll(cellCentres, cellI) + forAll(cellCentres, celli) { - Pout<< "Model :" << cellCentres[cellI] << endl - << "regionMesh:" << regionMesh.cellCentres()[cellI] << endl; + Pout<< "Model :" << cellCentres[celli] << endl + << "regionMesh:" << regionMesh.cellCentres()[celli] << endl; cellStr.write ( linePointRef ( - cellCentres[cellI], - regionMesh.cellCentres()[cellI] + cellCentres[celli], + regionMesh.cellCentres()[celli] ) ); } @@ -1798,8 +1798,8 @@ int main(int argc, char *argv[]) const faceSet& fz = zones[i]; forAllConstIter(faceSet, fz, iter) { - label faceI = iter.key(); - if (mesh.isInternalFace(faceI)) + label facei = iter.key(); + if (mesh.isInternalFace(facei)) { FatalIOErrorIn(args.executable().c_str(), dict) << "faceSet " << fz.name() @@ -1807,13 +1807,13 @@ int main(int argc, char *argv[]) << " This is not permitted." << exit(FatalIOError); } - extrudeMeshFaces[nExtrudeFaces] = faceI; - zoneFaces[nExtrudeFaces] = mesh.faces()[faceI]; + extrudeMeshFaces[nExtrudeFaces] = facei; + zoneFaces[nExtrudeFaces] = mesh.faces()[facei]; zoneID[nExtrudeFaces] = i; zoneFlipMap[nExtrudeFaces] = false; nExtrudeFaces++; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { isInternal[i] = true; } @@ -1858,8 +1858,8 @@ int main(int argc, char *argv[]) const faceSet& fz = shadowZones[i]; forAllConstIter(faceSet, fz, iter) { - label faceI = iter.key(); - if (mesh.isInternalFace(faceI)) + label facei = iter.key(); + if (mesh.isInternalFace(facei)) { FatalIOErrorIn(args.executable().c_str(), dict) << "faceSet " << fz.name() @@ -1867,7 +1867,7 @@ int main(int argc, char *argv[]) << " This is not permitted." << exit(FatalIOError); } - extrudeMeshShadowFaces[nShadowFaces] = faceI; + extrudeMeshShadowFaces[nShadowFaces] = facei; zoneShadowFlipMap[nShadowFaces] = false; zoneShadowID[nShadowFaces] = i; nShadowFaces++; @@ -2042,10 +2042,10 @@ int main(int argc, char *argv[]) labelList extrudeTopPatchID(extrudePatch.size()); labelList extrudeBottomPatchID(extrudePatch.size()); - forAll(zoneID, faceI) + forAll(zoneID, facei) { - extrudeTopPatchID[faceI] = interRegionTopPatch[zoneID[faceI]]; - extrudeBottomPatchID[faceI] = interRegionBottomPatch[zoneID[faceI]]; + extrudeTopPatchID[facei] = interRegionTopPatch[zoneID[facei]]; + extrudeBottomPatchID[facei] = interRegionBottomPatch[zoneID[facei]]; } @@ -2231,19 +2231,19 @@ int main(int argc, char *argv[]) } else { - label faceI = findUncoveredPatchFace + label facei = findUncoveredPatchFace ( mesh, UIndirectList<label>(extrudeMeshFaces, eFaces), extrudeMeshEdges[edgeI] ); - if (faceI != -1) + if (facei != -1) { label newPatchI = findPatchID ( regionPatches, - patches[patches.whichPatch(faceI)].name() + patches[patches.whichPatch(facei)].name() ); ePatches.setSize(eFaces.size(), newPatchI); } @@ -2283,10 +2283,10 @@ int main(int argc, char *argv[]) // Per local region an originating point labelList localRegionPoints(localToGlobalRegion.size()); - forAll(pointLocalRegions, faceI) + forAll(pointLocalRegions, facei) { - const face& f = extrudePatch.localFaces()[faceI]; - const face& pRegions = pointLocalRegions[faceI]; + const face& f = extrudePatch.localFaces()[facei]; + const face& pRegions = pointLocalRegions[facei]; forAll(pRegions, fp) { localRegionPoints[pRegions[fp]] = f[fp]; @@ -2298,13 +2298,13 @@ int main(int argc, char *argv[]) { pointField localSum(localToGlobalRegion.size(), Zero); - forAll(pointLocalRegions, faceI) + forAll(pointLocalRegions, facei) { - const face& pRegions = pointLocalRegions[faceI]; + const face& pRegions = pointLocalRegions[facei]; forAll(pRegions, fp) { label localRegionI = pRegions[fp]; - localSum[localRegionI] += extrudePatch.faceNormals()[faceI]; + localSum[localRegionI] += extrudePatch.faceNormals()[facei]; } } @@ -2337,13 +2337,13 @@ int main(int argc, char *argv[]) scalar thickness = model().sumThickness(1); - forAll(pointLocalRegions, faceI) + forAll(pointLocalRegions, facei) { - const face& f = extrudeFaces[faceI]; + const face& f = extrudeFaces[facei]; forAll(f, fp) { - label region = pointLocalRegions[faceI][fp]; + label region = pointLocalRegions[facei][fp]; const point& pt = extrudePoints[f[fp]]; meshTools::writeOBJ(str, pt); diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C index be552aada4ddb0d0bf918a7a38b4aafc87ad66ae..57a019dc3a65a4b12f19eb61875274d1826023e4 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C @@ -39,12 +39,12 @@ namespace Foam void Foam::extrude2DMesh::check2D() const { const faceList& faces = mesh_.faces(); - forAll(faces, faceI) + forAll(faces, facei) { - if (faces[faceI].size() != 2) + if (faces[facei].size() != 2) { FatalErrorInFunction - << "Face " << faceI << " size " << faces[faceI].size() + << "Face " << facei << " size " << faces[facei].size() << " is not of size 2: mesh is not a valid two-dimensional " << "mesh" << exit(FatalError); } @@ -205,15 +205,15 @@ void Foam::extrude2DMesh::setRefinement { label offset = layer * mesh_.nCells(); - forAll(mesh_.cells(), cellI) + forAll(mesh_.cells(), celli) { meshMod.addCell ( -1, //masterPointID, -1, //masterEdgeID, -1, //masterFaceID, - cellI + offset, //masterCellID, - mesh_.cellZones().whichZone(cellI) //zoneID + celli + offset, //masterCellID, + mesh_.cellZones().whichZone(celli) //zoneID ); } } @@ -262,18 +262,18 @@ void Foam::extrude2DMesh::setRefinement label currentLayerOffset = layer * mesh_.nPoints(); label nextLayerOffset = currentLayerOffset + mesh_.nPoints(); - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label zoneID = mesh_.faceZones().whichZone(faceI); + label zoneID = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; if (zoneID != -1) { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } face newFace(4); - const face& f = faces[faceI]; + const face& f = faces[facei]; newFace[0] = f[0] + currentLayerOffset; newFace[1] = f[1] + currentLayerOffset; newFace[2] = f[1] + nextLayerOffset; @@ -281,15 +281,15 @@ void Foam::extrude2DMesh::setRefinement //{ // vector n = newFace.normal(pointField(meshMod.points())); -// label own = mesh_.faceOwner()[faceI]; +// label own = mesh_.faceOwner()[facei]; // const labelList& ownPoints = mesh_.cellPoints()[own]; // point ownCc = sum(pointField(mesh_.points(), ownPoints))/ownPoints.size(); -// label nei = mesh_.faceNeighbour()[faceI]; +// label nei = mesh_.faceNeighbour()[facei]; // const labelList& neiPoints = mesh_.cellPoints()[nei]; // point neiCc = sum(pointField(mesh_.points(), neiPoints))/neiPoints.size(); // vector d = neiCc - ownCc; -// Pout<< "face:" << faceI << " at:" << f.centre(mesh_.points()) << endl +// Pout<< "face:" << facei << " at:" << f.centre(mesh_.points()) << endl // << " own:" << own << " at:" << ownCc << endl // << " nei:" << nei << " at:" << neiCc << endl // << " sign:" << (n & d) << endl @@ -301,8 +301,8 @@ void Foam::extrude2DMesh::setRefinement meshMod.addFace ( newFace, - mesh_.faceOwner()[faceI] + offset, // own - mesh_.faceNeighbour()[faceI] + offset, // nei + mesh_.faceOwner()[facei] + offset, // own + mesh_.faceNeighbour()[facei] + offset, // nei -1, // masterPointID -1, // masterEdgeID nFaces++, // masterFaceID @@ -315,8 +315,8 @@ void Foam::extrude2DMesh::setRefinement if (debug) { Info<< newFace << " " - << mesh_.faceOwner()[faceI] + offset << " " - << mesh_.faceNeighbour()[faceI] + offset << " " + << mesh_.faceOwner()[facei] + offset << " " + << mesh_.faceNeighbour()[facei] + offset << " " << nFaces - 1 << endl; } @@ -333,18 +333,18 @@ void Foam::extrude2DMesh::setRefinement 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); + label zoneID = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; if (zoneID != -1) { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } face newFace(4); - const face& f = faces[faceI]; + const face& f = faces[facei]; newFace[0] = f[0] + currentLayerOffset; newFace[1] = f[1] + currentLayerOffset; newFace[2] = f[1] + nextLayerOffset; @@ -355,7 +355,7 @@ void Foam::extrude2DMesh::setRefinement meshMod.addFace ( newFace, - mesh_.faceOwner()[faceI] + offset, // own + mesh_.faceOwner()[facei] + offset, // own -1, // nei -1, // masterPointID -1, // masterEdgeID @@ -369,7 +369,7 @@ void Foam::extrude2DMesh::setRefinement if (debug) { Info<< newFace << " " - << mesh_.faceOwner()[faceI] + offset << " " + << mesh_.faceOwner()[facei] + offset << " " << nFaces - 1 << endl; } @@ -379,9 +379,9 @@ void Foam::extrude2DMesh::setRefinement // Add extra internal faces that need special treatment for owners and // neighbours. - forAll(mesh_.cells(), cellI) + forAll(mesh_.cells(), celli) { - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; face frontFace(cFaces.size()); @@ -391,7 +391,7 @@ void Foam::extrude2DMesh::setRefinement const face& f = faces[nextFaceI]; label nextPointI; - if (mesh_.faceOwner()[nextFaceI] == cellI) + if (mesh_.faceOwner()[nextFaceI] == celli) { frontFace[0] = f[0]; nextPointI = f[1]; @@ -410,21 +410,21 @@ void Foam::extrude2DMesh::setRefinement // Find face containing pointI forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; - if (faceI != nextFaceI) + label facei = cFaces[cFaceI]; + if (facei != nextFaceI) { - const face& f = faces[faceI]; + 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; } } @@ -444,13 +444,13 @@ void Foam::extrude2DMesh::setRefinement label nei = -1; if (layer != nLayers - 1) { - nei = cellI + offset + mesh_.nCells(); + nei = celli + offset + mesh_.nCells(); } meshMod.addFace ( frontFace, - cellI + offset, // own + celli + offset, // own nei, // nei -1, // masterPointID -1, // masterEdgeID @@ -464,7 +464,7 @@ void Foam::extrude2DMesh::setRefinement if (debug) { Info<< frontFace << " " - << cellI + offset << " " + << celli + offset << " " << nei << " " << nFaces - 1 << endl; @@ -475,9 +475,9 @@ void Foam::extrude2DMesh::setRefinement // Generate front and back faces // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - forAll(mesh_.cells(), cellI) + forAll(mesh_.cells(), celli) { - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; face frontFace(cFaces.size()); @@ -487,7 +487,7 @@ void Foam::extrude2DMesh::setRefinement const face& f = faces[nextFaceI]; label nextPointI; - if (mesh_.faceOwner()[nextFaceI] == cellI) + if (mesh_.faceOwner()[nextFaceI] == celli) { frontFace[0] = f[0]; nextPointI = f[1]; @@ -506,21 +506,21 @@ void Foam::extrude2DMesh::setRefinement // Find face containing pointI forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; - if (faceI != nextFaceI) + label facei = cFaces[cFaceI]; + if (facei != nextFaceI) { - const face& f = faces[faceI]; + 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; } } @@ -531,7 +531,7 @@ void Foam::extrude2DMesh::setRefinement meshMod.addFace ( frontFace.reverseFace(), - cellI, // own + celli, // own -1, // nei -1, // masterPointID -1, // masterEdgeID @@ -545,7 +545,7 @@ void Foam::extrude2DMesh::setRefinement if (debug) { Info<< nl<<frontFace.reverseFace() << " " - << cellI << " " + << celli << " " << nFaces - 1 << endl; } @@ -561,7 +561,7 @@ void Foam::extrude2DMesh::setRefinement meshMod.addFace ( frontFace, - cellI + offset, // own + celli + offset, // own -1, // nei -1, // masterPointID -1, // masterEdgeID @@ -575,7 +575,7 @@ void Foam::extrude2DMesh::setRefinement if (debug) { Info<< frontFace << " " - << cellI + offset << " " + << celli + offset << " " << nFaces - 1 << endl; } diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C index 306de8feea77ade63e2977d286d831526cf38f31..32a7091c1783970f66ceb25597715034787e412c 100644 --- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C +++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C @@ -103,9 +103,9 @@ Foam::labelList Foam::patchToPoly2DMesh::internalFaceOrder() label newFaceI = 0; - forAll(faceEdges, faceI) + forAll(faceEdges, facei) { - const labelList& fEdges = faceEdges[faceI]; + const labelList& fEdges = faceEdges[facei]; // Neighbouring faces SortableList<label> nbr(fEdges.size(), -1); @@ -117,14 +117,14 @@ Foam::labelList Foam::patchToPoly2DMesh::internalFaceOrder() label nbrFaceI = neighbour_[fEdges[feI]]; - if (nbrFaceI == faceI) + if (nbrFaceI == facei) { nbrFaceI = owner_[fEdges[feI]]; } - if (faceI < nbrFaceI) + if (facei < nbrFaceI) { - // faceI is master + // facei is master nbr[feI] = nbrFaceI; } } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C index 3f916f9ba526ca41275a232005b212fd5da7c775..566298a651432acf85409984c490b97a0566a724 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C @@ -109,16 +109,16 @@ void Foam::DelaunayMesh<Triangulation>::addPatches faces.setSize(nInternalFaces + nBoundaryFaces); owner.setSize(nInternalFaces + nBoundaryFaces); - label faceI = nInternalFaces; + label facei = nInternalFaces; forAll(patchFaces, p) { forAll(patchFaces[p], f) { - faces[faceI] = patchFaces[p][f]; - owner[faceI] = patchOwners[p][f]; + faces[facei] = patchFaces[p][f]; + owner[facei] = patchOwners[p][f]; - faceI++; + facei++; } } } @@ -429,7 +429,7 @@ Foam::DelaunayMesh<Triangulation>::createMesh // Index the cells - label cellI = 0; + label celli = 0; for ( @@ -445,11 +445,11 @@ Foam::DelaunayMesh<Triangulation>::createMesh && cit->real() ) { - cellMap[cit->cellIndex()] = cellI++; + cellMap[cit->cellIndex()] = celli++; } } - label faceI = 0; + label facei = 0; labelList verticesOnTriFace(3, label(-1)); face newFace(verticesOnTriFace); @@ -566,16 +566,16 @@ Foam::DelaunayMesh<Triangulation>::createMesh neighbourCell = c1I; } - faces[faceI] = newFace; - owner[faceI] = ownerCell; - neighbour[faceI] = neighbourCell; - faceI++; + faces[facei] = newFace; + owner[facei] = ownerCell; + neighbour[facei] = neighbourCell; + facei++; } } - faces.setSize(faceI); - owner.setSize(faceI); - neighbour.setSize(faceI); + faces.setSize(facei); + owner.setSize(facei); + neighbour.setSize(facei); sortFaces(faces, owner, neighbour); @@ -583,7 +583,7 @@ Foam::DelaunayMesh<Triangulation>::createMesh addPatches ( - faceI, + facei, faces, owner, patchDicts, diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C index c1bf4ed7fed713dc4e472e4ba76b7e3bbb0c864d..16dab7f3e455078dd59e290b48d0bd9adbfb2786 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C @@ -164,13 +164,13 @@ void Foam::backgroundMeshDecomposition::initialRefinement() while (true) { // Determine/update the status of each cell - forAll(volumeStatus, cellI) + forAll(volumeStatus, celli) { - if (volumeStatus[cellI] == volumeType::UNKNOWN) + if (volumeStatus[celli] == volumeType::UNKNOWN) { treeBoundBox cellBb ( - mesh_.cells()[cellI].points + mesh_.cells()[celli].points ( mesh_.faces(), mesh_.points() @@ -179,15 +179,15 @@ void Foam::backgroundMeshDecomposition::initialRefinement() if (geometry.overlaps(cellBb)) { - volumeStatus[cellI] = volumeType::MIXED; + volumeStatus[celli] = volumeType::MIXED; } else if (geometry.inside(cellBb.midpoint())) { - volumeStatus[cellI] = volumeType::INSIDE; + volumeStatus[celli] = volumeType::INSIDE; } else { - volumeStatus[cellI] = volumeType::OUTSIDE; + volumeStatus[celli] = volumeType::OUTSIDE; } } } @@ -211,17 +211,17 @@ void Foam::backgroundMeshDecomposition::initialRefinement() forAll(newCellsToRefine, nCTRI) { - label cellI = newCellsToRefine[nCTRI]; + label celli = newCellsToRefine[nCTRI]; - if (volumeStatus[cellI] == volumeType::MIXED) + if (volumeStatus[celli] == volumeType::MIXED) { - volumeStatus[cellI] = volumeType::UNKNOWN; + volumeStatus[celli] = volumeType::UNKNOWN; } - icellWeights[cellI] = max + icellWeights[celli] = max ( 1.0, - icellWeights[cellI]/8.0 + icellWeights[celli]/8.0 ); } @@ -283,13 +283,13 @@ void Foam::backgroundMeshDecomposition::initialRefinement() } // Determine/update the status of each cell - forAll(volumeStatus, cellI) + forAll(volumeStatus, celli) { - if (volumeStatus[cellI] == volumeType::UNKNOWN) + if (volumeStatus[celli] == volumeType::UNKNOWN) { treeBoundBox cellBb ( - mesh_.cells()[cellI].points + mesh_.cells()[celli].points ( mesh_.faces(), mesh_.points() @@ -298,15 +298,15 @@ void Foam::backgroundMeshDecomposition::initialRefinement() if (geometry.overlaps(cellBb)) { - volumeStatus[cellI] = volumeType::MIXED; + volumeStatus[celli] = volumeType::MIXED; } else if (geometry.inside(cellBb.midpoint())) { - volumeStatus[cellI] = volumeType::INSIDE; + volumeStatus[celli] = volumeType::INSIDE; } else { - volumeStatus[cellI] = volumeType::OUTSIDE; + volumeStatus[celli] = volumeType::OUTSIDE; } } } @@ -318,11 +318,11 @@ void Foam::backgroundMeshDecomposition::initialRefinement() { DynamicList<label> cellsToRemove; - forAll(volumeStatus, cellI) + forAll(volumeStatus, celli) { - if (volumeStatus[cellI] == volumeType::OUTSIDE) + if (volumeStatus[celli] == volumeType::OUTSIDE) { - cellsToRemove.append(cellI); + cellsToRemove.append(celli); } } @@ -503,7 +503,7 @@ void Foam::backgroundMeshDecomposition::printMeshData bool Foam::backgroundMeshDecomposition::refineCell ( - label cellI, + label celli, volumeType volType, scalar& weightEstimate ) const @@ -515,7 +515,7 @@ bool Foam::backgroundMeshDecomposition::refineCell treeBoundBox cellBb ( - mesh_.cells()[cellI].points + mesh_.cells()[celli].points ( mesh_.faces(), mesh_.points() @@ -637,29 +637,29 @@ Foam::labelList Foam::backgroundMeshDecomposition::selectRefinementCells labelHashSet cellsToRefine; // Determine/update the status of each cell - forAll(volumeStatus, cellI) + forAll(volumeStatus, celli) { - if (volumeStatus[cellI] == volumeType::MIXED) + if (volumeStatus[celli] == volumeType::MIXED) { - if (meshCutter_.cellLevel()[cellI] < minLevels_) + if (meshCutter_.cellLevel()[celli] < minLevels_) { - cellsToRefine.insert(cellI); + cellsToRefine.insert(celli); } } - if (volumeStatus[cellI] != volumeType::OUTSIDE) + if (volumeStatus[celli] != volumeType::OUTSIDE) { if ( refineCell ( - cellI, - volumeStatus[cellI], - icellWeights[cellI] + celli, + volumeStatus[celli], + icellWeights[celli] ) ) { - cellsToRefine.insert(cellI); + cellsToRefine.insert(celli); } } } @@ -943,9 +943,9 @@ Foam::backgroundMeshDecomposition::distribute forAll(newCellsToRefine, nCTRI) { - label cellI = newCellsToRefine[nCTRI]; + label celli = newCellsToRefine[nCTRI]; - icellWeights[cellI] /= 8.0; + icellWeights[celli] /= 8.0; } // Mesh changing engine. diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.H b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.H index a539ddcff26b5b3bb4798cc9f3ad9381c2f1feda..8b9abb29bf818bfa13fb046f6cb5d3937c983427 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.H +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.H @@ -167,7 +167,7 @@ class backgroundMeshDecomposition // it bool refineCell ( - label cellI, + label celli, volumeType volType, scalar& weightEstimate ) const; diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index 80b1b78a57cbdd4c275bbedbba0ad5415a870deb..eea0bfd6cc1b93fde105b662b756760551c166ca 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -133,7 +133,7 @@ void Foam::conformalVoronoiMesh::calcTetMesh points.setSize(vertI); pointToDelaunayVertex.setSize(vertI); - label cellI = 0; + label celli = 0; for ( @@ -144,7 +144,7 @@ void Foam::conformalVoronoiMesh::calcTetMesh { if (cit->internalOrBoundaryDualVertex()) { - cit->cellIndex() = cellI++; + cit->cellIndex() = celli++; } else { @@ -170,7 +170,7 @@ void Foam::conformalVoronoiMesh::calcTetMesh neighbour.setSize(number_of_finite_facets()); - label faceI = 0; + label facei = 0; labelList verticesOnTriFace(3, label(-1)); @@ -262,14 +262,14 @@ void Foam::conformalVoronoiMesh::calcTetMesh neighbourCell = c1I; } - faces[faceI] = newFace; - owner[faceI] = ownerCell; - neighbour[faceI] = neighbourCell; - faceI++; + faces[facei] = newFace; + owner[facei] = ownerCell; + neighbour[facei] = neighbourCell; + facei++; } } - label nInternalFaces = faceI; + label nInternalFaces = facei; faces.setSize(nInternalFaces); owner.setSize(nInternalFaces); @@ -910,11 +910,11 @@ void Foam::conformalVoronoiMesh::checkCellSizing() pointField cellsToResize(cellsToResizeMap.size()); label count = 0; - for (label cellI = 0; cellI < pMesh.nCells(); ++cellI) + for (label celli = 0; celli < pMesh.nCells(); ++celli) { - if (cellsToResizeMap.found(cellI)) + if (cellsToResizeMap.found(celli)) { - cellsToResize[count++] = pMesh.cellCentres()[cellI]; + cellsToResize[count++] = pMesh.cellCentres()[celli]; } } @@ -1152,9 +1152,9 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality // forAllConstIter(labelHashSet, limitCells, iter) // { - // label cellI = iter.key(); + // label celli = iter.key(); - // const labelList& cP = cellPts[cellI]; + // const labelList& cP = cellPts[celli]; // forAll(cP, cPI) // { @@ -2527,17 +2527,17 @@ void Foam::conformalVoronoiMesh::addPatches owner.setSize(nInternalFaces + nBoundaryFaces); boundaryFacesToRemove.setSize(nInternalFaces + nBoundaryFaces); - label faceI = nInternalFaces; + label facei = nInternalFaces; forAll(patchFaces, p) { forAll(patchFaces[p], f) { - faces[faceI] = patchFaces[p][f]; - owner[faceI] = patchOwners[p][f]; - boundaryFacesToRemove[faceI] = indirectPatchFace[p][f]; + faces[facei] = patchFaces[p][f]; + owner[facei] = patchOwners[p][f]; + boundaryFacesToRemove[facei] = indirectPatchFace[p][f]; - faceI++; + facei++; } } } @@ -2623,7 +2623,7 @@ Foam::labelList Foam::conformalVoronoiMesh::removeUnusedCells cellUsed[neighbour[nI]] = true; } - label cellI = 0; + label celli = 0; labelList oldToNew(cellUsed.size(), label(-1)); @@ -2634,11 +2634,11 @@ Foam::labelList Foam::conformalVoronoiMesh::removeUnusedCells { if (cellUsed[cellUI] == true) { - oldToNew[cellUI] = cellI++; + oldToNew[cellUI] = celli++; } } - labelList newToOld(invert(cellI, oldToNew)); + labelList newToOld(invert(celli, oldToNew)); // Find all of the unused cells, create a list of them, then // subtract one from each owner and neighbour entry for each of diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index e8013eb1c488d318eea5184977c2873cd17566cc..74245d7cfc676f2d97396faa7ed0713813270dad 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -132,30 +132,30 @@ Foam::label Foam::conformalVoronoiMesh::findVerticesNearBoundaries() continue; } - for (label cellI = 0; cellI < 4; ++cellI) + for (label celli = 0; celli < 4; ++celli) { - Vertex_handle v = c1->vertex(cellI); + Vertex_handle v = c1->vertex(celli); if ( !is_infinite(v) && v->internalPoint() - && fit->second != cellI + && fit->second != celli ) { v->setNearBoundary(); } } - for (label cellI = 0; cellI < 4; ++cellI) + for (label celli = 0; celli < 4; ++celli) { - Vertex_handle v = c2->vertex(cellI); + Vertex_handle v = c2->vertex(celli); if ( !is_infinite(v) && v->internalPoint() - && fit->second != cellI + && fit->second != celli ) { v->setNearBoundary(); diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index e415d748f9f09ac25a90b2b91debfd3bd1dce121..4625e54928d5d4721e88e02a1f0ea00c8dc72d19 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -179,7 +179,7 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance) if (foamyHexMeshControls().writeTetDualMesh()) { - label cellI = 0; + label celli = 0; for ( Finite_cells_iterator cit = finite_cells_begin(); @@ -193,7 +193,7 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance) && !is_infinite(cit) ) { - cit->cellIndex() = cellI++; + cit->cellIndex() = celli++; } } @@ -213,20 +213,20 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance) // // or patch face (negative index) // labelList vertexToDualAddressing(number_of_vertices(), 0); // -// forAll(cellToDelaunayVertex, cellI) +// forAll(cellToDelaunayVertex, celli) // { -// label vertI = cellToDelaunayVertex[cellI]; +// label vertI = cellToDelaunayVertex[celli]; // // if (vertexToDualAddressing[vertI] != 0) // { // FatalErrorInFunction // << "Delaunay vertex " << vertI -// << " from cell " << cellI +// << " from cell " << celli // << " is already mapped to " // << vertexToDualAddressing[vertI] // << exit(FatalError); // } -// vertexToDualAddressing[vertI] = cellI+1; +// vertexToDualAddressing[vertI] = celli+1; // } // // forAll(patchToDelaunayVertex, patchi) @@ -356,15 +356,15 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance) // // if (index > 0) // { -// label cellI = index-1; -// dualPoints[pointI] = mesh.cellCentres()[cellI]; +// label celli = index-1; +// dualPoints[pointI] = mesh.cellCentres()[celli]; // } // else if (index < 0) // { -// label faceI = -index-1; -// if (faceI >= mesh.nInternalFaces()) +// label facei = -index-1; +// if (facei >= mesh.nInternalFaces()) // { -// dualPoints[pointI] = mesh.faceCentres()[faceI]; +// dualPoints[pointI] = mesh.faceCentres()[facei]; // } // } // } @@ -736,9 +736,9 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches { label nReorderedFaces = 0; - forAll(faceMap, faceI) + forAll(faceMap, facei) { - if (faceMap[faceI] != -1) + if (faceMap[facei] != -1) { nReorderedFaces++; } @@ -752,11 +752,11 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches // Rotate faces (rotation is already in new face indices). label nRotated = 0; - forAll(rotation, faceI) + forAll(rotation, facei) { - if (rotation[faceI] != 0) + if (rotation[facei] != 0) { - faces[faceI] = rotateList(faces[faceI], rotation[faceI]); + faces[facei] = rotateList(faces[facei], rotation[facei]); nRotated++; } } @@ -961,11 +961,11 @@ void Foam::conformalVoronoiMesh::writeMesh labelList addr(boundaryFacesToRemove.count()); label count = 0; - forAll(boundaryFacesToRemove, faceI) + forAll(boundaryFacesToRemove, facei) { - if (boundaryFacesToRemove[faceI]) + if (boundaryFacesToRemove[facei]) { - addr[count++] = faceI; + addr[count++] = facei; } } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshTemplates.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshTemplates.C index 662b27c9142999a90d55ef568965d4706a51a2fc..55fd3521d261407072f950ed2378b47ade0df9f7 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshTemplates.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshTemplates.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 @@ -98,22 +98,22 @@ bool Foam::conformalVoronoiMesh::distributeBackground(const Triangulation& mesh) { pointFromPoint v = topoint(vit->point()); - label cellI = cellSearch.findCell(v); + label celli = cellSearch.findCell(v); - if (cellI == -1) + if (celli == -1) { // Pout<< "findCell conformalVoronoiMesh::distribute " // << "findCell " // << vit->type() << " " // << vit->index() << " " // << v << " " -// << cellI -// << " find nearest cellI "; +// << celli +// << " find nearest celli "; - cellI = cellSearch.findNearestCell(v); + celli = cellSearch.findNearestCell(v); } - cellVertices[cellI]++; + cellVertices[celli]++; } } diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C index c9c14ff59887facbd9b048c7d86f9878cf1e5d2a..05d4c5e58061ee3318becdd39540819b8c66462b 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C @@ -116,15 +116,15 @@ void Foam::conformalVoronoiMesh::findCellZoneInsideWalk boolList blockedFace(mesh.nFaces()); selectSeparatedCoupledFaces(mesh, blockedFace); - forAll(faceToSurface, faceI) + forAll(faceToSurface, facei) { - if (faceToSurface[faceI] == -1) + if (faceToSurface[facei] == -1) { - blockedFace[faceI] = false; + blockedFace[facei] = false; } else { - blockedFace[faceI] = true; + blockedFace[facei] = true; } } // No need to sync since namedSurfaceIndex already is synced @@ -156,16 +156,16 @@ void Foam::conformalVoronoiMesh::findCellZoneInsideWalk // Find the region containing the insidePoint label keepRegionI = -1; - label cellI = mesh.findCell(insidePoint); + label celli = mesh.findCell(insidePoint); - if (cellI != -1) + if (celli != -1) { - keepRegionI = cellRegion[cellI]; + keepRegionI = cellRegion[celli]; } reduce(keepRegionI, maxOp<label>()); Info<< " For surface " << surfName - << " found point " << insidePoint << " in cell " << cellI + << " found point " << insidePoint << " in cell " << celli << " in global region " << keepRegionI << " out of " << cellRegion.nRegions() << " regions." << endl; @@ -179,22 +179,22 @@ void Foam::conformalVoronoiMesh::findCellZoneInsideWalk } // Set all cells with this region - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - if (cellRegion[cellI] == keepRegionI) + if (cellRegion[celli] == keepRegionI) { - if (cellToSurface[cellI] == -2) + if (cellToSurface[celli] == -2) { - cellToSurface[cellI] = surfI; + cellToSurface[celli] = surfI; } - else if (cellToSurface[cellI] != surfI) + else if (cellToSurface[celli] != surfI) { WarningInFunction - << "Cell " << cellI - << " at " << mesh.cellCentres()[cellI] + << "Cell " << celli + << " at " << mesh.cellCentres()[celli] << " is inside surface " << surfName << " but already marked as being in zone " - << cellToSurface[cellI] << endl + << cellToSurface[celli] << endl << "This can happen if your surfaces are not" << " (sufficiently) closed." << endl; @@ -343,65 +343,65 @@ void Foam::conformalVoronoiMesh::calcFaceZones syncTools::swapBoundaryFaceList(mesh, neiFaceOwner); - forAll(faces, faceI) + forAll(faces, facei) { - const label ownerSurfaceI = cellToSurface[faceOwner[faceI]]; + const label ownerSurfacei = cellToSurface[faceOwner[facei]]; - if (faceToSurface[faceI] >= 0) + if (faceToSurface[facei] >= 0) { continue; } - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - const label neiSurfaceI = cellToSurface[faceNeighbour[faceI]]; + const label neiSurfacei = cellToSurface[faceNeighbour[facei]]; if ( - (ownerSurfaceI >= 0 || neiSurfaceI >= 0) - && ownerSurfaceI != neiSurfaceI + (ownerSurfacei >= 0 || neiSurfacei >= 0) + && ownerSurfacei != neiSurfacei ) { - flipMap[faceI] = + flipMap[facei] = ( - ownerSurfaceI == max(ownerSurfaceI, neiSurfaceI) + ownerSurfacei == max(ownerSurfacei, neiSurfacei) ? false : true ); - faceToSurface[faceI] = max(ownerSurfaceI, neiSurfaceI); + faceToSurface[facei] = max(ownerSurfacei, neiSurfacei); } } else { - label patchID = mesh.boundaryMesh().whichPatch(faceI); + label patchID = mesh.boundaryMesh().whichPatch(facei); if (mesh.boundaryMesh()[patchID].coupled()) { - const label neiSurfaceI = - neiFaceOwner[faceI - mesh.nInternalFaces()]; + const label neiSurfacei = + neiFaceOwner[facei - mesh.nInternalFaces()]; if ( - (ownerSurfaceI >= 0 || neiSurfaceI >= 0) - && ownerSurfaceI != neiSurfaceI + (ownerSurfacei >= 0 || neiSurfacei >= 0) + && ownerSurfacei != neiSurfacei ) { - flipMap[faceI] = + flipMap[facei] = ( - ownerSurfaceI == max(ownerSurfaceI, neiSurfaceI) + ownerSurfacei == max(ownerSurfacei, neiSurfacei) ? false : true ); - faceToSurface[faceI] = max(ownerSurfaceI, neiSurfaceI); + faceToSurface[facei] = max(ownerSurfacei, neiSurfacei); } } else { - if (ownerSurfaceI >= 0) + if (ownerSurfacei >= 0) { - faceToSurface[faceI] = ownerSurfaceI; + faceToSurface[facei] = ownerSurfacei; } } } @@ -430,23 +430,23 @@ void Foam::conformalVoronoiMesh::calcFaceZones ); // Use intersection of cellCentre connections - forAll(faces, faceI) + forAll(faces, facei) { - if (faceToSurface[faceI] >= 0) + if (faceToSurface[facei] >= 0) { continue; } - label patchID = mesh.boundaryMesh().whichPatch(faceI); + label patchID = mesh.boundaryMesh().whichPatch(facei); - const label own = faceOwner[faceI]; + const label own = faceOwner[facei]; List<pointIndexHit> surfHit; labelList hitSurface; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - const label nei = faceNeighbour[faceI]; + const label nei = faceNeighbour[facei]; geometryToConformTo().findSurfaceAllIntersections ( @@ -461,7 +461,7 @@ void Foam::conformalVoronoiMesh::calcFaceZones geometryToConformTo().findSurfaceAllIntersections ( cellCentres[own], - neiCc[faceI - mesh.nInternalFaces()], + neiCc[facei - mesh.nInternalFaces()], surfHit, hitSurface ); @@ -481,19 +481,19 @@ void Foam::conformalVoronoiMesh::calcFaceZones norm ); - vector fN = faces[faceI].normal(mesh.points()); + vector fN = faces[facei].normal(mesh.points()); fN /= mag(fN) + SMALL; if ((norm[0] & fN) < 0) { - flipMap[faceI] = true; + flipMap[facei] = true; } else { - flipMap[faceI] = false; + flipMap[facei] = false; } - faceToSurface[faceI] = hitSurface[0]; + faceToSurface[facei] = hitSurface[0]; } } } @@ -509,9 +509,9 @@ void Foam::conformalVoronoiMesh::calcFaceZones // { // forAll(pp, i) // { -// label faceI = pp.start()+i; -// label ownSurface = cellToSurface[faceOwner[faceI]]; -// neiCellSurface[faceI - mesh.nInternalFaces()] = ownSurface; +// label facei = pp.start()+i; +// label ownSurface = cellToSurface[faceOwner[facei]]; +// neiCellSurface[facei - mesh.nInternalFaces()] = ownSurface; // } // } // } @@ -525,15 +525,15 @@ void Foam::conformalVoronoiMesh::calcFaceZones // { // forAll(pp, i) // { -// label faceI = pp.start()+i; -// label ownSurface = cellToSurface[faceOwner[faceI]]; +// label facei = pp.start()+i; +// label ownSurface = cellToSurface[faceOwner[facei]]; // label neiSurface = -// neiCellSurface[faceI-mesh.nInternalFaces()]; +// neiCellSurface[facei-mesh.nInternalFaces()]; // -// if (faceToSurface[faceI] == -1 && (ownSurface != neiSurface)) +// if (faceToSurface[facei] == -1 && (ownSurface != neiSurface)) // { // // Give face the max cell zone -// faceToSurface[faceI] = max(ownSurface, neiSurface); +// faceToSurface[facei] = max(ownSurface, neiSurface); // } // } // } @@ -617,13 +617,13 @@ void Foam::conformalVoronoiMesh::addZones // Topochange container polyTopoChange meshMod(mesh); - forAll(cellToSurface, cellI) + forAll(cellToSurface, celli) { - label surfaceI = cellToSurface[cellI]; + label surfacei = cellToSurface[celli]; - if (surfaceI >= 0) + if (surfacei >= 0) { - label zoneI = surfaceToCellZone[surfaceI]; + label zoneI = surfaceToCellZone[surfacei]; if (zoneI >= 0) { @@ -631,7 +631,7 @@ void Foam::conformalVoronoiMesh::addZones ( polyModifyCell ( - cellI, + celli, false, // removeFromZone zoneI ) @@ -643,55 +643,55 @@ void Foam::conformalVoronoiMesh::addZones const labelList& faceOwner = mesh.faceOwner(); const labelList& faceNeighbour = mesh.faceNeighbour(); - forAll(faceToSurface, faceI) + forAll(faceToSurface, facei) { - label surfaceI = faceToSurface[faceI]; + label surfacei = faceToSurface[facei]; - if (surfaceI < 0) + if (surfacei < 0) { continue; } - label patchID = mesh.boundaryMesh().whichPatch(faceI); + label patchID = mesh.boundaryMesh().whichPatch(facei); - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - label own = faceOwner[faceI]; - label nei = faceNeighbour[faceI]; + label own = faceOwner[facei]; + label nei = faceNeighbour[facei]; meshMod.setAction ( polyModifyFace ( - mesh.faces()[faceI], // modified face - faceI, // label of face + mesh.faces()[facei], // modified face + facei, // label of face own, // owner nei, // neighbour false, // face flip -1, // patch for face false, // remove from zone - surfaceToFaceZone[surfaceI], // zone for face - flipMap[faceI] // face flip in zone + surfaceToFaceZone[surfacei], // zone for face + flipMap[facei] // face flip in zone ) ); } else if (patchID != -1 && mesh.boundaryMesh()[patchID].coupled()) { - label own = faceOwner[faceI]; + label own = faceOwner[facei]; meshMod.setAction ( polyModifyFace ( - mesh.faces()[faceI], // modified face - faceI, // label of face + mesh.faces()[facei], // modified face + facei, // label of face own, // owner -1, // neighbour false, // face flip patchID, // patch for face false, // remove from zone - surfaceToFaceZone[surfaceI], // zone for face - flipMap[faceI] // face flip in zone + surfaceToFaceZone[surfacei], // zone for face + flipMap[facei] // face flip in zone ) ); } diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C index cb61f8e4d9e5aacde3d6e85a7026ecfa1661a230..107aa9fefb8b996ba5f414888d2b4b9d6ae5507a 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C @@ -255,7 +255,7 @@ autoPtr<polyMesh> generateHexMesh cellShapeList cellShapes(nCells[0]*nCells[1]*nCells[2]); labelList hexPoints(8); - label cellI = 0; + label celli = 0; for (label i = 0; i < nCells[0]; i++) { for (label j = 0; j < nCells[1]; j++) @@ -270,7 +270,7 @@ autoPtr<polyMesh> generateHexMesh hexPoints[5] = vtxLabel(nCells, i+1, j, k+1); hexPoints[6] = vtxLabel(nCells, i+1, j+1, k+1); hexPoints[7] = vtxLabel(nCells, i, j+1, k+1); - cellShapes[cellI++] = cellShape(hex, hexPoints); + cellShapes[celli++] = cellShape(hex, hexPoints); } } } @@ -627,11 +627,11 @@ int main(int argc, char *argv[]) scalarField distSqr(cellDistance.size()); const labelList& cellLevel = backgroundMesh.cellLevel(); - forAll(cellLevel, cellI) + forAll(cellLevel, celli) { // The largest edge of the cell will always be less than the // span of the bounding box of the cell. - distSqr[cellI] = magSqr(cellSize)/pow(2, cellLevel[cellI]); + distSqr[celli] = magSqr(cellSize)/pow(2, cellLevel[celli]); } { @@ -682,12 +682,12 @@ int main(int argc, char *argv[]) ); { scalarField pointDistSqr(fvm.nPoints(), -sqr(GREAT)); - for (label faceI = 0; faceI < fvm.nInternalFaces(); faceI++) + for (label facei = 0; facei < fvm.nInternalFaces(); facei++) { - label own = fvm.faceOwner()[faceI]; + label own = fvm.faceOwner()[facei]; label ownDistSqr = distSqr[own]; - const face& f = fvm.faces()[faceI]; + const face& f = fvm.faces()[facei]; forAll(f, fp) { pointDistSqr[f[fp]] = max(pointDistSqr[f[fp]], ownDistSqr); diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C index 2534b933bdee185a724c1efef42bbdbb2a8ecf4f..f1785027c6ea2826264465269c933ab9e55a4d00 100644 --- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C +++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C @@ -243,9 +243,9 @@ Foam::shortEdgeFilter2D::filter() // List of number of vertices in a face. labelList newFaceVertexCount(faces.size(), -1); - forAll(faces, faceI) + forAll(faces, facei) { - newFaceVertexCount[faceI] = faces[faceI].size(); + newFaceVertexCount[facei] = faces[facei].size(); } // Check if the point is a boundary point. Flag if it is so that @@ -456,9 +456,9 @@ Foam::shortEdgeFilter2D::filter() label newFaceSize = 0; // Now need to iterate over the faces and remove points. Global index. - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; newFace.clear(); newFace.setSize(f.size()); @@ -526,7 +526,7 @@ Foam::shortEdgeFilter2D::filter() else { FatalErrorInFunction - << "Only " << newFace.size() << " in face " << faceI + << "Only " << newFace.size() << " in face " << facei << exit(FatalError); } } diff --git a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C index 42c3bea20ae8e674f5db59fc5718ef5dd4fac653..9021e771c02e002341e28c20ec95e44a23a587fc 100644 --- a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C +++ b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C @@ -157,13 +157,13 @@ int main(int argc, char *argv[]) // Assign all visited faces to current patch label nVisited = 0; - forAll(visited, faceI) + forAll(visited, facei) { - if (visited[faceI]) + if (visited[facei]) { nVisited++; - patchIDs[faceI] = newPatchI; + patchIDs[facei] = newPatchI; } } @@ -234,11 +234,11 @@ int main(int argc, char *argv[]) // have to do the geometric stuff. const labelList& meshFace = bMesh.meshFace(); - forAll(patchIDs, faceI) + 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 3f5cae18326d96ea915cf72fa0e0e437e59aab4a..17e308c69b606f78068422d622ce887d9bc9de71 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -156,9 +156,9 @@ bool Foam::checkWedges // Check all non-wedge faces label nEdgesInError = 0; - forAll(fcs, faceI) + forAll(fcs, facei) { - const face& f = fcs[faceI]; + const face& f = fcs[facei]; forAll(f, fp) { @@ -200,7 +200,7 @@ bool Foam::checkWedges // Ok if purely in empty directions. if (nNonEmptyDirs > 0) { - if (edgesInError.insert(edge(p0, p1), faceI)) + if (edgesInError.insert(edge(p0, p1), facei)) { nEdgesInError++; } @@ -209,7 +209,7 @@ bool Foam::checkWedges else if (nEmptyDirs > 1) { // Always an error - if (edgesInError.insert(edge(p0, p1), faceI)) + if (edgesInError.insert(edge(p0, p1), facei)) { nEdgesInError++; } @@ -274,9 +274,9 @@ namespace Foam // lists of size cpp to transform. List<pointField> newPts(pts.size()); - forAll(pts, faceI) + forAll(pts, facei) { - newPts[faceI].setSize(pts[faceI].size()); + newPts[facei].setSize(pts[facei].size()); } label index = 0; @@ -286,12 +286,12 @@ namespace Foam // Extract for every face the i'th position pointField ptsAtIndex(pts.size(), Zero); - forAll(cpp, faceI) + forAll(cpp, facei) { - const pointField& facePts = pts[faceI]; + const pointField& facePts = pts[facei]; if (facePts.size() > index) { - ptsAtIndex[faceI] = facePts[index]; + ptsAtIndex[facei] = facePts[index]; n++; } } @@ -306,12 +306,12 @@ namespace Foam cpp.transformPosition(ptsAtIndex); // Extract back from ptsAtIndex into newPts - forAll(cpp, faceI) + forAll(cpp, facei) { - pointField& facePts = newPts[faceI]; + pointField& facePts = newPts[facei]; if (facePts.size() > index) { - facePts[index] = ptsAtIndex[faceI]; + facePts[index] = ptsAtIndex[facei]; } } diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C index 58c25e9e8d625b73fde30901e630dbde9f2b175e..fa8dc854b26e8f46cc498a65a9d8cd33dd459668 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C @@ -97,19 +97,19 @@ Foam::label Foam::checkTopology { cellSet cells(mesh, "illegalCells", mesh.nCells()/100); - forAll(mesh.cells(), cellI) + forAll(mesh.cells(), celli) { - const cell& cFaces = mesh.cells()[cellI]; + const cell& cFaces = mesh.cells()[celli]; if (cFaces.size() <= 3) { - cells.insert(cellI); + cells.insert(celli); } forAll(cFaces, i) { if (cFaces[i] < 0 || cFaces[i] >= mesh.nFaces()) { - cells.insert(cellI); + cells.insert(celli); break; } } @@ -223,10 +223,10 @@ Foam::label Foam::checkTopology { labelList nInternalFaces(mesh.nCells(), 0); - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - nInternalFaces[mesh.faceOwner()[faceI]]++; - nInternalFaces[mesh.faceNeighbour()[faceI]]++; + nInternalFaces[mesh.faceOwner()[facei]]++; + nInternalFaces[mesh.faceNeighbour()[facei]]++; } const polyBoundaryMesh& patches = mesh.boundaryMesh(); forAll(patches, patchi) @@ -245,15 +245,15 @@ Foam::label Foam::checkTopology cellSet oneCells(mesh, "oneInternalFaceCells", mesh.nCells()/100); cellSet twoCells(mesh, "twoInternalFacesCells", mesh.nCells()/100); - forAll(nInternalFaces, cellI) + forAll(nInternalFaces, celli) { - if (nInternalFaces[cellI] <= 1) + if (nInternalFaces[celli] <= 1) { - oneCells.insert(cellI); + oneCells.insert(celli); } - else if (nInternalFaces[cellI] == 2) + else if (nInternalFaces[celli] == 2) { - twoCells.insert(cellI); + twoCells.insert(celli); } } diff --git a/applications/utilities/mesh/manipulation/checkMesh/printMeshStats.C b/applications/utilities/mesh/manipulation/checkMesh/printMeshStats.C index f7e34d6ab56922a5abd65cb1716b48e0ac5bffa2..7f4a226a42aaeb7d94fd70cb5fcf23fe1efe8999 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/printMeshStats.C +++ b/applications/utilities/mesh/manipulation/checkMesh/printMeshStats.C @@ -97,36 +97,36 @@ void Foam::printMeshStats(const polyMesh& mesh, const bool allTopology) Map<label> polyhedralFaces; - for (label cellI = 0; cellI < mesh.nCells(); cellI++) + for (label celli = 0; celli < mesh.nCells(); celli++) { - if (hex.isA(mesh, cellI)) + if (hex.isA(mesh, celli)) { nHex++; } - else if (tet.isA(mesh, cellI)) + else if (tet.isA(mesh, celli)) { nTet++; } - else if (pyr.isA(mesh, cellI)) + else if (pyr.isA(mesh, celli)) { nPyr++; } - else if (prism.isA(mesh, cellI)) + else if (prism.isA(mesh, celli)) { nPrism++; } - else if (wedge.isA(mesh, cellI)) + else if (wedge.isA(mesh, celli)) { nWedge++; } - else if (tetWedge.isA(mesh, cellI)) + else if (tetWedge.isA(mesh, celli)) { nTetWedge++; } else { nUnknown++; - polyhedralFaces(mesh.cells()[cellI].size())++; + polyhedralFaces(mesh.cells()[celli].size())++; } } diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index bdab94fa8781467c27994c94711ffa87b5715ab8..cd8b2e260ac69a9040720a674b116a5053ae8927 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -110,7 +110,7 @@ void modifyOrAddFace ( polyTopoChange& meshMod, const face& f, - const label faceI, + const label facei, const label own, const bool flipFaceFlux, const label newPatchI, @@ -120,7 +120,7 @@ void modifyOrAddFace PackedBoolList& modifiedFace ) { - if (!modifiedFace[faceI]) + if (!modifiedFace[facei]) { // First usage of face. Modify. meshMod.setAction @@ -128,7 +128,7 @@ void modifyOrAddFace polyModifyFace ( f, // modified face - faceI, // label of face + facei, // label of face own, // owner -1, // neighbour flipFaceFlux, // face flip @@ -138,7 +138,7 @@ void modifyOrAddFace zoneFlip // face flip in zone ) ); - modifiedFace[faceI] = 1; + modifiedFace[facei] = 1; } else { @@ -152,7 +152,7 @@ void modifyOrAddFace -1, // neighbour -1, // master point -1, // master edge - faceI, // master face + facei, // master face flipFaceFlux, // face flip newPatchI, // patch for face zoneID, // zone for face @@ -184,9 +184,9 @@ void createFaces // Pass 1. Do selected side of zone // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - label zoneFaceI = fZone.whichFace(faceI); + label zoneFaceI = fZone.whichFace(facei); if (zoneFaceI != -1) { @@ -196,9 +196,9 @@ void createFaces modifyOrAddFace ( meshMod, - mesh.faces()[faceI], // modified face - faceI, // label of face - mesh.faceOwner()[faceI],// owner + mesh.faces()[facei], // modified face + facei, // label of face + mesh.faceOwner()[facei],// owner false, // face flip newMasterPatches[i], // patch for face fZone.index(), // zone for face @@ -215,9 +215,9 @@ void createFaces modifyOrAddFace ( meshMod, - mesh.faces()[faceI].reverseFace(), // modified face - faceI, // label of face - mesh.faceNeighbour()[faceI],// owner + mesh.faces()[facei].reverseFace(), // modified face + facei, // label of face + mesh.faceNeighbour()[facei],// owner true, // face flip newMasterPatches[i], // patch for face fZone.index(), // zone for face @@ -234,9 +234,9 @@ void createFaces // Pass 2. Do other side of zone // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - label zoneFaceI = fZone.whichFace(faceI); + label zoneFaceI = fZone.whichFace(facei); if (zoneFaceI != -1) { @@ -246,9 +246,9 @@ void createFaces modifyOrAddFace ( meshMod, - mesh.faces()[faceI].reverseFace(), // modified face - faceI, // label of face - mesh.faceNeighbour()[faceI], // owner + mesh.faces()[facei].reverseFace(), // modified face + facei, // label of face + mesh.faceNeighbour()[facei], // owner true, // face flip newSlavePatches[i], // patch for face fZone.index(), // zone for face @@ -262,9 +262,9 @@ void createFaces modifyOrAddFace ( meshMod, - mesh.faces()[faceI], // modified face - faceI, // label of face - mesh.faceOwner()[faceI],// owner + mesh.faces()[facei], // modified face + facei, // label of face + mesh.faceOwner()[facei],// owner false, // face flip newSlavePatches[i], // patch for face fZone.index(), // zone for face @@ -305,9 +305,9 @@ void createFaces { forAll(pp, i) { - label faceI = pp.start()+i; + label facei = pp.start()+i; - label zoneFaceI = fZone.whichFace(faceI); + label zoneFaceI = fZone.whichFace(facei); if (zoneFaceI != -1) { @@ -328,9 +328,9 @@ void createFaces modifyOrAddFace ( meshMod, - mesh.faces()[faceI], // modified face - faceI, // label of face - mesh.faceOwner()[faceI], // owner + mesh.faces()[facei], // modified face + facei, // label of face + mesh.faceOwner()[facei], // owner false, // face flip newPatchI, // patch for face fZone.index(), // zone for face @@ -494,9 +494,9 @@ int main(int argc, char *argv[]) // Add faces to faceZones labelList nFaces(mesh.faceZones().size(), 0); - forAll(faceToZoneID, faceI) + forAll(faceToZoneID, facei) { - label zoneID = faceToZoneID[faceI]; + label zoneID = faceToZoneID[facei]; if (zoneID != -1) { nFaces[zoneID]++; @@ -512,13 +512,13 @@ int main(int argc, char *argv[]) labelList addr(n); boolList flip(n); n = 0; - forAll(faceToZoneID, faceI) + forAll(faceToZoneID, facei) { - label zone = faceToZoneID[faceI]; + label zone = faceToZoneID[facei]; if (zone == zoneID) { - addr[n] = faceI; - flip[n] = faceToFlip[faceI]; + addr[n] = facei; + flip[n] = faceToFlip[facei]; n++; } } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.C b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.C index 25d8b3272c5e89895ede4251c22289ceebbd6858..84a7cea3c1fee3c60959c657eb24a2e76676c985 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.C +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceSelection.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 @@ -94,11 +94,11 @@ void Foam::faceSelection::select { if (flip_) { - forAll(faceToZoneID, faceI) + forAll(faceToZoneID, facei) { - if (faceToZoneID[faceI] == zoneID) + if (faceToZoneID[facei] == zoneID) { - faceToFlip[faceI] = !faceToFlip[faceI]; + faceToFlip[facei] = !faceToFlip[facei]; } } } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.C b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.C index 5b81ea35320a5809f7c3c22907a9be464d02347d..921698a1be419468da0571465d05bca645863b00 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.C +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/faceZoneSelection.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 @@ -81,18 +81,18 @@ void Foam::faceSelections::faceZoneSelection::select forAll(fZone, i) { - label faceI = fZone[i]; + label facei = fZone[i]; - if (faceToZoneID[faceI] == -1) + if (faceToZoneID[facei] == -1) { - faceToZoneID[faceI] = zoneID; - faceToFlip[faceI] = fZone.flipMap()[i]; + faceToZoneID[facei] = zoneID; + faceToFlip[facei] = fZone.flipMap()[i]; } - else if (faceToZoneID[faceI] != zoneID) + else if (faceToZoneID[facei] != zoneID) { FatalErrorInFunction - << "Face " << faceI << " already in faceZone " - << faceToZoneID[faceI] + << "Face " << facei << " already in faceZone " + << faceToZoneID[facei] << exit(FatalError); } } diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.C b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.C index 1210269b18f2bc7a1c6971a4479038bb7d11d0f9..494da9c9b5249d339ab18576325f65e37199910d 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.C +++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.C @@ -98,10 +98,10 @@ void Foam::faceSelections::searchableSurfaceSelection::select pointField end(mesh_.nFaces()); // Internal faces - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - start[faceI] = mesh_.cellCentres()[mesh_.faceOwner()[faceI]]; - end[faceI] = mesh_.cellCentres()[mesh_.faceNeighbour()[faceI]]; + start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]]; + end[facei] = mesh_.cellCentres()[mesh_.faceNeighbour()[facei]]; } // Boundary faces @@ -123,18 +123,18 @@ void Foam::faceSelections::searchableSurfaceSelection::select { forAll(pp, i) { - label faceI = pp.start()+i; - start[faceI] = mesh_.cellCentres()[mesh_.faceOwner()[faceI]]; - end[faceI] = neighbourCellCentres[faceI-mesh_.nInternalFaces()]; + label facei = pp.start()+i; + start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]]; + end[facei] = neighbourCellCentres[facei-mesh_.nInternalFaces()]; } } else { forAll(pp, i) { - label faceI = pp.start()+i; - start[faceI] = mesh_.cellCentres()[mesh_.faceOwner()[faceI]]; - end[faceI] = mesh_.faceCentres()[faceI]; + label facei = pp.start()+i; + start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]]; + end[facei] = mesh_.faceCentres()[facei]; } } } @@ -146,13 +146,13 @@ void Foam::faceSelections::searchableSurfaceSelection::select //- Note: do not select boundary faces. - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - if (hits[faceI].hit()) + if (hits[facei].hit()) { - faceToZoneID[faceI] = zoneID; - vector d = end[faceI]-start[faceI]; - faceToFlip[faceI] = ((normals[faceI] & d) < 0); + faceToZoneID[facei] = zoneID; + vector d = end[facei]-start[facei]; + faceToFlip[facei] = ((normals[facei] & d) < 0); } } forAll(pbm, patchi) @@ -163,12 +163,12 @@ void Foam::faceSelections::searchableSurfaceSelection::select { forAll(pp, i) { - label faceI = pp.start()+i; - if (hits[faceI].hit()) + label facei = pp.start()+i; + if (hits[facei].hit()) { - faceToZoneID[faceI] = zoneID; - vector d = end[faceI]-start[faceI]; - faceToFlip[faceI] = ((normals[faceI] & d) < 0); + faceToZoneID[facei] = zoneID; + vector d = end[facei]-start[facei]; + faceToFlip[facei] = ((normals[facei] & d) < 0); } } } diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 9313dd09e190ca5a98ae028bdb401d24e28a076d..a3138490b7e99075255206a3c94ae992b46fdeb3 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -244,12 +244,12 @@ void dumpCyclicMatch(const fileName& prefix, const polyMesh& mesh) Pout<< "Dumping cyclic match as lines between face centres to " << str.name() << endl; - forAll(cycPatch, faceI) + forAll(cycPatch, facei) { - const point& fc0 = mesh.faceCentres()[cycPatch.start()+faceI]; + const point& fc0 = mesh.faceCentres()[cycPatch.start()+facei]; meshTools::writeOBJ(str, fc0); vertI++; - const point& fc1 = mesh.faceCentres()[nbrPatch.start()+faceI]; + const point& fc1 = mesh.faceCentres()[nbrPatch.start()+facei]; meshTools::writeOBJ(str, fc1); vertI++; @@ -716,12 +716,12 @@ int main(int argc, char *argv[]) forAll(patchFaces, i) { - label faceI = patchFaces[i]; + label facei = patchFaces[i]; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { FatalErrorInFunction - << "Face " << faceI << " specified in set " + << "Face " << facei << " specified in set " << faces.name() << " is not an external face of the mesh." << endl << "This application can only repatch existing boundary" @@ -731,7 +731,7 @@ int main(int argc, char *argv[]) changePatchID ( mesh, - faceI, + facei, destPatchI, meshMod ); diff --git a/applications/utilities/mesh/manipulation/insideCells/insideCells.C b/applications/utilities/mesh/manipulation/insideCells/insideCells.C index 4b0845abcb354be10b330b9e3d8a0e8a7b7fb5b8..49baf63fcceb743f92b55698bc9c0dc8103a7dc1 100644 --- a/applications/utilities/mesh/manipulation/insideCells/insideCells.C +++ b/applications/utilities/mesh/manipulation/insideCells/insideCells.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 @@ -75,11 +75,11 @@ int main(int argc, char *argv[]) boolList inside(querySurf.calcInside(mesh.cellCentres())); - forAll(inside, cellI) + forAll(inside, celli) { - if (inside[cellI]) + if (inside[celli]) { - insideCells.insert(cellI); + insideCells.insert(celli); } } diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C b/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C index d41b206fd6bd50102130b51010a2bd7917306bdb..5ac528fe0f117ebb7bb4b6360d42890e8b70cf26 100644 --- a/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C +++ b/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C @@ -244,10 +244,10 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m) cellZoneIndices[zoneI] = zoneIndex(cellZoneNames_, cz[zoneI].name()); } - forAll(c, cellI) + forAll(c, celli) { // Grab zone ID. If a cell is not in a zone, it will return -1 - zoneID = cz.whichZone(cellI); + zoneID = cz.whichZone(celli); if (zoneID >= 0) { @@ -255,7 +255,7 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m) zoneID = cellZoneIndices[zoneID]; } - renumberCells[cellI] = + renumberCells[celli] = meshMod_.setAction ( polyAddCell @@ -303,9 +303,9 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m) label newOwn, newNei, newPatch, newZone; bool newZoneFlip; - forAll(f, faceI) + forAll(f, facei) { - const face& curFace = f[faceI]; + const face& curFace = f[facei]; face newFace(curFace.size()); @@ -320,22 +320,22 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m) if (min(newFace) < 0) { FatalErrorInFunction - << "Error in point mapping for face " << faceI + << "Error in point mapping for face " << facei << ". Old face: " << curFace << " New face: " << newFace << abort(FatalError); } } - if (faceI < m.nInternalFaces() || faceI >= m.nFaces()) + if (facei < m.nInternalFaces() || facei >= m.nFaces()) { newPatch = -1; } else { - newPatch = patchIndices[bm.whichPatch(faceI)]; + newPatch = patchIndices[bm.whichPatch(facei)]; } - newOwn = own[faceI]; + newOwn = own[facei]; if (newOwn > -1) newOwn = renumberCells[newOwn]; if (newPatch > -1) @@ -344,23 +344,23 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m) } else { - newNei = nei[faceI]; + newNei = nei[facei]; newNei = renumberCells[newNei]; } - newZone = fz.whichZone(faceI); + newZone = fz.whichZone(facei); newZoneFlip = false; if (newZone >= 0) { - newZoneFlip = fz[newZone].flipMap()[fz[newZone].whichFace(faceI)]; + newZoneFlip = fz[newZone].flipMap()[fz[newZone].whichFace(facei)]; // Grab the new zone newZone = faceZoneIndices[newZone]; } - renumberFaces[faceI] = + renumberFaces[facei] = meshMod_.setAction ( polyAddFace diff --git a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C index 23a6a2f1d328eed7dad7614dead9a08095a1b432..c2c7f9bb0650a81f8065f02e266e7555bba27225 100644 --- a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C +++ b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C @@ -170,16 +170,16 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces) { if (duplicates[bFaceI] != -1) { - label faceI = mesh.nInternalFaces() + bFaceI; - label patchi = patches.whichPatch(faceI); + label facei = mesh.nInternalFaces() + bFaceI; + label patchi = patches.whichPatch(facei); if (isA<processorPolyPatch>(patches[patchi])) { FatalErrorInFunction - << "Duplicate face " << faceI + << "Duplicate face " << facei << " is on a processorPolyPatch." << "This is not allowed." << nl - << "Face:" << faceI + << "Face:" << facei << " is on patch:" << patches[patchi].name() << abort(FatalError); } diff --git a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C index 0b87ff1d5af0f630a3a2462e0dc927cac91b4e45..f5a5ba0d74952f8330a94140d33e6e0434dddf86 100644 --- a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C +++ b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C @@ -130,12 +130,12 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) const labelUList& oldOwnerStart = lduAddr().ownerStartAddr(); - forAll(newCellFaces, cellI) + forAll(newCellFaces, celli) { - labelList& curFaces = newCellFaces[cellI]; + labelList& curFaces = newCellFaces[celli]; - const label s = oldOwnerStart[cellI]; - const label e = oldOwnerStart[cellI + 1]; + const label s = oldOwnerStart[celli]; + const label e = oldOwnerStart[celli + 1]; curFaces.setSize(e - s); @@ -171,12 +171,12 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) const labelUList& curFaceCells = curPatch.faceCells(); const label curStart = curPatch.start(); - forAll(curPatch, faceI) + forAll(curPatch, facei) { // Find out if the mirrored face is identical to the // original. If so, the face needs to become internal and // added to its owner cell - const face& origFace = curPatch[faceI]; + const face& origFace = curPatch[facei]; face mirrorFace(origFace.size()); forAll(mirrorFace, pointI) @@ -188,12 +188,12 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) { // The mirror is identical to current face. This will // become an internal face - const label oldSize = newCellFaces[curFaceCells[faceI]].size(); + const label oldSize = newCellFaces[curFaceCells[facei]].size(); - newCellFaces[curFaceCells[faceI]].setSize(oldSize + 1); - newCellFaces[curFaceCells[faceI]][oldSize] = curStart + faceI; + newCellFaces[curFaceCells[facei]].setSize(oldSize + 1); + newCellFaces[curFaceCells[facei]][oldSize] = curStart + facei; - curInsBouFace[faceI] = true; + curInsBouFace[facei] = true; } } } @@ -210,9 +210,9 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) label nNewFaces = 0; // Insert original (internal) faces - forAll(newCellFaces, cellI) + forAll(newCellFaces, celli) { - const labelList& curCellFaces = newCellFaces[cellI]; + const labelList& curCellFaces = newCellFaces[celli]; forAll(curCellFaces, cfI) { @@ -224,9 +224,9 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) } // Mirror internal faces - for (label faceI = 0; faceI < nOldInternalFaces; faceI++) + for (label facei = 0; facei < nOldInternalFaces; facei++) { - const face& oldFace = oldFaces[faceI]; + const face& oldFace = oldFaces[facei]; face& nf = newFaces[nNewFaces]; nf.setSize(oldFace.size()); @@ -237,7 +237,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) nf[i] = mirrorPointLookup[oldFace[oldFace.size() - i]]; } - mirrorFaceLookup[faceI] = nNewFaces; + mirrorFaceLookup[facei] = nNewFaces; nNewFaces++; } @@ -258,27 +258,27 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) newPatchStarts[nNewPatches] = nNewFaces; // Master side - for (label faceI = 0; faceI < curPatchSize; faceI++) + for (label facei = 0; facei < curPatchSize; facei++) { // Check if the face has already been added. If not, add it and // insert the numbering details. - if (!curInserted[faceI]) + if (!curInserted[facei]) { - newFaces[nNewFaces] = oldFaces[curPatchStart + faceI]; + newFaces[nNewFaces] = oldFaces[curPatchStart + facei]; - masterFaceLookup[curPatchStart + faceI] = nNewFaces; + masterFaceLookup[curPatchStart + facei] = nNewFaces; nNewFaces++; } } // Mirror side - for (label faceI = 0; faceI < curPatchSize; faceI++) + for (label facei = 0; facei < curPatchSize; facei++) { // Check if the face has already been added. If not, add it and // insert the numbering details. - if (!curInserted[faceI]) + if (!curInserted[facei]) { - const face& oldFace = oldFaces[curPatchStart + faceI]; + const face& oldFace = oldFaces[curPatchStart + facei]; face& nf = newFaces[nNewFaces]; nf.setSize(oldFace.size()); @@ -289,14 +289,14 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) nf[i] = mirrorPointLookup[oldFace[oldFace.size() - i]]; } - mirrorFaceLookup[curPatchStart + faceI] = nNewFaces; + mirrorFaceLookup[curPatchStart + facei] = nNewFaces; nNewFaces++; } else { // Grab the index of the master face for the mirror side - mirrorFaceLookup[curPatchStart + faceI] = - masterFaceLookup[curPatchStart + faceI]; + mirrorFaceLookup[curPatchStart + facei] = + masterFaceLookup[curPatchStart + facei]; } } @@ -330,9 +330,9 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) label nNewCells = 0; // Grab the original cells. Take care of face renumbering. - forAll(oldCells, cellI) + forAll(oldCells, celli) { - const cell& oc = oldCells[cellI]; + const cell& oc = oldCells[celli]; cell& nc = newCells[nNewCells]; nc.setSize(oc.size()); @@ -346,9 +346,9 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io) } // Mirror the cells - forAll(oldCells, cellI) + forAll(oldCells, celli) { - const cell& oc = oldCells[cellI]; + const cell& oc = oldCells[celli]; cell& nc = newCells[nNewCells]; nc.setSize(oc.size()); diff --git a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C index a758ff1f7eea70f8733663421ed7f7d7127fd8d3..43cb570e65ffefbc3ac6d16e0ac1d93bbd39e014 100644 --- a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C +++ b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C @@ -99,9 +99,9 @@ int main(int argc, char *argv[]) label nProtected = 0; - forAll(faceLabels, faceI) + forAll(faceLabels, facei) { - const label meshFaceI = faceLabels[faceI]; + const label meshFaceI = faceLabels[facei]; const label patchi = bm.whichPatch(meshFaceI); if @@ -112,7 +112,7 @@ int main(int argc, char *argv[]) ) { // Slave side. Mark so doesn't get visited. - allFaceInfo[faceI] = orientedSurface::NOFLIP; + allFaceInfo[facei] = orientedSurface::NOFLIP; nProtected++; } } @@ -125,13 +125,13 @@ int main(int argc, char *argv[]) // Number of (master)faces per edge labelList nMasterFaces(patch.nEdges(), 0); - forAll(faceLabels, faceI) + forAll(faceLabels, facei) { - const label meshFaceI = faceLabels[faceI]; + const label meshFaceI = faceLabels[facei]; if (isMasterFace[meshFaceI]) { - const labelList& fEdges = patch.faceEdges()[faceI]; + const labelList& fEdges = patch.faceEdges()[facei]; forAll(fEdges, fEdgeI) { nMasterFaces[fEdges[fEdgeI]]++; @@ -184,11 +184,11 @@ int main(int argc, char *argv[]) { // Pick an unset face label unsetFaceI = labelMax; - forAll(allFaceInfo, faceI) + forAll(allFaceInfo, facei) { - if (allFaceInfo[faceI] == orientedSurface::UNVISITED) + if (allFaceInfo[facei] == orientedSurface::UNVISITED) { - unsetFaceI = globalFaces.toGlobal(faceI); + unsetFaceI = globalFaces.toGlobal(facei); break; } } @@ -347,25 +347,25 @@ int main(int argc, char *argv[]) boolList newFlipMap(allFaceInfo.size(), false); label nChanged = 0; - forAll(allFaceInfo, faceI) + forAll(allFaceInfo, facei) { - if (allFaceInfo[faceI] == orientedSurface::NOFLIP) + if (allFaceInfo[facei] == orientedSurface::NOFLIP) { - newFlipMap[faceI] = false; + newFlipMap[facei] = false; } - else if (allFaceInfo[faceI] == orientedSurface::FLIP) + else if (allFaceInfo[facei] == orientedSurface::FLIP) { - newFlipMap[faceI] = true; + newFlipMap[facei] = true; } else { FatalErrorInFunction - << "Problem : unvisited face " << faceI - << " centre:" << mesh.faceCentres()[faceLabels[faceI]] + << "Problem : unvisited face " << facei + << " centre:" << mesh.faceCentres()[faceLabels[facei]] << abort(FatalError); } - if (fZone.flipMap()[faceI] != newFlipMap[faceI]) + if (fZone.flipMap()[facei] != newFlipMap[facei]) { nChanged++; } diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C index 69938e50bd47ec5e13b9088b66d8a5076abd530a..f6f4666fda60af5bac7730497dcfe37ddabd4b86 100644 --- a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C +++ b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C @@ -102,9 +102,9 @@ void Foam::meshDualiser::dumpPolyTopoChange const DynamicList<face>& faces = meshMod.faces(); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; str1<< 'f'; forAll(f, fp) @@ -125,7 +125,7 @@ void Foam::meshDualiser::dumpPolyTopoChange Foam::label Foam::meshDualiser::findDualCell ( - const label cellI, + const label celli, const label pointI ) const { @@ -137,7 +137,7 @@ Foam::label Foam::meshDualiser::findDualCell } else { - label index = findIndex(mesh_.pointCells()[pointI], cellI); + label index = findIndex(mesh_.pointCells()[pointI], celli); return dualCells[index]; } @@ -177,19 +177,19 @@ void Foam::meshDualiser::generateDualBoundaryEdges // sides. bool Foam::meshDualiser::sameDualCell ( - const label faceI, + const label facei, const label pointI ) const { - if (!mesh_.isInternalFace(faceI)) + if (!mesh_.isInternalFace(facei)) { FatalErrorInFunction - << "face:" << faceI << " is not internal face." + << "face:" << facei << " is not internal face." << abort(FatalError); } - label own = mesh_.faceOwner()[faceI]; - label nei = mesh_.faceNeighbour()[faceI]; + label own = mesh_.faceOwner()[facei]; + label nei = mesh_.faceNeighbour()[facei]; return findDualCell(own, pointI) == findDualCell(nei, pointI); } @@ -436,19 +436,19 @@ void Foam::meshDualiser::createFacesAroundEdge while (true) { - label faceI = ie.faceLabel(); + label facei = ie.faceLabel(); // Mark face as visited. - doneEFaces[findIndex(eFaces, faceI)] = true; + doneEFaces[findIndex(eFaces, facei)] = true; - if (faceToDualPoint_[faceI] != -1) + if (faceToDualPoint_[facei] != -1) { - verts.append(faceToDualPoint_[faceI]); + verts.append(faceToDualPoint_[facei]); } - label cellI = ie.cellLabel(); + label celli = ie.cellLabel(); - if (cellI == -1) + if (celli == -1) { // At ending boundary face. We've stored the face point above // so this is the whole face. @@ -456,8 +456,8 @@ void Foam::meshDualiser::createFacesAroundEdge } - label dualCell0 = findDualCell(cellI, e[0]); - label dualCell1 = findDualCell(cellI, e[1]); + label dualCell0 = findDualCell(celli, e[0]); + label dualCell1 = findDualCell(celli, e[1]); // Generate face. (always if splitFace=true; only if needed to // separate cells otherwise) @@ -492,15 +492,15 @@ void Foam::meshDualiser::createFacesAroundEdge { verts.append(edgeToDualPoint_[edgeI]); } - if (faceToDualPoint_[faceI] != -1) + if (faceToDualPoint_[facei] != -1) { - verts.append(faceToDualPoint_[faceI]); + verts.append(faceToDualPoint_[facei]); } } - if (cellToDualPoint_[cellI] != -1) + if (cellToDualPoint_[celli] != -1) { - verts.append(cellToDualPoint_[cellI]); + verts.append(cellToDualPoint_[celli]); } ++ie; @@ -537,22 +537,22 @@ void Foam::meshDualiser::createFacesAroundEdge } -// Walks around circumference of faceI. Creates single face. Gets given +// Walks around circumference of facei. Creates single face. Gets given // starting (feature) edge to start from. Returns ending edge. (all edges // in form of index in faceEdges) void Foam::meshDualiser::createFaceFromInternalFace ( - const label faceI, + const label facei, label& fp, polyTopoChange& meshMod ) const { - const face& f = mesh_.faces()[faceI]; - const labelList& fEdges = mesh_.faceEdges()[faceI]; - label own = mesh_.faceOwner()[faceI]; - label nei = mesh_.faceNeighbour()[faceI]; + const face& f = mesh_.faces()[facei]; + const labelList& fEdges = mesh_.faceEdges()[facei]; + label own = mesh_.faceOwner()[facei]; + label nei = mesh_.faceNeighbour()[facei]; - //Pout<< "createFaceFromInternalFace : At face:" << faceI + //Pout<< "createFaceFromInternalFace : At face:" << facei // << " verts:" << f // << " points:" << UIndirectList<point>(mesh_.points(), f)() // << " started walking at edge:" << fEdges[fp] @@ -563,7 +563,7 @@ void Foam::meshDualiser::createFaceFromInternalFace // Walk and collect face. DynamicList<label> verts(100); - verts.append(faceToDualPoint_[faceI]); + verts.append(faceToDualPoint_[facei]); verts.append(edgeToDualPoint_[fEdges[fp]]); // Step to vertex after edge mid @@ -602,7 +602,7 @@ void Foam::meshDualiser::createFaceFromInternalFace if (edgeToDualPoint_[edgeI] == -1) { FatalErrorInFunction - << "face:" << faceI << " verts:" << f + << "face:" << facei << " verts:" << f << " points:" << UIndirectList<point>(mesh_.points(), f)() << " no feature edge between " << f[fp] << " and " << f[nextFp] << " although have different" @@ -621,7 +621,7 @@ void Foam::meshDualiser::createFaceFromInternalFace ( -1, // masterPointI -1, // masterEdgeI - faceI, // masterFaceI + facei, // masterFaceI true, // edgeOrder, currentDualCell0, currentDualCell1, @@ -660,13 +660,13 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint // pointFaces. // Starting face - label faceI = startFaceI; + label facei = startFaceI; DynamicList<label> verts(4); while (true) { - label index = findIndex(pFaces, faceI-pp.start()); + label index = findIndex(pFaces, facei-pp.start()); // Has face been visited already? if (donePFaces[index]) @@ -676,15 +676,15 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint donePFaces[index] = true; // Insert face centre - verts.append(faceToDualPoint_[faceI]); + 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]; + const face& f = mesh_.faces()[facei]; label fp = findIndex(f, pointI); label prevFp = f.rcIndex(fp); - label edgeI = mesh_.faceEdges()[faceI][prevFp]; + label edgeI = mesh_.faceEdges()[facei][prevFp]; if (edgeToDualPoint_[edgeI] != -1) { @@ -695,7 +695,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint edgeFaceCirculator circ ( mesh_, - faceI, + facei, true, // ownerSide prevFp, // index of edge in face true // isBoundaryEdge @@ -708,20 +708,20 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint while (mesh_.isInternalFace(circ.faceLabel())); // Step to next face - faceI = circ.faceLabel(); + facei = circ.faceLabel(); - if (faceI < pp.start() || faceI >= pp.start()+pp.size()) + if (facei < pp.start() || facei >= pp.start()+pp.size()) { FatalErrorInFunction << "Walked from face on patch:" << patchi - << " to face:" << faceI - << " fc:" << mesh_.faceCentres()[faceI] - << " on patch:" << patches.whichPatch(faceI) + << " to face:" << facei + << " fc:" << mesh_.faceCentres()[facei] + << " on patch:" << patches.whichPatch(facei) << abort(FatalError); } // 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,7 +744,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint //pointI, // masterPointI -1, // masterPointI -1, // masterEdgeI - faceI, // masterFaceI + facei, // masterFaceI dualCellI, patchi, verts, @@ -753,17 +753,17 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint } else { - label faceI = startFaceI; + label facei = startFaceI; // Storage for face - DynamicList<label> verts(mesh_.faces()[faceI].size()); + DynamicList<label> verts(mesh_.faces()[facei].size()); // Starting point. verts.append(pointToDualPoint_[pointI]); // Find edge between pointI and next point on face. - const labelList& fEdges = mesh_.faceEdges()[faceI]; - label nextEdgeI = fEdges[findIndex(mesh_.faces()[faceI], pointI)]; + const labelList& fEdges = mesh_.faceEdges()[facei]; + label nextEdgeI = fEdges[findIndex(mesh_.faces()[facei], pointI)]; if (edgeToDualPoint_[nextEdgeI] != -1) { verts.append(edgeToDualPoint_[nextEdgeI]); @@ -771,7 +771,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint do { - label index = findIndex(pFaces, faceI-pp.start()); + label index = findIndex(pFaces, facei-pp.start()); // Has face been visited already? if (donePFaces[index]) @@ -781,11 +781,11 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint donePFaces[index] = true; // Face centre - verts.append(faceToDualPoint_[faceI]); + verts.append(faceToDualPoint_[facei]); - // Find edge before pointI on faceI - const labelList& fEdges = mesh_.faceEdges()[faceI]; - const face& f = mesh_.faces()[faceI]; + // Find edge before pointI on facei + const labelList& fEdges = mesh_.faceEdges()[facei]; + const face& f = mesh_.faces()[facei]; label prevFp = f.rcIndex(findIndex(f, pointI)); label edgeI = fEdges[prevFp]; @@ -798,8 +798,8 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint ( -1, // masterPointI -1, // masterEdgeI - faceI, // masterFaceI - findDualCell(own[faceI], pointI), + facei, // masterFaceI + findDualCell(own[facei], pointI), patchi, verts.shrink(), meshMod @@ -814,7 +814,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint edgeFaceCirculator circ ( mesh_, - faceI, + facei, true, // ownerSide prevFp, // index of edge in face true // isBoundaryEdge @@ -827,13 +827,13 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint while (mesh_.isInternalFace(circ.faceLabel())); // Step to next face. Quit if not on same patch. - faceI = circ.faceLabel(); + facei = circ.faceLabel(); } while ( - faceI != startFaceI - && faceI >= pp.start() - && faceI < pp.start()+pp.size() + facei != startFaceI + && facei >= pp.start() + && facei < pp.start()+pp.size() ); if (verts.size() > 2) @@ -844,7 +844,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint -1, // masterPointI -1, // masterEdgeI startFaceI, // masterFaceI - findDualCell(own[faceI], pointI), + findDualCell(own[facei], pointI), patchi, verts.shrink(), meshMod @@ -887,9 +887,9 @@ void Foam::meshDualiser::setRefinement // (Note: in 1.4.2 we can use the built-in mesh point ordering // facility instead) PackedBoolList isBoundaryEdge(mesh_.nEdges()); - for (label faceI = mesh_.nInternalFaces(); faceI < mesh_.nFaces(); faceI++) + for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++) { - const labelList& fEdges = mesh_.faceEdges()[faceI]; + const labelList& fEdges = mesh_.faceEdges()[facei]; forAll(fEdges, i) { @@ -912,15 +912,15 @@ void Foam::meshDualiser::setRefinement { featureFaceSet[featureFaces[i]] = true; } - label faceI = findIndex(featureFaceSet, false); + label facei = findIndex(featureFaceSet, false); - if (faceI != -1) + if (facei != -1) { FatalErrorInFunction << "In split-face-mode (splitFace=true) but not all faces" << " marked as feature faces." << endl - << "First conflicting face:" << faceI - << " centre:" << mesh_.faceCentres()[faceI] + << "First conflicting face:" << facei + << " centre:" << mesh_.faceCentres()[facei] << abort(FatalError); } @@ -954,18 +954,18 @@ void Foam::meshDualiser::setRefinement } for ( - label faceI = mesh_.nInternalFaces(); - faceI < mesh_.nFaces(); - faceI++ + label facei = mesh_.nInternalFaces(); + facei < mesh_.nFaces(); + facei++ ) { - if (!featureFaceSet[faceI]) + if (!featureFaceSet[facei]) { FatalErrorInFunction << "Not all boundary faces marked as feature faces." << endl - << "First conflicting face:" << faceI - << " centre:" << mesh_.faceCentres()[faceI] + << "First conflicting face:" << facei + << " centre:" << mesh_.faceCentres()[facei] << abort(FatalError); } } @@ -1116,12 +1116,12 @@ void Foam::meshDualiser::setRefinement // Dual points (from cell centres, feature faces, feature edges) // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - forAll(cellToDualPoint_, cellI) + forAll(cellToDualPoint_, celli) { - cellToDualPoint_[cellI] = meshMod.addPoint + cellToDualPoint_[celli] = meshMod.addPoint ( - cellCentres[cellI], - mesh_.faces()[mesh_.cells()[cellI][0]][0], // masterPoint + cellCentres[celli], + mesh_.faces()[mesh_.cells()[celli][0]][0], // masterPoint -1, // zoneID true // inCell ); @@ -1131,12 +1131,12 @@ void Foam::meshDualiser::setRefinement forAll(featureFaces, i) { - label faceI = featureFaces[i]; + label facei = featureFaces[i]; - faceToDualPoint_[faceI] = meshMod.addPoint + faceToDualPoint_[facei] = meshMod.addPoint ( - mesh_.faceCentres()[faceI], - mesh_.faces()[faceI][0], // masterPoint + mesh_.faceCentres()[facei], + mesh_.faces()[facei][0], // masterPoint -1, // zoneID true // inCell ); @@ -1144,22 +1144,22 @@ void Foam::meshDualiser::setRefinement // Detect whether different dual cells on either side of a face. This // would neccesitate having a dual face built from the face and thus a // dual point at the face centre. - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - if (faceToDualPoint_[faceI] == -1) + if (faceToDualPoint_[facei] == -1) { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; forAll(f, fp) { - label ownDualCell = findDualCell(own[faceI], f[fp]); - label neiDualCell = findDualCell(nei[faceI], f[fp]); + label ownDualCell = findDualCell(own[facei], f[fp]); + label neiDualCell = findDualCell(nei[facei], f[fp]); if (ownDualCell != neiDualCell) { - faceToDualPoint_[faceI] = meshMod.addPoint + faceToDualPoint_[facei] = meshMod.addPoint ( - mesh_.faceCentres()[faceI], + mesh_.faceCentres()[facei], f[fp], // masterPoint -1, // zoneID true // inCell @@ -1332,12 +1332,12 @@ void Foam::meshDualiser::setRefinement // - multiple cells: create single face between unique cell pair. Only // create face where cells differ on either side. // - non-feature face : inbetween cell zones. - forAll(faceToDualPoint_, faceI) + forAll(faceToDualPoint_, facei) { - if (faceToDualPoint_[faceI] != -1 && mesh_.isInternalFace(faceI)) + if (faceToDualPoint_[facei] != -1 && mesh_.isInternalFace(facei)) { - const face& f = mesh_.faces()[faceI]; - const labelList& fEdges = mesh_.faceEdges()[faceI]; + const face& f = mesh_.faces()[facei]; + const labelList& fEdges = mesh_.faceEdges()[facei]; // Starting edge label fp = 0; @@ -1353,7 +1353,7 @@ void Foam::meshDualiser::setRefinement if ( edgeToDualPoint_[fEdges[fp]] != -1 - && !sameDualCell(faceI, f.nextLabel(fp)) + && !sameDualCell(facei, f.nextLabel(fp)) ) { foundStart = true; @@ -1371,7 +1371,7 @@ void Foam::meshDualiser::setRefinement // Walk from edge fp and generate a face. createFaceFromInternalFace ( - faceI, + facei, fp, meshMod ); diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.H b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.H index ce3f98f3ec214318ec5b4305732a9cd643f967c2..4e769001eaaecf7718349d16e3c82235bc3fe445 100644 --- a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.H +++ b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.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 @@ -94,7 +94,7 @@ class meshDualiser static void dumpPolyTopoChange(const polyTopoChange&, const fileName&); //- Find dual cell given point and cell - label findDualCell(const label cellI, const label pointI) const; + label findDualCell(const label celli, const label pointI) const; //- Helper function to generate dualpoints on all boundary edges // emanating from (boundary & feature) point @@ -108,7 +108,7 @@ class meshDualiser //- Check that owner and neighbour of face have same dual cell bool sameDualCell ( - const label faceI, + const label facei, const label pointI ) const; @@ -153,7 +153,7 @@ class meshDualiser //- Create single internal face from internal face void createFaceFromInternalFace ( - const label faceI, + const label facei, label& fp, polyTopoChange& ) const; diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C index c242d6218351094e41f1115157e126c62191bddc..d862a71dde821ae92ab4776b58ca3dbdea51cd07 100644 --- a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C +++ b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C @@ -234,9 +234,9 @@ void simpleMarkFeatures // Face centres that need inclusion in the dual mesh labelHashSet featureFaceSet(mesh.nFaces()-mesh.nInternalFaces()); // A. boundary faces. - for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++) + for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++) { - featureFaceSet.insert(faceI); + featureFaceSet.insert(facei); } // B. face zones. @@ -270,11 +270,11 @@ void simpleMarkFeatures forAll(fz, i) { - label faceI = fz[i]; - const face& f = mesh.faces()[faceI]; - const labelList& fEdges = mesh.faceEdges()[faceI]; + label facei = fz[i]; + const face& f = mesh.faces()[facei]; + const labelList& fEdges = mesh.faceEdges()[facei]; - featureFaceSet.insert(faceI); + featureFaceSet.insert(facei); forAll(f, fp) { // Mark point as multi cell point (since both sides of @@ -385,9 +385,9 @@ int main(int argc, char *argv[]) // (Note: in 1.4.2 we can use the built-in mesh point ordering // facility instead) PackedBoolList isBoundaryEdge(mesh.nEdges()); - for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++) + for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++) { - const labelList& fEdges = mesh.faceEdges()[faceI]; + const labelList& fEdges = mesh.faceEdges()[facei]; forAll(fEdges, i) { diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C index 05a548eeeec43c9ca28a4928495d0682c4b81221..94627d7070cbdc0478a52938523bd7b2464a929d 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.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 @@ -240,9 +240,9 @@ int main(int argc, char *argv[]) // Select all cells refCells.setSize(mesh.nCells()); - forAll(mesh.cells(), cellI) + forAll(mesh.cells(), celli) { - refCells[cellI] = cellI; + refCells[celli] = celli; } if (mesh.nGeometricD() == 3) diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 5d6fe4f9ea8009edf7de056621e92abcb45af5b5..b2318817c7d41f29c20a6e3301b476f48f1e550d 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -86,9 +86,9 @@ tmp<volScalarField> createScalarField ); volScalarField& fld = tfld.ref(); - forAll(fld, cellI) + forAll(fld, celli) { - fld[cellI] = elems[cellI]; + fld[celli] = elems[celli]; } return tfld; @@ -100,9 +100,9 @@ label getBand(const labelList& owner, const labelList& neighbour) { label band = 0; - forAll(neighbour, faceI) + forAll(neighbour, facei) { - label diff = neighbour[faceI] - owner[faceI]; + label diff = neighbour[facei] - owner[facei]; if (diff > band) { @@ -128,10 +128,10 @@ void getBand labelList cellBandwidth(nCells, 0); scalarField nIntersect(nCells, 0.0); - forAll(neighbour, faceI) + forAll(neighbour, facei) { - label own = owner[faceI]; - label nei = neighbour[faceI]; + label own = owner[facei]; + label nei = neighbour[facei]; // Note: mag not necessary for correct (upper-triangular) ordering. label diff = nei-own; @@ -142,17 +142,17 @@ void getBand // Do not use field algebra because of conversion label to scalar profile = 0.0; - forAll(cellBandwidth, cellI) + forAll(cellBandwidth, celli) { - profile += 1.0*cellBandwidth[cellI]; + profile += 1.0*cellBandwidth[celli]; } sumSqrIntersect = 0.0; if (calculateIntersect) { - forAll(nIntersect, cellI) + forAll(nIntersect, celli) { - for (label colI = cellI-cellBandwidth[cellI]; colI <= cellI; colI++) + for (label colI = celli-cellBandwidth[celli]; colI <= celli; colI++) { nIntersect[colI] += 1.0; } @@ -190,15 +190,15 @@ labelList getFaceOrder forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { // Internal face. Get cell on other side. - label nbrCellI = reverseCellOrder[mesh.faceNeighbour()[faceI]]; + label nbrCellI = reverseCellOrder[mesh.faceNeighbour()[facei]]; if (nbrCellI == newCellI) { - nbrCellI = reverseCellOrder[mesh.faceOwner()[faceI]]; + nbrCellI = reverseCellOrder[mesh.faceOwner()[facei]]; } if (newCellI < nbrCellI) @@ -233,19 +233,19 @@ labelList getFaceOrder } // Leave patch faces intact. - for (label faceI = newFaceI; faceI < mesh.nFaces(); faceI++) + for (label facei = newFaceI; facei < mesh.nFaces(); facei++) { - oldToNewFace[faceI] = faceI; + oldToNewFace[facei] = facei; } // Check done all faces. - forAll(oldToNewFace, faceI) + forAll(oldToNewFace, facei) { - if (oldToNewFace[faceI] == -1) + if (oldToNewFace[facei] == -1) { FatalErrorInFunction - << "Did not determine new position" << " for face " << faceI + << "Did not determine new position" << " for face " << facei << abort(FatalError); } } @@ -286,15 +286,15 @@ labelList getRegionFaceOrder forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { // Internal face. Get cell on other side. - label nbrCellI = reverseCellOrder[mesh.faceNeighbour()[faceI]]; + 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]]) @@ -337,14 +337,14 @@ labelList getRegionFaceOrder // Sort in increasing region SortableList<label> sortKey(mesh.nFaces(), labelMax); - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - label ownRegion = cellToRegion[mesh.faceOwner()[faceI]]; - label neiRegion = cellToRegion[mesh.faceNeighbour()[faceI]]; + label ownRegion = cellToRegion[mesh.faceOwner()[facei]]; + label neiRegion = cellToRegion[mesh.faceNeighbour()[facei]]; if (ownRegion != neiRegion) { - sortKey[faceI] = + sortKey[facei] = min(ownRegion, neiRegion)*nRegions +max(ownRegion, neiRegion); } @@ -372,20 +372,20 @@ labelList getRegionFaceOrder } // Leave patch faces intact. - for (label faceI = newFaceI; faceI < mesh.nFaces(); faceI++) + for (label facei = newFaceI; facei < mesh.nFaces(); facei++) { - oldToNewFace[faceI] = faceI; + oldToNewFace[facei] = facei; } // Check done all faces. - forAll(oldToNewFace, faceI) + forAll(oldToNewFace, facei) { - if (oldToNewFace[faceI] == -1) + if (oldToNewFace[facei] == -1) { FatalErrorInFunction << "Did not determine new position" - << " for face " << faceI + << " for face " << facei << abort(FatalError); } } @@ -427,16 +427,16 @@ autoPtr<mapPolyMesh> reorderMesh // Check if any faces need swapping. labelHashSet flipFaceFlux(newOwner.size()); - forAll(newNeighbour, faceI) + forAll(newNeighbour, facei) { - label own = newOwner[faceI]; - label nei = newNeighbour[faceI]; + label own = newOwner[facei]; + label nei = newNeighbour[facei]; if (nei < own) { - newFaces[faceI].flip(); - Swap(newOwner[faceI], newNeighbour[faceI]); - flipFaceFlux.insert(faceI); + newFaces[facei].flip(); + Swap(newOwner[facei], newNeighbour[facei]); + flipFaceFlux.insert(facei); } } @@ -566,11 +566,11 @@ labelList regionRenumber labelListList regionToCells(invertOneToMany(nRegions, cellToRegion)); - label cellI = 0; + label celli = 0; forAll(regionToCells, regionI) { - Info<< " region " << regionI << " starts at " << cellI << endl; + Info<< " region " << regionI << " starts at " << celli << endl; // Make sure no parallel comms bool oldParRun = UPstream::parRun(); @@ -595,7 +595,7 @@ labelList regionRenumber forAll(subCellOrder, i) { - cellOrder[cellI++] = cellMap[subCellOrder[i]]; + cellOrder[celli++] = cellMap[subCellOrder[i]]; } } Info<< endl; @@ -975,13 +975,13 @@ int main(int argc, char *argv[]) const labelUList& faceCells = pbm[patchi].faceCells(); forAll(faceCells, i) { - label cellI = faceCells[i]; + label celli = faceCells[i]; - if (reverseCellOrder[cellI] != -1) + if (reverseCellOrder[celli] != -1) { - bndCells[nBndCells] = cellI; - bndCellMap[nBndCells++] = reverseCellOrder[cellI]; - reverseCellOrder[cellI] = -1; + bndCells[nBndCells] = celli; + bndCellMap[nBndCells++] = reverseCellOrder[celli]; + reverseCellOrder[celli] = -1; } } } @@ -1105,10 +1105,10 @@ int main(int argc, char *argv[]) const labelHashSet& fff = map().flipFaceFlux(); forAllConstIter(labelHashSet, fff, iter) { - label faceI = iter.key(); - label masterFaceI = faceProcAddressing[faceI]; + label facei = iter.key(); + label masterFaceI = faceProcAddressing[facei]; - faceProcAddressing[faceI] = -masterFaceI; + faceProcAddressing[facei] = -masterFaceI; if (masterFaceI == 0) { diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index 1cd3ad69586db3f0fc5d4b2e479d2c7247cd2cc8..12457a85179a5a81990bb7e92b85725031bfab61 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -110,31 +110,31 @@ void writeVTK forAllConstIter(cellSet, currentSet, iter) { - label cellI = iter.key(); + label celli = iter.key(); - const cell& cFaces = mesh.cells()[cellI]; + const cell& cFaces = mesh.cells()[celli]; forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (mesh.isInternalFace(faceI)) + 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)) { - cellFaces.insert(faceI, cellI); + cellFaces.insert(facei, celli); } } else { - cellFaces.insert(faceI, cellI); + cellFaces.insert(facei, celli); } } } diff --git a/applications/utilities/mesh/manipulation/setSet/writePatch.C b/applications/utilities/mesh/manipulation/setSet/writePatch.C index 11e22d23d3adaac529d50f88f3bfc8a42ac4f78a..6a3269956662854835e10013e0a3e53fc927a85c 100644 --- a/applications/utilities/mesh/manipulation/setSet/writePatch.C +++ b/applications/utilities/mesh/manipulation/setSet/writePatch.C @@ -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 @@ -81,9 +81,9 @@ void writePatch label nFaceVerts = 0; - forAll(fp.localFaces(), faceI) + forAll(fp.localFaces(), facei) { - nFaceVerts += fp.localFaces()[faceI].size() + 1; + nFaceVerts += fp.localFaces()[facei].size() + 1; } pStream << "POLYGONS " << fp.size() << ' ' << nFaceVerts << std::endl; @@ -91,9 +91,9 @@ void writePatch DynamicList<label> vertLabels(nFaceVerts); - forAll(fp.localFaces(), faceI) + forAll(fp.localFaces(), facei) { - const face& f = fp.localFaces()[faceI]; + const face& f = fp.localFaces()[facei]; vertLabels.append(f.size()); diff --git a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C index 8b23cfe5cd5a6e49711056c2c3c7e68b055d1a5c..ef0519b6177fb560aa75c0b4fb295d8893ab4ae2 100644 --- a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C +++ b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C @@ -163,8 +163,8 @@ int main(int argc, char *argv[]) // No flip map. forAll(faceLabels, i) { - label faceI = faceLabels[i]; - addressing.append(faceI); + label facei = faceLabels[i]; + addressing.append(facei); flipMap.append(false); } } @@ -187,24 +187,24 @@ int main(int argc, char *argv[]) forAll(faceLabels, i) { - label faceI = faceLabels[i]; + label facei = faceLabels[i]; bool flip = false; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { if ( - cells.found(mesh.faceOwner()[faceI]) - && !cells.found(mesh.faceNeighbour()[faceI]) + cells.found(mesh.faceOwner()[facei]) + && !cells.found(mesh.faceNeighbour()[facei]) ) { flip = false; } else if ( - !cells.found(mesh.faceOwner()[faceI]) - && cells.found(mesh.faceNeighbour()[faceI]) + !cells.found(mesh.faceOwner()[facei]) + && cells.found(mesh.faceNeighbour()[facei]) ) { flip = true; @@ -213,21 +213,21 @@ int main(int argc, char *argv[]) { FatalErrorInFunction << "One of owner or neighbour of internal face " - << faceI << " should be in cellSet " << cells.name() + << facei << " should be in cellSet " << cells.name() << " to be able to determine orientation." << endl - << "Face:" << faceI - << " own:" << mesh.faceOwner()[faceI] + << "Face:" << facei + << " own:" << mesh.faceOwner()[facei] << " OwnInCellSet:" - << cells.found(mesh.faceOwner()[faceI]) - << " nei:" << mesh.faceNeighbour()[faceI] + << cells.found(mesh.faceOwner()[facei]) + << " nei:" << mesh.faceNeighbour()[facei] << " NeiInCellSet:" - << cells.found(mesh.faceNeighbour()[faceI]) + << cells.found(mesh.faceNeighbour()[facei]) << abort(FatalError); } } else { - if (cells.found(mesh.faceOwner()[faceI])) + if (cells.found(mesh.faceOwner()[facei])) { flip = false; } @@ -237,7 +237,7 @@ int main(int argc, char *argv[]) } } - addressing.append(faceI); + addressing.append(facei); flipMap.append(flip); } } diff --git a/applications/utilities/mesh/manipulation/splitMesh/regionSide.C b/applications/utilities/mesh/manipulation/splitMesh/regionSide.C index 324143751c5767e95431c8120427349b17bacebf..207dcaf3e7440c363f37a27ea8a158703bd76877 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/regionSide.C +++ b/applications/utilities/mesh/manipulation/splitMesh/regionSide.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,16 +43,16 @@ defineTypeNameAndDebug(regionSide, 0); Foam::label Foam::regionSide::otherFace ( const primitiveMesh& mesh, - const label cellI, - const label faceI, + const label celli, + const label facei, const label edgeI ) { label f0I, f1I; - meshTools::getEdgeFaces(mesh, cellI, edgeI, f0I, f1I); + meshTools::getEdgeFaces(mesh, celli, edgeI, f0I, f1I); - if (f0I == faceI) + if (f0I == facei) { return f1I; } @@ -67,7 +67,7 @@ Foam::label Foam::regionSide::otherFace Foam::label Foam::regionSide::otherEdge ( const primitiveMesh& mesh, - const label faceI, + const label facei, const label edgeI, const label pointI ) @@ -77,7 +77,7 @@ Foam::label Foam::regionSide::otherEdge // Get other point on edge. label freePointI = e.otherVertex(pointI); - const labelList& fEdges = mesh.faceEdges()[faceI]; + const labelList& fEdges = mesh.faceEdges()[facei]; forAll(fEdges, fEdgeI) { @@ -102,52 +102,52 @@ Foam::label Foam::regionSide::otherEdge } FatalErrorInFunction - << "Cannot find other edge on face " << faceI << " that uses point " + << "Cannot find other edge on face " << facei << " that uses point " << pointI << " but not point " << freePointI << endl << "Edges on face:" << fEdges << " verts:" << UIndirectList<edge>(mesh.edges(), fEdges)() << " Vertices on face:" - << mesh.faces()[faceI] + << mesh.faces()[facei] << " Vertices on original edge:" << e << abort(FatalError); return -1; } -// Step from faceI (on side cellI) to connected face & cell without crossing +// Step from facei (on side celli) to connected face & cell without crossing // fenceEdges. void Foam::regionSide::visitConnectedFaces ( const primitiveMesh& mesh, const labelHashSet& region, const labelHashSet& fenceEdges, - const label cellI, - const label faceI, + const label celli, + const label facei, labelHashSet& visitedFace ) { - if (!visitedFace.found(faceI)) + if (!visitedFace.found(facei)) { if (debug) { - Info<< "visitConnectedFaces : cellI:" << cellI << " faceI:" - << faceI << " isOwner:" << (cellI == mesh.faceOwner()[faceI]) + Info<< "visitConnectedFaces : celli:" << celli << " facei:" + << facei << " isOwner:" << (celli == mesh.faceOwner()[facei]) << endl; } // Mark as visited - visitedFace.insert(faceI); + visitedFace.insert(facei); // Mark which side of face was visited. - if (cellI == mesh.faceOwner()[faceI]) + if (celli == mesh.faceOwner()[facei]) { - sideOwner_.insert(faceI); + sideOwner_.insert(facei); } // Visit all neighbouring faces on faceSet. Stay on this 'side' of // face by doing edge-face-cell walk. - const labelList& fEdges = mesh.faceEdges()[faceI]; + const labelList& fEdges = mesh.faceEdges()[facei]; forAll(fEdges, fEdgeI) { @@ -159,11 +159,11 @@ 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)) { - label otherCellI = cellI; + label otherCellI = celli; // Keep on crossing faces/cells until back on face on // surface @@ -173,7 +173,7 @@ void Foam::regionSide::visitConnectedFaces if (debug) { - Info<< "visitConnectedFaces : cellI:" << cellI + Info<< "visitConnectedFaces : celli:" << celli << " found insideEdgeFace:" << otherFaceI << endl; } @@ -234,13 +234,13 @@ void Foam::regionSide::walkPointConnectedFaces 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 + // Cross facei i.e. get edge not startEdgeI which uses regionPointI label edgeI = otherEdge(mesh, startFaceI, startEdgeI, regionPointI); if (!regionEdges.found(edgeI)) @@ -265,14 +265,14 @@ void Foam::regionSide::walkPointConnectedFaces forAll(eFaces, eFaceI) { - label faceI = eFaces[eFaceI]; + label facei = eFaces[eFaceI]; walkPointConnectedFaces ( mesh, regionEdges, regionPointI, - faceI, + facei, edgeI, visitedEdges ); @@ -298,8 +298,8 @@ void Foam::regionSide::walkAllPointConnectedFaces forAllConstIter(labelHashSet, regionFaces, iter) { - const label faceI = iter.key(); - const labelList& fEdges = mesh.faceEdges()[faceI]; + const label facei = iter.key(); + const labelList& fEdges = mesh.faceEdges()[facei]; forAll(fEdges, fEdgeI) { @@ -331,29 +331,29 @@ void Foam::regionSide::walkAllPointConnectedFaces forAllConstIter(labelHashSet, regionFaces, iter) { - const label faceI = iter.key(); + const label facei = iter.key(); // Get side of face. - label cellI; + label celli; - if (sideOwner_.found(faceI)) + if (sideOwner_.found(facei)) { - cellI = mesh.faceOwner()[faceI]; + celli = mesh.faceOwner()[facei]; } else { - cellI = mesh.faceNeighbour()[faceI]; + celli = mesh.faceNeighbour()[facei]; } // Find starting point and edge on face. - const labelList& fEdges = mesh.faceEdges()[faceI]; + const labelList& fEdges = mesh.faceEdges()[facei]; forAll(fEdges, fEdgeI) { label edgeI = fEdges[fEdgeI]; - // Get the face 'perpendicular' to faceI on region. - label otherFaceI = otherFace(mesh, cellI, faceI, edgeI); + // Get the face 'perpendicular' to facei on region. + label otherFaceI = otherFace(mesh, celli, facei, edgeI); // Edge const edge& e = mesh.edges()[edgeI]; diff --git a/applications/utilities/mesh/manipulation/splitMesh/regionSide.H b/applications/utilities/mesh/manipulation/splitMesh/regionSide.H index 823b32234c456f91ea4f934d82afd5447c46fa94..e63197cb183d658a94e6ca956b9ac0564536d5b6 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/regionSide.H +++ b/applications/utilities/mesh/manipulation/splitMesh/regionSide.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 @@ -77,20 +77,20 @@ class regionSide static label otherEdge ( const primitiveMesh& mesh, - const label faceI, + const label facei, const label edgeI, const label pointI ); - //- From faceI, side cellI, cross to other faces/cells by + //- From facei, side celli, cross to other faces/cells by // face-cell walking and store visited faces and update sideOwner_. void visitConnectedFaces ( const primitiveMesh& mesh, const labelHashSet& region, const labelHashSet& fenceEdges, - const label cellI, - const label faceI, + const label celli, + const label facei, labelHashSet& visitedFace ); @@ -127,7 +127,7 @@ public: static label otherFace ( const primitiveMesh& mesh, - const label cellI, + const label celli, const label excludeFaceI, const label edgeI ); diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index 4473501daba2e3f675a87fe0b1eea06a4ffa4e1d..a468dd38a5e77ec0e66758f6abc4bf2aa566018a 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -250,11 +250,11 @@ void subsetSurfaceFields labelList getNonRegionCells(const labelList& cellRegion, const label regionI) { DynamicList<label> nonRegionCells(cellRegion.size()); - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - if (cellRegion[cellI] != regionI) + if (cellRegion[celli] != regionI) { - nonRegionCells.append(cellI); + nonRegionCells.append(celli); } } return nonRegionCells.shrink(); @@ -329,17 +329,17 @@ void getInterfaceSizes // Internal faces // ~~~~~~~~~~~~~~ - forAll(mesh.faceNeighbour(), faceI) + forAll(mesh.faceNeighbour(), facei) { - label ownRegion = cellRegion[mesh.faceOwner()[faceI]]; - label neiRegion = cellRegion[mesh.faceNeighbour()[faceI]]; + label ownRegion = cellRegion[mesh.faceOwner()[facei]]; + label neiRegion = cellRegion[mesh.faceNeighbour()[facei]]; if (ownRegion != neiRegion) { addToInterface ( mesh, - (useFaceZones ? mesh.faceZones().whichZone(faceI) : -1), + (useFaceZones ? mesh.faceZones().whichZone(facei) : -1), ownRegion, neiRegion, regionsToSize @@ -355,15 +355,15 @@ void getInterfaceSizes forAll(coupledRegion, i) { - label cellI = mesh.faceOwner()[i+mesh.nInternalFaces()]; - coupledRegion[i] = cellRegion[cellI]; + label celli = mesh.faceOwner()[i+mesh.nInternalFaces()]; + coupledRegion[i] = cellRegion[celli]; } syncTools::swapBoundaryFaceList(mesh, coupledRegion); forAll(coupledRegion, i) { - label faceI = i+mesh.nInternalFaces(); - label ownRegion = cellRegion[mesh.faceOwner()[faceI]]; + label facei = i+mesh.nInternalFaces(); + label ownRegion = cellRegion[mesh.faceOwner()[facei]]; label neiRegion = coupledRegion[i]; if (ownRegion != neiRegion) @@ -371,7 +371,7 @@ void getInterfaceSizes addToInterface ( mesh, - (useFaceZones ? mesh.faceZones().whichZone(faceI) : -1), + (useFaceZones ? mesh.faceZones().whichZone(facei) : -1), ownRegion, neiRegion, regionsToSize @@ -519,17 +519,17 @@ void getInterfaceSizes // Mark all inter-region faces. faceToInterface.setSize(mesh.nFaces(), -1); - forAll(mesh.faceNeighbour(), faceI) + forAll(mesh.faceNeighbour(), facei) { - label ownRegion = cellRegion[mesh.faceOwner()[faceI]]; - label neiRegion = cellRegion[mesh.faceNeighbour()[faceI]]; + label ownRegion = cellRegion[mesh.faceOwner()[facei]]; + label neiRegion = cellRegion[mesh.faceNeighbour()[facei]]; if (ownRegion != neiRegion) { label zoneID = -1; if (useFaceZones) { - zoneID = mesh.faceZones().whichZone(faceI); + zoneID = mesh.faceZones().whichZone(facei); } edge interface @@ -538,13 +538,13 @@ void getInterfaceSizes max(ownRegion, neiRegion) ); - faceToInterface[faceI] = regionsToInterface[interface][zoneID]; + faceToInterface[facei] = regionsToInterface[interface][zoneID]; } } forAll(coupledRegion, i) { - label faceI = i+mesh.nInternalFaces(); - label ownRegion = cellRegion[mesh.faceOwner()[faceI]]; + label facei = i+mesh.nInternalFaces(); + label ownRegion = cellRegion[mesh.faceOwner()[facei]]; label neiRegion = coupledRegion[i]; if (ownRegion != neiRegion) @@ -552,7 +552,7 @@ void getInterfaceSizes label zoneID = -1; if (useFaceZones) { - zoneID = mesh.faceZones().whichZone(faceI); + zoneID = mesh.faceZones().whichZone(facei); } edge interface @@ -561,7 +561,7 @@ void getInterfaceSizes max(ownRegion, neiRegion) ); - faceToInterface[faceI] = regionsToInterface[interface][zoneID]; + faceToInterface[facei] = regionsToInterface[interface][zoneID]; } } } @@ -639,8 +639,8 @@ autoPtr<mapPolyMesh> createRegionMesh forAll(coupledRegion, i) { - label cellI = mesh.faceOwner()[i+mesh.nInternalFaces()]; - coupledRegion[i] = cellRegion[cellI]; + label celli = mesh.faceOwner()[i+mesh.nInternalFaces()]; + coupledRegion[i] = cellRegion[celli]; } syncTools::swapBoundaryFaceList(mesh, coupledRegion); @@ -662,19 +662,19 @@ autoPtr<mapPolyMesh> createRegionMesh labelList exposedPatchIDs(exposedFaces.size()); forAll(exposedFaces, i) { - label faceI = exposedFaces[i]; - label interfaceI = faceToInterface[faceI]; + label facei = exposedFaces[i]; + label interfacei = faceToInterface[facei]; - label ownRegion = cellRegion[mesh.faceOwner()[faceI]]; + label ownRegion = cellRegion[mesh.faceOwner()[facei]]; label neiRegion = -1; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - neiRegion = cellRegion[mesh.faceNeighbour()[faceI]]; + neiRegion = cellRegion[mesh.faceNeighbour()[facei]]; } else { - neiRegion = coupledRegion[faceI-mesh.nInternalFaces()]; + neiRegion = coupledRegion[facei-mesh.nInternalFaces()]; } @@ -694,8 +694,8 @@ autoPtr<mapPolyMesh> createRegionMesh else { FatalErrorInFunction - << "Exposed face:" << faceI - << " fc:" << mesh.faceCentres()[faceI] + << "Exposed face:" << facei + << " fc:" << mesh.faceCentres()[facei] << " has owner region " << ownRegion << " and neighbour region " << neiRegion << " when handling region:" << regionI @@ -705,11 +705,11 @@ autoPtr<mapPolyMesh> createRegionMesh // Find the patch. if (regionI < otherRegion) { - exposedPatchIDs[i] = interfacePatches[interfaceI]; + exposedPatchIDs[i] = interfacePatches[interfacei]; } else { - exposedPatchIDs[i] = interfacePatches[interfaceI]+1; + exposedPatchIDs[i] = interfacePatches[interfacei]+1; } } @@ -770,10 +770,10 @@ void createAndWriteRegion // Make map of all added patches labelHashSet addedPatches(2*interfacePatches.size()); - forAll(interfacePatches, interfaceI) + forAll(interfacePatches, interfacei) { - addedPatches.insert(interfacePatches[interfaceI]); - addedPatches.insert(interfacePatches[interfaceI]+1); + addedPatches.insert(interfacePatches[interfacei]); + addedPatches.insert(interfacePatches[interfacei]+1); } @@ -968,23 +968,23 @@ void createAndWriteRegion ), newMesh().nFaces() ); - forAll(faceProcAddressing, faceI) + forAll(faceProcAddressing, facei) { // 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]] + map().cellMap()[newMesh().faceOwner()[facei]] == 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() @@ -1138,11 +1138,11 @@ label findCorrespondingRegion // Per region the number of cells in zoneI labelList cellsInZone(nCellRegions, 0); - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - if (existingZoneID[cellI] == zoneI) + if (existingZoneID[celli] == zoneI) { - cellsInZone[cellRegion[cellI]]++; + cellsInZone[cellRegion[celli]]++; } } @@ -1161,11 +1161,11 @@ label findCorrespondingRegion else { // Check that region contains no cells that aren't in cellZone. - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - if (cellRegion[cellI] == regionI && existingZoneID[cellI] != zoneI) + if (cellRegion[celli] == regionI && existingZoneID[celli] != zoneI) { - // cellI in regionI but not in zoneI + // celli in regionI but not in zoneI regionI = -1; break; } @@ -1200,18 +1200,18 @@ void getZoneID forAll(cz, i) { - label cellI = cz[i]; - if (zoneID[cellI] == -1) + label celli = cz[i]; + if (zoneID[celli] == -1) { - zoneID[cellI] = zoneI; + zoneID[celli] = zoneI; } else { FatalErrorInFunction - << "Cell " << cellI << " with cell centre " - << mesh.cellCentres()[cellI] + << "Cell " << celli << " with cell centre " + << mesh.cellCentres()[celli] << " is multiple zones. This is not allowed." << endl - << "It is in zone " << cellZones[zoneID[cellI]].name() + << "It is in zone " << cellZones[zoneID[celli]].name() << " and in zone " << cellZones[zoneI].name() << exit(FatalError); } @@ -1386,9 +1386,9 @@ void writeCellToRegion(const fvMesh& mesh, const labelList& cellRegion) dimensionedScalar("zero", dimless, 0), zeroGradientFvPatchScalarField::typeName ); - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - cellToRegion[cellI] = cellRegion[cellI]; + cellToRegion[celli] = cellRegion[celli]; } cellToRegion.write(); @@ -1662,25 +1662,25 @@ int main(int argc, char *argv[]) { blockedFace.setSize(mesh.nFaces(), false); - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - label own = mesh.faceOwner()[faceI]; - label nei = mesh.faceNeighbour()[faceI]; + label own = mesh.faceOwner()[facei]; + label nei = mesh.faceNeighbour()[facei]; if (zoneID[own] != zoneID[nei]) { - blockedFace[faceI] = true; + blockedFace[facei] = true; } } // Different cellZones on either side of processor patch. forAll(neiZoneID, i) { - label faceI = i+mesh.nInternalFaces(); + label facei = i+mesh.nInternalFaces(); - if (zoneID[mesh.faceOwner()[faceI]] != neiZoneID[i]) + if (zoneID[mesh.faceOwner()[facei]] != neiZoneID[i]) { - blockedFace[faceI] = true; + blockedFace[facei] = true; } } } @@ -1740,9 +1740,9 @@ int main(int argc, char *argv[]) labelList regionSizes(nCellRegions, 0); - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - regionSizes[cellRegion[cellI]]++; + regionSizes[cellRegion[celli]]++; } forAll(regionSizes, regionI) { @@ -1992,14 +1992,14 @@ int main(int argc, char *argv[]) (void)mesh.tetBasePtIs(); - label cellI = mesh.findCell(insidePoint); + label celli = mesh.findCell(insidePoint); - Info<< nl << "Found point " << insidePoint << " in cell " << cellI + Info<< nl << "Found point " << insidePoint << " in cell " << celli << endl; - if (cellI != -1) + if (celli != -1) { - regionI = cellRegion[cellI]; + regionI = cellRegion[celli]; } reduce(regionI, maxOp<label>()); diff --git a/applications/utilities/parallelProcessing/reconstructPar/checkFaceAddressingComp.H b/applications/utilities/parallelProcessing/reconstructPar/checkFaceAddressingComp.H index 03458a2964485f44bd35440f54813c014a000452..014b30d3b82f58ef9193b4a78b36d2db74336d18 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/checkFaceAddressingComp.H +++ b/applications/utilities/parallelProcessing/reconstructPar/checkFaceAddressingComp.H @@ -12,11 +12,11 @@ { const labelList& curFaceAddr = faceProcAddressing[procI]; - forAll(curFaceAddr, faceI) + forAll(curFaceAddr, facei) { - if (mag(curFaceAddr[faceI]) < minFaceIndex) + if (mag(curFaceAddr[facei]) < minFaceIndex) { - minFaceIndex = mag(curFaceAddr[faceI]); + minFaceIndex = mag(curFaceAddr[facei]); } } } @@ -37,9 +37,9 @@ { labelList& curFaceAddr = faceProcAddressing[procI]; - forAll(curFaceAddr, faceI) + forAll(curFaceAddr, facei) { - curFaceAddr[faceI] += sign(curFaceAddr[faceI]); + curFaceAddr[facei] += sign(curFaceAddr[facei]); } faceProcAddressing[procI].write(); diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index 99b9ab199ef8d0dabe06535831e2b3886d3b3def..3f78c990970025f80e9f242759247fa8f0541abd 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -404,9 +404,9 @@ void writeCellDistance zeroGradientFvPatchScalarField::typeName ); - forAll(cellDecomposition, cellI) + forAll(cellDecomposition, celli) { - cellDist[cellI] = cellDecomposition[cellI]; + cellDist[celli] = cellDecomposition[celli]; } cellDist.write(); diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index fb8feb2796f0e5963c5d2589f2cdc2fba6b385fb..be24d05a76ccfd6b728d5f8cacf89ccc3e5feedc 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -367,15 +367,15 @@ void compareFields const volVectorField& b ) { - forAll(a, cellI) + forAll(a, celli) { - if (mag(b[cellI] - a[cellI]) > tolDim) + if (mag(b[celli] - a[celli]) > tolDim) { FatalErrorInFunction << "Did not map volVectorField correctly:" << nl - << "cell:" << cellI - << " transfer b:" << b[cellI] - << " real cc:" << a[cellI] + << "cell:" << celli + << " transfer b:" << b[celli] + << " real cc:" << a[celli] << abort(FatalError); } } diff --git a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentScalarField.C b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentScalarField.C index bed6cb7895e1bb9b88e31634b8eeeb3b1c04f550..5401b662b9e637fb83bdb9cce2ac01e39da36550 100644 --- a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentScalarField.C +++ b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentScalarField.C @@ -58,9 +58,9 @@ void writeFluentField << "1 " << phiInternal.size() // Start and end of list << ")(" << endl; - forAll(phiInternal, cellI) + forAll(phiInternal, celli) { - stream << phiInternal[cellI] << endl; + stream << phiInternal[celli] << endl; } stream @@ -94,9 +94,9 @@ void writeFluentField nWrittenFaces += emptyFaceCells.size(); - forAll(emptyFaceCells, faceI) + forAll(emptyFaceCells, facei) { - stream << phiInternal[emptyFaceCells[faceI]] << endl; + stream << phiInternal[emptyFaceCells[facei]] << endl; } stream @@ -122,9 +122,9 @@ void writeFluentField nWrittenFaces += patchPhi.size(); - forAll(patchPhi, faceI) + forAll(patchPhi, facei) { - stream << patchPhi[faceI] << endl; + stream << patchPhi[facei] << endl; } stream diff --git a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentVectorField.C b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentVectorField.C index 7fca73ce19cfe7db22cbf909e3df2300c7b18241..24fb46b8079ae200a6a59ebae7d1e75b79cabcf1 100644 --- a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentVectorField.C +++ b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentVectorField.C @@ -57,12 +57,12 @@ void writeFluentField << "1 " << phiInternal.size() // Start and end of list << ")(" << endl; - forAll(phiInternal, cellI) + forAll(phiInternal, celli) { stream - << phiInternal[cellI].x() << " " - << phiInternal[cellI].y() << " " - << phiInternal[cellI].z() << " " + << phiInternal[celli].x() << " " + << phiInternal[celli].y() << " " + << phiInternal[celli].z() << " " << endl; } @@ -89,12 +89,12 @@ void writeFluentField nWrittenFaces += patchPhi.size(); - forAll(patchPhi, faceI) + forAll(patchPhi, facei) { stream - << patchPhi[faceI].x() << " " - << patchPhi[faceI].y() << " " - << patchPhi[faceI].z() << " " + << patchPhi[facei].x() << " " + << patchPhi[facei].y() << " " + << patchPhi[facei].z() << " " << endl; } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C index 6ac0c5b34cd811400f3f61131ce12dd930e29963..66f29bfed16d9be0739ed2337cfcf565ef8dafb5 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C @@ -482,19 +482,19 @@ void ensightField label j = 0; forAll(fz, i) { - label faceI = fz[i]; - if (mesh.isInternalFace(faceI)) + label facei = fz[i]; + if (mesh.isInternalFace(facei)) { - values[j] = sf[faceI]; + values[j] = sf[facei]; ++j; } else { - if (eMesh.faceToBeIncluded(faceI)) + if (eMesh.faceToBeIncluded(facei)) { - label patchi = mesh.boundaryMesh().whichPatch(faceI); + label patchi = mesh.boundaryMesh().whichPatch(facei); const polyPatch& pp = mesh.boundaryMesh()[patchi]; - label patchFaceI = pp.whichFace(faceI); + label patchFaceI = pp.whichFace(facei); Type value = sf.boundaryField()[patchi][patchFaceI]; values[j] = value; ++j; diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C index f4651e0086964c68f061f7b2e50afb9019a340a8..7b99bb62b78853481415fef4d184739bd28f7598 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C @@ -129,34 +129,34 @@ void Foam::ensightMesh::correct() label nHexes = 0; label nPolys = 0; - forAll(cellShapes, cellI) + forAll(cellShapes, celli) { - const cellShape& cellShape = cellShapes[cellI]; + const cellShape& cellShape = cellShapes[celli]; const cellModel& cellModel = cellShape.model(); if (cellModel == tet) { - tets[nTets++] = cellI; + tets[nTets++] = celli; } else if (cellModel == pyr) { - pyrs[nPyrs++] = cellI; + pyrs[nPyrs++] = celli; } else if (cellModel == prism) { - prisms[nPrisms++] = cellI; + prisms[nPrisms++] = celli; } else if (cellModel == wedge) { - wedges[nWedges++] = cellI; + wedges[nWedges++] = celli; } else if (cellModel == hex) { - hexes[nHexes++] = cellI; + hexes[nHexes++] = celli; } else { - polys[nPolys++] = cellI; + polys[nPolys++] = celli; } } @@ -211,21 +211,21 @@ void Foam::ensightMesh::correct() label nQuads = 0; label nPolys = 0; - forAll(p, faceI) + forAll(p, facei) { - const face& f = p[faceI]; + const face& f = p[facei]; if (f.size() == 3) { - tris[nTris++] = faceI; + tris[nTris++] = facei; } else if (f.size() == 4) { - quads[nQuads++] = faceI; + quads[nQuads++] = facei; } else { - polys[nPolys++] = faceI; + polys[nPolys++] = facei; } } @@ -327,12 +327,12 @@ void Foam::ensightMesh::correct() forAll(fz, i) { - label faceI = fz[i]; + label facei = fz[i]; // Avoid counting faces on processor boundaries twice - if (faceToBeIncluded(faceI)) + if (faceToBeIncluded(facei)) { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; if (f.size() == 3) { @@ -425,17 +425,17 @@ Foam::ensightMesh::~ensightMesh() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool Foam::ensightMesh::faceToBeIncluded(const label faceI) const +bool Foam::ensightMesh::faceToBeIncluded(const label facei) const { bool res = false; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { res = true; } else { - res = boundaryFaceToBeIncluded_[faceI-mesh_.nInternalFaces()]; + res = boundaryFaceToBeIncluded_[facei-mesh_.nInternalFaces()]; } return res; @@ -586,9 +586,9 @@ void Foam::ensightMesh::writePolysNPointsPerFace { const labelList& cf = cellFaces[polys[i]]; - forAll(cf, faceI) + forAll(cf, facei) { - ensightGeometryFile.write(faces[cf[faceI]].size()); + ensightGeometryFile.write(faces[cf[facei]].size()); } } } @@ -607,9 +607,9 @@ void Foam::ensightMesh::writePolysPoints { const labelList& cf = cellFaces[polys[i]]; - forAll(cf, faceI) + forAll(cf, facei) { - const label faceId = cf[faceI]; + const label faceId = cf[facei]; const face& f = faces[faceId]; // points of face (in global points) const label np = f.size(); bool reverseOrder = false; @@ -1251,9 +1251,9 @@ void Foam::ensightMesh::write // a better way of doing this? label nMasterFaces = 0; - forAll(fz, faceI) + forAll(fz, facei) { - if (faceToBeIncluded(fz[faceI])) + if (faceToBeIncluded(fz[facei])) { ++nMasterFaces; } @@ -1264,11 +1264,11 @@ void Foam::ensightMesh::write label currentFace = 0; - forAll(fz, faceI) + forAll(fz, facei) { - if (faceToBeIncluded(fz[faceI])) + if (faceToBeIncluded(fz[facei])) { - faceZoneMasterFaces[currentFace] = faceZoneFaces[faceI]; + faceZoneMasterFaces[currentFace] = faceZoneFaces[facei]; ++currentFace; } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H index e1f7e8384b9b124ffbfe740c3a177ace95699f3b..5b9fea4f0235a37c129f17a33a2dbe977b4a7d0f 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.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 @@ -361,7 +361,7 @@ public: //- When exporting faceZones, check if a given face has to be included // or not (i.e. faces on processor boundaries) - bool faceToBeIncluded(const label faceI) const; + bool faceToBeIncluded(const label facei) const; //- Helper to cause barrier. Necessary on Quadrics. static void barrier(); diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C index 5d067df07c369c14b1f3ef1ad53d000832e78c7c..52a3fa22c5df22d4335c7a9c2ae46c3e9f9f414a 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C @@ -324,9 +324,9 @@ int main(int argc, char *argv[]) const fvMesh& mesh = vMesh.mesh(); INTEGER4 nFaceNodes = 0; - forAll(mesh.faces(), faceI) + forAll(mesh.faces(), facei) { - nFaceNodes += mesh.faces()[faceI].size(); + nFaceNodes += mesh.faces()[facei].size(); } diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriter.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriter.C index f19ebf36f46a4457e3a324a8345dca3cd9419a20..abf25471b44058f40ad6d99e983ae2146683fa5c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriter.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriter.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 @@ -318,25 +318,25 @@ void Foam::tecplotWriter::writeConnectivity(const fvMesh& mesh) const { List<INTEGER4> FaceNodeCounts(mesh.nFaces()); - forAll(mesh.faces(), faceI) + forAll(mesh.faces(), facei) { - const face& f = mesh.faces()[faceI]; - FaceNodeCounts[faceI] = INTEGER4(f.size()); + const face& f = mesh.faces()[facei]; + FaceNodeCounts[facei] = INTEGER4(f.size()); } INTEGER4 nFaceNodes = 0; - forAll(mesh.faces(), faceI) + forAll(mesh.faces(), facei) { - nFaceNodes += mesh.faces()[faceI].size(); + nFaceNodes += mesh.faces()[facei].size(); } List<INTEGER4> FaceNodes(nFaceNodes); label nodeI = 0; - forAll(mesh.faces(), faceI) + forAll(mesh.faces(), facei) { - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, fp) { FaceNodes[nodeI++] = INTEGER4(f[fp]+1); @@ -345,24 +345,24 @@ void Foam::tecplotWriter::writeConnectivity(const fvMesh& mesh) const List<INTEGER4> FaceLeftElems(mesh.nFaces()); - forAll(mesh.faceOwner(), faceI) + forAll(mesh.faceOwner(), facei) { - FaceLeftElems[faceI] = mesh.faceOwner()[faceI]+1; + FaceLeftElems[facei] = mesh.faceOwner()[facei]+1; } List<INTEGER4> FaceRightElems(mesh.nFaces()); - forAll(mesh.faceNeighbour(), faceI) + forAll(mesh.faceNeighbour(), facei) { - FaceRightElems[faceI] = mesh.faceNeighbour()[faceI]+1; + FaceRightElems[facei] = mesh.faceNeighbour()[facei]+1; } for ( - label faceI = mesh.nInternalFaces(); - faceI < mesh.nFaces(); - faceI++ + label facei = mesh.nInternalFaces(); + facei < mesh.nFaces(); + facei++ ) { - FaceRightElems[faceI] = 0; + FaceRightElems[facei] = 0; } if diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C index df71e2c90bf83bd2ea31c18212d7b62d03d2886f..3ffcdf530e23435e47c99dd5e1699b9c4462303a 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C @@ -97,17 +97,17 @@ Foam::tmp<Field<Type>> Foam::tecplotWriter::getFaceField forAll(faceLabels, i) { - label faceI = faceLabels[i]; + label facei = faceLabels[i]; - label patchi = patches.whichPatch(faceI); + label patchi = patches.whichPatch(facei); if (patchi == -1) { - fld[i] = sfld[faceI]; + fld[i] = sfld[facei]; } else { - label localFaceI = faceI - patches[patchi].start(); + 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 d5b3763b159902bd86ad465f6ccbbd721c245cb4..218bdfdcc382e41ade11a18a64a29acd2f9eccad 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C @@ -101,26 +101,26 @@ void ReadAndMapFields if (index > 0) { - label cellI = index-1; - fld[pointI] = readField[cellI]; + label celli = index-1; + fld[pointI] = readField[celli]; } else if (index < 0) { - label faceI = -index-1; - label bFaceI = faceI - mesh.nInternalFaces(); + label facei = -index-1; + label bFaceI = facei - mesh.nInternalFaces(); if (bFaceI >= 0) { label patchi = mesh.boundaryMesh().patchID()[bFaceI]; label localFaceI = mesh.boundaryMesh()[patchi].whichFace ( - faceI + facei ); fld[pointI] = readField.boundaryField()[patchi][localFaceI]; } //else //{ // FatalErrorInFunction - // << "Face " << faceI << " from index " << index + // << "Face " << facei << " from index " << index // << " is not a boundary face." << abort(FatalError); //} @@ -214,11 +214,11 @@ int main(int argc, char *argv[]) } else { - label faceI = -index-1; - if (faceI < mesh.nInternalFaces()) + label facei = -index-1; + if (facei < mesh.nInternalFaces()) { FatalErrorInFunction - << "Face " << faceI << " from index " << index + << "Face " << facei << " from index " << index << " is not a boundary face." << " nInternalFaces:" << mesh.nInternalFaces() << exit(FatalError); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.C index e64fba3c932918d9023194e069238be255629dc1..2e58b413a4363f1b81202e1cd19165df16daa9b9 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.C @@ -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 @@ -80,18 +80,18 @@ Foam::internalWriter::internalWriter // Count total number of vertices referenced. label nFaceVerts = 0; - forAll(vtkVertLabels, cellI) + forAll(vtkVertLabels, celli) { - nFaceVerts += vtkVertLabels[cellI].size() + 1; + nFaceVerts += vtkVertLabels[celli].size() + 1; } os_ << "CELLS " << vtkVertLabels.size() << ' ' << nFaceVerts << std::endl; DynamicList<label> vertLabels(nFaceVerts); - forAll(vtkVertLabels, cellI) + forAll(vtkVertLabels, celli) { - const labelList& vtkVerts = vtkVertLabels[cellI]; + const labelList& vtkVerts = vtkVertLabels[celli]; vertLabels.append(vtkVerts.size()); @@ -133,9 +133,9 @@ void Foam::internalWriter::writeCellIDs() { const labelList& cMap = vMesh_.subsetter().cellMap(); - forAll(mesh.cells(), cellI) + forAll(mesh.cells(), celli) { - cellId[labelI++] = cMap[cellI]; + cellId[labelI++] = cMap[celli]; } forAll(superCells, superCellI) { @@ -146,9 +146,9 @@ void Foam::internalWriter::writeCellIDs() } else { - forAll(mesh.cells(), cellI) + forAll(mesh.cells(), celli) { - cellId[labelI++] = cellI; + cellId[labelI++] = celli; } forAll(superCells, superCellI) { diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.C index a5d5df8b437bf23fce05a6b9aa90b731751c113d..4a9840c1e271d18aa0314b75bf6463cdc388abae 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.C @@ -70,9 +70,9 @@ Foam::patchWriter::patchWriter nPoints_ += pp.nPoints(); nFaces_ += pp.size(); - forAll(pp, faceI) + forAll(pp, facei) { - nFaceVerts += pp[faceI].size() + 1; + nFaceVerts += pp[facei].size() + 1; } } @@ -98,9 +98,9 @@ Foam::patchWriter::patchWriter { const polyPatch& pp = patches[patchIDs_[i]]; - forAll(pp, faceI) + forAll(pp, facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; vertLabels.append(f.size()); writeFuns::insert(f + offset, vertLabels); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriter.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriter.C index 08840858049eb45779373a2a18cc63cdd7c115bc..367dd92e7a57c376031e8af2e5e61e5191832dcb 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriter.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriter.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 @@ -49,9 +49,9 @@ Foam::surfaceMeshWriter::surfaceMeshWriter // Write topology label nFaceVerts = 0; - forAll(pp, faceI) + forAll(pp, facei) { - nFaceVerts += pp[faceI].size() + 1; + nFaceVerts += pp[facei].size() + 1; } os_ << "POINTS " << pp.nPoints() << " float" << std::endl; @@ -65,9 +65,9 @@ Foam::surfaceMeshWriter::surfaceMeshWriter DynamicList<label> vertLabels(nFaceVerts); - forAll(pp, faceI) + forAll(pp, facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; vertLabels.append(f.size()); writeFuns::insert(f, vertLabels); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C index 0d490c2097f01330500d8887d1109f5f6fe30c1a..ed3e7ca352dc53ebfef0ef8c3e7d62aba340e7f5 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C @@ -41,17 +41,17 @@ Foam::tmp<Field<Type>> Foam::surfaceMeshWriter::getFaceField forAll(pp_.addressing(), i) { - label faceI = pp_.addressing()[i]; + label facei = pp_.addressing()[i]; - label patchi = patches.whichPatch(faceI); + label patchi = patches.whichPatch(facei); if (patchi == -1) { - fld[i] = sfld[faceI]; + fld[i] = sfld[facei]; } else { - label localFaceI = faceI - patches[patchi].start(); + 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 f0ef8cd88aaf335d2c407b4a1544bca11befc73e..1f40d276e556172ab3e5705c3d61ea78acd14044 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.C @@ -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 @@ -71,9 +71,9 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) // and cells if (decomposePoly) { - forAll(cellShapes, cellI) + forAll(cellShapes, celli) { - const cellModel& model = cellShapes[cellI].model(); + const cellModel& model = cellShapes[celli].model(); if ( @@ -85,7 +85,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) && model != tetWedge ) { - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; forAll(cFaces, cFaceI) { @@ -122,24 +122,24 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) // Set counters for additional points and additional cells label addPointI = 0, addCellI = 0; - forAll(cellShapes, cellI) + forAll(cellShapes, celli) { - const cellShape& cellShape = cellShapes[cellI]; + const cellShape& cellShape = cellShapes[celli]; const cellModel& cellModel = cellShape.model(); - labelList& vtkVerts = vertLabels_[cellI]; + labelList& vtkVerts = vertLabels_[celli]; if (cellModel == tet) { vtkVerts = cellShape; - cellTypes_[cellI] = VTK_TETRA; + cellTypes_[celli] = VTK_TETRA; } else if (cellModel == pyr) { vtkVerts = cellShape; - cellTypes_[cellI] = VTK_PYRAMID; + cellTypes_[celli] = VTK_PYRAMID; } else if (cellModel == prism) { @@ -150,7 +150,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) Foam::Swap(vtkVerts[1], vtkVerts[2]); Foam::Swap(vtkVerts[4], vtkVerts[5]); - cellTypes_[cellI] = VTK_WEDGE; + cellTypes_[celli] = VTK_WEDGE; } else if (cellModel == tetWedge) { @@ -163,7 +163,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) vtkVerts[4] = cellShape[4]; vtkVerts[5] = cellShape[4]; - cellTypes_[cellI] = VTK_WEDGE; + cellTypes_[celli] = VTK_WEDGE; } else if (cellModel == wedge) { @@ -178,20 +178,20 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) vtkVerts[6] = cellShape[5]; vtkVerts[7] = cellShape[6]; - cellTypes_[cellI] = VTK_HEXAHEDRON; + cellTypes_[celli] = VTK_HEXAHEDRON; } else if (cellModel == hex) { vtkVerts = cellShape; - cellTypes_[cellI] = VTK_HEXAHEDRON; + cellTypes_[celli] = VTK_HEXAHEDRON; } else if (decomposePoly) { // Polyhedral cell. Decompose into tets + pyramids. // Mapping from additional point to cell - addPointCellLabels_[addPointI] = cellI; + addPointCellLabels_[addPointI] = celli; // The new vertex from the cell-centre const label newVertexLabel = mesh_.nPoints() + addPointI; @@ -199,11 +199,11 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) // Whether to insert cell in place of original or not. bool substituteCell = true; - const labelList& cFaces = mesh_.cells()[cellI]; + const labelList& cFaces = mesh_.cells()[celli]; forAll(cFaces, cFaceI) { const face& f = mesh_.faces()[cFaces[cFaceI]]; - const bool isOwner = (owner[cFaces[cFaceI]] == cellI); + const bool isOwner = (owner[cFaces[cFaceI]] == celli); // Number of triangles and quads in decomposition label nTris = 0; @@ -223,13 +223,13 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) if (substituteCell) { - thisCellI = cellI; + thisCellI = celli; substituteCell = false; } else { thisCellI = mesh_.nCells() + addCellI; - superCells_[addCellI++] = cellI; + superCells_[addCellI++] = celli; } labelList& addVtkVerts = vertLabels_[thisCellI]; @@ -270,13 +270,13 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) if (substituteCell) { - thisCellI = cellI; + thisCellI = celli; substituteCell = false; } else { thisCellI = mesh_.nCells() + addCellI; - superCells_[addCellI++] = cellI; + superCells_[addCellI++] = celli; } @@ -310,9 +310,9 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) else { // Polyhedral cell - not decomposed - cellTypes_[cellI] = VTK_POLYHEDRON; + cellTypes_[celli] = VTK_POLYHEDRON; - const labelList& cFaces = mesh_.cells()[cellI]; + const labelList& cFaces = mesh_.cells()[celli]; // space for the number of faces and size of each face label nData = 1 + cFaces.size(); @@ -333,7 +333,7 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) forAll(cFaces, cFaceI) { const face& f = mesh.faces()[cFaces[cFaceI]]; - const bool isOwner = (owner[cFaces[cFaceI]] == cellI); + 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 917c2f60a03d5269e834da92c46c8c50e8f6ec00..02c4aea945cc5eeea49be8c30038958fa9e66ef2 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFaceSet.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFaceSet.C @@ -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 @@ -85,18 +85,18 @@ void Foam::writeFaceSet label nFaceVerts = 0; - forAll(fp.localFaces(), faceI) + forAll(fp.localFaces(), facei) { - nFaceVerts += fp.localFaces()[faceI].size() + 1; + nFaceVerts += fp.localFaces()[facei].size() + 1; } ostr<< "POLYGONS " << fp.size() << ' ' << nFaceVerts << std::endl; DynamicList<label> vertLabels(nFaceVerts); - forAll(fp.localFaces(), faceI) + forAll(fp.localFaces(), facei) { - const face& f = fp.localFaces()[faceI]; + const face& f = fp.localFaces()[facei]; vertLabels.append(f.size()); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.C index 10e72cd9262930f20193d111a85dae45f6fc86e6..04470916261f3bc03252decd35efe6fe560e9386 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.C @@ -64,9 +64,9 @@ void writeSurfFields DynamicList<floatScalar> pField(3*mesh.nFaces()); - for (label faceI = 0; faceI < mesh.nFaces(); faceI++) + for (label facei = 0; facei < mesh.nFaces(); facei++) { - writeFuns::insert(fc[faceI], pField); + writeFuns::insert(fc[facei], pField); } writeFuns::write(str, binary, pField); @@ -84,9 +84,9 @@ void writeSurfFields DynamicList<floatScalar> fField(3*mesh.nFaces()); - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - writeFuns::insert(svf[faceI], fField); + writeFuns::insert(svf[facei], fField); } forAll(svf.boundaryField(), patchi) diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C index c9766c8697402919b4ac2a8bb8a767c7d48d5dcb..4c212e0aa767f50a385a624b289f716f80110019 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C @@ -708,10 +708,10 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show) } // Do averaging per individual zone - forAll(pp, faceI) + forAll(pp, facei) { - label zoneI = pZones[faceI]; - zoneCentre[patchi][zoneI] += pp[faceI].centre(pp.points()); + label zoneI = pZones[facei]; + zoneCentre[patchi][zoneI] += pp[facei].centre(pp.points()); zoneNFaces[zoneI]++; } diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.H index b37255a8f100f9a112865c0fc9345d998e746265..1324b84ea98a731388f2b446ddeb8e9e3de2fa64 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.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 @@ -74,9 +74,9 @@ void Foam::vtkPV3Foam::convertFaceField // for interior faces: average owner/neighbour // for boundary faces: owner - forAll(faceLabels, faceI) + forAll(faceLabels, facei) { - const label faceNo = faceLabels[faceI]; + const label faceNo = faceLabels[facei]; if (faceNo < nInternalFaces) { Type t = 0.5*(tf[faceOwner[faceNo]] + tf[faceNeigh[faceNo]]); @@ -96,7 +96,7 @@ void Foam::vtkPV3Foam::convertFaceField } vtkOpenFOAMTupleRemap<Type>(vec); - cellData->InsertTuple(faceI, vec); + cellData->InsertTuple(facei, vec); } diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C index 3228871c61a9e3c9220a8deea01449350429621e..7eba743458bfc8aed55ab4b819a304c9c34cbd7a 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C @@ -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 @@ -55,10 +55,10 @@ vtkPolyData* Foam::vtkPV3Foam::faceSetVTKMesh const faceList& meshFaces = mesh.faces(); faceList patchFaces(fSet.size()); - label faceI = 0; + label facei = 0; forAllConstIter(faceSet, fSet, iter) { - patchFaces[faceI++] = meshFaces[iter.key()]; + patchFaces[facei++] = meshFaces[iter.key()]; } primitiveFacePatch p(patchFaces, mesh.points()); @@ -83,9 +83,9 @@ vtkPolyData* Foam::vtkPV3Foam::faceSetVTKMesh vtkCellArray* vtkcells = vtkCellArray::New(); vtkcells->Allocate(faces.size()); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; vtkIdType nodeIds[f.size()]; forAll(f, fp) diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C index 64638239881fb49013fc0442a638f1fc4a7ce1ff..ad8bf9df78ea760bb24793d728bc2939edf8d6ef 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C @@ -83,9 +83,9 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh Info<< "... scanning for polyhedra" << endl; } - forAll(cellShapes, cellI) + forAll(cellShapes, celli) { - const cellModel& model = cellShapes[cellI].model(); + const cellModel& model = cellShapes[celli].model(); if ( @@ -97,7 +97,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh && model != tetWedge ) { - const cell& cFaces = mesh.cells()[cellI]; + const cell& cFaces = mesh.cells()[celli]; forAll(cFaces, cFaceI) { @@ -168,12 +168,12 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh // [numFace0Pts, id1, id2, id3, numFace1Pts, id1, id2, id3, ...] DynamicList<vtkIdType> faceStream(256); - forAll(cellShapes, cellI) + forAll(cellShapes, celli) { - const cellShape& cellShape = cellShapes[cellI]; + const cellShape& cellShape = cellShapes[celli]; const cellModel& cellModel = cellShape.model(); - superCells[addCellI++] = cellI; + superCells[addCellI++] = celli; if (cellModel == tet) { @@ -273,7 +273,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh else if (reader_->GetUseVTKPolyhedron()) { // Polyhedral cell - use VTK_POLYHEDRON - const labelList& cFaces = mesh.cells()[cellI]; + const labelList& cFaces = mesh.cells()[celli]; #ifdef HAS_VTK_POLYHEDRON vtkIdType nFaces = cFaces.size(); @@ -295,7 +295,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh forAll(cFaces, cFaceI) { const face& f = mesh.faces()[cFaces[cFaceI]]; - const bool isOwner = (owner[cFaces[cFaceI]] == cellI); + const bool isOwner = (owner[cFaces[cFaceI]] == celli); const label nFacePoints = f.size(); // number of labels for this face @@ -353,20 +353,20 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh // Polyhedral cell. Decompose into tets + prisms. // Mapping from additional point to cell - addPointCellLabels[addPointI] = cellI; + addPointCellLabels[addPointI] = celli; // The new vertex from the cell-centre const label newVertexLabel = mesh.nPoints() + addPointI; - vtkInsertNextOpenFOAMPoint(vtkpoints, mesh.C()[cellI]); + vtkInsertNextOpenFOAMPoint(vtkpoints, mesh.C()[celli]); // Whether to insert cell in place of original or not. bool substituteCell = true; - const labelList& cFaces = mesh.cells()[cellI]; + const labelList& cFaces = mesh.cells()[celli]; forAll(cFaces, cFaceI) { const face& f = mesh.faces()[cFaces[cFaceI]]; - const bool isOwner = (owner[cFaces[cFaceI]] == cellI); + 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/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamTemplates.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamTemplates.C index 605fb463ef20b0cb811429a5efea24303e64046c..8a5c16c87fe0f08885cbc61352b44fe1aa9bbf72 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamTemplates.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamTemplates.C @@ -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 @@ -71,9 +71,9 @@ vtkPolyData* Foam::vtkPV3Foam::patchVTKMesh vtkCellArray* vtkcells = vtkCellArray::New(); vtkcells->Allocate(faces.size()); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; vtkIdType nodeIds[f.size()]; forAll(f, fp) diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C index 2eb2e61add5b40ec71316717f0a08a0ec8740296..a23095e67e2bdbfdab0960fb434beb3a56136460 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C @@ -712,10 +712,10 @@ void Foam::vtkPVFoam::renderPatchNames } // Do averaging per individual zone - forAll(pp, faceI) + forAll(pp, facei) { - label zoneI = pZones[faceI]; - zoneCentre[patchi][zoneI] += pp[faceI].centre(pp.points()); + label zoneI = pZones[facei]; + zoneCentre[patchi][zoneI] += pp[facei].centre(pp.points()); zoneNFaces[zoneI]++; } diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamFaceField.H b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamFaceField.H index dae21728b07682d077b94c3e4a1e90cd080185d3..69395405d5be6d8ff1b935ba490cfaad0324d350 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamFaceField.H +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamFaceField.H @@ -74,9 +74,9 @@ void Foam::vtkPVFoam::convertFaceField // for interior faces: average owner/neighbour // for boundary faces: owner - forAll(faceLabels, faceI) + forAll(faceLabels, facei) { - const label faceNo = faceLabels[faceI]; + const label faceNo = faceLabels[facei]; if (faceNo < nInternalFaces) { Type t = 0.5*(tf[faceOwner[faceNo]] + tf[faceNeigh[faceNo]]); @@ -96,7 +96,7 @@ void Foam::vtkPVFoam::convertFaceField } vtkOpenFOAMTupleRemap<Type>(vec); - cellData->InsertTuple(faceI, vec); + cellData->InsertTuple(facei, vec); } diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshSet.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshSet.C index f72627367fce0613457a91940bbee93377e468d5..a4c5a59e9a08b93ea07ad43a7c9299ed28fbe5be 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshSet.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshSet.C @@ -55,10 +55,10 @@ vtkPolyData* Foam::vtkPVFoam::faceSetVTKMesh const faceList& meshFaces = mesh.faces(); faceList patchFaces(fSet.size()); - label faceI = 0; + label facei = 0; forAllConstIter(faceSet, fSet, iter) { - patchFaces[faceI++] = meshFaces[iter.key()]; + patchFaces[facei++] = meshFaces[iter.key()]; } primitiveFacePatch p(patchFaces, mesh.points()); @@ -83,9 +83,9 @@ vtkPolyData* Foam::vtkPVFoam::faceSetVTKMesh vtkCellArray* vtkcells = vtkCellArray::New(); vtkcells->Allocate(faces.size()); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; vtkIdType nodeIds[f.size()]; forAll(f, fp) diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshVolume.C index c4a52dbc98bc3fbd7dd9a2c13b84e3ff6bdda557..8e77847e95714152a87183fdf738c1475afa39fa 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshVolume.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamMeshVolume.C @@ -83,9 +83,9 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh Info<< "... scanning for polyhedra" << endl; } - forAll(cellShapes, cellI) + forAll(cellShapes, celli) { - const cellModel& model = cellShapes[cellI].model(); + const cellModel& model = cellShapes[celli].model(); if ( @@ -97,7 +97,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh && model != tetWedge ) { - const cell& cFaces = mesh.cells()[cellI]; + const cell& cFaces = mesh.cells()[celli]; forAll(cFaces, cFaceI) { @@ -168,12 +168,12 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh // [numFace0Pts, id1, id2, id3, numFace1Pts, id1, id2, id3, ...] DynamicList<vtkIdType> faceStream(256); - forAll(cellShapes, cellI) + forAll(cellShapes, celli) { - const cellShape& cellShape = cellShapes[cellI]; + const cellShape& cellShape = cellShapes[celli]; const cellModel& cellModel = cellShape.model(); - superCells[addCellI++] = cellI; + superCells[addCellI++] = celli; if (cellModel == tet) { @@ -273,7 +273,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh else if (reader_->GetUseVTKPolyhedron()) { // Polyhedral cell - use VTK_POLYHEDRON - const labelList& cFaces = mesh.cells()[cellI]; + const labelList& cFaces = mesh.cells()[celli]; #ifdef HAS_VTK_POLYHEDRON vtkIdType nFaces = cFaces.size(); @@ -295,7 +295,7 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh forAll(cFaces, cFaceI) { const face& f = mesh.faces()[cFaces[cFaceI]]; - const bool isOwner = (owner[cFaces[cFaceI]] == cellI); + const bool isOwner = (owner[cFaces[cFaceI]] == celli); const label nFacePoints = f.size(); // number of labels for this face @@ -353,20 +353,20 @@ vtkUnstructuredGrid* Foam::vtkPVFoam::volumeVTKMesh // Polyhedral cell. Decompose into tets + prisms. // Mapping from additional point to cell - addPointCellLabels[addPointI] = cellI; + addPointCellLabels[addPointI] = celli; // The new vertex from the cell-centre const label newVertexLabel = mesh.nPoints() + addPointI; - vtkInsertNextOpenFOAMPoint(vtkpoints, mesh.C()[cellI]); + vtkInsertNextOpenFOAMPoint(vtkpoints, mesh.C()[celli]); // Whether to insert cell in place of original or not. bool substituteCell = true; - const labelList& cFaces = mesh.cells()[cellI]; + const labelList& cFaces = mesh.cells()[celli]; forAll(cFaces, cFaceI) { const face& f = mesh.faces()[cFaces[cFaceI]]; - const bool isOwner = (owner[cFaces[cFaceI]] == cellI); + 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/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamTemplates.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamTemplates.C index 6f044d42acff62d75f3cb1cc8aad595b57d55e9c..714d73d7ce9031e40a41843eb90863fa3de56f82 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamTemplates.C +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamTemplates.C @@ -71,9 +71,9 @@ vtkPolyData* Foam::vtkPVFoam::patchVTKMesh vtkCellArray* vtkcells = vtkCellArray::New(); vtkcells->Allocate(faces.size()); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; vtkIdType nodeIds[f.size()]; forAll(f, fp) diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C index 30526e17a5d038aa46f502092871c40d794afb2c..ef4f7a57227f88d91f9d96d0fd2799a73a3e78c5 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C @@ -69,8 +69,8 @@ void Foam::channelIndex::walkOppositeFaces DynamicList<label> frontFaces(startFaces); forAll(frontFaces, i) { - label faceI = frontFaces[i]; - blockedFace[faceI] = true; + label facei = frontFaces[i]; + blockedFace[facei] = true; } while (returnReduce(frontFaces.size(), sumOp<label>()) > 0) @@ -79,11 +79,11 @@ void Foam::channelIndex::walkOppositeFaces boolList isFrontBndFace(nBnd, false); forAll(frontFaces, i) { - label faceI = frontFaces[i]; + label facei = frontFaces[i]; - if (!mesh.isInternalFace(faceI)) + if (!mesh.isInternalFace(facei)) { - isFrontBndFace[faceI-mesh.nInternalFaces()] = true; + isFrontBndFace[facei-mesh.nInternalFaces()] = true; } } syncTools::swapBoundaryFaceList(mesh, isFrontBndFace); @@ -91,11 +91,11 @@ void Foam::channelIndex::walkOppositeFaces // Add forAll(isFrontBndFace, i) { - label faceI = mesh.nInternalFaces()+i; - if (isFrontBndFace[i] && !blockedFace[faceI]) + label facei = mesh.nInternalFaces()+i; + if (isFrontBndFace[i] && !blockedFace[facei]) { - blockedFace[faceI] = true; - frontFaces.append(faceI); + blockedFace[facei] = true; + frontFaces.append(facei); } } @@ -104,17 +104,17 @@ void Foam::channelIndex::walkOppositeFaces forAll(frontFaces, i) { - label faceI = frontFaces[i]; + label facei = frontFaces[i]; { - const cell& ownCell = cells[mesh.faceOwner()[faceI]]; + const cell& ownCell = cells[mesh.faceOwner()[facei]]; - label oppositeFaceI = ownCell.opposingFaceLabel(faceI, faces); + label oppositeFaceI = ownCell.opposingFaceLabel(facei, faces); if (oppositeFaceI == -1) { FatalErrorInFunction - << "Face:" << faceI << " owner cell:" << ownCell + << "Face:" << facei << " owner cell:" << ownCell << " is not a hex?" << abort(FatalError); } else @@ -127,16 +127,16 @@ void Foam::channelIndex::walkOppositeFaces } } - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - const cell& neiCell = mesh.cells()[mesh.faceNeighbour()[faceI]]; + const cell& neiCell = mesh.cells()[mesh.faceNeighbour()[facei]]; - label oppositeFaceI = neiCell.opposingFaceLabel(faceI, faces); + label oppositeFaceI = neiCell.opposingFaceLabel(facei, faces); if (oppositeFaceI == -1) { FatalErrorInFunction - << "Face:" << faceI << " neighbour cell:" << neiCell + << "Face:" << facei << " neighbour cell:" << neiCell << " is not a hex?" << abort(FatalError); } else @@ -175,11 +175,11 @@ void Foam::channelIndex::calcLayeredRegions { OFstream str(mesh.time().path()/"blockedFaces.obj"); label vertI = 0; - forAll(blockedFace, faceI) + forAll(blockedFace, facei) { - if (blockedFace[faceI]) + if (blockedFace[facei]) { - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, fp) { meshTools::writeOBJ(str, mesh.points()[f[fp]]); diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C index 2f505548027c5ebbcf142375a40022025278e176..eb7198f37c31731c9dd70966ac6ae093b016fb33 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndexTemplates.C @@ -32,9 +32,9 @@ Foam::Field<T> Foam::channelIndex::regionSum(const Field<T>& cellField) const { Field<T> regionField(cellRegion_().nRegions(), Zero); - forAll(cellRegion_(), cellI) + forAll(cellRegion_(), celli) { - regionField[cellRegion_()[cellI]] += cellField[cellI]; + regionField[cellRegion_()[celli]] += cellField[celli]; } // Global sum diff --git a/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C b/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C index a704c2310a4256a132043086905017dc150f07c7..62b2cdf1c3e74d082c5910412513eb39a058326c 100644 --- a/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C +++ b/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C @@ -153,15 +153,15 @@ int main(int argc, char *argv[]) if (!isType<emptyPolyPatch>(patches[patchi])) { - forAll(bouFaces, faceI) + forAll(bouFaces, facei) { if ( - magSqr(phi.boundaryField()[patchi][faceI]) + magSqr(phi.boundaryField()[patchi][facei]) < SMALL ) { - const labelList& zeroPoints = bouFaces[faceI]; + const labelList& zeroPoints = bouFaces[facei]; // Zero flux face found found = true; @@ -178,7 +178,7 @@ int main(int argc, char *argv[]) if (found) { Info<< "Zero face: patch: " << patchi - << " face: " << faceI << endl; + << " face: " << facei << endl; forAll(zeroPoints, pointI) { @@ -250,12 +250,12 @@ int main(int argc, char *argv[]) for ( - label faceI = nInternalFaces; - faceI<faces.size(); - faceI++ + label facei = nInternalFaces; + facei<faces.size(); + facei++ ) { - const labelList& curBPoints = faces[faceI]; + const labelList& curBPoints = faces[facei]; bool bPointFound = false; scalar currentBStream = 0.0; @@ -287,7 +287,7 @@ int main(int argc, char *argv[]) if (visitedPoint[curBPoints[pointI]] == 0) { label patchNo = - mesh.boundaryMesh().whichPatch(faceI); + mesh.boundaryMesh().whichPatch(facei); if ( @@ -303,7 +303,7 @@ int main(int argc, char *argv[]) { label faceNo = mesh.boundaryMesh()[patchNo] - .whichFace(faceI); + .whichFace(facei); vector edgeHat = points[curBPoints[pointI]] @@ -311,7 +311,7 @@ int main(int argc, char *argv[]) edgeHat.replace(slabDir, 0); edgeHat /= mag(edgeHat); - vector nHat = unitAreas[faceI]; + vector nHat = unitAreas[facei]; if (edgeHat.y() > VSMALL) { @@ -378,10 +378,10 @@ int main(int argc, char *argv[]) } } - for (label faceI=0; faceI<nInternalFaces; faceI++) + for (label facei=0; facei<nInternalFaces; facei++) { // Get the list of point labels for the face - const labelList& curPoints = faces[faceI]; + const labelList& curPoints = faces[facei]; bool pointFound = false; @@ -419,7 +419,7 @@ int main(int argc, char *argv[]) edgeHat.replace(slabDir, 0); edgeHat /= mag(edgeHat); - vector nHat = unitAreas[faceI]; + vector nHat = unitAreas[facei]; if (edgeHat.y() > VSMALL) { @@ -428,7 +428,7 @@ int main(int argc, char *argv[]) streamFunction[curPoints[pointI]] = currentStream - + phi[faceI]*sign(nHat.x()); + + phi[facei]*sign(nHat.x()); } else if (edgeHat.y() < -VSMALL) { @@ -437,7 +437,7 @@ int main(int argc, char *argv[]) streamFunction[curPoints[pointI]] = currentStream - - phi[faceI]*sign(nHat.x()); + - phi[facei]*sign(nHat.x()); } } } diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C index 2a6808776b5735bec6f5c9d64dd4fcafc006ea7c..d7515817919b72db530a3b5e02e0a195d1e5092e 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C +++ b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C @@ -104,12 +104,12 @@ int main(int argc, char *argv[]) Info<< "Setting boundary layer velocity" << nl << endl; scalar yblv = ybl.value(); - forAll(U, cellI) + forAll(U, celli) { - if (y[cellI] <= yblv) + if (y[celli] <= yblv) { - mask[cellI] = 1; - U[cellI] *= ::pow(y[cellI]/yblv, (1.0/7.0)); + mask[celli] = 1; + U[celli] *= ::pow(y[celli]/yblv, (1.0/7.0)); } } mask.correctBoundaryConditions(); diff --git a/applications/utilities/preProcessing/mapFields/mapLagrangian.C b/applications/utilities/preProcessing/mapFields/mapLagrangian.C index 24db863432f6347417eed1c1f53d32e47d953ca8..77a6ec3a4d51841111197dd0de31a59ddb11e4ee 100644 --- a/applications/utilities/preProcessing/mapFields/mapLagrangian.C +++ b/applications/utilities/preProcessing/mapFields/mapLagrangian.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 @@ -39,17 +39,17 @@ static const scalar perturbFactor = 1e-6; // compatible with tracking. static label findCell(const Cloud<passiveParticle>& cloud, const point& pt) { - label cellI = -1; + label celli = -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) + if (celli >= 0) { - return cellI; + return celli; } else { @@ -62,17 +62,17 @@ static label findCell(const Cloud<passiveParticle>& cloud, const point& pt) polyMesh::FACE_PLANES // no decomposition needed ); - label faceI = meshSearcher.findNearestBoundaryFace(pt); + label facei = meshSearcher.findNearestBoundaryFace(pt); - if (faceI >= 0) + if (facei >= 0) { - const point& cc = mesh.cellCentres()[mesh.faceOwner()[faceI]]; + const point& cc = mesh.cellCentres()[mesh.faceOwner()[facei]]; const point perturbPt = (1-perturbFactor)*pt+perturbFactor*cc; - mesh.findCellFacePt(perturbPt, cellI, tetFaceI, tetPtI); + mesh.findCellFacePt(perturbPt, celli, tetFaceI, tetPtI); - return cellI; + return celli; } } @@ -188,9 +188,9 @@ void mapLagrangian(const meshToMesh0& meshToMesh0Interp) ); passiveParticle& newP = newPtr(); - label faceI = newP.track(iter().position(), td); + label facei = newP.track(iter().position(), td); - if (faceI < 0 && newP.cell() >= 0) + if (facei < 0 && newP.cell() >= 0) { // Hit position. foundCell = true; diff --git a/applications/utilities/preProcessing/mapFieldsPar/mapLagrangian.C b/applications/utilities/preProcessing/mapFieldsPar/mapLagrangian.C index d2ed7da591a3a3621b158136433c22148aeca02f..c702b6fc01174d068c228707c9f6bd919599d691 100644 --- a/applications/utilities/preProcessing/mapFieldsPar/mapLagrangian.C +++ b/applications/utilities/preProcessing/mapFieldsPar/mapLagrangian.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 @@ -39,17 +39,17 @@ static const scalar perturbFactor = 1e-6; // compatible with tracking. static label findCell(const Cloud<passiveParticle>& cloud, const point& pt) { - label cellI = -1; + label celli = -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) + if (celli >= 0) { - return cellI; + return celli; } else { @@ -62,17 +62,17 @@ static label findCell(const Cloud<passiveParticle>& cloud, const point& pt) polyMesh::FACE_PLANES // no decomposition needed ); - label faceI = meshSearcher.findNearestBoundaryFace(pt); + label facei = meshSearcher.findNearestBoundaryFace(pt); - if (faceI >= 0) + if (facei >= 0) { - const point& cc = mesh.cellCentres()[mesh.faceOwner()[faceI]]; + const point& cc = mesh.cellCentres()[mesh.faceOwner()[facei]]; const point perturbPt = (1-perturbFactor)*pt+perturbFactor*cc; - mesh.findCellFacePt(perturbPt, cellI, tetFaceI, tetPtI); + mesh.findCellFacePt(perturbPt, celli, tetFaceI, tetPtI); - return cellI; + return celli; } } @@ -178,9 +178,9 @@ void mapLagrangian(const meshToMesh& interp) ); passiveParticle& newP = newPtr(); - label faceI = newP.track(iter().position(), td); + label facei = newP.track(iter().position(), td); - if (faceI < 0 && newP.cell() >= 0) + if (facei < 0 && newP.cell() >= 0) { // Hit position. foundCell = true; diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C index 0f865afb401e63b7387e4a82b50c93f11759f6c3..23ca4d734f2dc0ad4685087044317a9d27046490 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C +++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C @@ -164,15 +164,15 @@ void writeRays Pout<< "Dumping rays to " << str.name() << endl; - forAll(myFc, faceI) + forAll(myFc, facei) { - const labelList visFaces = visibleFaceFaces[faceI]; + const labelList visFaces = visibleFaceFaces[facei]; forAll(visFaces, faceRemote) { label compactI = visFaces[faceRemote]; const point& remoteFc = compactCf[compactI]; - meshTools::writeOBJ(str, myFc[faceI]); + meshTools::writeOBJ(str, myFc[facei]); vertI++; meshTools::writeOBJ(str, remoteFc); vertI++; @@ -228,12 +228,12 @@ void insertMatrixElements scalarSquareMatrix& matrix ) { - forAll(viewFactors, faceI) + forAll(viewFactors, facei) { - const scalarList& vf = viewFactors[faceI]; - const labelList& globalFaces = globalFaceFaces[faceI]; + 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]; @@ -397,11 +397,11 @@ int main(int argc, char *argv[]) labelHashSet includePatches; includePatches.insert(patchID); - forAll(coarseCf, faceI) + forAll(coarseCf, facei) { - point cf = coarseCf[faceI]; + point cf = coarseCf[facei]; - const label coarseFaceI = coarsePatchFace[faceI]; + const label coarseFaceI = coarsePatchFace[facei]; const labelList& fineFaces = coarseToFine[coarseFaceI]; const label agglomI = agglom[fineFaces[0]] + coarsePatches[patchID].start(); @@ -445,7 +445,7 @@ int main(int argc, char *argv[]) } } - point sf = coarseSf[faceI]; + point sf = coarseSf[facei]; localCoarseCf.append(cf); localCoarseSf.append(sf); localAgg.append(agglomI); @@ -502,10 +502,10 @@ int main(int argc, char *argv[]) labelListList visibleFaceFaces(nCoarseFaces); label nViewFactors = 0; - forAll(nVisibleFaceFaces, faceI) + forAll(nVisibleFaceFaces, facei) { - visibleFaceFaces[faceI].setSize(nVisibleFaceFaces[faceI]); - nViewFactors += nVisibleFaceFaces[faceI]; + visibleFaceFaces[facei].setSize(nVisibleFaceFaces[facei]); + nViewFactors += nVisibleFaceFaces[facei]; } @@ -574,9 +574,9 @@ int main(int argc, char *argv[]) nVisibleFaceFaces = 0; forAll(rayStartFace, i) { - label faceI = rayStartFace[i]; + label facei = rayStartFace[i]; label compactI = rayEndFace[i]; - visibleFaceFaces[faceI][nVisibleFaceFaces[faceI]++] = compactI; + visibleFaceFaces[facei][nVisibleFaceFaces[facei]++] = compactI; } @@ -896,12 +896,12 @@ int main(int argc, char *argv[]) // Create globalFaceFaces needed to insert view factors // in F to the global matrix Fmatrix - forAll(globalFaceFaces, faceI) + forAll(globalFaceFaces, facei) { - globalFaceFaces[faceI] = renumber + globalFaceFaces[facei] = renumber ( compactToGlobal, - visibleFaceFaces[faceI] + visibleFaceFaces[facei] ); } @@ -923,12 +923,12 @@ int main(int argc, char *argv[]) else { labelListList globalFaceFaces(visibleFaceFaces.size()); - forAll(globalFaceFaces, faceI) + forAll(globalFaceFaces, facei) { - globalFaceFaces[faceI] = renumber + globalFaceFaces[facei] = renumber ( compactToGlobal, - visibleFaceFaces[faceI] + visibleFaceFaces[facei] ); } diff --git a/applications/utilities/surface/surfaceAdd/surfaceAdd.C b/applications/utilities/surface/surfaceAdd/surfaceAdd.C index 3fde3717550433810b507148a16b57724d2f6131..f86eac19e6c5dd286517bbc29353ea545ae0220b 100644 --- a/applications/utilities/surface/surfaceAdd/surfaceAdd.C +++ b/applications/utilities/surface/surfaceAdd/surfaceAdd.C @@ -176,9 +176,9 @@ int main(int argc, char *argv[]) label trianglei = 0; // Copy triangles1 into trianglesAll - forAll(surface1, faceI) + forAll(surface1, facei) { - facesAll[trianglei++] = surface1[faceI]; + facesAll[trianglei++] = surface1[facei]; } label nRegions1 = surface1.patches().size(); @@ -193,9 +193,9 @@ int main(int argc, char *argv[]) } // Add (renumbered) surface2 triangles - forAll(surface2, faceI) + forAll(surface2, facei) { - const labelledTri& tri = surface2[faceI]; + const labelledTri& tri = surface2[facei]; labelledTri& destTri = facesAll[trianglei++]; destTri[0] = tri[0] + points1.size(); diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C index 75cef9a83df3bc6bbe0c05d5ec0e6d938bfb2a67..9a265fc113864d8496d32f19aa1450156ce1cec6 100644 --- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C +++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C @@ -46,19 +46,19 @@ bool validTri ( const bool verbose, const triSurface& surf, - const label faceI + const label facei ) { // Simple check on indices ok. - const labelledTri& f = surf[faceI]; + const labelledTri& f = surf[facei]; forAll(f, fp) { if (f[fp] < 0 || f[fp] >= surf.points().size()) { WarningInFunction - << "triangle " << faceI << " vertices " << f + << "triangle " << facei << " vertices " << f << " uses point indices outside point range 0.." << surf.points().size()-1 << endl; return false; @@ -68,7 +68,7 @@ bool validTri if ((f[0] == f[1]) || (f[0] == f[2]) || (f[1] == f[2])) { WarningInFunction - << "triangle " << faceI + << "triangle " << facei << " uses non-unique vertices " << f << " coords:" << f.points(surf.points()) << endl; @@ -77,7 +77,7 @@ bool validTri // duplicate triangle check - const labelList& fFaces = surf.faceFaces()[faceI]; + const labelList& fFaces = surf.faceFaces()[facei]; // Check if faceNeighbours use same points as this face. // Note: discards normal information - sides of baffle are merged. @@ -85,7 +85,7 @@ bool validTri { label nbrFaceI = fFaces[i]; - if (nbrFaceI <= faceI) + if (nbrFaceI <= facei) { // lower numbered faces already checked continue; @@ -101,7 +101,7 @@ bool validTri ) { WarningInFunction - << "triangle " << faceI << " vertices " << f + << "triangle " << facei << " vertices " << f << " has the same vertices as triangle " << nbrFaceI << " vertices " << nbrF << " coords:" << f.points(surf.points()) @@ -248,14 +248,14 @@ int main(int argc, char *argv[]) { labelList regionSize(surf.patches().size(), 0); - forAll(surf, faceI) + forAll(surf, facei) { - label region = surf[faceI].region(); + label region = surf[facei].region(); if (region < 0 || region >= regionSize.size()) { WarningInFunction - << "Triangle " << faceI << " vertices " << surf[faceI] + << "Triangle " << facei << " vertices " << surf[facei] << " has region " << region << " which is outside the range" << " of regions 0.." << surf.patches().size()-1 << endl; @@ -283,11 +283,11 @@ int main(int argc, char *argv[]) { DynamicList<label> illegalFaces(surf.size()/100 + 1); - forAll(surf, faceI) + forAll(surf, facei) { - if (!validTri(verbose, surf, faceI)) + if (!validTri(verbose, surf, facei)) { - illegalFaces.append(faceI); + illegalFaces.append(facei); } } @@ -315,19 +315,19 @@ int main(int argc, char *argv[]) { scalarField triQ(surf.size(), 0); - forAll(surf, faceI) + forAll(surf, facei) { - const labelledTri& f = surf[faceI]; + const labelledTri& f = surf[facei]; if (f[0] == f[1] || f[0] == f[2] || f[1] == f[2]) { //WarningIn(args.executable()) - // << "Illegal triangle " << faceI << " vertices " << f + // << "Illegal triangle " << facei << " vertices " << f // << " coords " << f.points(surf.points()) << endl; } else { - triQ[faceI] = triPointRef + triQ[facei] = triPointRef ( surf.points()[f[0]], surf.points()[f[1]], @@ -377,11 +377,11 @@ int main(int argc, char *argv[]) { DynamicList<label> problemFaces(surf.size()/100+1); - forAll(triQ, faceI) + forAll(triQ, facei) { - if (triQ[faceI] < 1e-11) + if (triQ[facei] < 1e-11) { - problemFaces.append(faceI); + problemFaces.append(facei); } } @@ -645,11 +645,11 @@ int main(int argc, char *argv[]) { boolList includeMap(surf.size(), false); - forAll(faceZone, faceI) + forAll(faceZone, facei) { - if (faceZone[faceI] == zone) + if (faceZone[facei] == zone) { - includeMap[faceI] = true; + includeMap[facei] = true; } } diff --git a/applications/utilities/surface/surfaceClean/collapseBase.C b/applications/utilities/surface/surfaceClean/collapseBase.C index 0bf67176286df64a34c234098423031e9382c184..72945ac9bbb7363d9a7cfcafa26c6ba27a615378 100644 --- a/applications/utilities/surface/surfaceClean/collapseBase.C +++ b/applications/utilities/surface/surfaceClean/collapseBase.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 @@ -54,11 +54,11 @@ using namespace Foam; // // boolList include(surf.size(), false); // -// forAll(collapseRegion, faceI) +// forAll(collapseRegion, facei) // { -// if (collapseRegion[faceI] == regionI) +// if (collapseRegion[facei] == regionI) // { -// include[faceI] = true; +// include[facei] = true; // } // } // @@ -269,7 +269,7 @@ bool isSliver const triSurface& surf, const scalar minLen, const scalar minQuality, - const label faceI, + const label facei, const label edgeI ) { @@ -284,12 +284,12 @@ bool isSliver triSurfaceTools::oppositeVertex ( surf, - faceI, + facei, edgeI ); const edge& e = surf.edges()[edgeI]; - const labelledTri& f = surf[faceI]; + const labelledTri& f = surf[facei]; pointHit pHit = e.line(localPoints).nearestDist @@ -306,10 +306,10 @@ bool isSliver ) ) { - // Remove faceI and split all other faces using this + // Remove facei and split all other faces using this // edge. This is done by 'replacing' the edgeI with the // opposite0 vertex - //Pout<< "Splitting face " << faceI << " since distance " + //Pout<< "Splitting face " << facei << " since distance " // << pHit.distance() // << " from vertex " << opposite0 // << " to edge " << edgeI @@ -350,23 +350,23 @@ static void markCollapsedFaces forAll(eFaces, i) { - label faceI = eFaces[i]; + label facei = eFaces[i]; - bool isCandidate = isSliver(surf, minLen, minQuality, faceI, edgeI); + bool isCandidate = isSliver(surf, minLen, minQuality, facei, edgeI); if (isCandidate) { // Mark face as being collapsed - if (faceToEdge[faceI] != -1) + if (faceToEdge[facei] != -1) { FatalErrorInFunction - << "Cannot collapse face " << faceI << " since " + << "Cannot collapse face " << facei << " since " << " is marked to be collapsed both to edge " - << faceToEdge[faceI] << " and " << edgeI + << faceToEdge[facei] << " and " << edgeI << abort(FatalError); } - faceToEdge[faceI] = edgeI; + faceToEdge[facei] = edgeI; } } } @@ -380,22 +380,22 @@ static void markRegion const triSurface& surf, const labelList& faceToEdge, const label regionI, - const label faceI, + const label facei, labelList& collapseRegion ) { - if (faceToEdge[faceI] == -1 || collapseRegion[faceI] != -1) + if (faceToEdge[facei] == -1 || collapseRegion[facei] != -1) { FatalErrorInFunction << "Problem : crossed into uncollapsed/regionized face" << abort(FatalError); } - collapseRegion[faceI] = regionI; + collapseRegion[facei] = regionI; // Recurse across edges to collapsed neighbours - const labelList& fEdges = surf.faceEdges()[faceI]; + const labelList& fEdges = surf.faceEdges()[facei]; forAll(fEdges, fEdgeI) { @@ -423,7 +423,7 @@ static void markRegion else if (collapseRegion[nbrFaceI] != regionI) { FatalErrorInFunction - << "Edge:" << edgeI << " between face " << faceI + << "Edge:" << edgeI << " between face " << facei << " with region " << regionI << " and face " << nbrFaceI << " with region " << collapseRegion[nbrFaceI] @@ -446,15 +446,15 @@ static label markRegions { label regionI = 0; - forAll(faceToEdge, faceI) + forAll(faceToEdge, facei) { - if (collapseRegion[faceI] == -1 && faceToEdge[faceI] != -1) + if (collapseRegion[facei] == -1 && faceToEdge[facei] != -1) { //Pout<< "markRegions : Marking region:" << regionI - // << " starting from face " << faceI << endl; + // << " starting from face " << facei << endl; // Collapsed face. Mark connected region with current region number - markRegion(surf, faceToEdge, regionI++, faceI, collapseRegion); + markRegion(surf, faceToEdge, regionI++, facei, collapseRegion); } } return regionI; @@ -480,9 +480,9 @@ static label edgeType forAll(eFaces, i) { - label faceI = eFaces[i]; + label facei = eFaces[i]; - label region = collapseRegion[faceI]; + label region = collapseRegion[facei]; if (region == -1) { @@ -926,20 +926,20 @@ label collapseBase forAll(eFaces, i) { - label faceI = eFaces[i]; + label facei = eFaces[i]; - if (!faceHandled[faceI] && faceToEdge[faceI] == -1) + if (!faceHandled[facei] && faceToEdge[facei] == -1) { // Split face to use vertices. splitTri ( - localFaces[faceI], + localFaces[facei], e, splitVerts, newTris ); - faceHandled[faceI] = true; + faceHandled[facei] = true; nSplit++; } @@ -949,11 +949,11 @@ label collapseBase } // Copy all unsplit faces - forAll(faceHandled, faceI) + forAll(faceHandled, facei) { - if (!faceHandled[faceI] && faceToEdge[faceI] == -1) + if (!faceHandled[facei] && faceToEdge[facei] == -1) { - newTris.append(localFaces[faceI]); + newTris.append(localFaces[facei]); } } diff --git a/applications/utilities/surface/surfaceClean/collapseEdge.C b/applications/utilities/surface/surfaceClean/collapseEdge.C index 8b752129ef8461be39b1b843b203773bc97ec93f..9d610205446f02e3e9bfdba65f9f85480fbb9288 100644 --- a/applications/utilities/surface/surfaceClean/collapseEdge.C +++ b/applications/utilities/surface/surfaceClean/collapseEdge.C @@ -28,12 +28,12 @@ License static void markPointNbrs ( const triSurface& surf, - const label faceI, + const label facei, const bool val, boolList& okToCollapse ) { - const triSurface::FaceType& f = surf.localFaces()[faceI]; + const triSurface::FaceType& f = surf.localFaces()[facei]; forAll(f, fp) { @@ -57,9 +57,9 @@ static triSurface pack List<labelledTri> newTriangles(surf.size()); label newTriangleI = 0; - forAll(surf, faceI) + forAll(surf, facei) { - const labelledTri& f = surf.localFaces()[faceI]; + const labelledTri& f = surf.localFaces()[facei]; label newA = pointMap[f[0]]; label newB = pointMap[f[1]]; @@ -102,12 +102,12 @@ label collapseEdge(triSurface& surf, const scalar minLen) boolList okToCollapse(surf.size(), true); label nCollapsed = 0; - forAll(localFaces, faceI) + forAll(localFaces, facei) { - if (okToCollapse[faceI]) + if (okToCollapse[facei]) { // Check edge lengths. - const triSurface::FaceType& f = localFaces[faceI]; + const triSurface::FaceType& f = localFaces[facei]; forAll(f, fp) { @@ -120,14 +120,14 @@ label collapseEdge(triSurface& surf, const scalar minLen) pointMap[v1] = v; newPoints[v] = 0.5*(localPoints[v1] + localPoints[v]); - //Pout<< "Collapsing triange " << faceI + //Pout<< "Collapsing triange " << facei // << " to edge mid " << newPoints[v] << endl; nCollapsed++; - okToCollapse[faceI] = false; + okToCollapse[facei] = false; // Protect point neighbours from collapsing. - markPointNbrs(surf, faceI, false, okToCollapse); + markPointNbrs(surf, facei, false, okToCollapse); break; } diff --git a/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C b/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C index 349b4838822fd84c5e35a02cc0b97250d3d5abc3..cff6230318582bbee7c3cc07e218b5840fc26fd9 100644 --- a/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C +++ b/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C @@ -110,9 +110,9 @@ int main(int argc, char *argv[]) vert.Add( ::Vector(pt.x(), pt.y(), pt.z())); } - forAll(surf, faceI) + forAll(surf, facei) { - const labelledTri& f = surf[faceI]; + const labelledTri& f = surf[facei]; tridata td; td.v[0]=f[0]; diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C index cf8373b4c3ee4a484e059004616b2a28963769b0..f1894297f760f34d19a53bb61832ccd4d12291c4 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C @@ -208,8 +208,8 @@ vectorField calcVertexNormals(const triSurface& surf) forAll(pFaces, fI) { - const label faceI = pFaces[fI]; - const triFace& f = surf[faceI]; + const label facei = pFaces[fI]; + const triFace& f = surf[facei]; vector fN = f.normal(points); diff --git a/applications/utilities/surface/surfaceFind/surfaceFind.C b/applications/utilities/surface/surfaceFind/surfaceFind.C index b002e13d315fee0fd0bfeb369cf35ec56c625810..f9bdc6426d7442512553712346421f8aeb252583 100644 --- a/applications/utilities/surface/surfaceFind/surfaceFind.C +++ b/applications/utilities/surface/surfaceFind/surfaceFind.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 @@ -96,15 +96,15 @@ int main(int argc, char *argv[]) minIndex = -1; minDist = GREAT; - forAll(surf1, faceI) + forAll(surf1, facei) { - const point centre = surf1[faceI].centre(points); + const point centre = surf1[facei].centre(points); const scalar dist = mag(centre - samplePt); if (dist < minDist) { minDist = dist; - minIndex = faceI; + minIndex = facei; } } diff --git a/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C b/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C index b7c5ca03b2a3125727cda5f68b37781269df7d23..98495bd264c628649bc4dda65bf25082e8f203b2 100644 --- a/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C +++ b/applications/utilities/surface/surfaceHookUp/surfaceHookUp.C @@ -44,17 +44,17 @@ Usage using namespace Foam; -// Split faceI along edgeI at position newPointI +// Split facei along edgeI at position newPointI void greenRefine ( const triSurface& surf, - const label faceI, + const label facei, const label edgeI, const label newPointI, DynamicList<labelledTri>& newFaces ) { - const labelledTri& f = surf.localFaces()[faceI]; + const labelledTri& f = surf.localFaces()[facei]; const edge& e = surf.edges()[edgeI]; // Find index of edge in face. @@ -478,9 +478,9 @@ int main(int argc, char *argv[]) continue; } - const label faceI = eFaces[0]; + const label facei = eFaces[0]; - if (visitedFace[hitSurfI][faceI]) + if (visitedFace[hitSurfI][facei]) { continue; } @@ -523,13 +523,13 @@ int main(int argc, char *argv[]) greenRefine ( hitSurf, - faceI, + facei, eIndex, newPointI, newFacesFromSplit ); - visitedFace[hitSurfI][faceI] = true; + visitedFace[hitSurfI][facei] = true; forAll(newFacesFromSplit, newFaceI) { @@ -537,7 +537,7 @@ int main(int argc, char *argv[]) if (newFaceI == 0) { - newFaces[hitSurfI][faceI] = fN; + newFaces[hitSurfI][facei] = fN; } else { diff --git a/applications/utilities/surface/surfaceInertia/surfaceInertia.C b/applications/utilities/surface/surfaceInertia/surfaceInertia.C index d41147e0d27705e9e877944a79d62138dee0ed8b..b79c2863387b2d80353152e4f496073326208163 100644 --- a/applications/utilities/surface/surfaceInertia/surfaceInertia.C +++ b/applications/utilities/surface/surfaceInertia/surfaceInertia.C @@ -331,14 +331,14 @@ int main(int argc, char *argv[]) scalar surfaceArea = 0; - forAll(surf, faceI) + forAll(surf, facei) { - const labelledTri& f = surf[faceI]; + const labelledTri& f = surf[facei]; if (f[0] == f[1] || f[0] == f[2] || f[1] == f[2]) { WarningInFunction - << "Illegal triangle " << faceI << " vertices " << f + << "Illegal triangle " << facei << " vertices " << f << " coords " << f.points(surf.points()) << endl; } else diff --git a/applications/utilities/surface/surfaceMeshInfo/surfaceMeshInfo.C b/applications/utilities/surface/surfaceMeshInfo/surfaceMeshInfo.C index 0129154b84c2b114ab9d3370af7a3cee6065fd78..4a48ada7606239e5194ca01e663a8aafa4e9b72d 100644 --- a/applications/utilities/surface/surfaceMeshInfo/surfaceMeshInfo.C +++ b/applications/utilities/surface/surfaceMeshInfo/surfaceMeshInfo.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 @@ -143,9 +143,9 @@ int main(int argc, char *argv[]) } } - forAll(surf, faceI) + forAll(surf, facei) { - const scalar fArea(surf[faceI].mag(surf.points())); + const scalar fArea(surf[facei].mag(surf.points())); areaTotal += fArea; if (writeAreas) diff --git a/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C b/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C index dc133d613d6f0ed43ed04effeaf4ee1e1434c204..dc887c60c11113ef0e42e84b52439c34995031e0 100644 --- a/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C +++ b/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C @@ -83,13 +83,13 @@ int main(int argc, char *argv[]) // Collect faces of region boolList includeMap(surf.size(), false); - forAll(surf, faceI) + forAll(surf, facei) { - const labelledTri& f = surf[faceI]; + const labelledTri& f = surf[facei]; if (f.region() == patchi) { - includeMap[faceI] = true; + includeMap[facei] = true; } } diff --git a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C index 3e69502c79c5b7c57dc3066f6262acb7037b5e52..fe899e6e399c9e19df5d807c23dd42eeb79ddf7d 100644 --- a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C +++ b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C @@ -308,16 +308,16 @@ label findEdge } -// Get the other edge connected to pointI on faceI. +// Get the other edge connected to pointI on facei. label otherEdge ( const triSurface& surf, - const label faceI, + const label facei, const label otherEdgeI, const label pointI ) { - const labelList& fEdges = surf.faceEdges()[faceI]; + const labelList& fEdges = surf.faceEdges()[facei]; forAll(fEdges, i) { @@ -339,7 +339,7 @@ label otherEdge } FatalErrorInFunction - << " verts:" << surf.localPoints()[faceI] + << " verts:" << surf.localPoints()[facei] << " connected to point " << pointI << " faceEdges:" << UIndirectList<edge>(surf.edges(), fEdges)() << abort(FatalError); @@ -365,7 +365,7 @@ void walkSplitLine Map<label>& faceToPoint ) { - label faceI = startFaceI; + label facei = startFaceI; label edgeI = startEdgeI; label pointI = startPointI; @@ -378,11 +378,11 @@ void walkSplitLine do { // Cross face to next edge. - edgeI = otherEdge(surf, faceI, edgeI, pointI); + edgeI = otherEdge(surf, facei, edgeI, pointI); if (borderEdge[edgeI]) { - if (!faceToEdge.insert(faceI, edgeI)) + if (!faceToEdge.insert(facei, edgeI)) { // Was already visited. return; @@ -393,7 +393,7 @@ void walkSplitLine break; } } - else if (!faceToPoint.insert(faceI, pointI)) + else if (!faceToPoint.insert(facei, pointI)) { // Was already visited. return; @@ -409,13 +409,13 @@ void walkSplitLine << abort(FatalError); } - if (eFaces[0] == faceI) + if (eFaces[0] == facei) { - faceI = eFaces[1]; + facei = eFaces[1]; } - else if (eFaces[1] == faceI) + else if (eFaces[1] == facei) { - faceI = eFaces[0]; + facei = eFaces[0]; } else { @@ -516,17 +516,17 @@ void calcPointVecs forAll(eFaces, i) { - label faceI = eFaces[i]; + label facei = eFaces[i]; - if (faceToEdge.found(faceI)) + if (faceToEdge.found(facei)) { if (face0I == -1) { - face0I = faceI; + face0I = facei; } else if (face1I == -1) { - face1I = faceI; + face1I = facei; break; } @@ -603,14 +603,14 @@ void renumberFaces { forAllConstIter(Map<label>, faceToEdge, iter) { - const label faceI = iter.key(); - const triSurface::FaceType& f = surf.localFaces()[faceI]; + const label facei = iter.key(); + const triSurface::FaceType& f = surf.localFaces()[facei]; forAll(f, fp) { if (pointMap[f[fp]] != -1) { - newTris[faceI][fp] = pointMap[f[fp]]; + newTris[facei][fp] = pointMap[f[fp]]; } } } @@ -908,10 +908,10 @@ int main(int argc, char *argv[]) // Start off from copy of faces. List<labelledTri> newTris(surf.size()); - forAll(surf, faceI) + forAll(surf, facei) { - newTris[faceI] = surf.localFaces()[faceI]; - newTris[faceI].region() = surf[faceI].region(); + newTris[facei] = surf.localFaces()[facei]; + newTris[facei].region() = surf[facei].region(); } // Renumber all faces in faceToEdge @@ -921,9 +921,9 @@ int main(int argc, char *argv[]) // Check if faces use unmoved points. - forAll(newTris, faceI) + forAll(newTris, facei) { - const triSurface::FaceType& f = newTris[faceI]; + const triSurface::FaceType& f = newTris[facei]; forAll(f, fp) { @@ -931,7 +931,7 @@ int main(int argc, char *argv[]) if (mag(pt) >= GREAT/2) { - Info<< "newTri:" << faceI << " verts:" << f + Info<< "newTri:" << facei << " verts:" << f << " vert:" << f[fp] << " point:" << pt << endl; } } diff --git a/applications/utilities/surface/surfaceSubset/surfaceSubset.C b/applications/utilities/surface/surfaceSubset/surfaceSubset.C index 562b7bd302c173ecc11f6fa366afc437755fb08d..c45d25e4b7727ecf7c2f4a8daad25917f8de2886 100644 --- a/applications/utilities/surface/surfaceSubset/surfaceSubset.C +++ b/applications/utilities/surface/surfaceSubset/surfaceSubset.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 @@ -199,9 +199,9 @@ int main(int argc, char *argv[]) Info<< "Using zone min:" << min << " max:" << max << endl; - forAll(surf1, faceI) + forAll(surf1, facei) { - const point centre = surf1[faceI].centre(surf1.points()); + const point centre = surf1[facei].centre(surf1.points()); if ( @@ -213,7 +213,7 @@ int main(int argc, char *argv[]) && (centre.z() <= max.z()) ) { - facesToSubset[faceI] = true; + facesToSubset[facei] = true; } } } @@ -256,11 +256,11 @@ int main(int argc, char *argv[]) searchSelectSurf.tree(); // Check if face (centre) is in outside or inside. - forAll(facesToSubset, faceI) + forAll(facesToSubset, facei) { - if (!facesToSubset[faceI]) + if (!facesToSubset[facei]) { - const point fc(surf1[faceI].centre(surf1.points())); + const point fc(surf1[facei].centre(surf1.points())); volumeType t = selectTree.getVolumeType(fc); @@ -271,7 +271,7 @@ int main(int argc, char *argv[]) : (t == volumeType::INSIDE) ) { - facesToSubset[faceI] = true; + facesToSubset[facei] = true; } } } @@ -289,14 +289,14 @@ int main(int argc, char *argv[]) // Select all triangles that are close to the plane and // whose normal aligns with the plane as well. - forAll(surf1.faceCentres(), faceI) + forAll(surf1.faceCentres(), facei) { - const point& fc = surf1.faceCentres()[faceI]; - const point& nf = surf1.faceNormals()[faceI]; + const point& fc = surf1.faceCentres()[facei]; + const point& nf = surf1.faceNormals()[facei]; if (pl.distance(fc) < distance && mag(pl.normal() & nf) > cosAngle) { - facesToSubset[faceI] = true; + facesToSubset[facei] = true; } } } @@ -315,37 +315,37 @@ int main(int argc, char *argv[]) Info<< "Found " << markedFaces.size() << " marked face(s)." << endl; // Check and mark faces to pick up - forAll(markedFaces, faceI) + forAll(markedFaces, facei) { if ( - markedFaces[faceI] < 0 - || markedFaces[faceI] >= surf1.size() + markedFaces[facei] < 0 + || markedFaces[facei] >= surf1.size() ) { FatalErrorInFunction - << "Face label " << markedFaces[faceI] << "out of range." + << "Face label " << markedFaces[facei] << "out of range." << " The mesh has got " << surf1.size() << " faces." << exit(FatalError); } // Mark the face - facesToSubset[markedFaces[faceI]] = true; + facesToSubset[markedFaces[facei]] = true; // mark its neighbours if requested if (addFaceNeighbours) { const labelList& curFaces = - surf1.faceFaces()[markedFaces[faceI]]; + surf1.faceFaces()[markedFaces[facei]]; forAll(curFaces, i) { - label faceI = curFaces[i]; + label facei = curFaces[i]; - if (!facesToSubset[faceI]) + if (!facesToSubset[facei]) { - facesToSubset[faceI] = true; + facesToSubset[facei] = true; nFaceNeighbours++; } } diff --git a/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C b/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C index b499bf05f5cdc0f20417e2a8458dbda3c2c44479..b81d7c825b1c7e36928e8a266d0c871e9717bc4c 100644 --- a/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C +++ b/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C @@ -106,13 +106,13 @@ bool repatchFace const boundaryMesh& bMesh, const labelList& nearest, const labelList& surfToMeshPatch, - const label faceI, + const label facei, polyTopoChange& meshMod ) { bool changed = false; - label bFaceI = faceI - mesh.nInternalFaces(); + label bFaceI = facei - mesh.nInternalFaces(); if (nearest[bFaceI] != -1) { @@ -121,11 +121,11 @@ bool repatchFace label patchID = surfToMeshPatch[bMeshPatchID]; - if (patchID != mesh.boundaryMesh().whichPatch(faceI)) + if (patchID != mesh.boundaryMesh().whichPatch(facei)) { - label own = mesh.faceOwner()[faceI]; + label own = mesh.faceOwner()[facei]; - label zoneID = mesh.faceZones().whichZone(faceI); + label zoneID = mesh.faceZones().whichZone(facei); bool zoneFlip = false; @@ -133,15 +133,15 @@ bool repatchFace { const faceZone& fZone = mesh.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } meshMod.setAction ( polyModifyFace ( - mesh.faces()[faceI],// modified face - faceI, // label of face being modified + mesh.faces()[facei],// modified face + facei, // label of face being modified own, // owner -1, // neighbour false, // face flip @@ -283,9 +283,9 @@ int main(int argc, char *argv[]) forAllConstIter(faceSet, faceLabels, iter) { - label faceI = iter.key(); + label facei = iter.key(); - if (repatchFace(mesh, bMesh, nearest, patchMap, faceI, meshMod)) + if (repatchFace(mesh, bMesh, nearest, patchMap, facei, meshMod)) { nChanged++; } @@ -295,9 +295,9 @@ int main(int argc, char *argv[]) { forAll(nearest, bFaceI) { - label faceI = mesh.nInternalFaces() + bFaceI; + label facei = mesh.nInternalFaces() + bFaceI; - if (repatchFace(mesh, bMesh, nearest, patchMap, faceI, meshMod)) + if (repatchFace(mesh, bMesh, nearest, patchMap, facei, meshMod)) { nChanged++; } diff --git a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C index 80d5a29b44cd2d42882075b300e4754e8fdedaf8..6a6a21f93356ff1f8facd990b14c80d41bd590d7 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.C +++ b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.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 @@ -37,7 +37,7 @@ defineTypeNameAndDebug(treeDataCell, 0); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -Foam::treeBoundBox Foam::treeDataCell::calcCellBb(const label cellI) const +Foam::treeBoundBox Foam::treeDataCell::calcCellBb(const label celli) const { const cellList& cells = mesh_.cells(); const faceList& faces = mesh_.faces(); @@ -49,7 +49,7 @@ Foam::treeBoundBox Foam::treeDataCell::calcCellBb(const label cellI) const vector(-GREAT, -GREAT, -GREAT) ); - const cell& cFaces = cells[cellI]; + const cell& cFaces = cells[celli]; forAll(cFaces, cFaceI) { @@ -208,14 +208,14 @@ void Foam::treeDataCell::findNearestOp::operator() forAll(indices, i) { label index = indices[i]; - label cellI = shape.cellLabels()[index]; - scalar distSqr = magSqr(sample - shape.mesh().cellCentres()[cellI]); + label celli = shape.cellLabels()[index]; + scalar distSqr = magSqr(sample - shape.mesh().cellCentres()[celli]); if (distSqr < nearestDistSqr) { nearestDistSqr = distSqr; minIndex = index; - nearestPoint = shape.mesh().cellCentres()[cellI]; + nearestPoint = shape.mesh().cellCentres()[celli]; } } } diff --git a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H index 8f62001330419d94c88f1b3e7b45ecf32626364e..b53bb6fcd16d9ba12585c3c9defa1b8724fd4f5e 100644 --- a/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.H +++ b/src/OpenFOAM/algorithms/indexedOctree/treeDataCell.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 @@ class treeDataCell // Private Member Functions //- Calculate cell bounding box - treeBoundBox calcCellBb(const label cellI) const; + treeBoundBox calcCellBb(const label celli) const; //- Initialise all member data void update(); diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C index 717f7d609f3166b083cc2600e9fb2f32b5ff1ee7..1fcb7ec542213352d8162732ced062b4523fdd8e 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C @@ -634,9 +634,9 @@ operator== GeometricBoundaryField& bf ) { - forAll((*this), patchI) + forAll((*this), patchi) { - this->operator[](patchI) == bf[patchI]; + this->operator[](patchi) == bf[patchi]; } } @@ -648,9 +648,9 @@ operator== const FieldField<PatchField, Type>& ptff ) { - forAll((*this), patchI) + forAll((*this), patchi) { - this->operator[](patchI) == ptff[patchI]; + this->operator[](patchi) == ptff[patchi]; } } @@ -662,9 +662,9 @@ operator== const Type& t ) { - forAll((*this), patchI) + forAll((*this), patchi) { - this->operator[](patchI) == t; + this->operator[](patchi) == t; } } diff --git a/src/OpenFOAM/interpolations/patchToPatchInterpolation/CalcPatchToPatchWeights.C b/src/OpenFOAM/interpolations/patchToPatchInterpolation/CalcPatchToPatchWeights.C index 87c18a3127da003ed24570e28b03a2301d8583ce..c23f5ac12869717d79fae8c363b419b21ec4d5c2 100644 --- a/src/OpenFOAM/interpolations/patchToPatchInterpolation/CalcPatchToPatchWeights.C +++ b/src/OpenFOAM/interpolations/patchToPatchInterpolation/CalcPatchToPatchWeights.C @@ -252,10 +252,10 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcFaceAddressing() const vectorField fromPatchFaceCentres(fromPatchFaces.size()); - forAll(fromPatchFaceCentres, faceI) + forAll(fromPatchFaceCentres, facei) { - fromPatchFaceCentres[faceI] = - fromPatchFaces[faceI].centre(fromPatchPoints); + fromPatchFaceCentres[facei] = + fromPatchFaces[facei].centre(fromPatchPoints); } const pointField& toPatchPoints = toPatch_.points(); @@ -275,36 +275,36 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcFaceAddressing() const faceAddressingPtr_ = new labelList(proj.size(), -1); labelList& faceAddressing = *faceAddressingPtr_; - forAll(faceAddressing, faceI) + forAll(faceAddressing, facei) { - if (proj[faceI].hit()) + if (proj[facei].hit()) { // A hit exists - faceAddressing[faceI] = proj[faceI].hitObject(); + faceAddressing[facei] = proj[facei].hitObject(); const typename FromPatch::FaceType& hitFace = - fromPatchFaces[faceAddressing[faceI]]; + fromPatchFaces[faceAddressing[facei]]; pointHit curHit = hitFace.ray ( - toPatchFaces[faceI].centre(toPatchPoints), - projectionDirection[faceI], + toPatchFaces[facei].centre(toPatchPoints), + projectionDirection[facei], fromPatchPoints, alg_, dir_ ); // grab distance to target - faceDistance[faceI] = curHit.distance(); + faceDistance[facei] = curHit.distance(); // grab face centre of the hit face const point& hitFaceCentre = - fromPatchFaceCentres[faceAddressing[faceI]]; + fromPatchFaceCentres[faceAddressing[facei]]; // grab neighbours of hit face const labelList& neighbours = - fromPatchFaceFaces[faceAddressing[faceI]]; + fromPatchFaceFaces[faceAddressing[facei]]; scalar m = mag(curHit.hitPoint() - hitFaceCentre); @@ -314,8 +314,8 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcFaceAddressing() const || neighbours.empty() ) { - faceWeights.set(faceI, new scalarField(1)); - faceWeights[faceI][0] = 1.0; + faceWeights.set(facei, new scalarField(1)); + faceWeights[facei][0] = 1.0; } else { @@ -323,13 +323,13 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcFaceAddressing() const // The first coefficient corresponds to the centre face. // The rest is ordered in the same way as the faceFaces list. - faceWeights.set(faceI, new scalarField(neighbours.size() + 1)); + faceWeights.set(facei, new scalarField(neighbours.size() + 1)); - faceWeights[faceI][0] = 1.0/m; + faceWeights[facei][0] = 1.0/m; forAll(neighbours, nI) { - faceWeights[faceI][nI + 1] = + faceWeights[facei][nI + 1] = 1.0/ ( mag @@ -342,11 +342,11 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcFaceAddressing() const } } - faceWeights[faceI] /= sum(faceWeights[faceI]); + faceWeights[facei] /= sum(faceWeights[facei]); } else { - faceWeights.set(faceI, new scalarField(0)); + faceWeights.set(facei, new scalarField(0)); } } } diff --git a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolate.C b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolate.C index 621e9a75746189a5e184f16903135fa24997c937..d43414b42810d0e06f11345c82cbe26b530a7618 100644 --- a/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolate.C +++ b/src/OpenFOAM/interpolations/patchToPatchInterpolation/PatchToPatchInterpolate.C @@ -126,21 +126,21 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::faceInterpolate const labelList& addr = faceAddr(); - forAll(result, faceI) + forAll(result, facei) { - const scalarField& curWeights = weights[faceI]; + const scalarField& curWeights = weights[facei]; - if (addr[faceI] > -1) + if (addr[facei] > -1) { const labelList& hitFaceFaces = - fromPatchFaceFaces[addr[faceI]]; + fromPatchFaceFaces[addr[facei]]; // first add the hit face - result[faceI] += ff[addr[faceI]]*curWeights[0]; + result[facei] += ff[addr[facei]]*curWeights[0]; for (label wI = 1; wI < curWeights.size(); wI++) { - result[faceI] += ff[hitFaceFaces[wI - 1]]*curWeights[wI]; + result[facei] += ff[hitFaceFaces[wI - 1]]*curWeights[wI]; } } } diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixATmul.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixATmul.C index 4c06f84e21d6ad8296fb35c118dde7b3e7769ebe..eeb3618c2aa3c4c9d4633e2f1fd1370ee66bf2a3 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixATmul.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixATmul.C @@ -198,12 +198,12 @@ void Foam::LduMatrix<Type, DType, LUType>::sumA // Add the interface internal coefficients to diagonal // and the interface boundary coefficients to the sum-off-diagonal - forAll(interfaces_, patchI) + forAll(interfaces_, patchi) { - if (interfaces_.set(patchI)) + if (interfaces_.set(patchi)) { - const unallocLabelList& pa = lduAddr().patchAddr(patchI); - const Field<LUType>& pCoeffs = interfacesUpper_[patchI]; + const unallocLabelList& pa = lduAddr().patchAddr(patchi); + const Field<LUType>& pCoeffs = interfacesUpper_[patchi]; forAll(pa, face) { diff --git a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C index 89c3f797eed1ffe1423c8c2add30f99563b9314c..8bf7a15194eb9d5bddf3858543f70dee1dec12c4 100644 --- a/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C +++ b/src/OpenFOAM/matrices/LduMatrix/LduMatrix/LduMatrixUpdateMatrixInterfaces.C @@ -42,16 +42,16 @@ void Foam::LduMatrix<Type, DType, LUType>::initMatrixInterfaces || Pstream::defaultCommsType == Pstream::nonBlocking ) { - forAll(interfaces_, interfaceI) + forAll(interfaces_, interfacei) { - if (interfaces_.set(interfaceI)) + if (interfaces_.set(interfacei)) { - interfaces_[interfaceI].initInterfaceMatrixUpdate + interfaces_[interfacei].initInterfaceMatrixUpdate ( result, psiif, - interfaceCoeffs[interfaceI], - //Amultiplier<Type, LUType>(interfaceCoeffs[interfaceI]), + interfaceCoeffs[interfacei], + //Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]), Pstream::defaultCommsType ); } @@ -65,19 +65,19 @@ void Foam::LduMatrix<Type, DType, LUType>::initMatrixInterfaces // beyond the end of the schedule which only handles "normal" patches for ( - label interfaceI=patchSchedule.size()/2; - interfaceI<interfaces_.size(); - interfaceI++ + label interfacei=patchSchedule.size()/2; + interfacei<interfaces_.size(); + interfacei++ ) { - if (interfaces_.set(interfaceI)) + if (interfaces_.set(interfacei)) { - interfaces_[interfaceI].initInterfaceMatrixUpdate + interfaces_[interfacei].initInterfaceMatrixUpdate ( result, psiif, - interfaceCoeffs[interfaceI], - //Amultiplier<Type, LUType>(interfaceCoeffs[interfaceI]), + interfaceCoeffs[interfacei], + //Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]), Pstream::blocking ); } @@ -114,16 +114,16 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces OPstream::waitRequests(); } - forAll(interfaces_, interfaceI) + forAll(interfaces_, interfacei) { - if (interfaces_.set(interfaceI)) + if (interfaces_.set(interfacei)) { - interfaces_[interfaceI].updateInterfaceMatrix + interfaces_[interfacei].updateInterfaceMatrix ( result, psiif, - interfaceCoeffs[interfaceI], - //Amultiplier<Type, LUType>(interfaceCoeffs[interfaceI]), + interfaceCoeffs[interfacei], + //Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]), Pstream::defaultCommsType ); } @@ -136,29 +136,29 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces // Loop over all the "normal" interfaces relating to standard patches forAll(patchSchedule, i) { - label interfaceI = patchSchedule[i].patch; + label interfacei = patchSchedule[i].patch; - if (interfaces_.set(interfaceI)) + if (interfaces_.set(interfacei)) { if (patchSchedule[i].init) { - interfaces_[interfaceI].initInterfaceMatrixUpdate + interfaces_[interfacei].initInterfaceMatrixUpdate ( result, psiif, - interfaceCoeffs[interfaceI], - //Amultiplier<Type, LUType>(interfaceCoeffs[interfaceI]), + interfaceCoeffs[interfacei], + //Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]), Pstream::scheduled ); } else { - interfaces_[interfaceI].updateInterfaceMatrix + interfaces_[interfacei].updateInterfaceMatrix ( result, psiif, - interfaceCoeffs[interfaceI], - //Amultiplier<Type, LUType>(interfaceCoeffs[interfaceI]), + interfaceCoeffs[interfacei], + //Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]), Pstream::scheduled ); } @@ -169,19 +169,19 @@ void Foam::LduMatrix<Type, DType, LUType>::updateMatrixInterfaces // beyond the end of the schedule which only handles "normal" patches for ( - label interfaceI=patchSchedule.size()/2; - interfaceI<interfaces_.size(); - interfaceI++ + label interfacei=patchSchedule.size()/2; + interfacei<interfaces_.size(); + interfacei++ ) { - if (interfaces_.set(interfaceI)) + if (interfaces_.set(interfacei)) { - interfaces_[interfaceI].updateInterfaceMatrix + interfaces_[interfacei].updateInterfaceMatrix ( result, psiif, - interfaceCoeffs[interfaceI], - //Amultiplier<Type, LUType>(interfaceCoeffs[interfaceI]), + interfaceCoeffs[interfacei], + //Amultiplier<Type, LUType>(interfaceCoeffs[interfacei]), Pstream::blocking ); } diff --git a/src/OpenFOAM/matrices/LduMatrix/Smoothers/GaussSeidel/TGaussSeidelSmoother.C b/src/OpenFOAM/matrices/LduMatrix/Smoothers/GaussSeidel/TGaussSeidelSmoother.C index b86661adabae6f8d0994411d4d9bfba22a1cf8da..b37ceaa5babac9f0045c02c00b0d28d98ab5c110 100644 --- a/src/OpenFOAM/matrices/LduMatrix/Smoothers/GaussSeidel/TGaussSeidelSmoother.C +++ b/src/OpenFOAM/matrices/LduMatrix/Smoothers/GaussSeidel/TGaussSeidelSmoother.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 @@ -45,9 +45,9 @@ Foam::TGaussSeidelSmoother<Type, DType, LUType>::TGaussSeidelSmoother const DType* const __restrict__ diagPtr = matrix.diag().begin(); DType* __restrict__ rDPtr = rD_.begin(); - for (label cellI=0; cellI<nCells; cellI++) + for (label celli=0; celli<nCells; celli++) { - rDPtr[cellI] = inv(diagPtr[cellI]); + rDPtr[celli] = inv(diagPtr[celli]); } } @@ -123,14 +123,14 @@ void Foam::TGaussSeidelSmoother<Type, DType, LUType>::smooth label fStart; label fEnd = ownStartPtr[0]; - for (label cellI=0; cellI<nCells; cellI++) + for (label celli=0; celli<nCells; celli++) { // Start and end of this row fStart = fEnd; - fEnd = ownStartPtr[cellI + 1]; + fEnd = ownStartPtr[celli + 1]; // Get the accumulated neighbour side - curPsi = bPrimePtr[cellI]; + curPsi = bPrimePtr[celli]; // Accumulate the owner product side for (label curFace=fStart; curFace<fEnd; curFace++) @@ -139,7 +139,7 @@ void Foam::TGaussSeidelSmoother<Type, DType, LUType>::smooth } // Finish current psi - curPsi = dot(rDPtr[cellI], curPsi); + curPsi = dot(rDPtr[celli], curPsi); // Distribute the neighbour side using current psi for (label curFace=fStart; curFace<fEnd; curFace++) @@ -147,7 +147,7 @@ void Foam::TGaussSeidelSmoother<Type, DType, LUType>::smooth bPrimePtr[uPtr[curFace]] -= dot(lowerPtr[curFace], curPsi); } - psiPtr[cellI] = curPsi; + psiPtr[celli] = curPsi; } } } diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.C index 269fc2150bff71927c363bf55c89c22abb24f45e..d8185f43b910e096b4be3206b4c20f6475e78df9 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduAddressing.C @@ -53,9 +53,9 @@ void Foam::lduAddressing::calcLosort() const // Create temporary neighbour addressing labelListList cellNbrFaces(size()); - forAll(cellNbrFaces, cellI) + forAll(cellNbrFaces, celli) { - cellNbrFaces[cellI].setSize(nNbrOfFace[cellI]); + cellNbrFaces[celli].setSize(nNbrOfFace[celli]); } // Reset the list of number of neighbours to zero @@ -77,9 +77,9 @@ void Foam::lduAddressing::calcLosort() const // Set counter for losort label lstI = 0; - forAll(cellNbrFaces, cellI) + forAll(cellNbrFaces, celli) { - const labelList& curNbr = cellNbrFaces[cellI]; + const labelList& curNbr = cellNbrFaces[celli]; forAll(curNbr, curNbrI) { @@ -110,15 +110,15 @@ void Foam::lduAddressing::calcOwnerStart() const label nOwnStart = 0; label i = 1; - forAll(own, faceI) + forAll(own, facei) { - label curOwn = own[faceI]; + label curOwn = own[facei]; if (curOwn > nOwnStart) { while (i <= curOwn) { - ownStart[i++] = faceI; + ownStart[i++] = facei; } nOwnStart = curOwn; @@ -149,16 +149,16 @@ void Foam::lduAddressing::calcLosortStart() const label nLsrtStart = 0; label i = 0; - forAll(lsrt, faceI) + forAll(lsrt, facei) { // Get neighbour - const label curNbr = nbr[lsrt[faceI]]; + const label curNbr = nbr[lsrt[facei]]; if (curNbr > nLsrtStart) { while (i <= curNbr) { - lsrtStart[i++] = faceI; + lsrtStart[i++] = facei; } nLsrtStart = curNbr; @@ -253,10 +253,10 @@ Foam::Tuple2<Foam::label, Foam::scalar> Foam::lduAddressing::band() const labelList cellBandwidth(size(), 0); - forAll(neighbour, faceI) + forAll(neighbour, facei) { - label own = owner[faceI]; - label nei = neighbour[faceI]; + label own = owner[facei]; + label nei = neighbour[facei]; // Note: mag not necessary for correct (upper-triangular) ordering. label diff = nei-own; @@ -267,9 +267,9 @@ Foam::Tuple2<Foam::label, Foam::scalar> Foam::lduAddressing::band() const // Do not use field algebra because of conversion label to scalar scalar profile = 0.0; - forAll(cellBandwidth, cellI) + forAll(cellBandwidth, celli) { - profile += 1.0*cellBandwidth[cellI]; + profile += 1.0*cellBandwidth[celli]; } return Tuple2<label, scalar>(bandwidth, profile); diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C index 537746ed20a6a8c0f0136d012184a019274e710f..715fb420bac95012c9960e1bacd2d4ff7ad3a73b 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixATmul.C @@ -184,12 +184,12 @@ void Foam::lduMatrix::sumA // Add the interface internal coefficients to diagonal // and the interface boundary coefficients to the sum-off-diagonal - forAll(interfaces, patchI) + forAll(interfaces, patchi) { - if (interfaces.set(patchI)) + if (interfaces.set(patchi)) { - const labelUList& pa = lduAddr().patchAddr(patchI); - const scalarField& pCoeffs = interfaceBouCoeffs[patchI]; + const labelUList& pa = lduAddr().patchAddr(patchi); + const scalarField& pCoeffs = interfaceBouCoeffs[patchi]; forAll(pa, face) { diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C index 481e5047342a328cc8f86a54f8d6fc2bb03ccd5c..3709218436bd727d1dc6de4b5df400b21e33dd83 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixUpdateMatrixInterfaces.C @@ -42,15 +42,15 @@ void Foam::lduMatrix::initMatrixInterfaces || Pstream::defaultCommsType == Pstream::nonBlocking ) { - forAll(interfaces, interfaceI) + forAll(interfaces, interfacei) { - if (interfaces.set(interfaceI)) + if (interfaces.set(interfacei)) { - interfaces[interfaceI].initInterfaceMatrixUpdate + interfaces[interfacei].initInterfaceMatrixUpdate ( result, psiif, - coupleCoeffs[interfaceI], + coupleCoeffs[interfacei], cmpt, Pstream::defaultCommsType ); @@ -65,18 +65,18 @@ void Foam::lduMatrix::initMatrixInterfaces // beyond the end of the schedule which only handles "normal" patches for ( - label interfaceI=patchSchedule.size()/2; - interfaceI<interfaces.size(); - interfaceI++ + label interfacei=patchSchedule.size()/2; + interfacei<interfaces.size(); + interfacei++ ) { - if (interfaces.set(interfaceI)) + if (interfaces.set(interfacei)) { - interfaces[interfaceI].initInterfaceMatrixUpdate + interfaces[interfacei].initInterfaceMatrixUpdate ( result, psiif, - coupleCoeffs[interfaceI], + coupleCoeffs[interfacei], cmpt, Pstream::blocking ); @@ -104,15 +104,15 @@ void Foam::lduMatrix::updateMatrixInterfaces { if (Pstream::defaultCommsType == Pstream::blocking) { - forAll(interfaces, interfaceI) + forAll(interfaces, interfacei) { - if (interfaces.set(interfaceI)) + if (interfaces.set(interfacei)) { - interfaces[interfaceI].updateInterfaceMatrix + interfaces[interfacei].updateInterfaceMatrix ( result, psiif, - coupleCoeffs[interfaceI], + coupleCoeffs[interfacei], cmpt, Pstream::defaultCommsType ); @@ -128,19 +128,19 @@ void Foam::lduMatrix::updateMatrixInterfaces { allUpdated = true; - forAll(interfaces, interfaceI) + forAll(interfaces, interfacei) { - if (interfaces.set(interfaceI)) + if (interfaces.set(interfacei)) { - if (!interfaces[interfaceI].updatedMatrix()) + if (!interfaces[interfacei].updatedMatrix()) { - if (interfaces[interfaceI].ready()) + if (interfaces[interfacei].ready()) { - interfaces[interfaceI].updateInterfaceMatrix + interfaces[interfacei].updateInterfaceMatrix ( result, psiif, - coupleCoeffs[interfaceI], + coupleCoeffs[interfacei], cmpt, Pstream::defaultCommsType ); @@ -179,19 +179,19 @@ void Foam::lduMatrix::updateMatrixInterfaces } // Consume - forAll(interfaces, interfaceI) + forAll(interfaces, interfacei) { if ( - interfaces.set(interfaceI) - && !interfaces[interfaceI].updatedMatrix() + interfaces.set(interfacei) + && !interfaces[interfacei].updatedMatrix() ) { - interfaces[interfaceI].updateInterfaceMatrix + interfaces[interfacei].updateInterfaceMatrix ( result, psiif, - coupleCoeffs[interfaceI], + coupleCoeffs[interfacei], cmpt, Pstream::defaultCommsType ); @@ -205,28 +205,28 @@ void Foam::lduMatrix::updateMatrixInterfaces // Loop over all the "normal" interfaces relating to standard patches forAll(patchSchedule, i) { - label interfaceI = patchSchedule[i].patch; + label interfacei = patchSchedule[i].patch; - if (interfaces.set(interfaceI)) + if (interfaces.set(interfacei)) { if (patchSchedule[i].init) { - interfaces[interfaceI].initInterfaceMatrixUpdate + interfaces[interfacei].initInterfaceMatrixUpdate ( result, psiif, - coupleCoeffs[interfaceI], + coupleCoeffs[interfacei], cmpt, Pstream::scheduled ); } else { - interfaces[interfaceI].updateInterfaceMatrix + interfaces[interfacei].updateInterfaceMatrix ( result, psiif, - coupleCoeffs[interfaceI], + coupleCoeffs[interfacei], cmpt, Pstream::scheduled ); @@ -238,18 +238,18 @@ void Foam::lduMatrix::updateMatrixInterfaces // beyond the end of the schedule which only handles "normal" patches for ( - label interfaceI=patchSchedule.size()/2; - interfaceI<interfaces.size(); - interfaceI++ + label interfacei=patchSchedule.size()/2; + interfacei<interfaces.size(); + interfacei++ ) { - if (interfaces.set(interfaceI)) + if (interfaces.set(interfacei)) { - interfaces[interfaceI].updateInterfaceMatrix + interfaces[interfacei].updateInterfaceMatrix ( result, psiif, - coupleCoeffs[interfaceI], + coupleCoeffs[interfacei], cmpt, Pstream::blocking ); diff --git a/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C b/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C index bb515bd15c6f8deed0c04596b1c1747f01ddb5d5..4c4ba4995f098cc0cb72e388b77a2e134b95fc15 100644 --- a/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.C +++ b/src/OpenFOAM/matrices/lduMatrix/smoothers/nonBlockingGaussSeidel/nonBlockingGaussSeidelSmoother.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 @@ -164,14 +164,14 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth label fStart; label fEnd = ownStartPtr[0]; - for (label cellI=0; cellI<blockStart; cellI++) + for (label celli=0; celli<blockStart; celli++) { // Start and end of this row fStart = fEnd; - fEnd = ownStartPtr[cellI + 1]; + fEnd = ownStartPtr[celli + 1]; // Get the accumulated neighbour side - curPsi = bPrimePtr[cellI]; + curPsi = bPrimePtr[celli]; // Accumulate the owner product side for (label curFace=fStart; curFace<fEnd; curFace++) @@ -180,7 +180,7 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth } // Finish current psi - curPsi /= diagPtr[cellI]; + curPsi /= diagPtr[celli]; // Distribute the neighbour side using current psi for (label curFace=fStart; curFace<fEnd; curFace++) @@ -188,7 +188,7 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth bPrimePtr[uPtr[curFace]] -= lowerPtr[curFace]*curPsi; } - psiPtr[cellI] = curPsi; + psiPtr[celli] = curPsi; } matrix_.updateMatrixInterfaces @@ -201,14 +201,14 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth ); // Update rest of the cells - for (label cellI=blockStart; cellI < nCells; cellI++) + for (label celli=blockStart; celli < nCells; celli++) { // Start and end of this row fStart = fEnd; - fEnd = ownStartPtr[cellI + 1]; + fEnd = ownStartPtr[celli + 1]; // Get the accumulated neighbour side - curPsi = bPrimePtr[cellI]; + curPsi = bPrimePtr[celli]; // Accumulate the owner product side for (label curFace=fStart; curFace<fEnd; curFace++) @@ -217,7 +217,7 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth } // Finish current psi - curPsi /= diagPtr[cellI]; + curPsi /= diagPtr[celli]; // Distribute the neighbour side using current psi for (label curFace=fStart; curFace<fEnd; curFace++) @@ -225,7 +225,7 @@ void Foam::nonBlockingGaussSeidelSmoother::smooth bPrimePtr[uPtr[curFace]] -= lowerPtr[curFace]*curPsi; } - psiPtr[cellI] = curPsi; + psiPtr[celli] = curPsi; } } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index 63bdd3a02185257d3d2aca34e1f905ce9125f49e..70efe48f4f981e879669673f4b607ddf4a2cef44 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -591,10 +591,10 @@ bool Foam::GAMGAgglomeration::checkRestriction { label nChanged = 0; - forAll(lower, faceI) + forAll(lower, facei) { - label own = lower[faceI]; - label nei = upper[faceI]; + label own = lower[facei]; + label nei = upper[facei]; if (restrict[own] == restrict[nei]) { @@ -625,13 +625,13 @@ bool Foam::GAMGAgglomeration::checkRestriction // Count number of regions/masters per coarse cell labelListList coarseToMasters(nCoarse); nNewCoarse = 0; - forAll(restrict, cellI) + forAll(restrict, celli) { - labelList& masters = coarseToMasters[restrict[cellI]]; + labelList& masters = coarseToMasters[restrict[celli]]; - if (findIndex(masters, master[cellI]) == -1) + if (findIndex(masters, master[celli]) == -1) { - masters.append(master[cellI]); + masters.append(master[celli]); nNewCoarse++; } } @@ -663,12 +663,12 @@ bool Foam::GAMGAgglomeration::checkRestriction } newRestrict.setSize(fineAddressing.size()); - forAll(restrict, cellI) + forAll(restrict, celli) { - label coarseI = restrict[cellI]; + label coarseI = restrict[celli]; - label index = findIndex(coarseToMasters[coarseI], master[cellI]); - newRestrict[cellI] = coarseToNewCoarse[coarseI][index]; + label index = findIndex(coarseToMasters[coarseI], master[celli]); + newRestrict[celli] = coarseToNewCoarse[coarseI][index]; } return false; diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C index 6c219acacdab844b6fe438faa04cdba852ff7a09..926dd147246f0132d87ff3fa43188abe9efdaaf2 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/GAMGProcAgglomeration/GAMGProcAgglomeration.C @@ -134,9 +134,9 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells ); labelList globalIndices(addr.size()); - forAll(globalIndices, cellI) + forAll(globalIndices, celli) { - globalIndices[cellI] = globalNumbering.toGlobal(myProcID, cellI); + globalIndices[celli] = globalNumbering.toGlobal(myProcID, celli); } @@ -191,10 +191,10 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells const labelUList& own = addr.lowerAddr(); { - forAll(nbr, faceI) + forAll(nbr, facei) { - nNbrs[nbr[faceI]]++; - nNbrs[own[faceI]]++; + nNbrs[nbr[facei]]++; + nNbrs[own[facei]]++; } forAll(interfaces, inti) @@ -215,19 +215,19 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells // Create cell-cells addressing labelListList cellCells(addr.size()); - forAll(cellCells, cellI) + forAll(cellCells, celli) { - cellCells[cellI].setSize(nNbrs[cellI], -1); + cellCells[celli].setSize(nNbrs[celli], -1); } // Reset the list of number of neighbours to zero nNbrs = 0; // Scatter the neighbour faces - forAll(nbr, faceI) + forAll(nbr, facei) { - label c0 = own[faceI]; - label c1 = nbr[faceI]; + label c0 = own[facei]; + label c1 = nbr[facei]; cellCells[c0][nNbrs[c0]++] = globalIndices[c1]; cellCells[c1][nNbrs[c1]++] = globalIndices[c0]; @@ -246,15 +246,15 @@ Foam::labelListList Foam::GAMGProcAgglomeration::globalCellCells } } - forAll(cellCells, cellI) + forAll(cellCells, celli) { - Foam::stableSort(cellCells[cellI]); + Foam::stableSort(cellCells[celli]); } // Replace the initial element (always -1) with the local cell - forAll(cellCells, cellI) + forAll(cellCells, celli) { - cellCells[cellI][0] = globalIndices[cellI]; + cellCells[celli][0] = globalIndices[celli]; } return cellCells; 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 ddd79ad6ab003b4d5d18c3a6aa2a77cab7442d1a..47bd3ba08ea175998cd0a07edb69951a885a4037 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGProcAgglomerations/procFacesGAMGProcAgglomeration/procFacesGAMGProcAgglomeration.C @@ -181,10 +181,10 @@ Foam::procFacesGAMGProcAgglomeration::processorAgglomeration ); labelList coarseToMaster(nCoarseProcs, labelMax); - forAll(fineToCoarse, cellI) + forAll(fineToCoarse, celli) { - label coarseI = fineToCoarse[cellI]; - coarseToMaster[coarseI] = min(coarseToMaster[coarseI], cellI); + label coarseI = fineToCoarse[celli]; + coarseToMaster[coarseI] = min(coarseToMaster[coarseI], celli); } // Sort according to master and redo restriction diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C index d6df8be62922d7dd2e313efebfc0d1eaf3f1de19..06cb0c59b603ad6714d7563e5d6f86ff8ded140b 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverAgglomerateMatrix.C @@ -721,11 +721,11 @@ void Foam::GAMGSolver::procAgglomerateMatrix // // //const scalarField& bouCoeffs = allInterfaceBouCoeffs[intI]; // //const scalarField& intCoeffs = allInterfaceIntCoeffs[intI]; - // //forAll(bouCoeffs, faceI) + // //forAll(bouCoeffs, facei) // //{ - // // Pout<< " " << faceI - // // << "\tbou:" << bouCoeffs[faceI] - // // << "\tint:" << intCoeffs[faceI] + // // Pout<< " " << facei + // // << "\tbou:" << bouCoeffs[facei] + // // << "\tint:" << intCoeffs[facei] // // << endl; // //} // } diff --git a/src/OpenFOAM/meshes/bandCompression/bandCompression.C b/src/OpenFOAM/meshes/bandCompression/bandCompression.C index 339938fb7c03ed2d9743ca9a36ffba956b08b913..44ed6a1ba91cf0b22f179e4b4c08d0fc8619e862 100644 --- a/src/OpenFOAM/meshes/bandCompression/bandCompression.C +++ b/src/OpenFOAM/meshes/bandCompression/bandCompression.C @@ -68,15 +68,15 @@ Foam::labelList Foam::bandCompression(const labelListList& cellCellAddressing) label currentCell = -1; label minWeight = labelMax; - forAll(visited, cellI) + forAll(visited, celli) { // find the lowest connected cell that has not been visited yet - if (!visited[cellI]) + if (!visited[celli]) { - if (cellCellAddressing[cellI].size() < minWeight) + if (cellCellAddressing[celli].size() < minWeight) { - minWeight = cellCellAddressing[cellI].size(); - currentCell = cellI; + minWeight = cellCellAddressing[celli].size(); + currentCell = celli; } } } @@ -153,15 +153,15 @@ Foam::labelList Foam::bandCompression { // Count number of neighbours labelList numNbrs(offsets.size()-1, 0); - forAll(numNbrs, cellI) + forAll(numNbrs, celli) { - label start = offsets[cellI]; - label end = offsets[cellI+1]; + label start = offsets[celli]; + label end = offsets[celli+1]; - for (label faceI = start; faceI < end; faceI++) + for (label facei = start; facei < end; facei++) { - numNbrs[cellI]++; - numNbrs[cellCells[faceI]]++; + numNbrs[celli]++; + numNbrs[cellCells[facei]]++; } } @@ -193,15 +193,15 @@ Foam::labelList Foam::bandCompression label currentCell = -1; label minWeight = labelMax; - forAll(visited, cellI) + forAll(visited, celli) { // find the lowest connected cell that has not been visited yet - if (!visited[cellI]) + if (!visited[celli]) { - if (numNbrs[cellI] < minWeight) + if (numNbrs[celli] < minWeight) { - minWeight = numNbrs[cellI]; - currentCell = cellI; + minWeight = numNbrs[celli]; + currentCell = celli; } } } @@ -245,9 +245,9 @@ Foam::labelList Foam::bandCompression label start = offsets[currentCell]; label end = offsets[currentCell+1]; - for (label faceI = start; faceI < end; faceI++) + for (label facei = start; facei < end; facei++) { - label nbr = cellCells[faceI]; + label nbr = cellCells[facei]; if (!visited[nbr]) { // not visited, add to the list diff --git a/src/OpenFOAM/meshes/lduMesh/lduMesh.C b/src/OpenFOAM/meshes/lduMesh/lduMesh.C index 200f7e525fa9e90672df7517eeb74508e208f5ca..b3250d6b05f75aa945e1e205be3aad64ff5655a1 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduMesh.C +++ b/src/OpenFOAM/meshes/lduMesh/lduMesh.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,10 +101,10 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const InfoProxy<lduMesh>& ip) { const labelList& l = addr.lowerAddr(); const labelList& u = addr.upperAddr(); - forAll(l, faceI) + forAll(l, facei) { - os << " face:" << faceI << " l:" << l[faceI] - << " u:" << u[faceI] << endl; + os << " face:" << facei << " l:" << l[facei] + << " u:" << u[facei] << endl; } forAll(interfaces, i) { diff --git a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C index bdd4dbe09f3d69bfc5c5fe8775b25829540f3c7e..37066914ec95a666014f180b5216aa6741c0fdd6 100644 --- a/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C +++ b/src/OpenFOAM/meshes/lduMesh/lduPrimitiveMesh.C @@ -64,45 +64,45 @@ void Foam::lduPrimitiveMesh::checkUpperTriangular const labelUList& u ) { - forAll(l, faceI) + forAll(l, facei) { - if (u[faceI] < l[faceI]) + if (u[facei] < l[facei]) { FatalErrorInFunction - << "Reversed face. Problem at face " << faceI - << " l:" << l[faceI] << " u:" << u[faceI] + << "Reversed face. Problem at face " << facei + << " l:" << l[facei] << " u:" << u[facei] << abort(FatalError); } - if (l[faceI] < 0 || u[faceI] < 0 || u[faceI] >= size) + if (l[facei] < 0 || u[facei] < 0 || u[facei] >= size) { FatalErrorInFunction - << "Illegal cell label. Problem at face " << faceI - << " l:" << l[faceI] << " u:" << u[faceI] + << "Illegal cell label. Problem at face " << facei + << " l:" << l[facei] << " u:" << u[facei] << abort(FatalError); } } - for (label faceI=1; faceI < l.size(); faceI++) + for (label facei=1; facei < l.size(); facei++) { - if (l[faceI-1] > l[faceI]) + if (l[facei-1] > l[facei]) { FatalErrorInFunction << "Lower not in incremental cell order." - << " Problem at face " << faceI - << " l:" << l[faceI] << " u:" << u[faceI] - << " previous l:" << l[faceI-1] + << " Problem at face " << facei + << " l:" << l[facei] << " u:" << u[facei] + << " previous l:" << l[facei-1] << abort(FatalError); } - else if (l[faceI-1] == l[faceI]) + else if (l[facei-1] == l[facei]) { // Same cell. - if (u[faceI-1] > u[faceI]) + if (u[facei-1] > u[facei]) { FatalErrorInFunction << "Upper not in incremental cell order." - << " Problem at face " << faceI - << " l:" << l[faceI] << " u:" << u[faceI] - << " previous u:" << u[faceI-1] + << " Problem at face " << facei + << " l:" << l[facei] << " u:" << u[facei] + << " previous u:" << u[facei-1] << abort(FatalError); } } @@ -135,34 +135,34 @@ Foam::labelList Foam::lduPrimitiveMesh::upperTriOrder labelList nNbrs(nCells, 0); // Count number of upper neighbours - forAll(lower, faceI) + forAll(lower, facei) { - if (upper[faceI] < lower[faceI]) + if (upper[facei] < lower[facei]) { FatalErrorInFunction - << "Problem at face:" << faceI - << " lower:" << lower[faceI] - << " upper:" << upper[faceI] + << "Problem at face:" << facei + << " lower:" << lower[facei] + << " upper:" << upper[facei] << exit(FatalError); } - nNbrs[lower[faceI]]++; + nNbrs[lower[facei]]++; } // Construct cell-upper cell addressing labelList offsets(nCells+1); offsets[0] = 0; - forAll(nNbrs, cellI) + forAll(nNbrs, celli) { - offsets[cellI+1] = offsets[cellI]+nNbrs[cellI]; + offsets[celli+1] = offsets[celli]+nNbrs[celli]; } nNbrs = offsets; labelList cellToFaces(offsets.last()); - forAll(upper, faceI) + forAll(upper, facei) { - label cellI = lower[faceI]; - cellToFaces[nNbrs[cellI]++] = faceI; + label celli = lower[facei]; + cellToFaces[nNbrs[celli]++] = facei; } // Sort @@ -174,16 +174,16 @@ Foam::labelList Foam::lduPrimitiveMesh::upperTriOrder label newFaceI = 0; - for (label cellI = 0; cellI < nCells; cellI++) + for (label celli = 0; celli < nCells; celli++) { - label startOfCell = offsets[cellI]; - label nNbr = offsets[cellI+1] - startOfCell; + label startOfCell = offsets[celli]; + label nNbr = offsets[celli+1] - startOfCell; nbr.setSize(nNbr); order.setSize(nNbr); forAll(order, i) { - nbr[i] = upper[cellToFaces[offsets[cellI]+i]]; + nbr[i] = upper[cellToFaces[offsets[celli]+i]]; } sortedOrder(nbr, order); @@ -509,18 +509,18 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh forAll(elems, i) { label procMeshI = elems[i][0]; - label interfaceI = elems[i][1]; + label interfacei = elems[i][1]; const lduInterfacePtrsList interfaces = mesh(myMesh, otherMeshes, procMeshI).interfaces(); const processorLduInterface& pldui = refCast<const processorLduInterface> ( - interfaces[interfaceI] + interfaces[interfacei] ); Pout<< " proc:" << procIDs[procMeshI] - << " interfaceI:" << interfaceI + << " interfacei:" << interfacei << " between:" << pldui.myProcNo() << " and:" << pldui.neighbProcNo() << endl; @@ -539,17 +539,17 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh forAll(elems, i) { label procMeshI = elems[i][0]; - label interfaceI = elems[i][1]; + label interfacei = elems[i][1]; const lduInterfacePtrsList interfaces = mesh(myMesh, otherMeshes, procMeshI).interfaces(); const processorLduInterface& pldui = refCast<const processorLduInterface> ( - interfaces[interfaceI] + interfaces[interfacei] ); Pout<< " proc:" << procIDs[procMeshI] - << " interfaceI:" << interfaceI + << " interfacei:" << interfacei << " between:" << pldui.myProcNo() << " and:" << pldui.neighbProcNo() << endl; @@ -600,10 +600,10 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh // Add internal faces label allFaceI = faceOffsets[procMeshI]; - forAll(l, faceI) + forAll(l, facei) { - lowerAddr_[allFaceI] = cellOffsets[procMeshI]+l[faceI]; - upperAddr_[allFaceI] = cellOffsets[procMeshI]+u[faceI]; + lowerAddr_[allFaceI] = cellOffsets[procMeshI]+l[facei]; + upperAddr_[allFaceI] = cellOffsets[procMeshI]+u[facei]; allFaceI++; } @@ -647,7 +647,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh forAll(elems, i) { label procI = elems[i][0]; - label interfaceI = elems[i][1]; + label interfacei = elems[i][1]; const lduInterfacePtrsList interfaces = mesh ( @@ -658,7 +658,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh const processorLduInterface& pldui = refCast<const processorLduInterface> ( - interfaces[interfaceI] + interfaces[interfacei] ); if @@ -795,7 +795,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh interfaces_.setSize(unmergedMap.size() + nOtherInterfaces); primitiveInterfaces_.setSize(interfaces_.size()); - label allInterfaceI = 0; + label allInterfacei = 0; forAllConstIter(EdgeMap<labelPairList>, unmergedMap, iter) { @@ -808,7 +808,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh { const labelPair& elem = elems[i]; label procMeshI = elem[0]; - label interfaceI = elem[1]; + label interfacei = elem[1]; const lduInterfacePtrsList interfaces = mesh ( myMesh, @@ -819,7 +819,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh const processorLduInterface& pldui = refCast<const processorLduInterface> ( - interfaces[interfaceI] + interfaces[interfacei] ); label myProcNo = pldui.myProcNo(); label nbrProcNo = pldui.neighbProcNo(); @@ -840,7 +840,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh { const labelPair& elem = elems[order[i]]; label procMeshI = elem[0]; - label interfaceI = elem[1]; + label interfacei = elem[1]; const lduInterfacePtrsList interfaces = mesh ( myMesh, @@ -848,7 +848,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh procMeshI ).interfaces(); - n += interfaces[interfaceI].faceCells().size(); + n += interfaces[interfacei].faceCells().size(); } // Size @@ -861,7 +861,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh { const labelPair& elem = elems[order[i]]; label procMeshI = elem[0]; - label interfaceI = elem[1]; + label interfacei = elem[1]; const lduInterfacePtrsList interfaces = mesh ( myMesh, @@ -869,17 +869,17 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh procMeshI ).interfaces(); - boundaryMap[procMeshI][interfaceI] = allInterfaceI; - labelList& bfMap = boundaryFaceMap[procMeshI][interfaceI]; + boundaryMap[procMeshI][interfacei] = allInterfacei; + labelList& bfMap = boundaryFaceMap[procMeshI][interfacei]; - const labelUList& l = interfaces[interfaceI].faceCells(); + const labelUList& l = interfaces[interfacei].faceCells(); bfMap.setSize(l.size()); - forAll(l, faceI) + forAll(l, facei) { - allFaceCells[n] = cellOffsets[procMeshI]+l[faceI]; + allFaceCells[n] = cellOffsets[procMeshI]+l[facei]; allFaceRestrictAddressing[n] = n; - bfMap[faceI] = n; + bfMap[facei] = n; n++; } } @@ -916,10 +916,10 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh primitiveInterfaces_.set ( - allInterfaceI, + allInterfacei, new processorGAMGInterface ( - allInterfaceI, + allInterfacei, interfaces_, allFaceCells, allFaceRestrictAddressing, @@ -930,12 +930,12 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh Pstream::msgType() // tag ) ); - interfaces_.set(allInterfaceI, &primitiveInterfaces_[allInterfaceI]); + interfaces_.set(allInterfacei, &primitiveInterfaces_[allInterfacei]); if (debug) { - Pout<< "Created " << interfaces_[allInterfaceI].type() - << " interface at " << allInterfaceI + Pout<< "Created " << interfaces_[allInterfacei].type() + << " interface at " << allInterfacei << " comm:" << comm_ << " myProcNo:" << myAgglom << " neighbProcNo:" << neighbProcNo @@ -944,7 +944,7 @@ Foam::lduPrimitiveMesh::lduPrimitiveMesh } - allInterfaceI++; + allInterfacei++; } diff --git a/src/OpenFOAM/meshes/meshShapes/cell/cell.C b/src/OpenFOAM/meshes/meshShapes/cell/cell.C index aa2e0261419f755848b9f02f5aa6d97b89007b56..198cd3762bcf7e24a5e5c2351f30dfcf245c773f 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/cell.C +++ b/src/OpenFOAM/meshes/meshShapes/cell/cell.C @@ -41,9 +41,9 @@ Foam::labelList Foam::cell::labels(const faceUList& f) const const labelList& faces = *this; - forAll(faces, faceI) + forAll(faces, facei) { - maxVert += f[faces[faceI]].size(); + maxVert += f[faces[facei]].size(); } // set the fill-in list @@ -63,9 +63,9 @@ Foam::labelList Foam::cell::labels(const faceUList& f) const // go through the rest of the faces. For each vertex, check if the point is // already inserted (up to maxVert, which now carries the number of real // points. If not, add it at the end of the list. - for (label faceI = 1; faceI < faces.size(); faceI++) + for (label facei = 1; facei < faces.size(); facei++) { - const labelList& curFace = f[faces[faceI]]; + const labelList& curFace = f[faces[facei]]; forAll(curFace, pointI) { @@ -126,17 +126,17 @@ Foam::edgeList Foam::cell::edges(const faceUList& f) const // create a list of edges label maxNoEdges = 0; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - maxNoEdges += f[curFaces[faceI]].nEdges(); + maxNoEdges += f[curFaces[facei]].nEdges(); } edgeList allEdges(maxNoEdges); label nEdges = 0; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - const edgeList curFaceEdges = f[curFaces[faceI]].edges(); + const edgeList curFaceEdges = f[curFaces[facei]].edges(); forAll(curFaceEdges, faceEdgeI) { @@ -197,10 +197,10 @@ Foam::point Foam::cell::centre const labelList& faces = *this; - forAll(faces, faceI) + forAll(faces, facei) { - scalar a = f[faces[faceI]].mag(p); - cEst += f[faces[faceI]].centre(p)*a; + scalar a = f[faces[facei]].mag(p); + cEst += f[faces[facei]].centre(p)*a; sumArea += a; } @@ -212,13 +212,13 @@ Foam::point Foam::cell::centre scalar sumV = 0; - forAll(faces, faceI) + forAll(faces, facei) { // calculate pyramid volume. If it is greater than zero, OK. // If not, the pyramid is inside-out. Create a face with the opposite // order and recalculate pyramid centre! - scalar pyrVol = pyramidPointFaceRef(f[faces[faceI]], cEst).mag(p); - vector pyrCentre = pyramidPointFaceRef(f[faces[faceI]], cEst).centre(p); + scalar pyrVol = pyramidPointFaceRef(f[faces[facei]], cEst).mag(p); + vector pyrCentre = pyramidPointFaceRef(f[faces[facei]], cEst).centre(p); // if pyramid inside-out because face points inwards invert // N.B. pyramid remains unchanged @@ -256,9 +256,9 @@ Foam::scalar Foam::cell::mag const labelList& faces = *this; - forAll(faces, faceI) + forAll(faces, facei) { - cEst += f[faces[faceI]].centre(p); + cEst += f[faces[facei]].centre(p); nCellFaces += 1; } @@ -267,9 +267,9 @@ Foam::scalar Foam::cell::mag // Calculate the magnitude by summing the mags of the pyramids scalar v = 0; - forAll(faces, faceI) + forAll(faces, facei) { - v += ::Foam::mag(pyramidPointFaceRef(f[faces[faceI]], cEst).mag(p)); + v += ::Foam::mag(pyramidPointFaceRef(f[faces[facei]], cEst).mag(p)); } return v; diff --git a/src/OpenFOAM/meshes/meshShapes/cell/oppositeCellFace.C b/src/OpenFOAM/meshes/meshShapes/cell/oppositeCellFace.C index bca4477ada3adc66595447284b69878c41d2cef9..2cb46ef3a762b4a09bd2a12d16c29cb16cf59a30 100644 --- a/src/OpenFOAM/meshes/meshShapes/cell/oppositeCellFace.C +++ b/src/OpenFOAM/meshes/meshShapes/cell/oppositeCellFace.C @@ -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 @@ -54,15 +54,15 @@ Foam::label Foam::cell::opposingFaceLabel label oppositeFaceLabel = -1; - forAll(curFaceLabels, faceI) + forAll(curFaceLabels, facei) { // Compare the face with the master - const face& curFace = meshFaces[curFaceLabels[faceI]]; + const face& curFace = meshFaces[curFaceLabels[facei]]; // Skip the master face if ( - curFaceLabels[faceI] != masterFaceLabel + curFaceLabels[facei] != masterFaceLabel && curFace.size() == masterFace.size() ) { @@ -92,7 +92,7 @@ Foam::label Foam::cell::opposingFaceLabel if (oppositeFaceLabel == -1) { // Found opposite face - oppositeFaceLabel = curFaceLabels[faceI]; + oppositeFaceLabel = curFaceLabels[facei]; } else { @@ -100,7 +100,7 @@ Foam::label Foam::cell::opposingFaceLabel // Non-prismatic cell Info<< "Multiple faces not sharing vertex: " << oppositeFaceLabel << " and " - << curFaceLabels[faceI] << endl; + << curFaceLabels[facei] << endl; return -1; } } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C index 5a048dc0e345869d14a235e33e746a9ff82c5b60..06c9d3e4c2da5c54f2e05e900b69130af0bb5fd8 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C @@ -54,9 +54,9 @@ Foam::cellMatcher::cellMatcher cellModelName_(cellModelName), cellModelPtr_(NULL) { - forAll(localFaces_, faceI) + forAll(localFaces_, facei) { - face& f = localFaces_[faceI]; + face& f = localFaces_[facei]; f.setSize(maxVertPerFace); } @@ -83,9 +83,9 @@ Foam::label Foam::cellMatcher::calcLocalFaces label newVertI = 0; forAll(myFaces, myFaceI) { - label faceI = myFaces[myFaceI]; + label facei = myFaces[myFaceI]; - const face& f = faces[faceI]; + const face& f = faces[facei]; face& localFace = localFaces_[myFaceI]; // Size of localFace @@ -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 @@ -248,13 +248,13 @@ void Foam::cellMatcher::write(Foam::Ostream& os) const { os << "Faces:" << endl; - forAll(localFaces_, faceI) + forAll(localFaces_, facei) { os << " "; - for (label fp = 0; fp < faceSize_[faceI]; fp++) + for (label fp = 0; fp < faceSize_[facei]; fp++) { - os << ' ' << localFaces_[faceI][fp]; + os << ' ' << localFaces_[facei][fp]; } os << endl; } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H index 36e6b45a1b238fc54c3d52bbd7799d44855ba683..f8aafaebaabf4c710c850cd8d65386aebb2c8512 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.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 @@ -35,7 +35,7 @@ Description hexMatcher hex(mesh); cellShape shape; .. - bool isHex = hex.match(cellI, shape); + bool isHex = hex.match(celli, shape); \endverbatim Now shape is set to the correct Hex cellShape (if \a isHex is true) @@ -242,20 +242,20 @@ public: // matching. Returns true and sets vertLabels_. // Needs faces, faceOwner of all faces in 'mesh' and cell number // and labels of faces for this cell. - // cellI only used in combination with faceOwner to detect owner + // celli only used in combination with faceOwner to detect owner // status. virtual bool matchShape ( const bool checkOnly, const faceList& faces, const labelList& faceOwner, - const label cellI, + const label celli, const labelList& myFaces ) = 0; //- Exact match. Uses faceSizeMatch. // Returns true if cell matches shape exactly. - virtual bool isA(const primitiveMesh& mesh, const label cellI) = 0; + virtual bool isA(const primitiveMesh& mesh, const label celli) = 0; //- Exact match given all the faces forming a cell. No checks // on whether faces match up and form a closed shape. @@ -265,7 +265,7 @@ public: virtual bool matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ) = 0; diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C index 0b10206c4364a024f8ec1cd239bcd8ef3fd5f8e9..bf8c545abf0ebace93e2e44c90c162603940924f 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.C @@ -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 @@ -40,33 +40,33 @@ Foam::cellShape Foam::degenerateMatcher::match ( const faceList& faces, const labelList& owner, - const label cellI, + const label celli, const labelList& cellFaces ) { // Recognize in order of assumed occurrence. - if (hex.matchShape(false, faces, owner, cellI, cellFaces)) + if (hex.matchShape(false, faces, owner, celli, cellFaces)) { return cellShape(hex.model(), hex.vertLabels()); } - else if (tet.matchShape(false, faces, owner, cellI, cellFaces)) + else if (tet.matchShape(false, faces, owner, celli, cellFaces)) { return cellShape(tet.model(), tet.vertLabels()); } - else if (prism.matchShape(false, faces, owner, cellI, cellFaces)) + else if (prism.matchShape(false, faces, owner, celli, cellFaces)) { return cellShape(prism.model(), prism.vertLabels()); } - else if (pyr.matchShape(false, faces, owner, cellI, cellFaces)) + else if (pyr.matchShape(false, faces, owner, celli, cellFaces)) { return cellShape(pyr.model(), pyr.vertLabels()); } - else if (wedge.matchShape(false, faces, owner, cellI, cellFaces)) + else if (wedge.matchShape(false, faces, owner, celli, cellFaces)) { return cellShape(wedge.model(), wedge.vertLabels()); } - else if (tetWedge.matchShape(false, faces, owner, cellI, cellFaces)) + else if (tetWedge.matchShape(false, faces, owner, celli, cellFaces)) { return cellShape(tetWedge.model(), tetWedge.vertLabels()); } @@ -100,15 +100,15 @@ Foam::cellShape Foam::degenerateMatcher::match(const cellShape& shape) Foam::cellShape Foam::degenerateMatcher::match ( const primitiveMesh& mesh, - const label cellI + const label celli ) { return match ( mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ); } diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.H index cb3e6ff02dee3c5ba724f4435c52612fcf628a9c..4513870b64aa0c5b57ccc5fd5e7eaa7bf7163998 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/degenerateMatcher.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 @@ -75,7 +75,7 @@ class degenerateMatcher ( const faceList& faces, const labelList& faceOwner, - const label cellI, + const label celli, const labelList& cellFaces ); @@ -90,8 +90,8 @@ public: // vertices. cellShape just used to extract faces. static cellShape match(const cellShape& shape); - //- Recognize shape given mesh and cellI - static cellShape match(const primitiveMesh& mesh, const label cellI); + //- Recognize shape given mesh and celli + static cellShape match(const primitiveMesh& mesh, const label celli); }; diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C index 38eba8b3b06a2bb52463150aa714d1ceceec069a..a6f03ba93688aaf738d33de2ed33e1b95941eb73 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.C @@ -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 @@ -61,7 +61,7 @@ bool Foam::hexMatcher::matchShape const bool checkOnly, const faceList& faces, const labelList& owner, - const label cellI, + const label celli, const labelList& myFaces ) { @@ -115,7 +115,7 @@ bool Foam::hexMatcher::matchShape ( face4vert0, faceSize_[face4I], - !(owner[faceMap_[face4I]] == cellI) + !(owner[faceMap_[face4I]] == celli) ); vertLabels_[1] = pointMap_[face4[face4vert1]]; @@ -125,7 +125,7 @@ bool Foam::hexMatcher::matchShape ( face4vert1, faceSize_[face4I], - !(owner[faceMap_[face4I]] == cellI) + !(owner[faceMap_[face4I]] == celli) ); vertLabels_[2] = pointMap_[face4[face4vert2]]; @@ -135,7 +135,7 @@ bool Foam::hexMatcher::matchShape ( face4vert2, faceSize_[face4I], - !(owner[faceMap_[face4I]] == cellI) + !(owner[faceMap_[face4I]] == celli) ); vertLabels_[3] = pointMap_[face4[face4vert3]]; @@ -159,7 +159,7 @@ bool Foam::hexMatcher::matchShape ( face0vert0, faceSize_[face0I], - (owner[faceMap_[face0I]] == cellI) + (owner[faceMap_[face0I]] == celli) ); vertLabels_[4] = pointMap_[face0[face0vert4]]; @@ -169,7 +169,7 @@ bool Foam::hexMatcher::matchShape ( face0vert4, faceSize_[face0I], - (owner[faceMap_[face0I]] == cellI) + (owner[faceMap_[face0I]] == celli) ); vertLabels_[7] = pointMap_[face0[face0vert7]]; @@ -193,7 +193,7 @@ bool Foam::hexMatcher::matchShape ( face5vert4, faceSize_[face5I], - (owner[faceMap_[face5I]] == cellI) + (owner[faceMap_[face5I]] == celli) ); vertLabels_[5] = pointMap_[face5[face5vert5]]; @@ -203,7 +203,7 @@ bool Foam::hexMatcher::matchShape ( face5vert5, faceSize_[face5I], - (owner[faceMap_[face5I]] == cellI) + (owner[faceMap_[face5I]] == celli) ); vertLabels_[6] = pointMap_[face5[face5vert6]]; @@ -275,15 +275,15 @@ bool Foam::hexMatcher::faceSizeMatch } -bool Foam::hexMatcher::isA(const primitiveMesh& mesh, const label cellI) +bool Foam::hexMatcher::isA(const primitiveMesh& mesh, const label celli) { return matchShape ( true, mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ); } @@ -305,7 +305,7 @@ bool Foam::hexMatcher::isA(const faceList& faces) bool Foam::hexMatcher::matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ) { @@ -316,8 +316,8 @@ bool Foam::hexMatcher::matches false, mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ) ) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.H index cbe7cac4d71914b1ae4fdd3a63a142d7dab5a0ed..3a656ce6010fe4b874c244be67f2ce412f24484e 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/hexMatcher.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 @@ -107,18 +107,18 @@ public: const bool checkOnly, const faceList& faces, const labelList& faceOwner, - const label cellI, + const label celli, const labelList& myFaces ); - virtual bool isA(const primitiveMesh& mesh, const label cellI); + virtual bool isA(const primitiveMesh& mesh, const label celli); virtual bool isA(const faceList&); virtual bool matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ); }; diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C index 0c6fefe7b34c560c3caf97533a113a0e11112ae0..ba9e9148b034b22709075852d8201bf322d35f07 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.C @@ -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 @@ -59,7 +59,7 @@ bool Foam::prismMatcher::matchShape const bool checkOnly, const faceList& faces, const labelList& owner, - const label cellI, + const label celli, const labelList& myFaces ) { @@ -93,11 +93,11 @@ bool Foam::prismMatcher::matchShape // label face0I = -1; - forAll(faceSize_, faceI) + forAll(faceSize_, facei) { - if (faceSize_[faceI] == 3) + if (faceSize_[facei] == 3) { - face0I = faceI; + face0I = facei; break; } } @@ -122,7 +122,7 @@ bool Foam::prismMatcher::matchShape ( face0vert0, faceSize_[face0I], - !(owner[faceMap_[face0I]] == cellI) + !(owner[faceMap_[face0I]] == celli) ); vertLabels_[1] = pointMap_[face0[face0vert1]]; //Info<< "Prism vertex 1: vertex " << face0[face0vert1] @@ -164,7 +164,7 @@ bool Foam::prismMatcher::matchShape ( face4vert1, faceSize_[face4I], - (owner[faceMap_[face4I]] == cellI) + (owner[faceMap_[face4I]] == celli) ); vertLabels_[4] = pointMap_[face4[face4vert4]]; //Info<< "Prism vertex 4: vertex " << face4[face4vert4] @@ -177,7 +177,7 @@ bool Foam::prismMatcher::matchShape ( face4vert4, faceSize_[face4I], - (owner[faceMap_[face4I]] == cellI) + (owner[faceMap_[face4I]] == celli) ); vertLabels_[3] = pointMap_[face4[face4vert3]]; //Info<< "Prism vertex 3: vertex " << face4[face4vert3] @@ -226,7 +226,7 @@ bool Foam::prismMatcher::matchShape ( face0vert1, faceSize_[face0I], - !(owner[faceMap_[face0I]] == cellI) + !(owner[faceMap_[face0I]] == celli) ); vertLabels_[2] = pointMap_[face0[face0vert2]]; //Info<< "Prism vertex 2: vertex " << face0[face0vert2] @@ -260,7 +260,7 @@ bool Foam::prismMatcher::matchShape ( face3vert2, faceSize_[face3I], - (owner[faceMap_[face3I]] == cellI) + (owner[faceMap_[face3I]] == celli) ); vertLabels_[5] = pointMap_[face3[face3vert5]]; //Info<< "Prism vertex 5: vertex " << face3[face3vert5] @@ -340,15 +340,15 @@ bool Foam::prismMatcher::faceSizeMatch } -bool Foam::prismMatcher::isA(const primitiveMesh& mesh, const label cellI) +bool Foam::prismMatcher::isA(const primitiveMesh& mesh, const label celli) { return matchShape ( true, mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ); } @@ -370,7 +370,7 @@ bool Foam::prismMatcher::isA(const faceList& faces) bool Foam::prismMatcher::matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ) { @@ -381,8 +381,8 @@ bool Foam::prismMatcher::matches false, mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ) ) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.H index e30aa6bafaac489538f4e0b856285397479ce3c0..8e69686418e87d29824207892bdf9f4a0de0d83d 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/prismMatcher.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 @@ -107,18 +107,18 @@ public: const bool checkOnly, const faceList& faces, const labelList& faceOwner, - const label cellI, + const label celli, const labelList& myFaces ); - virtual bool isA(const primitiveMesh& mesh, const label cellI); + virtual bool isA(const primitiveMesh& mesh, const label celli); virtual bool isA(const faceList&); virtual bool matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ); }; diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C index 68278af08b9e41aaa84e5b2d38e6c0762cb7a4b1..12e1b40eb9267bd8c6391ff4748161b0f0bcdb8d 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.C @@ -64,7 +64,7 @@ bool Foam::pyrMatcher::matchShape const bool checkOnly, const faceList& faces, const labelList& owner, - const label cellI, + const label celli, const labelList& myFaces ) { @@ -102,11 +102,11 @@ bool Foam::pyrMatcher::matchShape // label face0I = -1; - forAll(faceSize_, faceI) + forAll(faceSize_, facei) { - if (faceSize_[faceI] == 4) + if (faceSize_[facei] == 4) { - face0I = faceI; + face0I = facei; break; } } @@ -128,7 +128,7 @@ bool Foam::pyrMatcher::matchShape ( face0vert0, faceSize_[face0I], - !(owner[faceMap_[face0I]] == cellI) + !(owner[faceMap_[face0I]] == celli) ); vertLabels_[1] = pointMap_[face0[face0vert1]]; @@ -138,7 +138,7 @@ bool Foam::pyrMatcher::matchShape ( face0vert1, faceSize_[face0I], - !(owner[faceMap_[face0I]] == cellI) + !(owner[faceMap_[face0I]] == celli) ); vertLabels_[2] = pointMap_[face0[face0vert2]]; @@ -148,7 +148,7 @@ bool Foam::pyrMatcher::matchShape ( face0vert2, faceSize_[face0I], - !(owner[faceMap_[face0I]] == cellI) + !(owner[faceMap_[face0I]] == celli) ); vertLabels_[3] = pointMap_[face0[face0vert3]]; @@ -207,7 +207,7 @@ bool Foam::pyrMatcher::matchShape ( face4vert0, faceSize_[face4I], - !(owner[faceMap_[face4I]] == cellI) + !(owner[faceMap_[face4I]] == celli) ); vertLabels_[4] = pointMap_[face4[face4vert4]]; @@ -264,15 +264,15 @@ bool Foam::pyrMatcher::faceSizeMatch } -bool Foam::pyrMatcher::isA(const primitiveMesh& mesh, const label cellI) +bool Foam::pyrMatcher::isA(const primitiveMesh& mesh, const label celli) { return matchShape ( true, mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ); } @@ -294,7 +294,7 @@ bool Foam::pyrMatcher::isA(const faceList& faces) bool Foam::pyrMatcher::matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ) { @@ -305,8 +305,8 @@ bool Foam::pyrMatcher::matches false, mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ) ) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.H index 69c8b7c1389ecc6ebf5f1e098d41125e30e58019..f39ee7583e14d21a21c2ad7006788c779ea4ec14 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/pyrMatcher.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 @@ -107,18 +107,18 @@ public: const bool checkOnly, const faceList& faces, const labelList& faceOwner, - const label cellI, + const label celli, const labelList& myFaces ); - virtual bool isA(const primitiveMesh& mesh, const label cellI); + virtual bool isA(const primitiveMesh& mesh, const label celli); virtual bool isA(const faceList&); virtual bool matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ); }; diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C index 8c6890769aaf2ddd372ec915b6ee3509584fa984..360b909ac954e3cc91ec0de567538a4e2c287515 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.C @@ -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 @@ -65,7 +65,7 @@ bool Foam::tetMatcher::matchShape const bool checkOnly, const faceList& faces, const labelList& owner, - const label cellI, + const label celli, const labelList& myFaces ) { @@ -120,7 +120,7 @@ bool Foam::tetMatcher::matchShape ( face3vert0, faceSize_[face3I], - !(owner[faceMap_[face3I]] == cellI) + !(owner[faceMap_[face3I]] == celli) ); vertLabels_[1] = pointMap_[face3[face3vert1]]; @@ -130,7 +130,7 @@ bool Foam::tetMatcher::matchShape ( face3vert1, faceSize_[face3I], - !(owner[faceMap_[face3I]] == cellI) + !(owner[faceMap_[face3I]] == celli) ); vertLabels_[2] = pointMap_[face3[face3vert2]]; @@ -177,7 +177,7 @@ bool Foam::tetMatcher::matchShape ( face1vert0, faceSize_[face1I], - (owner[faceMap_[face1I]] == cellI) + (owner[faceMap_[face1I]] == celli) ); vertLabels_[3] = pointMap_[face1[face1vert3]]; @@ -215,15 +215,15 @@ bool Foam::tetMatcher::faceSizeMatch } -bool Foam::tetMatcher::isA(const primitiveMesh& mesh, const label cellI) +bool Foam::tetMatcher::isA(const primitiveMesh& mesh, const label celli) { return matchShape ( true, mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ); } @@ -245,7 +245,7 @@ bool Foam::tetMatcher::isA(const faceList& faces) bool Foam::tetMatcher::matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ) { @@ -256,8 +256,8 @@ bool Foam::tetMatcher::matches false, mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ) ) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.H index e36e6b5f4383ce4e069ef437679a28cca67924fe..d9d0c6329a3ec35e5e5f4ff1997b9dccdade79fc 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetMatcher.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 @@ -107,18 +107,18 @@ public: const bool checkOnly, const faceList& faces, const labelList& faceOwner, - const label cellI, + const label celli, const labelList& myFaces ); - virtual bool isA(const primitiveMesh& mesh, const label cellI); + virtual bool isA(const primitiveMesh& mesh, const label celli); virtual bool isA(const faceList&); virtual bool matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ); }; diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C index f7633d88b9aaf4729ca9f35a854dd377721affc1..b9421240ea658b9fbcc0dd6f2c615489b0a931b4 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C @@ -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 @@ -64,7 +64,7 @@ bool Foam::tetWedgeMatcher::matchShape const bool checkOnly, const faceList& faces, const labelList& owner, - const label cellI, + const label celli, const labelList& myFaces ) { @@ -103,11 +103,11 @@ bool Foam::tetWedgeMatcher::matchShape // label face0I = -1; - forAll(faceSize_, faceI) + forAll(faceSize_, facei) { - if (faceSize_[faceI] == 3) + if (faceSize_[facei] == 3) { - face0I = faceI; + face0I = facei; break; } } @@ -131,7 +131,7 @@ bool Foam::tetWedgeMatcher::matchShape ( face0vert0, faceSize_[face0I], - !(owner[faceMap_[face0I]] == cellI) + !(owner[faceMap_[face0I]] == celli) ); vertLabels_[1] = pointMap_[face0[face0vert1]]; @@ -160,7 +160,7 @@ bool Foam::tetWedgeMatcher::matchShape ( face0vert1, faceSize_[face0I], - !(owner[faceMap_[face0I]] == cellI) + !(owner[faceMap_[face0I]] == celli) ); vertLabels_[2] = pointMap_[face0[face0vert2]]; @@ -195,7 +195,7 @@ bool Foam::tetWedgeMatcher::matchShape ( face3vert2, faceSize_[face3I], - (owner[faceMap_[face3I]] == cellI) + (owner[faceMap_[face3I]] == celli) ); const face& face3 = localFaces_[face3I]; @@ -208,7 +208,7 @@ bool Foam::tetWedgeMatcher::matchShape ( face3vert4, faceSize_[face3I], - (owner[faceMap_[face3I]] == cellI) + (owner[faceMap_[face3I]] == celli) ); vertLabels_[3] = pointMap_[face3[face3vert3]]; @@ -268,15 +268,15 @@ bool Foam::tetWedgeMatcher::faceSizeMatch } -bool Foam::tetWedgeMatcher::isA(const primitiveMesh& mesh, const label cellI) +bool Foam::tetWedgeMatcher::isA(const primitiveMesh& mesh, const label celli) { return matchShape ( true, mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ); } @@ -298,7 +298,7 @@ bool Foam::tetWedgeMatcher::isA(const faceList& faces) bool Foam::tetWedgeMatcher::matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ) { @@ -309,8 +309,8 @@ bool Foam::tetWedgeMatcher::matches false, mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ) ) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.H index bbece3cf6743a71a24eaa0c192365931fe20b5a3..5b4525a8ac15924941a9a1b1fde359086877fa12 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.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 @@ -107,18 +107,18 @@ public: const bool checkOnly, const faceList& faces, const labelList& faceOwner, - const label cellI, + const label celli, const labelList& myFaces ); - virtual bool isA(const primitiveMesh& mesh, const label cellI); + virtual bool isA(const primitiveMesh& mesh, const label celli); virtual bool isA(const faceList&); virtual bool matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ); }; diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C index a7d85387b0e0359bbaaa8da9048b6e77592f38cf..3dc67372a4f0caa6a127e95e9ced1c1eef8c5839 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C @@ -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 @@ -61,7 +61,7 @@ bool Foam::wedgeMatcher::matchShape const bool checkOnly, const faceList& faces, const labelList& owner, - const label cellI, + const label celli, const labelList& myFaces ) { @@ -94,11 +94,11 @@ bool Foam::wedgeMatcher::matchShape // label face0I = -1; - forAll(faceSize_, faceI) + forAll(faceSize_, facei) { - if (faceSize_[faceI] == 3) + if (faceSize_[facei] == 3) { - face0I = faceI; + face0I = facei; break; } } @@ -125,7 +125,7 @@ bool Foam::wedgeMatcher::matchShape ( face0vert0, faceSize_[face0I], - !(owner[faceMap_[face0I]] == cellI) + !(owner[faceMap_[face0I]] == celli) ); vertLabels_[1] = pointMap_[face0[face0vert1]]; //Info<< "Wedge vertex 1: vertex " << face0[face0vert1] @@ -175,7 +175,7 @@ bool Foam::wedgeMatcher::matchShape ( face4vert0, faceSize_[face4I], - !(owner[faceMap_[face4I]] == cellI) + !(owner[faceMap_[face4I]] == celli) ); vertLabels_[3] = pointMap_[face4[face4vert3]]; //Info<< "Wedge vertex 3: vertex " << face4[face4vert3] @@ -223,7 +223,7 @@ bool Foam::wedgeMatcher::matchShape ( face2vert3, faceSize_[face2I], - (owner[faceMap_[face2I]] == cellI) + (owner[faceMap_[face2I]] == celli) ); vertLabels_[6] = pointMap_[face2[face2vert6]]; @@ -251,7 +251,7 @@ bool Foam::wedgeMatcher::matchShape ( face1vert6, faceSize_[face1I], - !(owner[faceMap_[face1I]] == cellI) + !(owner[faceMap_[face1I]] == celli) ); vertLabels_[5] = pointMap_[face1[face1vert5]]; @@ -261,7 +261,7 @@ bool Foam::wedgeMatcher::matchShape ( face1vert5, faceSize_[face1I], - !(owner[faceMap_[face1I]] == cellI) + !(owner[faceMap_[face1I]] == celli) ); vertLabels_[4] = pointMap_[face1[face1vert4]]; @@ -271,7 +271,7 @@ bool Foam::wedgeMatcher::matchShape ( face0vert1, faceSize_[face0I], - !(owner[faceMap_[face0I]] == cellI) + !(owner[faceMap_[face0I]] == celli) ); vertLabels_[2] = pointMap_[face0[face0vert2]]; //Info<< "Wedge vertex 2: vertex " << face0[face0vert2] @@ -367,15 +367,15 @@ bool Foam::wedgeMatcher::faceSizeMatch } -bool Foam::wedgeMatcher::isA(const primitiveMesh& mesh, const label cellI) +bool Foam::wedgeMatcher::isA(const primitiveMesh& mesh, const label celli) { return matchShape ( true, mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ); } @@ -397,7 +397,7 @@ bool Foam::wedgeMatcher::isA(const faceList& faces) bool Foam::wedgeMatcher::matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ) { @@ -408,8 +408,8 @@ bool Foam::wedgeMatcher::matches false, mesh.faces(), mesh.faceOwner(), - cellI, - mesh.cells()[cellI] + celli, + mesh.cells()[celli] ) ) { diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.H b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.H index 85faf2ab3281b45bc652795ff98dbdbbc5606252..6d827fc2671f2e5a4ffe51949028c970991ff86a 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.H +++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.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 @@ -107,18 +107,18 @@ public: const bool checkOnly, const faceList& faces, const labelList& faceOwner, - const label cellI, + const label celli, const labelList& myFaces ); - virtual bool isA(const primitiveMesh& mesh, const label cellI); + virtual bool isA(const primitiveMesh& mesh, const label celli); virtual bool isA(const faceList&); virtual bool matches ( const primitiveMesh& mesh, - const label cellI, + const label celli, cellShape& shape ); }; diff --git a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModelI.H b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModelI.H index 8b911eee55fa4bb025de859add872d1d64d648e3..91511797d8968cf5b233d97df90eeaf15bfca996 100644 --- a/src/OpenFOAM/meshes/meshShapes/cellModel/cellModelI.H +++ b/src/OpenFOAM/meshes/meshShapes/cellModel/cellModelI.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 @@ -99,11 +99,11 @@ inline faceList cellModel::faces(const labelList& pointLabels) const faceList f(faces_.size()); // Translate model lebels into global labels - forAll(faces_, faceI) + forAll(faces_, facei) { - const labelList& curModelLabels = faces_[faceI]; + const labelList& curModelLabels = faces_[facei]; - face& curFace = f[faceI]; + face& curFace = f[facei]; curFace.setSize(curModelLabels.size()); diff --git a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H index ea4a14862e4406739ccfa088830ba5a94c2f174f..d2f8d2a7e513ec2221da548dc2b84aaef4201d0e 100644 --- a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.H +++ b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCell.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 @@ -89,7 +89,7 @@ public: // Access //- Return i-th face - inline triFace face(const label faceI) const; + inline triFace face(const label facei) const; //- Return first face adjacent to the given edge inline label edgeFace(const label edgeI) const; @@ -98,7 +98,7 @@ public: inline label edgeAdjacentFace ( const label edgeI, - const label faceI + const label facei ) const; //- Return i-th edge diff --git a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H index d4f424b6cae663401d1f14b074f524d8ed1ef8d9..6606934f7570654ea601d063a52ad3d9c8f20290 100644 --- a/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H +++ b/src/OpenFOAM/meshes/meshShapes/tetCell/tetCellI.H @@ -62,7 +62,7 @@ inline Foam::tetCell::tetCell(Istream& is) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -inline Foam::triFace Foam::tetCell::face(const label faceI) const +inline Foam::triFace Foam::tetCell::face(const label facei) const { // Warning. Ordering of faces needs to be the same for a tetrahedron // class, a tetrahedron cell shape model and a tetCell @@ -71,19 +71,19 @@ inline Foam::triFace Foam::tetCell::face(const label faceI) const static const label c[] = {3, 2, 3, 1}; #ifdef FULLDEBUG - if (faceI >= 4) + if (facei >= 4) { FatalErrorInFunction - << "index out of range 0 -> 3. faceI = " << faceI + << "index out of range 0 -> 3. facei = " << facei << abort(FatalError); } #endif return triFace ( - operator[](a[faceI]), - operator[](b[faceI]), - operator[](c[faceI]) + operator[](a[facei]), + operator[](b[facei]), + operator[](c[facei]) ); } @@ -111,7 +111,7 @@ inline Foam::label Foam::tetCell::edgeFace(const label edgeI) const inline Foam::label Foam::tetCell::edgeAdjacentFace ( const label edgeI, - const label faceI + const label facei ) const { // Warning. Ordering of faces needs to be the same for a tetrahedron @@ -127,10 +127,10 @@ inline Foam::label Foam::tetCell::edgeAdjacentFace }; #ifdef FULLDEBUG - if (faceI >= 4) + if (facei >= 4) { FatalErrorInFunction - << "face index out of range 0 -> 3. faceI = " << faceI + << "face index out of range 0 -> 3. facei = " << facei << abort(FatalError); } @@ -142,7 +142,7 @@ inline Foam::label Foam::tetCell::edgeAdjacentFace } #endif - return adjacentFace[edgeI][faceI]; + return adjacentFace[edgeI][facei]; } diff --git a/src/OpenFOAM/meshes/meshTools/matchPoints.C b/src/OpenFOAM/meshes/meshTools/matchPoints.C index d309e8e501f8c4bed7696984bcebb42997e82a02..21291812e877de5ee09fcbb8533565233197f37a 100644 --- a/src/OpenFOAM/meshes/meshTools/matchPoints.C +++ b/src/OpenFOAM/meshes/meshTools/matchPoints.C @@ -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 @@ -88,14 +88,14 @@ bool Foam::matchPoints j++ ) { - label faceI = pts1MagSqr.indices()[j]; + label facei = pts1MagSqr.indices()[j]; // Compare actual vectors - scalar distSqr = magSqr(pts0[face0I] - pts1[faceI]); + scalar distSqr = magSqr(pts0[face0I] - pts1[facei]); if (distSqr <= sqr(matchDist) && distSqr < minDistSqr) { minDistSqr = distSqr; - minFaceI = faceI; + minFaceI = facei; } } @@ -122,12 +122,12 @@ bool Foam::matchPoints j++ ) { - label faceI = pts1MagSqr.indices()[j]; + label facei = pts1MagSqr.indices()[j]; - Pout<< " Compared coord: " << pts1[faceI] + Pout<< " Compared coord: " << pts1[facei] << " at index " << j << " with difference to point " - << mag(pts1[faceI] - pts0[face0I]) << endl; + << mag(pts1[facei] - pts0[face0I]) << endl; } } } @@ -200,16 +200,16 @@ bool Foam::matchPoints j++ ) { - label faceI = pts1MagSqr.indices()[j]; + label facei = pts1MagSqr.indices()[j]; // Compare actual vectors - scalar distSqr = magSqr(pts0[face0I] - pts1[faceI]); + scalar distSqr = magSqr(pts0[face0I] - pts1[facei]); - scalar distNorm = (pts0Dir[face0I] & pts1Dir[faceI]); + scalar distNorm = (pts0Dir[face0I] & pts1Dir[facei]); if ( magSqr(pts0Dir[face0I]) < sqr(SMALL) - && magSqr(pts1Dir[faceI]) < sqr(SMALL) + && magSqr(pts1Dir[facei]) < sqr(SMALL) ) { distNorm = -1; @@ -222,7 +222,7 @@ bool Foam::matchPoints { minDistNorm = distNorm; minDistSqr = distSqr; - minFaceI = faceI; + minFaceI = facei; } } } @@ -250,12 +250,12 @@ bool Foam::matchPoints j++ ) { - label faceI = pts1MagSqr.indices()[j]; + label facei = pts1MagSqr.indices()[j]; - Pout<< " Compared coord: " << pts1[faceI] + Pout<< " Compared coord: " << pts1[facei] << " at index " << j << " with difference to point " - << mag(pts1[faceI] - pts0[face0I]) << endl; + << mag(pts1[facei] - pts0[face0I]) << endl; } } } diff --git a/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C b/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C index adddf9777c43811861e57aa8b5531144e4bd78cf..7ba9428d372bd7846a8b94afbf8f14f7bde470e6 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.C +++ b/src/OpenFOAM/meshes/pointMesh/pointBoundaryMesh/pointBoundaryMesh.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 @@ -45,12 +45,12 @@ Foam::pointBoundaryMesh::pointBoundaryMesh // Set boundary patches pointPatchList& Patches = *this; - forAll(Patches, patchI) + forAll(Patches, patchi) { Patches.set ( - patchI, - facePointPatch::New(basicBdry[patchI], *this).ptr() + patchi, + facePointPatch::New(basicBdry[patchi], *this).ptr() ); } } diff --git a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointBoundaryMeshMapper.H b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointBoundaryMeshMapper.H index 3205386a699e516243bdc76673eaf89ee933eefc..00331499ca331c6cac15595798985c745f7429db 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointBoundaryMeshMapper.H +++ b/src/OpenFOAM/meshes/pointMesh/pointMeshMapper/pointBoundaryMeshMapper.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 @@ -73,14 +73,14 @@ public: { const pointBoundaryMesh& patches = mesh.boundary(); - forAll(patches, patchI) + forAll(patches, patchi) { set ( - patchI, + patchi, new pointPatchMapper ( - patches[patchI], + patches[patchi], pointMap, mpm ) diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H index 1dedaaa82612873954f70fc448738e7062bb8ff9..ffafe9447e0562b473e6bd5f87e5b1c0b41dc314 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.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 @@ -127,8 +127,8 @@ public: //- Return neighbour point patch const cyclicPointPatch& neighbPatch() const { - label patchI = cyclicPolyPatch_.neighbPatchID(); - const pointPatch& pp = this->boundaryMesh()[patchI]; + label patchi = cyclicPolyPatch_.neighbPatchID(); + const pointPatch& pp = this->boundaryMesh()[patchi]; return refCast<const cyclicPointPatch>(pp); } diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C index e010752abfce2c15dfbe8f3f37e6407204a646c7..e3de87ecd94c5bb154d07bc897ddb1b5500dabe9 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C @@ -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 @@ -59,9 +59,9 @@ void Foam::processorPointPatch::initGeometry(PstreamBuffers& pBufs) faceList masterFaces(pp.size()); - forAll(pp, faceI) + forAll(pp, facei) { - masterFaces[faceI] = pp[faceI].reverseFace(); + masterFaces[facei] = pp[facei].reverseFace(); } reverseMeshPoints_ = primitiveFacePatch diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalIndex.H index 129b477becfda3da079f2d4590a242f3e7ef6bbf..793c9324b6aae0db76afe03223af9f788824da01 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 diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C index 5a25df9d618d223992e3a176554b194d09e3799f..9b98e1102a3158e2f25003efbdb832fd7e3cd4e8 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalMeshData.C @@ -1207,9 +1207,9 @@ void Foam::globalMeshData::calcPointBoundaryFaces labelList nPointFaces(coupledPatch().nPoints(), 0); - forAll(bMesh, patchI) + forAll(bMesh, patchi) { - const polyPatch& pp = bMesh[patchI]; + const polyPatch& pp = bMesh[patchi]; if (!pp.coupled()) { @@ -1245,9 +1245,9 @@ void Foam::globalMeshData::calcPointBoundaryFaces // 3. Fill - forAll(bMesh, patchI) + forAll(bMesh, patchi) { - const polyPatch& pp = bMesh[patchI]; + const polyPatch& pp = bMesh[patchi]; if (!pp.coupled()) { @@ -1407,12 +1407,12 @@ void Foam::globalMeshData::calcGlobalPointBoundaryFaces() const if (findIndex(untrafoFaces, slave)== -1) { label procI = globalIndices.whichProcID(slave); - label faceI = globalIndices.toLocal(procI, slave); + label facei = globalIndices.toLocal(procI, slave); myBFaces[n++] = globalIndexAndTransform::encode ( procI, - faceI, + facei, transformI ); } @@ -1495,8 +1495,8 @@ void Foam::globalMeshData::calcGlobalPointBoundaryCells() const forAll(pCells, i) { - label cellI = pCells[i]; - Map<label>::iterator fnd = meshCellMap.find(cellI); + label celli = pCells[i]; + Map<label>::iterator fnd = meshCellMap.find(celli); if (fnd != meshCellMap.end()) { @@ -1504,8 +1504,8 @@ void Foam::globalMeshData::calcGlobalPointBoundaryCells() const } else { - meshCellMap.insert(cellI, bCellI); - cellMap.append(cellI); + meshCellMap.insert(celli, bCellI); + cellMap.append(celli); bCells[i] = bCellI; bCellI++; } @@ -1636,11 +1636,11 @@ void Foam::globalMeshData::calcGlobalPointBoundaryCells() const if (findIndex(untrafoCells, slave)== -1) { label procI = globalIndices.whichProcID(slave); - label cellI = globalIndices.toLocal(procI, slave); + label celli = globalIndices.toLocal(procI, slave); myBCells[n++] = globalIndexAndTransform::encode ( procI, - cellI, + celli, transformI ); } @@ -2041,9 +2041,9 @@ const Foam::indirectPrimitivePatch& Foam::globalMeshData::coupledPatch() const label nCoupled = 0; - forAll(bMesh, patchI) + forAll(bMesh, patchi) { - const polyPatch& pp = bMesh[patchI]; + const polyPatch& pp = bMesh[patchi]; if (pp.coupled()) { @@ -2053,17 +2053,17 @@ const Foam::indirectPrimitivePatch& Foam::globalMeshData::coupledPatch() const labelList coupledFaces(nCoupled); nCoupled = 0; - forAll(bMesh, patchI) + forAll(bMesh, patchi) { - const polyPatch& pp = bMesh[patchI]; + const polyPatch& pp = bMesh[patchi]; if (pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - coupledFaces[nCoupled++] = faceI++; + coupledFaces[nCoupled++] = facei++; } } } diff --git a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C index fa753427ec33826c63abc91e60d8ac9466b80d76..3baf270ee91b63eb18de79ef094c5d7e69d86251 100644 --- a/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C +++ b/src/OpenFOAM/meshes/polyMesh/globalMeshData/globalPoints.C @@ -46,9 +46,9 @@ Foam::label Foam::globalPoints::countPatchPoints { label nTotPoints = 0; - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { nTotPoints += pp.nPoints(); @@ -84,13 +84,13 @@ Foam::label Foam::globalPoints::findSamePoint Foam::labelPairList Foam::globalPoints::addSendTransform ( - const label patchI, + const label patchi, const labelPairList& info ) const { scalar tol = refCast<const coupledPolyPatch> ( - mesh_.boundaryMesh()[patchI] + mesh_.boundaryMesh()[patchi] ).matchTolerance(); labelPairList sendInfo(info.size()); @@ -113,8 +113,8 @@ Foam::labelPairList Foam::globalPoints::addSendTransform globalTransforms_.addToTransformIndex ( globalIndexAndTransform::transformIndex(info[i]), - patchI, - true, // patchI is sending side + patchi, + true, // patchi is sending side tol // tolerance for comparison ) ); @@ -398,9 +398,9 @@ void Foam::globalPoints::initOwnPoints { const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { @@ -487,9 +487,9 @@ void Foam::globalPoints::sendPatchPoints const polyBoundaryMesh& patches = mesh_.boundaryMesh(); const labelPairList& patchInfo = globalTransforms_.patchTransformSign(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; // mergeSeparated=true : send from all processor patches // =false: send from ones without transform @@ -497,7 +497,7 @@ void Foam::globalPoints::sendPatchPoints if ( (Pstream::parRun() && isA<processorPolyPatch>(pp)) - && (mergeSeparated || patchInfo[patchI].first() == -1) + && (mergeSeparated || patchInfo[patchi].first() == -1) ) { const processorPolyPatch& procPatch = @@ -584,14 +584,14 @@ void Foam::globalPoints::receivePatchPoints // Reset changed points changedPoints.clear(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if ( (Pstream::parRun() && isA<processorPolyPatch>(pp)) - && (mergeSeparated || patchInfo[patchI].first() == -1) + && (mergeSeparated || patchInfo[patchi].first() == -1) ) { const processorPolyPatch& procPatch = @@ -642,7 +642,7 @@ void Foam::globalPoints::receivePatchPoints isA<cyclicPolyPatch>(pp) && refCast<const cyclicPolyPatch>(pp).owner() ) - && (mergeSeparated || patchInfo[patchI].first() == -1) + && (mergeSeparated || patchInfo[patchi].first() == -1) ) { // Handle cyclics: send lower half to upper half and vice versa. @@ -651,7 +651,7 @@ void Foam::globalPoints::receivePatchPoints const cyclicPolyPatch& cycPatch = refCast<const cyclicPolyPatch>(pp); - //Pout<< "Patch:" << patchI << " name:" << pp.name() << endl; + //Pout<< "Patch:" << patchi << " name:" << pp.name() << endl; const labelList& meshPoints = pp.meshPoints(); const labelList coupledMeshPoints(reverseMeshPoints(cycPatch)); @@ -845,9 +845,9 @@ Foam::labelList Foam::globalPoints::reverseMeshPoints faceList masterFaces(nbrPatch.size()); - forAll(nbrPatch, faceI) + forAll(nbrPatch, facei) { - masterFaces[faceI] = nbrPatch[faceI].reverseFace(); + masterFaces[facei] = nbrPatch[facei].reverseFace(); } return primitiveFacePatch diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C index d43410ec9d661f742942aa91c7bac2ba320ebe15..9253875b8a66e30611f186fcbeccfbff9c6d6ab2 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/cellMapper/cellMapper.C @@ -60,13 +60,13 @@ void Foam::cellMapper::calcAddressing() const label nInsertedCells = 0; - forAll(directAddr, cellI) + forAll(directAddr, celli) { - if (directAddr[cellI] < 0) + if (directAddr[celli] < 0) { // Found inserted cell - directAddr[cellI] = 0; - insertedCells[nInsertedCells] = cellI; + directAddr[celli] = 0; + insertedCells[nInsertedCells] = celli; nInsertedCells++; } } @@ -90,19 +90,19 @@ void Foam::cellMapper::calcAddressing() const // Get addressing const labelList& mo = cfp[cfpI].masterObjects(); - label cellI = cfp[cfpI].index(); + label celli = cfp[cfpI].index(); - if (addr[cellI].size()) + if (addr[celli].size()) { FatalErrorInFunction - << "Master cell " << cellI + << "Master cell " << celli << " mapped from point cells " << mo << " already destination of mapping." << abort(FatalError); } // Map from masters, uniform weights - addr[cellI] = mo; - w[cellI] = scalarList(mo.size(), 1.0/mo.size()); + addr[celli] = mo; + w[celli] = scalarList(mo.size(), 1.0/mo.size()); } const List<objectMap>& cfe = mpm_.cellsFromEdgesMap(); @@ -112,19 +112,19 @@ void Foam::cellMapper::calcAddressing() const // Get addressing const labelList& mo = cfe[cfeI].masterObjects(); - label cellI = cfe[cfeI].index(); + label celli = cfe[cfeI].index(); - if (addr[cellI].size()) + if (addr[celli].size()) { FatalErrorInFunction - << "Master cell " << cellI + << "Master cell " << celli << " mapped from edge cells " << mo << " already destination of mapping." << abort(FatalError); } // Map from masters, uniform weights - addr[cellI] = mo; - w[cellI] = scalarList(mo.size(), 1.0/mo.size()); + addr[celli] = mo; + w[celli] = scalarList(mo.size(), 1.0/mo.size()); } const List<objectMap>& cff = mpm_.cellsFromFacesMap(); @@ -134,19 +134,19 @@ void Foam::cellMapper::calcAddressing() const // Get addressing const labelList& mo = cff[cffI].masterObjects(); - label cellI = cff[cffI].index(); + label celli = cff[cffI].index(); - if (addr[cellI].size()) + if (addr[celli].size()) { FatalErrorInFunction - << "Master cell " << cellI + << "Master cell " << celli << " mapped from face cells " << mo << " already destination of mapping." << abort(FatalError); } // Map from masters, uniform weights - addr[cellI] = mo; - w[cellI] = scalarList(mo.size(), 1.0/mo.size()); + addr[celli] = mo; + w[celli] = scalarList(mo.size(), 1.0/mo.size()); } // Volume conservative mapping if possible @@ -158,19 +158,19 @@ void Foam::cellMapper::calcAddressing() const // Get addressing const labelList& mo = cfc[cfcI].masterObjects(); - label cellI = cfc[cfcI].index(); + label celli = cfc[cfcI].index(); - if (addr[cellI].size()) + if (addr[celli].size()) { FatalErrorInFunction - << "Master cell " << cellI + << "Master cell " << celli << " mapped from cell cells " << mo << " already destination of mapping." << abort(FatalError); } // Map from masters - addr[cellI] = mo; + addr[celli] = mo; } if (mpm_.hasOldCellVolumes()) @@ -193,29 +193,29 @@ void Foam::cellMapper::calcAddressing() const { const labelList& mo = cfc[cfcI].masterObjects(); - label cellI = cfc[cfcI].index(); + label celli = cfc[cfcI].index(); - w[cellI].setSize(mo.size()); + w[celli].setSize(mo.size()); if (mo.size()) { scalar sumV = 0; forAll(mo, ci) { - w[cellI][ci] = V[mo[ci]]; + w[celli][ci] = V[mo[ci]]; sumV += V[mo[ci]]; } if (sumV > VSMALL) { forAll(mo, ci) { - w[cellI][ci] /= sumV; + w[celli][ci] /= sumV; } } else { // Exception: zero volume. Use uniform mapping - w[cellI] = scalarList(mo.size(), 1.0/mo.size()); + w[celli] = scalarList(mo.size(), 1.0/mo.size()); } } } @@ -228,9 +228,9 @@ void Foam::cellMapper::calcAddressing() const { const labelList& mo = cfc[cfcI].masterObjects(); - label cellI = cfc[cfcI].index(); + label celli = cfc[cfcI].index(); - w[cellI] = scalarList(mo.size(), 1.0/mo.size()); + w[celli] = scalarList(mo.size(), 1.0/mo.size()); } } @@ -240,13 +240,13 @@ void Foam::cellMapper::calcAddressing() const const labelList& cm = mpm_.cellMap(); - forAll(cm, cellI) + forAll(cm, celli) { - if (cm[cellI] > -1 && addr[cellI].empty()) + if (cm[celli] > -1 && addr[celli].empty()) { // Mapped from a single cell - addr[cellI] = labelList(1, cm[cellI]); - w[cellI] = scalarList(1, 1.0); + addr[celli] = labelList(1, cm[celli]); + w[celli] = scalarList(1, 1.0); } } @@ -257,15 +257,15 @@ void Foam::cellMapper::calcAddressing() const label nInsertedCells = 0; - forAll(addr, cellI) + forAll(addr, celli) { - if (addr[cellI].empty()) + if (addr[celli].empty()) { // Mapped from a dummy cell - addr[cellI] = labelList(1, label(0)); - w[cellI] = scalarList(1, 1.0); + addr[celli] = labelList(1, label(0)); + w[celli] = scalarList(1, 1.0); - insertedCells[nInsertedCells] = cellI; + insertedCells[nInsertedCells] = celli; nInsertedCells++; } } diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C index aa80be4c36a2e93b89a7f0d9d1efeea98f157d99..2e66f75f3cda46e49fd6423484b640013984c2ef 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/faceMapper/faceMapper.C @@ -60,13 +60,13 @@ void Foam::faceMapper::calcAddressing() const label nInsertedFaces = 0; - forAll(directAddr, faceI) + forAll(directAddr, facei) { - if (directAddr[faceI] < 0) + if (directAddr[facei] < 0) { // Found inserted face - directAddr[faceI] = 0; - insertedFaces[nInsertedFaces] = faceI; + directAddr[facei] = 0; + insertedFaces[nInsertedFaces] = facei; nInsertedFaces++; } } @@ -90,19 +90,19 @@ void Foam::faceMapper::calcAddressing() const // Get addressing const labelList& mo = ffp[ffpI].masterObjects(); - label faceI = ffp[ffpI].index(); + label facei = ffp[ffpI].index(); - if (addr[faceI].size()) + if (addr[facei].size()) { FatalErrorInFunction - << "Master face " << faceI + << "Master face " << facei << " mapped from point faces " << mo << " already destination of mapping." << abort(FatalError); } // Map from masters, uniform weights - addr[faceI] = mo; - w[faceI] = scalarList(mo.size(), 1.0/mo.size()); + addr[facei] = mo; + w[facei] = scalarList(mo.size(), 1.0/mo.size()); } const List<objectMap>& ffe = mpm_.facesFromEdgesMap(); @@ -112,19 +112,19 @@ void Foam::faceMapper::calcAddressing() const // Get addressing const labelList& mo = ffe[ffeI].masterObjects(); - label faceI = ffe[ffeI].index(); + label facei = ffe[ffeI].index(); - if (addr[faceI].size()) + if (addr[facei].size()) { FatalErrorInFunction - << "Master face " << faceI + << "Master face " << facei << " mapped from edge faces " << mo << " already destination of mapping." << abort(FatalError); } // Map from masters, uniform weights - addr[faceI] = mo; - w[faceI] = scalarList(mo.size(), 1.0/mo.size()); + addr[facei] = mo; + w[facei] = scalarList(mo.size(), 1.0/mo.size()); } const List<objectMap>& fff = mpm_.facesFromFacesMap(); @@ -134,19 +134,19 @@ void Foam::faceMapper::calcAddressing() const // Get addressing const labelList& mo = fff[fffI].masterObjects(); - label faceI = fff[fffI].index(); + label facei = fff[fffI].index(); - if (addr[faceI].size()) + if (addr[facei].size()) { FatalErrorInFunction - << "Master face " << faceI + << "Master face " << facei << " mapped from face faces " << mo << " already destination of mapping." << abort(FatalError); } // Map from masters, uniform weights - addr[faceI] = mo; - w[faceI] = scalarList(mo.size(), 1.0/mo.size()); + addr[facei] = mo; + w[facei] = scalarList(mo.size(), 1.0/mo.size()); } @@ -154,13 +154,13 @@ void Foam::faceMapper::calcAddressing() const // so check if addressing size still zero. const labelList& fm = mpm_.faceMap(); - forAll(fm, faceI) + forAll(fm, facei) { - if (fm[faceI] > -1 && addr[faceI].empty()) + if (fm[facei] > -1 && addr[facei].empty()) { // Mapped from a single face - addr[faceI] = labelList(1, fm[faceI]); - w[faceI] = scalarList(1, 1.0); + addr[facei] = labelList(1, fm[facei]); + w[facei] = scalarList(1, 1.0); } } @@ -172,15 +172,15 @@ void Foam::faceMapper::calcAddressing() const label nInsertedFaces = 0; - forAll(addr, faceI) + forAll(addr, facei) { - if (addr[faceI].empty()) + if (addr[facei].empty()) { // Mapped from a dummy face - addr[faceI] = labelList(1, label(0)); - w[faceI] = scalarList(1, 1.0); + addr[facei] = labelList(1, label(0)); + w[facei] = scalarList(1, 1.0); - insertedFaces[nInsertedFaces] = faceI; + insertedFaces[nInsertedFaces] = facei; nInsertedFaces++; } } diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C index 72d7376b85afdecb78b3755efee79e530e3a6c64..82cc8d5d575cee1febbed0eb60ab7f314fe465dd 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistribute.C @@ -419,9 +419,9 @@ void Foam::mapDistribute::calcCompactAddressing // Count all (non-local) elements needed. Just for presizing map. labelList nNonLocal(Pstream::nProcs(), 0); - forAll(cellCells, cellI) + forAll(cellCells, celli) { - const labelList& cCells = cellCells[cellI]; + const labelList& cCells = cellCells[celli]; forAll(cCells, i) { @@ -446,9 +446,9 @@ void Foam::mapDistribute::calcCompactAddressing // Collect all (non-local) elements needed. - forAll(cellCells, cellI) + forAll(cellCells, celli) { - const labelList& cCells = cellCells[cellI]; + const labelList& cCells = cellCells[celli]; forAll(cCells, i) { @@ -615,9 +615,9 @@ void Foam::mapDistribute::exchangeAddressing ); // Renumber elements - forAll(cellCells, cellI) + forAll(cellCells, celli) { - labelList& cCells = cellCells[cellI]; + labelList& cCells = cellCells[celli]; forAll(cCells, i) { @@ -987,9 +987,9 @@ Foam::mapDistribute::mapDistribute ); // Add all (non-local) transformed elements needed. - forAll(transformedElements, cellI) + forAll(transformedElements, celli) { - const labelPairList& elems = transformedElements[cellI]; + const labelPairList& elems = transformedElements[celli]; forAll(elems, i) { @@ -1022,9 +1022,9 @@ Foam::mapDistribute::mapDistribute // Count per transformIndex label nTrafo = globalTransforms.transformPermutations().size(); labelList nPerTransform(nTrafo, 0); - forAll(transformedElements, cellI) + forAll(transformedElements, celli) { - const labelPairList& elems = transformedElements[cellI]; + const labelPairList& elems = transformedElements[celli]; forAll(elems, i) { @@ -1046,10 +1046,10 @@ Foam::mapDistribute::mapDistribute nPerTransform = 0; transformedIndices.setSize(transformedElements.size()); - forAll(transformedElements, cellI) + forAll(transformedElements, celli) { - const labelPairList& elems = transformedElements[cellI]; - transformedIndices[cellI].setSize(elems.size()); + const labelPairList& elems = transformedElements[celli]; + transformedIndices[celli].setSize(elems.size()); forAll(elems, i) { @@ -1069,7 +1069,7 @@ Foam::mapDistribute::mapDistribute // index of element to transform transformElements_[trafoI][n] = rawElemI; // destination of transformed element - transformedIndices[cellI][i] = transformStart_[trafoI]+n; + transformedIndices[celli][i] = transformStart_[trafoI]+n; n++; } } diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C index c33f2a62484d277b11d27885afe8f6bc415ac7be..a21509fdea40ef41150df427a3e64974818b3dd2 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapDistribute/mapDistributePolyMesh.C @@ -34,10 +34,10 @@ void Foam::mapDistributePolyMesh::calcPatchSizes() oldPatchSizes_.setSize(oldPatchStarts_.size()); // Calculate old patch sizes - for (label patchI = 0; patchI < oldPatchStarts_.size() - 1; patchI++) + for (label patchi = 0; patchi < oldPatchStarts_.size() - 1; patchi++) { - oldPatchSizes_[patchI] = - oldPatchStarts_[patchI + 1] - oldPatchStarts_[patchI]; + oldPatchSizes_[patchi] = + oldPatchStarts_[patchi + 1] - oldPatchStarts_[patchi]; } // Set the last one by hand diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPatchChange/mapPatchChange.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPatchChange/mapPatchChange.H index e6ee23544de3f7890eced5e594d7ff715de76f83..b14dd1757c9b41d91c3e834611f956a132736d2e 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPatchChange/mapPatchChange.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPatchChange/mapPatchChange.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 @@ -97,11 +97,11 @@ public: label addedI = 0; - forAll(patchMap_, patchI) + forAll(patchMap_, patchi) { - if (patchMap_[patchI] == -1) + if (patchMap_[patchi] == -1) { - added[addedI++] = patchI; + added[addedI++] = patchi; } } added.setSize(addedI); @@ -114,11 +114,11 @@ public: labelList oldToNew(nOldPatches_, -1); // Mark all preserved patches - forAll(patchMap_, patchI) + forAll(patchMap_, patchi) { - if (patchMap_[patchI] != -1) + if (patchMap_[patchi] != -1) { - oldToNew[patchMap_[patchI]] = patchI; + oldToNew[patchMap_[patchi]] = patchi; } } diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C index 48d857b05e3f17c677a7f9d75a45f17bdcf5d18b..45a156334289bbdd7d50a672c3c4c6b7d7f9c1c2 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.C @@ -91,10 +91,10 @@ Foam::mapPolyMesh::mapPolyMesh oldCellVolumesPtr_(oldCellVolumesPtr) { // Calculate old patch sizes - for (label patchI = 0; patchI < oldPatchStarts_.size() - 1; patchI++) + for (label patchi = 0; patchi < oldPatchStarts_.size() - 1; patchi++) { - oldPatchSizes_[patchI] = - oldPatchStarts_[patchI + 1] - oldPatchStarts_[patchI]; + oldPatchSizes_[patchi] = + oldPatchStarts_[patchi + 1] - oldPatchStarts_[patchi]; } // Set the last one by hand @@ -179,10 +179,10 @@ Foam::mapPolyMesh::mapPolyMesh if (oldPatchStarts_.size() > 0) { // Calculate old patch sizes - for (label patchI = 0; patchI < oldPatchStarts_.size() - 1; patchI++) + for (label patchi = 0; patchi < oldPatchStarts_.size() - 1; patchi++) { - oldPatchSizes_[patchI] = - oldPatchStarts_[patchI + 1] - oldPatchStarts_[patchI]; + oldPatchSizes_[patchi] = + oldPatchStarts_[patchi + 1] - oldPatchStarts_[patchi]; } // Set the last one by hand diff --git a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H index f369944c69efff40da3ed5b642c5324b00f59d22..1c91aee287103b063fa3a0ef3c760af6338711bf 100644 --- a/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/mapPolyMesh/mapPolyMesh.H @@ -69,29 +69,29 @@ Description \par faces - unchanged: - - faceMap[faceI] contains old face label + - faceMap[facei] contains old face label - reverseFaceMap[oldFaceI] contains new face label - removed: - reverseFaceMap[oldFaceI] contains -1 - merged into face: - reverseFaceMap[oldFaceI] contains <-1 : -newFaceI-2 - - faceMap[faceI] contains the old master face label - - facesFromFaces gives for faceI all the old face labels + - faceMap[facei] contains the old master face label + - facesFromFaces gives for facei all the old face labels (including the old master face!) - added-from-same: - - faceMap[faceI] contains the old master face label + - faceMap[facei] contains the old master face label - inflated-from-edge: - - faceMap[faceI] contains -1 + - faceMap[facei] contains -1 - facesFromEdges contains an entry with - - faceI + - facei - list of faces(*) on old mesh that connected to the old edge - inflated-from-point: - - faceMap[faceI] contains -1 + - faceMap[facei] contains -1 - facesFromPoints contains an entry with - - faceI + - facei - list of faces(*) on old mesh that connected to the old point - appended: - - faceMap[faceI] contains -1 + - faceMap[facei] contains -1 Note (*) \n if the newly inflated face is a boundary face the list of faces will @@ -101,34 +101,34 @@ Description \par cells - unchanged: - - cellMap[cellI] contains old cell label + - cellMap[celli] contains old cell label - reverseCellMap[oldCellI] contains new cell label - removed: - reverseCellMap[oldCellI] contains -1 - merged into cell: - reverseCellMap[oldCellI] contains <-1 : -newCellI-2 - - cellMap[cellI] contains the old master cell label - - cellsFromCells gives for cellI all the old cell labels + - cellMap[celli] contains the old master cell label + - cellsFromCells gives for celli all the old cell labels (including the old master cell!) - added-from-same: - - cellMap[cellI] contains the old master cell label + - cellMap[celli] contains the old master cell label - inflated-from-face: - - cellMap[cellI] contains -1 + - cellMap[celli] contains -1 - cellsFromFaces contains an entry with - - cellI + - celli - list of cells on old mesh that connected to the old face - inflated-from-edge: - - cellMap[cellI] contains -1 + - cellMap[celli] contains -1 - cellsFromEdges contains an entry with - - cellI + - celli - list of cells on old mesh that connected to the old edge - inflated-from-point: - - cellMap[cellI] contains -1 + - cellMap[celli] contains -1 - cellsFromPoints contains an entry with - - cellI + - celli - list of cells on old mesh that connected to the old point - appended: - - cellMap[cellI] contains -1 + - cellMap[celli] contains -1 SourceFiles diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index 4b90fb078b2c00dd57c36df875efb03d4ccb9dbf..66a1c70019f9d06ba7ab4b79fa8a66a992fbf90b 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -76,16 +76,16 @@ Foam::polyBoundaryMesh::polyBoundaryMesh PtrList<entry> patchEntries(is); patches.setSize(patchEntries.size()); - forAll(patches, patchI) + forAll(patches, patchi) { patches.set ( - patchI, + patchi, polyPatch::New ( - patchEntries[patchI].keyword(), - patchEntries[patchI].dict(), - patchI, + patchEntries[patchi].keyword(), + patchEntries[patchi].dict(), + patchi, *this ) ); @@ -151,16 +151,16 @@ Foam::polyBoundaryMesh::polyBoundaryMesh PtrList<entry> patchEntries(is); patches.setSize(patchEntries.size()); - forAll(patches, patchI) + forAll(patches, patchi) { patches.set ( - patchI, + patchi, polyPatch::New ( - patchEntries[patchI].keyword(), - patchEntries[patchI].dict(), - patchI, + patchEntries[patchi].keyword(), + patchEntries[patchi].dict(), + patchi, *this ) ); @@ -179,9 +179,9 @@ Foam::polyBoundaryMesh::polyBoundaryMesh { polyPatchList& patches = *this; patches.setSize(ppl.size()); - forAll(patches, patchI) + forAll(patches, patchi) { - patches.set(patchI, ppl[patchI].clone(*this).ptr()); + patches.set(patchi, ppl[patchi].clone(*this).ptr()); } } } @@ -195,9 +195,9 @@ Foam::polyBoundaryMesh::~polyBoundaryMesh() void Foam::polyBoundaryMesh::clearGeom() { - forAll(*this, patchI) + forAll(*this, patchi) { - operator[](patchI).clearGeom(); + operator[](patchi).clearGeom(); } } @@ -208,9 +208,9 @@ void Foam::polyBoundaryMesh::clearAddressing() patchIDPtr_.clear(); groupPatchIDsPtr_.clear(); - forAll(*this, patchI) + forAll(*this, patchi) { - operator[](patchI).clearAddressing(); + operator[](patchi).clearAddressing(); } } @@ -227,16 +227,16 @@ void Foam::polyBoundaryMesh::calcGeometry() || Pstream::defaultCommsType == Pstream::nonBlocking ) { - forAll(*this, patchI) + forAll(*this, patchi) { - operator[](patchI).initGeometry(pBufs); + operator[](patchi).initGeometry(pBufs); } pBufs.finishedSends(); - forAll(*this, patchI) + forAll(*this, patchi) { - operator[](patchI).calcGeometry(pBufs); + operator[](patchi).calcGeometry(pBufs); } } else if (Pstream::defaultCommsType == Pstream::scheduled) @@ -248,15 +248,15 @@ void Foam::polyBoundaryMesh::calcGeometry() forAll(patchSchedule, patchEvali) { - const label patchI = patchSchedule[patchEvali].patch; + const label patchi = patchSchedule[patchEvali].patch; if (patchSchedule[patchEvali].init) { - operator[](patchI).initGeometry(pBufs); + operator[](patchi).initGeometry(pBufs); } else { - operator[](patchI).calcGeometry(pBufs); + operator[](patchi).calcGeometry(pBufs); } } } @@ -280,15 +280,15 @@ Foam::polyBoundaryMesh::neighbourEdges() const // Initialize. label nEdgePairs = 0; - forAll(*this, patchI) + forAll(*this, patchi) { - const polyPatch& pp = operator[](patchI); + const polyPatch& pp = operator[](patchi); - neighbourEdges[patchI].setSize(pp.nEdges() - pp.nInternalEdges()); + neighbourEdges[patchi].setSize(pp.nEdges() - pp.nInternalEdges()); - forAll(neighbourEdges[patchI], i) + forAll(neighbourEdges[patchi], i) { - labelPair& edgeInfo = neighbourEdges[patchI][i]; + labelPair& edgeInfo = neighbourEdges[patchi][i]; edgeInfo[0] = -1; edgeInfo[1] = -1; @@ -301,9 +301,9 @@ Foam::polyBoundaryMesh::neighbourEdges() const // point addressing) to patch + relative edge index. HashTable<labelPair, edge, Hash<edge>> pointsToEdge(nEdgePairs); - forAll(*this, patchI) + forAll(*this, patchi) { - const polyPatch& pp = operator[](patchI); + const polyPatch& pp = operator[](patchi); const edgeList& edges = pp.edges(); @@ -332,7 +332,7 @@ Foam::polyBoundaryMesh::neighbourEdges() const meshEdge, labelPair ( - patchI, + patchi, edgei - pp.nInternalEdges() ) ); @@ -342,11 +342,11 @@ Foam::polyBoundaryMesh::neighbourEdges() const // Second occurrence. Store. const labelPair& edgeInfo = fnd(); - neighbourEdges[patchI][edgei - pp.nInternalEdges()] = + neighbourEdges[patchi][edgei - pp.nInternalEdges()] = edgeInfo; neighbourEdges[edgeInfo[0]][edgeInfo[1]] - = labelPair(patchI, edgei - pp.nInternalEdges()); + = labelPair(patchi, edgei - pp.nInternalEdges()); // Found all two occurrences of this edge so remove from // hash to save space. Note that this will give lots of @@ -364,11 +364,11 @@ Foam::polyBoundaryMesh::neighbourEdges() const << abort(FatalError); } - forAll(*this, patchI) + forAll(*this, patchi) { - const polyPatch& pp = operator[](patchI); + const polyPatch& pp = operator[](patchi); - const labelPairList& nbrEdges = neighbourEdges[patchI]; + const labelPairList& nbrEdges = neighbourEdges[patchi]; forAll(nbrEdges, i) { @@ -412,12 +412,12 @@ const Foam::labelList& Foam::polyBoundaryMesh::patchID() const const polyBoundaryMesh& bm = *this; - forAll(bm, patchI) + forAll(bm, patchi) { - label bFaceI = bm[patchI].start() - mesh_.nInternalFaces(); - forAll(bm[patchI], i) + label bFaceI = bm[patchi].start() - mesh_.nInternalFaces(); + forAll(bm[patchi], i) { - patchID[bFaceI++] = patchI; + patchID[bFaceI++] = patchi; } } } @@ -435,9 +435,9 @@ Foam::polyBoundaryMesh::groupPatchIDs() const const polyBoundaryMesh& bm = *this; - forAll(bm, patchI) + forAll(bm, patchi) { - const wordList& groups = bm[patchI].inGroups(); + const wordList& groups = bm[patchi].inGroups(); forAll(groups, i) { @@ -446,7 +446,7 @@ Foam::polyBoundaryMesh::groupPatchIDs() const if (findPatchID(name) != -1) { WarningInFunction - << "Patch " << bm[patchI].name() + << "Patch " << bm[patchi].name() << " specifies a group " << name << " which is also a patch name." << " This might give problems later on." << endl; @@ -460,11 +460,11 @@ Foam::polyBoundaryMesh::groupPatchIDs() const if (iter != groupPatchIDs.end()) { - iter().append(patchI); + iter().append(patchi); } else { - groupPatchIDs.insert(name, labelList(1, patchI)); + groupPatchIDs.insert(name, labelList(1, patchi)); } } } @@ -488,22 +488,22 @@ void Foam::polyBoundaryMesh::setGroup // Add to specified patches forAll(patchIDs, i) { - label patchI = patchIDs[i]; - polyPatch& pp = patches[patchI]; + label patchi = patchIDs[i]; + polyPatch& pp = patches[patchi]; if (!pp.inGroup(groupName)) { pp.inGroups().append(groupName); } - donePatch[patchI] = true; + donePatch[patchi] = true; } // Remove from other patches - forAll(patches, patchI) + forAll(patches, patchi) { - if (!donePatch[patchI]) + if (!donePatch[patchi]) { - polyPatch& pp = patches[patchI]; + polyPatch& pp = patches[patchi]; label newI = 0; if (pp.inGroup(groupName)) @@ -530,9 +530,9 @@ Foam::wordList Foam::polyBoundaryMesh::names() const wordList t(patches.size()); - forAll(patches, patchI) + forAll(patches, patchi) { - t[patchI] = patches[patchI].name(); + t[patchi] = patches[patchi].name(); } return t; @@ -545,9 +545,9 @@ Foam::wordList Foam::polyBoundaryMesh::types() const wordList t(patches.size()); - forAll(patches, patchI) + forAll(patches, patchi) { - t[patchI] = patches[patchI].type(); + t[patchi] = patches[patchi].type(); } return t; @@ -560,9 +560,9 @@ Foam::wordList Foam::polyBoundaryMesh::physicalTypes() const wordList t(patches.size()); - forAll(patches, patchI) + forAll(patches, patchi) { - t[patchI] = patches[patchI].physicalType(); + t[patchi] = patches[patchi].physicalType(); } return t; @@ -679,11 +679,11 @@ Foam::label Foam::polyBoundaryMesh::findPatchID(const word& patchName) const { const polyPatchList& patches = *this; - forAll(patches, patchI) + forAll(patches, patchi) { - if (patches[patchI].name() == patchName) + if (patches[patchi].name() == patchName) { - return patchI; + return patchi; } } @@ -719,9 +719,9 @@ Foam::label Foam::polyBoundaryMesh::whichPatch(const label faceIndex) const } - forAll(*this, patchI) + forAll(*this, patchi) { - const polyPatch& bp = operator[](patchI); + const polyPatch& bp = operator[](patchi); if ( @@ -729,7 +729,7 @@ Foam::label Foam::polyBoundaryMesh::whichPatch(const label faceIndex) const && faceIndex < bp.start() + bp.size() ) { - return patchI; + return patchi; } } @@ -874,20 +874,20 @@ bool Foam::polyBoundaryMesh::checkParallelSync(const bool report) const label nonProcI = 0; - forAll(bm, patchI) + forAll(bm, patchi) { - if (!isA<processorPolyPatch>(bm[patchI])) + if (!isA<processorPolyPatch>(bm[patchi])) { - if (nonProcI != patchI) + if (nonProcI != patchi) { // There is processor patch in between normal patches. hasError = true; if (debug || report) { - Pout<< " ***Problem with boundary patch " << patchI - << " named " << bm[patchI].name() - << " of type " << bm[patchI].type() + Pout<< " ***Problem with boundary patch " << patchi + << " named " << bm[patchi].name() + << " of type " << bm[patchi].type() << ". The patch seems to be preceeded by processor" << " patches. This is can give problems." << endl; @@ -895,8 +895,8 @@ bool Foam::polyBoundaryMesh::checkParallelSync(const bool report) const } else { - names[nonProcI] = bm[patchI].name(); - types[nonProcI] = bm[patchI].type(); + names[nonProcI] = bm[patchi].name(); + types[nonProcI] = bm[patchi].type(); nonProcI++; } } @@ -952,34 +952,34 @@ bool Foam::polyBoundaryMesh::checkDefinition(const bool report) const HashSet<word> patchNames(2*size()); - forAll(bm, patchI) + forAll(bm, patchi) { - if (bm[patchI].start() != nextPatchStart && !hasError) + if (bm[patchi].start() != nextPatchStart && !hasError) { hasError = true; - Info<< " ****Problem with boundary patch " << patchI - << " named " << bm[patchI].name() - << " of type " << bm[patchI].type() + Info<< " ****Problem with boundary patch " << patchi + << " named " << bm[patchi].name() + << " of type " << bm[patchi].type() << ". The patch should start on face no " << nextPatchStart - << " and the patch specifies " << bm[patchI].start() + << " and the patch specifies " << bm[patchi].start() << "." << endl << "Possibly consecutive patches have this same problem." << " Suppressing future warnings." << endl; } - if (!patchNames.insert(bm[patchI].name()) && !hasError) + if (!patchNames.insert(bm[patchi].name()) && !hasError) { hasError = true; - Info<< " ****Duplicate boundary patch " << patchI - << " named " << bm[patchI].name() - << " of type " << bm[patchI].type() + Info<< " ****Duplicate boundary patch " << patchi + << " named " << bm[patchi].name() + << " of type " << bm[patchi].type() << "." << endl << "Suppressing future warnings." << endl; } - nextPatchStart += bm[patchI].size(); + nextPatchStart += bm[patchi].size(); } reduce(hasError, orOp<bool>()); @@ -1010,16 +1010,16 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p) || Pstream::defaultCommsType == Pstream::nonBlocking ) { - forAll(*this, patchI) + forAll(*this, patchi) { - operator[](patchI).initMovePoints(pBufs, p); + operator[](patchi).initMovePoints(pBufs, p); } pBufs.finishedSends(); - forAll(*this, patchI) + forAll(*this, patchi) { - operator[](patchI).movePoints(pBufs, p); + operator[](patchi).movePoints(pBufs, p); } } else if (Pstream::defaultCommsType == Pstream::scheduled) @@ -1031,15 +1031,15 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p) forAll(patchSchedule, patchEvali) { - const label patchI = patchSchedule[patchEvali].patch; + const label patchi = patchSchedule[patchEvali].patch; if (patchSchedule[patchEvali].init) { - operator[](patchI).initMovePoints(pBufs, p); + operator[](patchi).initMovePoints(pBufs, p); } else { - operator[](patchI).movePoints(pBufs, p); + operator[](patchi).movePoints(pBufs, p); } } } @@ -1060,16 +1060,16 @@ void Foam::polyBoundaryMesh::updateMesh() || Pstream::defaultCommsType == Pstream::nonBlocking ) { - forAll(*this, patchI) + forAll(*this, patchi) { - operator[](patchI).initUpdateMesh(pBufs); + operator[](patchi).initUpdateMesh(pBufs); } pBufs.finishedSends(); - forAll(*this, patchI) + forAll(*this, patchi) { - operator[](patchI).updateMesh(pBufs); + operator[](patchi).updateMesh(pBufs); } } else if (Pstream::defaultCommsType == Pstream::scheduled) @@ -1081,15 +1081,15 @@ void Foam::polyBoundaryMesh::updateMesh() forAll(patchSchedule, patchEvali) { - const label patchI = patchSchedule[patchEvali].patch; + const label patchi = patchSchedule[patchEvali].patch; if (patchSchedule[patchEvali].init) { - operator[](patchI).initUpdateMesh(pBufs); + operator[](patchi).initUpdateMesh(pBufs); } else { - operator[](patchI).updateMesh(pBufs); + operator[](patchi).updateMesh(pBufs); } } } @@ -1108,9 +1108,9 @@ void Foam::polyBoundaryMesh::reorder // Adapt indices polyPatchList& patches = *this; - forAll(patches, patchI) + forAll(patches, patchi) { - patches[patchI].index() = patchI; + patches[patchi].index() = patchi; } if (validBoundary) @@ -1126,11 +1126,11 @@ bool Foam::polyBoundaryMesh::writeData(Ostream& os) const os << patches.size() << nl << token::BEGIN_LIST << incrIndent << nl; - forAll(patches, patchI) + forAll(patches, patchi) { - os << indent << patches[patchI].name() << nl + os << indent << patches[patchi].name() << nl << indent << token::BEGIN_BLOCK << nl - << incrIndent << patches[patchI] << decrIndent + << incrIndent << patches[patchi] << decrIndent << indent << token::END_BLOCK << endl; } @@ -1160,9 +1160,9 @@ const Foam::polyPatch& Foam::polyBoundaryMesh::operator[] const word& patchName ) const { - const label patchI = findPatchID(patchName); + const label patchi = findPatchID(patchName); - if (patchI < 0) + if (patchi < 0) { FatalErrorInFunction << "Patch named " << patchName << " not found." << nl @@ -1170,7 +1170,7 @@ const Foam::polyPatch& Foam::polyBoundaryMesh::operator[] << abort(FatalError); } - return operator[](patchI); + return operator[](patchi); } @@ -1179,9 +1179,9 @@ Foam::polyPatch& Foam::polyBoundaryMesh::operator[] const word& patchName ) { - const label patchI = findPatchID(patchName); + const label patchi = findPatchID(patchName); - if (patchI < 0) + if (patchi < 0) { FatalErrorInFunction << "Patch named " << patchName << " not found." << nl @@ -1189,7 +1189,7 @@ Foam::polyPatch& Foam::polyBoundaryMesh::operator[] << abort(FatalError); } - return operator[](patchI); + return operator[](patchi); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshTemplates.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshTemplates.C index 3afb9df7c07b8871cb6f4c4fdfbf95daa45b5803..76be9e370f458675d89390bb3727c3547a34be85 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMeshTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -32,11 +32,11 @@ Foam::labelHashSet Foam::polyBoundaryMesh::findPatchIDs() const labelHashSet patchIDs(bm.size()); - forAll(bm, patchI) + forAll(bm, patchi) { - if (isA<Type>(bm[patchI])) + if (isA<Type>(bm[patchi])) { - patchIDs.insert(patchI); + patchIDs.insert(patchi); } } return patchIDs; diff --git a/src/OpenFOAM/meshes/polyMesh/polyMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMesh.C index 4aa8f63a39668b5808fed11775c03b2bd0c161c1..53be08ccd931e0909cfc31a4d3cc98414c61920d 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMesh.C @@ -677,15 +677,15 @@ void Foam::polyMesh::resetPrimitives // Reset patch sizes and starts - forAll(boundary_, patchI) + forAll(boundary_, patchi) { - boundary_[patchI] = polyPatch + boundary_[patchi] = polyPatch ( - boundary_[patchI], + boundary_[patchi], boundary_, - patchI, - patchSizes[patchI], - patchStarts[patchI] + patchi, + patchSizes[patchi], + patchStarts[patchi] ); } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C index 45494b3ce93099ebbee38e203b314fae28c46d05..ec2c6877c969076d8e25ad919cdc65699845e1b7 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshCheck.C @@ -72,15 +72,15 @@ bool Foam::polyMesh::checkFaceOrthogonality // Statistics only for internal and masters of coupled faces PackedBoolList isMasterFace(syncTools::getInternalOrMasterFaces(*this)); - forAll(ortho, faceI) + forAll(ortho, facei) { - if (ortho[faceI] < severeNonorthogonalityThreshold) + if (ortho[facei] < severeNonorthogonalityThreshold) { - if (ortho[faceI] > SMALL) + if (ortho[facei] > SMALL) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } severeNonOrth++; @@ -90,18 +90,18 @@ bool Foam::polyMesh::checkFaceOrthogonality // Error : non-ortho too large if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } if (detailedReport && errorNonOrth == 0) { // Non-orthogonality greater than 90 deg WarningInFunction << "Severe non-orthogonality for face " - << faceI - << " between cells " << own[faceI] - << " and " << nei[faceI] + << facei + << " between cells " << own[facei] + << " and " << nei[facei] << ": Angle = " - << radToDeg(::acos(min(1.0, max(-1.0, ortho[faceI])))) + << radToDeg(::acos(min(1.0, max(-1.0, ortho[facei])))) << " deg." << endl; } @@ -109,10 +109,10 @@ bool Foam::polyMesh::checkFaceOrthogonality } } - if (isMasterFace[faceI]) + if (isMasterFace[facei]) { - minDDotS = min(minDDotS, ortho[faceI]); - sumDDotS += ortho[faceI]; + minDDotS = min(minDDotS, ortho[facei]); + sumDDotS += ortho[facei]; nSummed++; } } @@ -205,37 +205,37 @@ bool Foam::polyMesh::checkFaceSkewness // Statistics only for all faces except slave coupled faces PackedBoolList isMasterFace(syncTools::getMasterFaces(*this)); - forAll(skew, faceI) + forAll(skew, facei) { // Check if the skewness vector is greater than the PN vector. // This does not cause trouble but is a good indication of a poor mesh. - if (skew[faceI] > skewThreshold_) + if (skew[facei] > skewThreshold_) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } if (detailedReport && nWarnSkew == 0) { // Non-orthogonality greater than 90 deg - if (isInternalFace(faceI)) + if (isInternalFace(facei)) { WarningInFunction - << "Severe skewness " << skew[faceI] - << " for face " << faceI - << " between cells " << own[faceI] - << " and " << nei[faceI]; + << "Severe skewness " << skew[facei] + << " for face " << facei + << " between cells " << own[facei] + << " and " << nei[facei]; } else { WarningInFunction - << "Severe skewness " << skew[faceI] - << " for boundary face " << faceI - << " on cell " << own[faceI]; + << "Severe skewness " << skew[facei] + << " for boundary face " << facei + << " on cell " << own[facei]; } } - if (isMasterFace[faceI]) + if (isMasterFace[facei]) { nWarnSkew++; } @@ -314,9 +314,9 @@ bool Foam::polyMesh::checkEdgeAlignment EdgeMap<label> edgesInError; - forAll(fcs, faceI) + forAll(fcs, facei) { - const face& f = fcs[faceI]; + const face& f = fcs[facei]; forAll(f, fp) { @@ -358,13 +358,13 @@ bool Foam::polyMesh::checkEdgeAlignment // Ok if purely in empty directions. if (nNonEmptyDirs > 0) { - edgesInError.insert(edge(p0, p1), faceI); + edgesInError.insert(edge(p0, p1), facei); } } else if (nEmptyDirs > 1) { // Always an error - edgesInError.insert(edge(p0, p1), faceI); + edgesInError.insert(edge(p0, p1), facei); } } } @@ -434,13 +434,13 @@ bool Foam::polyMesh::checkCellDeterminant scalar minDet = min(cellDeterminant); scalar sumDet = sum(cellDeterminant); - forAll(cellDeterminant, cellI) + forAll(cellDeterminant, celli) { - if (cellDeterminant[cellI] < warnDet) + if (cellDeterminant[celli] < warnDet) { if (setPtr) { - setPtr->insert(cellI); + setPtr->insert(celli); } nErrorCells++; @@ -520,24 +520,24 @@ bool Foam::polyMesh::checkFaceWeight // Statistics only for internal and masters of coupled faces PackedBoolList isMasterFace(syncTools::getInternalOrMasterFaces(*this)); - forAll(faceWght, faceI) + forAll(faceWght, facei) { - if (faceWght[faceI] < minWeight) + if (faceWght[facei] < minWeight) { // Note: insert both sides of coupled faces if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorFaces++; } // Note: statistics only on master of coupled faces - if (isMasterFace[faceI]) + if (isMasterFace[facei]) { - minDet = min(minDet, faceWght[faceI]); - sumDet += faceWght[faceI]; + minDet = min(minDet, faceWght[facei]); + sumDet += faceWght[facei]; nSummed++; } } @@ -607,24 +607,24 @@ bool Foam::polyMesh::checkVolRatio // Statistics only for internal and masters of coupled faces PackedBoolList isMasterFace(syncTools::getInternalOrMasterFaces(*this)); - forAll(volRatio, faceI) + forAll(volRatio, facei) { - if (volRatio[faceI] < minRatio) + if (volRatio[facei] < minRatio) { // Note: insert both sides of coupled faces if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorFaces++; } // Note: statistics only on master of coupled faces - if (isMasterFace[faceI]) + if (isMasterFace[facei]) { - minDet = min(minDet, volRatio[faceI]); - sumDet += volRatio[faceI]; + minDet = min(minDet, volRatio[facei]); + sumDet += volRatio[facei]; nSummed++; } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C index 3cde2db2922a1e8cfc887fcf39da508c78cf8ed2..3ca9dd4a106a43dbc1b9c732cbe86c6272a9394a 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.C @@ -46,13 +46,13 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceOrthogonality scalarField& ortho = tortho.ref(); // Internal faces - forAll(nei, faceI) + forAll(nei, facei) { - ortho[faceI] = primitiveMeshTools::faceOrthogonality + ortho[facei] = primitiveMeshTools::faceOrthogonality ( - cc[own[faceI]], - cc[nei[faceI]], - areas[faceI] + cc[own[facei]], + cc[nei[facei]], + areas[facei] ); } @@ -62,21 +62,21 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceOrthogonality pointField neighbourCc; syncTools::swapBoundaryCellPositions(mesh, cc, neighbourCc); - forAll(pbm, patchI) + forAll(pbm, patchi) { - const polyPatch& pp = pbm[patchI]; + const polyPatch& pp = pbm[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start() + i; - label bFaceI = faceI - mesh.nInternalFaces(); + label facei = pp.start() + i; + label bFaceI = facei - mesh.nInternalFaces(); - ortho[faceI] = primitiveMeshTools::faceOrthogonality + ortho[facei] = primitiveMeshTools::faceOrthogonality ( - cc[own[faceI]], + cc[own[facei]], neighbourCc[bFaceI], - areas[faceI] + areas[facei] ); } } @@ -102,18 +102,18 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceSkewness tmp<scalarField> tskew(new scalarField(mesh.nFaces())); scalarField& skew = tskew.ref(); - forAll(nei, faceI) + forAll(nei, facei) { - skew[faceI] = primitiveMeshTools::faceSkewness + skew[facei] = primitiveMeshTools::faceSkewness ( mesh, p, fCtrs, fAreas, - faceI, - cellCtrs[own[faceI]], - cellCtrs[nei[faceI]] + facei, + cellCtrs[own[facei]], + cellCtrs[nei[facei]] ); } @@ -124,25 +124,25 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceSkewness pointField neighbourCc; syncTools::swapBoundaryCellPositions(mesh, cellCtrs, neighbourCc); - forAll(pbm, patchI) + forAll(pbm, patchi) { - const polyPatch& pp = pbm[patchI]; + const polyPatch& pp = pbm[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start() + i; - label bFaceI = faceI - mesh.nInternalFaces(); + label facei = pp.start() + i; + label bFaceI = facei - mesh.nInternalFaces(); - skew[faceI] = primitiveMeshTools::faceSkewness + skew[facei] = primitiveMeshTools::faceSkewness ( mesh, p, fCtrs, fAreas, - faceI, - cellCtrs[own[faceI]], + facei, + cellCtrs[own[facei]], neighbourCc[bFaceI] ); } @@ -151,17 +151,17 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceSkewness { forAll(pp, i) { - label faceI = pp.start() + i; + label facei = pp.start() + i; - skew[faceI] = primitiveMeshTools::boundaryFaceSkewness + skew[facei] = primitiveMeshTools::boundaryFaceSkewness ( mesh, p, fCtrs, fAreas, - faceI, - cellCtrs[own[faceI]] + facei, + cellCtrs[own[facei]] ); } } @@ -187,15 +187,15 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceWeights scalarField& weight = tweight.ref(); // Internal faces - forAll(nei, faceI) + forAll(nei, facei) { - const point& fc = fCtrs[faceI]; - const vector& fa = fAreas[faceI]; + const point& fc = fCtrs[facei]; + const vector& fa = fAreas[facei]; - scalar dOwn = mag(fa & (fc-cellCtrs[own[faceI]])); - scalar dNei = mag(fa & (cellCtrs[nei[faceI]]-fc)); + scalar dOwn = mag(fa & (fc-cellCtrs[own[facei]])); + scalar dNei = mag(fa & (cellCtrs[nei[facei]]-fc)); - weight[faceI] = min(dNei,dOwn)/(dNei+dOwn+VSMALL); + weight[facei] = min(dNei,dOwn)/(dNei+dOwn+VSMALL); } @@ -204,23 +204,23 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::faceWeights pointField neiCc; syncTools::swapBoundaryCellPositions(mesh, cellCtrs, neiCc); - forAll(pbm, patchI) + forAll(pbm, patchi) { - const polyPatch& pp = pbm[patchI]; + const polyPatch& pp = pbm[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start() + i; - label bFaceI = faceI - mesh.nInternalFaces(); + label facei = pp.start() + i; + label bFaceI = facei - mesh.nInternalFaces(); - const point& fc = fCtrs[faceI]; - const vector& fa = fAreas[faceI]; + const point& fc = fCtrs[facei]; + const vector& fa = fAreas[facei]; - scalar dOwn = mag(fa & (fc-cellCtrs[own[faceI]])); + scalar dOwn = mag(fa & (fc-cellCtrs[own[facei]])); scalar dNei = mag(fa & (neiCc[bFaceI]-fc)); - weight[faceI] = min(dNei,dOwn)/(dNei+dOwn+VSMALL); + weight[facei] = min(dNei,dOwn)/(dNei+dOwn+VSMALL); } } } @@ -243,12 +243,12 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::volRatio scalarField& ratio = tratio.ref(); // Internal faces - forAll(nei, faceI) + forAll(nei, facei) { - scalar volOwn = vol[own[faceI]]; - scalar volNei = vol[nei[faceI]]; + scalar volOwn = vol[own[facei]]; + scalar volNei = vol[nei[facei]]; - ratio[faceI] = min(volOwn,volNei)/(max(volOwn, volNei)+VSMALL); + ratio[facei] = min(volOwn,volNei)/(max(volOwn, volNei)+VSMALL); } @@ -257,20 +257,20 @@ Foam::tmp<Foam::scalarField> Foam::polyMeshTools::volRatio scalarField neiVol; syncTools::swapBoundaryCellList(mesh, vol, neiVol); - forAll(pbm, patchI) + forAll(pbm, patchi) { - const polyPatch& pp = pbm[patchI]; + const polyPatch& pp = pbm[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start() + i; - label bFaceI = faceI - mesh.nInternalFaces(); + label facei = pp.start() + i; + label bFaceI = facei - mesh.nInternalFaces(); - scalar volOwn = vol[own[faceI]]; + scalar volOwn = vol[own[facei]]; scalar volNei = neiVol[bFaceI]; - ratio[faceI] = min(volOwn,volNei)/(max(volOwn, volNei)+VSMALL); + 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 d0461b67a9766c24a83cd4b53812ae9686bb520a..b2035c14fd6e1f7009967080f27a03446091940f 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C @@ -93,16 +93,16 @@ Foam::labelList Foam::polyMesh::facePatchFaceCells { const labelList& facePointCells = pointCells[facePoints[pointI]]; - forAll(facePointCells, cellI) + forAll(facePointCells, celli) { - faceList cellFaces = cellsFaceShapes[facePointCells[cellI]]; + faceList cellFaces = cellsFaceShapes[facePointCells[celli]]; forAll(cellFaces, cellFace) { if (face::sameVertices(cellFaces[cellFace], curFace)) { // Found the cell corresponding to this face - FaceCells[fI] = facePointCells[cellI]; + FaceCells[fI] = facePointCells[celli]; found = true; } @@ -147,17 +147,17 @@ void Foam::polyMesh::setTopology faceListList cellsFaceShapes(cellsAsShapes.size()); cells.setSize(cellsAsShapes.size()); - forAll(cellsFaceShapes, cellI) + forAll(cellsFaceShapes, celli) { - cellsFaceShapes[cellI] = cellsAsShapes[cellI].faces(); + cellsFaceShapes[celli] = cellsAsShapes[celli].faces(); - cells[cellI].setSize(cellsFaceShapes[cellI].size()); + cells[celli].setSize(cellsFaceShapes[celli].size()); // Initialise cells to -1 to flag undefined faces - static_cast<labelList&>(cells[cellI]) = -1; + static_cast<labelList&>(cells[celli]) = -1; // Count maximum possible numer of mesh faces - maxFaces += cellsFaceShapes[cellI].size(); + maxFaces += cellsFaceShapes[celli].size(); } // Set size of faces array to maximum possible number of mesh faces @@ -171,7 +171,7 @@ void Foam::polyMesh::setTopology bool found = false; - forAll(cells, cellI) + forAll(cells, celli) { // Note: // Insertion cannot be done in one go as the faces need to be @@ -179,7 +179,7 @@ void Foam::polyMesh::setTopology // cells. Therefore, all neighbours will be detected first // and then added in the correct order. - const faceList& curFaces = cellsFaceShapes[cellI]; + const faceList& curFaces = cellsFaceShapes[celli]; // Record the neighbour cell labelList neiCells(curFaces.size(), -1); @@ -190,14 +190,14 @@ void Foam::polyMesh::setTopology label nNeighbours = 0; // For all faces ... - forAll(curFaces, faceI) + forAll(curFaces, facei) { // Skip faces that have already been matched - if (cells[cellI][faceI] >= 0) continue; + if (cells[celli][facei] >= 0) continue; found = false; - const face& curFace = curFaces[faceI]; + const face& curFace = curFaces[facei]; // Get the list of labels const labelList& curPoints = curFace; @@ -215,7 +215,7 @@ void Foam::polyMesh::setTopology label curNei = curNeighbours[neiI]; // Reject neighbours with the lower label - if (curNei > cellI) + if (curNei > celli) { // Get the list of search faces const faceList& searchFaces = cellsFaceShapes[curNei]; @@ -228,8 +228,8 @@ void Foam::polyMesh::setTopology found = true; // Record the neighbour cell and face - neiCells[faceI] = curNei; - faceOfNeiCell[faceI] = neiFaceI; + neiCells[facei] = curNei; + faceOfNeiCell[facei] = neiFaceI; nNeighbours++; break; @@ -265,7 +265,7 @@ void Foam::polyMesh::setTopology faces_[nFaces] = curFaces[nextNei]; // Set cell-face and cell-neighbour-face to current face label - cells[cellI][nextNei] = nFaces; + cells[celli][nextNei] = nFaces; cells[neiCells[nextNei]][faceOfNeiCell[nextNei]] = nFaces; // Stop the neighbour from being used again @@ -288,9 +288,9 @@ void Foam::polyMesh::setTopology patchSizes.setSize(boundaryFaces.size(), -1); patchStarts.setSize(boundaryFaces.size(), -1); - forAll(boundaryFaces, patchI) + forAll(boundaryFaces, patchi) { - const faceList& patchFaces = boundaryFaces[patchI]; + const faceList& patchFaces = boundaryFaces[patchi]; labelList curPatchFaceCells = facePatchFaceCells @@ -298,17 +298,17 @@ void Foam::polyMesh::setTopology patchFaces, PointCells, cellsFaceShapes, - patchI + patchi ); // Grab the start label label curPatchStart = nFaces; - forAll(patchFaces, faceI) + forAll(patchFaces, facei) { - const face& curFace = patchFaces[faceI]; + const face& curFace = patchFaces[facei]; - const label cellInside = curPatchFaceCells[faceI]; + const label cellInside = curPatchFaceCells[facei]; // Get faces of the cell inside const faceList& facesOfCellInside = cellsFaceShapes[cellInside]; @@ -326,9 +326,9 @@ void Foam::polyMesh::setTopology << " on the face on cell " << cellInside << " which is either an internal face or already " << "belongs to some other patch. This is face " - << faceI << " of patch " - << patchI << " named " - << boundaryPatchNames[patchI] << "." + << facei << " of patch " + << patchi << " named " + << boundaryPatchNames[patchi] << "." << abort(FatalError); } @@ -346,7 +346,7 @@ void Foam::polyMesh::setTopology if (!found) { FatalErrorInFunction - << "face " << faceI << " of patch " << patchI + << "face " << facei << " of patch " << patchi << " does not seem to belong to cell " << cellInside << " which, according to the addressing, " << "should be next to it." @@ -357,24 +357,24 @@ void Foam::polyMesh::setTopology nFaces++; } - patchSizes[patchI] = nFaces - curPatchStart; - patchStarts[patchI] = curPatchStart; + patchSizes[patchi] = nFaces - curPatchStart; + patchStarts[patchi] = curPatchStart; } // Grab "non-existing" faces and put them into a default patch defaultPatchStart = nFaces; - forAll(cells, cellI) + forAll(cells, celli) { - labelList& curCellFaces = cells[cellI]; + labelList& curCellFaces = cells[celli]; - forAll(curCellFaces, faceI) + forAll(curCellFaces, facei) { - if (curCellFaces[faceI] == -1) // "non-existent" face + if (curCellFaces[facei] == -1) // "non-existent" face { - curCellFaces[faceI] = nFaces; - faces_[nFaces] = cellsFaceShapes[cellI][faceI]; + curCellFaces[facei] = nFaces; + faces_[nFaces] = cellsFaceShapes[celli][facei]; nFaces++; } @@ -553,19 +553,19 @@ Foam::polyMesh::polyMesh // Warning: Patches can only be added once the face list is // completed, as they hold a subList of the face list - forAll(boundaryFaces, patchI) + forAll(boundaryFaces, patchi) { // Add the patch to the list boundary_.set ( - patchI, + patchi, polyPatch::New ( - boundaryPatchTypes[patchI], - boundaryPatchNames[patchI], - patchSizes[patchI], - patchStarts[patchI], - patchI, + boundaryPatchTypes[patchi], + boundaryPatchNames[patchi], + patchSizes[patchi], + patchStarts[patchi], + patchi, boundary_ ) ); @@ -573,11 +573,11 @@ Foam::polyMesh::polyMesh if ( boundaryPatchPhysicalTypes.size() - && boundaryPatchPhysicalTypes[patchI].size() + && boundaryPatchPhysicalTypes[patchi].size() ) { - boundary_[patchI].physicalType() = - boundaryPatchPhysicalTypes[patchI]; + boundary_[patchi].physicalType() = + boundaryPatchPhysicalTypes[patchi]; } } @@ -598,32 +598,32 @@ Foam::polyMesh::polyMesh // Check if there already exists a defaultFaces patch as last patch // and reuse it. - label patchI = findIndex(boundaryPatchNames, defaultBoundaryPatchName); + label patchi = findIndex(boundaryPatchNames, defaultBoundaryPatchName); - if (patchI != -1) + if (patchi != -1) { - if (patchI != boundaryFaces.size()-1 || boundary_[patchI].size()) + if (patchi != boundaryFaces.size()-1 || boundary_[patchi].size()) { FatalErrorInFunction - << "Default patch " << boundary_[patchI].name() + << "Default patch " << boundary_[patchi].name() << " already has faces in it or is not" << " last in list of patches." << exit(FatalError); } WarningInFunction - << "Reusing existing patch " << patchI + << "Reusing existing patch " << patchi << " for undefined faces." << endl; boundary_.set ( - patchI, + patchi, polyPatch::New ( - boundaryPatchTypes[patchI], - boundaryPatchNames[patchI], + boundaryPatchTypes[patchi], + boundaryPatchNames[patchi], nFaces - defaultPatchStart, defaultPatchStart, - patchI, + patchi, boundary_ ) ); @@ -837,22 +837,22 @@ Foam::polyMesh::polyMesh // Warning: Patches can only be added once the face list is // completed, as they hold a subList of the face list - forAll(boundaryDicts, patchI) + forAll(boundaryDicts, patchi) { - dictionary patchDict(boundaryDicts[patchI]); + dictionary patchDict(boundaryDicts[patchi]); - patchDict.set("nFaces", patchSizes[patchI]); - patchDict.set("startFace", patchStarts[patchI]); + patchDict.set("nFaces", patchSizes[patchi]); + patchDict.set("startFace", patchStarts[patchi]); // Add the patch to the list boundary_.set ( - patchI, + patchi, polyPatch::New ( - boundaryPatchNames[patchI], + boundaryPatchNames[patchi], patchDict, - patchI, + patchi, boundary_ ) ); @@ -874,32 +874,32 @@ Foam::polyMesh::polyMesh // Check if there already exists a defaultFaces patch as last patch // and reuse it. - label patchI = findIndex(boundaryPatchNames, defaultBoundaryPatchName); + label patchi = findIndex(boundaryPatchNames, defaultBoundaryPatchName); - if (patchI != -1) + if (patchi != -1) { - if (patchI != boundaryFaces.size()-1 || boundary_[patchI].size()) + if (patchi != boundaryFaces.size()-1 || boundary_[patchi].size()) { FatalErrorInFunction - << "Default patch " << boundary_[patchI].name() + << "Default patch " << boundary_[patchi].name() << " already has faces in it or is not" << " last in list of patches." << exit(FatalError); } WarningInFunction - << "Reusing existing patch " << patchI + << "Reusing existing patch " << patchi << " for undefined faces." << endl; boundary_.set ( - patchI, + patchi, polyPatch::New ( - boundary_[patchI].type(), - boundary_[patchI].name(), + boundary_[patchi].type(), + boundary_[patchi].name(), nFaces - defaultPatchStart, defaultPatchStart, - patchI, + patchi, boundary_ ) ); diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C b/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C index d67eeeceb8737426ec3fbe2181e04ea1c2462b87..2d41380d22a89aa6f1e8f48a3d4895a334244204 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshIO.C @@ -184,12 +184,12 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate() wordList oldTypes = boundary_.types(); wordList oldNames = boundary_.names(); - forAll(oldTypes, patchI) + forAll(oldTypes, patchi) { if ( - oldTypes[patchI] != newTypes[patchI] - || oldNames[patchI] != newNames[patchI] + oldTypes[patchi] != newTypes[patchi] + || oldNames[patchi] != newNames[patchi] ) { boundaryChanged = true; @@ -206,23 +206,23 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate() boundary_.clear(); boundary_.setSize(newBoundary.size()); - forAll(newBoundary, patchI) + forAll(newBoundary, patchi) { - boundary_.set(patchI, newBoundary[patchI].clone(boundary_)); + boundary_.set(patchi, newBoundary[patchi].clone(boundary_)); } } else { - forAll(boundary_, patchI) + forAll(boundary_, patchi) { - boundary_[patchI] = polyPatch + boundary_[patchi] = polyPatch ( - newBoundary[patchI].name(), - newBoundary[patchI].size(), - newBoundary[patchI].start(), - patchI, + newBoundary[patchi].name(), + newBoundary[patchi].size(), + newBoundary[patchi].start(), + patchi, boundary_, - newBoundary[patchI].type() + newBoundary[patchi].type() ); } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C index 730d7b3b475bd2b2324268bcd4a5a6f88279e6e6..403f87e005003cb16aaa7ba6edc68780d135b9e9 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshInitMesh.C @@ -40,9 +40,9 @@ void Foam::polyMesh::initMesh() { label nInternalFaces = 0; - forAll(neighbour_, faceI) + forAll(neighbour_, facei) { - if (neighbour_[faceI] == -1) + if (neighbour_[facei] == -1) { break; } @@ -118,31 +118,31 @@ void Foam::polyMesh::initMesh(cellList& c) label nInternalFaces = 0; - forAll(c, cellI) + forAll(c, celli) { // get reference to face labels for current cell - const labelList& cellfaces = c[cellI]; + const labelList& cellfaces = c[celli]; - forAll(cellfaces, faceI) + forAll(cellfaces, facei) { - if (cellfaces[faceI] < 0) + if (cellfaces[facei] < 0) { FatalErrorInFunction - << "Illegal face label " << cellfaces[faceI] - << " in cell " << cellI + << "Illegal face label " << cellfaces[facei] + << " in cell " << celli << exit(FatalError); } - if (!markedFaces[cellfaces[faceI]]) + if (!markedFaces[cellfaces[facei]]) { // First visit: owner - owner_[cellfaces[faceI]] = cellI; - markedFaces[cellfaces[faceI]] = true; + owner_[cellfaces[facei]] = celli; + markedFaces[cellfaces[facei]] = true; } else { // Second visit: neighbour - neighbour_[cellfaces[faceI]] = cellI; + neighbour_[cellfaces[facei]] = celli; nInternalFaces++; } } diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C index a38773d455e5e98e6eaeef66b59a427e46545b70..04d7e7fbdc04d5b36a0e3608a30a108078d2daa3 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/polyMeshTetDecomposition.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 @@ -226,10 +226,10 @@ Foam::labelList Foam::polyMeshTetDecomposition::findFaceBasePts pointField neighbourCellCentres(mesh.nFaces() - nInternalFaces); - for(label faceI = nInternalFaces; faceI < mesh.nFaces(); faceI++) + for(label facei = nInternalFaces; facei < mesh.nFaces(); facei++) { - neighbourCellCentres[faceI - nInternalFaces] = - pC[pOwner[faceI]]; + neighbourCellCentres[facei - nInternalFaces] = + pC[pOwner[facei]]; } syncTools::swapBoundaryFacePositions(mesh, neighbourCellCentres); @@ -250,13 +250,13 @@ Foam::labelList Foam::polyMeshTetDecomposition::findFaceBasePts fI++, bFI++ ) { - label patchI = + label patchi = mesh.boundaryMesh().patchID()[bFI]; - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { const coupledPolyPatch& pp = - refCast<const coupledPolyPatch>(patches[patchI]); + refCast<const coupledPolyPatch>(patches[patchi]); if (pp.owner()) { @@ -323,12 +323,12 @@ Foam::labelList Foam::polyMeshTetDecomposition::findFaceBasePts continue; } - label patchI = mesh.boundaryMesh().patchID()[bFI]; + label patchi = mesh.boundaryMesh().patchID()[bFI]; - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { const coupledPolyPatch& pp = - refCast<const coupledPolyPatch>(patches[patchI]); + refCast<const coupledPolyPatch>(patches[patchi]); // Calculated base points on coupled faces are those of // the owner patch face. They need to be reindexed to for @@ -381,9 +381,9 @@ bool Foam::polyMeshTetDecomposition::checkFaceTets // Calculate coupled cell centre pointField neiCc(mesh.nFaces() - mesh.nInternalFaces()); - for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++) + for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++) { - neiCc[faceI - mesh.nInternalFaces()] = cc[own[faceI]]; + neiCc[facei - mesh.nInternalFaces()] = cc[own[facei]]; } syncTools::swapBoundaryFacePositions(mesh, neiCc); @@ -394,9 +394,9 @@ bool Foam::polyMeshTetDecomposition::checkFaceTets label nErrorTets = 0; - forAll(fcs, faceI) + forAll(fcs, facei) { - const face& f = fcs[faceI]; + const face& f = fcs[facei]; forAll(f, fPtI) { @@ -404,15 +404,15 @@ bool Foam::polyMeshTetDecomposition::checkFaceTets ( p[f[fPtI]], p[f.nextLabel(fPtI)], - fc[faceI], - cc[own[faceI]] + fc[facei], + cc[own[facei]] ).quality(); if (tetQual > -tol) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorTets++; @@ -420,10 +420,10 @@ bool Foam::polyMeshTetDecomposition::checkFaceTets } } - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { // Create the neighbour tet - it will have positive volume - const face& f = fcs[faceI]; + const face& f = fcs[facei]; forAll(f, fPtI) { @@ -431,15 +431,15 @@ bool Foam::polyMeshTetDecomposition::checkFaceTets ( p[f[fPtI]], p[f.nextLabel(fPtI)], - fc[faceI], - cc[nei[faceI]] + fc[facei], + cc[nei[facei]] ).quality(); if (tetQual < tol) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorTets++; @@ -447,11 +447,11 @@ bool Foam::polyMeshTetDecomposition::checkFaceTets } } - if (findSharedBasePoint(mesh, faceI, tol, report) == -1) + if (findSharedBasePoint(mesh, facei, tol, report) == -1) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorTets++; @@ -459,17 +459,17 @@ bool Foam::polyMeshTetDecomposition::checkFaceTets } else { - label patchI = patches.patchID()[faceI - mesh.nInternalFaces()]; + label patchi = patches.patchID()[facei - mesh.nInternalFaces()]; - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { if ( findSharedBasePoint ( mesh, - faceI, - neiCc[faceI - mesh.nInternalFaces()], + facei, + neiCc[facei - mesh.nInternalFaces()], tol, report ) == -1 @@ -477,7 +477,7 @@ bool Foam::polyMeshTetDecomposition::checkFaceTets { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorTets++; @@ -485,11 +485,11 @@ bool Foam::polyMeshTetDecomposition::checkFaceTets } else { - if (findBasePoint(mesh, faceI, tol, report) == -1) + if (findBasePoint(mesh, facei, tol, report) == -1) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorTets++; diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndices.C b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndices.C index b19a2a372db411ca41c8b607925d8c58f9e5f821..f380512362f9a8bea97480d42faef829a0c7fb7b 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndices.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndices.C @@ -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 @@ -29,8 +29,8 @@ License Foam::tetIndices::tetIndices() : - cellI_(-1), - faceI_(-1), + celli_(-1), + facei_(-1), faceBasePtI_(-1), facePtAI_(-1), facePtBI_(-1), @@ -40,16 +40,16 @@ Foam::tetIndices::tetIndices() Foam::tetIndices::tetIndices ( - label cellI, - label faceI, + label celli, + label facei, label faceBasePtI, label facePtAI, label facePtBI, label tetPtI ) : - cellI_(cellI), - faceI_(faceI), + celli_(celli), + facei_(facei), faceBasePtI_(faceBasePtI), facePtAI_(facePtAI), facePtBI_(facePtBI), @@ -59,14 +59,14 @@ Foam::tetIndices::tetIndices Foam::tetIndices::tetIndices ( - label cellI, - label faceI, + label celli, + label facei, label tetPtI, const polyMesh& mesh ) : - cellI_(cellI), - faceI_(faceI), + celli_(celli), + facei_(facei), faceBasePtI_(-1), facePtAI_(-1), facePtBI_(-1), @@ -75,11 +75,11 @@ Foam::tetIndices::tetIndices const faceList& pFaces = mesh.faces(); const labelList& pOwner = mesh.faceOwner(); - const Foam::face& f = pFaces[faceI_]; + const Foam::face& f = pFaces[facei_]; - bool own = (pOwner[faceI_] == cellI_); + bool own = (pOwner[facei_] == celli_); - faceBasePtI_ = mesh.tetBasePtIs()[faceI_]; + faceBasePtI_ = mesh.tetBasePtIs()[facei_]; label facePtI = (tetPtI_ + faceBasePtI_) % f.size(); label otherFacePtI = f.fcIndex(facePtI); diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndices.H b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndices.H index bacfca5363849bf58c1f5ad8b12623fe74d526be..d33d5f98b735a1d87f8f83b17b84bdcff8b7a9bc 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndices.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndices.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 @@ -76,10 +76,10 @@ class tetIndices // Private data //- Cell that this is a decomposed tet of - label cellI_; + label celli_; //- Face that holds this decomposed tet - label faceI_; + label facei_; //- Base point on the face label faceBasePtI_; @@ -109,8 +109,8 @@ public: //- Construct from components tetIndices ( - label cellI, - label faceI, + label celli, + label facei, label faceBasePtI, label facePtAI, label facePtBI, @@ -120,8 +120,8 @@ public: //- Construct from cell, face, pt description of tet tetIndices ( - label cellI, - label faceI, + label celli, + label facei, label tetPtI, const polyMesh& mesh ); diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H index 8db94610e1ad87083b2aaa086cc52c6d6167c430..7a30eea0999f161053c84d2094e351ad23d7aea4 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshTetDecomposition/tetIndicesI.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 @@ -29,13 +29,13 @@ License Foam::label Foam::tetIndices::cell() const { - return cellI_; + return celli_; } Foam::label Foam::tetIndices::face() const { - return faceI_; + return facei_; } @@ -69,11 +69,11 @@ Foam::tetPointRef Foam::tetIndices::tet(const polyMesh& mesh) const const faceList& pFaces = mesh.faces(); const vectorField& pC = mesh.cellCentres(); - const Foam::face& f = pFaces[faceI_]; + const Foam::face& f = pFaces[facei_]; return tetPointRef ( - pC[cellI_], + pC[celli_], pPts[f[faceBasePtI_]], pPts[f[facePtAI_]], pPts[f[facePtBI_]] @@ -88,13 +88,13 @@ Foam::tetPointRef Foam::tetIndices::oldTet(const polyMesh& mesh) const // We need to reconstruct the old Cc from oldPoints (it isn't // stored) - point oldC = mesh.cells()[cellI_].centre + point oldC = mesh.cells()[celli_].centre ( oldPPts, pFaces ); - const Foam::face& f = pFaces[faceI_]; + const Foam::face& f = pFaces[facei_]; return tetPointRef ( @@ -111,7 +111,7 @@ Foam::triPointRef Foam::tetIndices::faceTri(const polyMesh& mesh) const const pointField& pPts = mesh.points(); const faceList& pFaces = mesh.faces(); - const Foam::face& f = pFaces[faceI_]; + const Foam::face& f = pFaces[facei_]; return triPointRef ( @@ -126,7 +126,7 @@ Foam::triFace Foam::tetIndices::faceTriIs(const polyMesh& mesh) const { const faceList& pFaces = mesh.faces(); - const Foam::face& f = pFaces[faceI_]; + const Foam::face& f = pFaces[facei_]; return triFace ( @@ -142,7 +142,7 @@ Foam::triPointRef Foam::tetIndices::oldFaceTri(const polyMesh& mesh) const const pointField& oldPPts = mesh.oldPoints(); const faceList& pFaces = mesh.faces(); - const Foam::face& f = pFaces[faceI_]; + const Foam::face& f = pFaces[facei_]; return triPointRef ( @@ -155,13 +155,13 @@ Foam::triPointRef Foam::tetIndices::oldFaceTri(const polyMesh& mesh) const Foam::label& Foam::tetIndices::cell() { - return cellI_; + return celli_; } Foam::label& Foam::tetIndices::face() { - return faceI_; + return facei_; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C index 8c4eea8f294fca977ac2e7c47fa61c9d983d1803..4c1e351c18c74b168a13ae89495bb606a2f98aa4 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.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 @@ -139,17 +139,17 @@ Foam::pointField Foam::coupledPolyPatch::getAnchorPoints if (transform != COINCIDENTFULLMATCH) { // Return the first point - forAll(faces, faceI) + forAll(faces, facei) { - anchors[faceI] = points[faces[faceI][0]]; + anchors[facei] = points[faces[facei][0]]; } } else { // Make anchor point unique - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; bool unique = true; @@ -179,14 +179,14 @@ Foam::pointField Foam::coupledPolyPatch::getAnchorPoints if (unique) { - anchors[faceI] = p1; + anchors[facei] = p1; break; } } if (!unique) { - anchors[faceI] = points[faces[faceI][0]]; + anchors[facei] = points[faces[facei][0]]; } } } @@ -205,11 +205,11 @@ Foam::scalarField Foam::coupledPolyPatch::calcFaceTol // Calculate typical distance per face scalarField tols(faces.size()); - forAll(faces, faceI) + forAll(faces, facei) { - const point& cc = faceCentres[faceI]; + const point& cc = faceCentres[facei]; - const face& f = faces[faceI]; + const face& f = faces[facei]; // 1. calculate a typical size of the face. Use maximum distance // to face centre @@ -225,7 +225,7 @@ Foam::scalarField Foam::coupledPolyPatch::calcFaceTol maxCmpt = max(maxCmpt, cmptMax(cmptMag(pt))); } - tols[faceI] = max + tols[facei] = max ( SMALL, max(SMALL*maxCmpt, Foam::sqrt(maxLenSqr)) diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C index f9a789efc2677620d6f1a7fcb08bc24005471619..fca4f97b70aac077a050f3293f7e4259f1d0d0d3 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C @@ -60,14 +60,14 @@ Foam::label Foam::cyclicPolyPatch::findMaxArea label maxI = -1; scalar maxAreaSqr = -GREAT; - forAll(faces, faceI) + forAll(faces, facei) { - scalar areaSqr = magSqr(faces[faceI].normal(points)); + scalar areaSqr = magSqr(faces[facei].normal(points)); if (areaSqr > maxAreaSqr) { maxAreaSqr = areaSqr; - maxI = faceI; + maxI = facei; } } return maxI; @@ -454,20 +454,20 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors const tensor revT(E1.T() & E0); // Rotation - forAll(half0Ctrs, faceI) + forAll(half0Ctrs, facei) { - half0Ctrs[faceI] = + half0Ctrs[facei] = Foam::transform ( revT, - half0Ctrs[faceI] - rotationCentre_ + half0Ctrs[facei] - rotationCentre_ ) + rotationCentre_; - anchors0[faceI] = + anchors0[facei] = Foam::transform ( revT, - anchors0[faceI] - rotationCentre_ + anchors0[facei] - rotationCentre_ ) + rotationCentre_; } @@ -522,17 +522,17 @@ void Foam::cyclicPolyPatch::getCentresAndAnchors const tensor revT(rotationTensor(n0, -n1)); // Rotation - forAll(half0Ctrs, faceI) + forAll(half0Ctrs, facei) { - half0Ctrs[faceI] = Foam::transform + half0Ctrs[facei] = Foam::transform ( revT, - half0Ctrs[faceI] + half0Ctrs[facei] ); - anchors0[faceI] = Foam::transform + anchors0[facei] = Foam::transform ( revT, - anchors0[faceI] + anchors0[facei] ); } } @@ -576,18 +576,18 @@ Foam::vector Foam::cyclicPolyPatch::findFaceMaxRadius const scalarField magRadSqr(magSqr(n)); - label faceI = findMax(magRadSqr); + label facei = findMax(magRadSqr); if (debug) { Info<< "findFaceMaxRadius(const pointField&) : patch: " << name() << nl - << " rotFace = " << faceI << nl - << " point = " << faceCentres[faceI] << nl - << " distance = " << Foam::sqrt(magRadSqr[faceI]) + << " rotFace = " << facei << nl + << " point = " << faceCentres[facei] << nl + << " distance = " << Foam::sqrt(magRadSqr[facei]) << endl; } - return n[faceI]; + return n[facei]; } @@ -1431,9 +1431,9 @@ bool Foam::cyclicPolyPatch::order // Return false if no change neccesary, true otherwise. - forAll(faceMap, faceI) + forAll(faceMap, facei) { - if (faceMap[faceI] != faceI || rotation[faceI] != 0) + if (faceMap[facei] != facei || rotation[facei] != 0) { return true; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C index 0f75909ee68be3d2a2430c1f31a71700d76dd4dd..beab754388b509fc8d0b8b80c507776949b5290a 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/oldCyclic/oldCyclicPolyPatch.C @@ -55,9 +55,9 @@ Foam::pointField Foam::oldCyclicPolyPatch::calcFaceCentres { pointField ctrs(faces.size()); - forAll(faces, faceI) + forAll(faces, facei) { - ctrs[faceI] = faces[faceI].centre(points); + ctrs[facei] = faces[facei].centre(points); } return ctrs; @@ -72,9 +72,9 @@ Foam::pointField Foam::oldCyclicPolyPatch::getAnchorPoints { pointField anchors(faces.size()); - forAll(faces, faceI) + forAll(faces, facei) { - anchors[faceI] = points[faces[faceI][0]]; + anchors[facei] = points[faces[facei][0]]; } return anchors; @@ -90,14 +90,14 @@ Foam::label Foam::oldCyclicPolyPatch::findMaxArea label maxI = -1; scalar maxAreaSqr = -GREAT; - forAll(faces, faceI) + forAll(faces, facei) { - scalar areaSqr = magSqr(faces[faceI].normal(points)); + scalar areaSqr = magSqr(faces[facei].normal(points)); if (areaSqr > maxAreaSqr) { maxAreaSqr = areaSqr; - maxI = faceI; + maxI = facei; } } return maxI; @@ -205,15 +205,15 @@ bool Foam::oldCyclicPolyPatch::getGeometricHalves half1ToPatch.setSize(pp.size()); // Compare to face 0 normal. - forAll(faceNormals, faceI) + forAll(faceNormals, facei) { - if ((faceNormals[faceI] & faceNormals[0]) > 0) + if ((faceNormals[facei] & faceNormals[0]) > 0) { - half0ToPatch[n0Faces++] = faceI; + half0ToPatch[n0Faces++] = facei; } else { - half1ToPatch[n1Faces++] = faceI; + half1ToPatch[n1Faces++] = facei; } } half0ToPatch.setSize(n0Faces); @@ -324,10 +324,10 @@ void Foam::oldCyclicPolyPatch::getCentresAndAnchors const tensor reverseT(rotationTensor(n0, -n1)); // Rotation - forAll(half0Ctrs, faceI) + forAll(half0Ctrs, facei) { - half0Ctrs[faceI] = Foam::transform(reverseT, half0Ctrs[faceI]); - anchors0[faceI] = Foam::transform(reverseT, anchors0[faceI]); + half0Ctrs[facei] = Foam::transform(reverseT, half0Ctrs[facei]); + anchors0[facei] = Foam::transform(reverseT, anchors0[facei]); } ppPoints = Foam::transform(reverseT, pp.points()); @@ -379,17 +379,17 @@ void Foam::oldCyclicPolyPatch::getCentresAndAnchors const tensor reverseT(rotationTensor(n0, -n1)); // Rotation - forAll(half0Ctrs, faceI) + forAll(half0Ctrs, facei) { - half0Ctrs[faceI] = Foam::transform + half0Ctrs[facei] = Foam::transform ( reverseT, - half0Ctrs[faceI] + half0Ctrs[facei] ); - anchors0[faceI] = Foam::transform + anchors0[facei] = Foam::transform ( reverseT, - anchors0[faceI] + anchors0[facei] ); } ppPoints = Foam::transform(reverseT, pp.points()); @@ -862,11 +862,11 @@ bool Foam::oldCyclicPolyPatch::order if (!matchedAll) { - label faceI = 0; + label facei = 0; for (label i = 0; i < halfSize; i++) { - half0ToPatch[i] = faceI++; - half1ToPatch[i] = faceI++; + half0ToPatch[i] = facei++; + half1ToPatch[i] = facei++; } // And redo all matching @@ -945,9 +945,9 @@ bool Foam::oldCyclicPolyPatch::order { label baffleI = 0; - forAll(pp, faceI) + forAll(pp, facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; const labelList& pFaces = pp.pointFaces()[f[0]]; label matchedFaceI = -1; @@ -956,7 +956,7 @@ bool Foam::oldCyclicPolyPatch::order { label otherFaceI = pFaces[i]; - if (otherFaceI > faceI) + if (otherFaceI > facei) { const face& otherF = pp.localFaces()[otherFaceI]; @@ -972,7 +972,7 @@ bool Foam::oldCyclicPolyPatch::order if (matchedFaceI != -1) { - half0ToPatch[baffleI] = faceI; + half0ToPatch[baffleI] = facei; half1ToPatch[baffleI] = matchedFaceI; baffleI++; } @@ -1206,9 +1206,9 @@ bool Foam::oldCyclicPolyPatch::order // Return false if no change neccesary, true otherwise. - forAll(faceMap, faceI) + forAll(faceMap, facei) { - if (faceMap[faceI] != faceI || rotation[faceI] != 0) + if (faceMap[facei] != facei || rotation[facei] != 0) { return true; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C index 8d039e2aa00efce5eeb716492d182481bf9d13b3..ef54a15336899cdf31adbdaddb07eb23bb275d1c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/processor/processorPolyPatch.C @@ -273,10 +273,10 @@ void Foam::processorPolyPatch::calcGeometry(PstreamBuffers& pBufs) label vertI = 0; - forAll(faceCentres(), faceI) + forAll(faceCentres(), facei) { - const point& c0 = neighbFaceCentres_[faceI]; - const point& c1 = faceCentres()[faceI]; + const point& c0 = neighbFaceCentres_[facei]; + const point& c1 = faceCentres()[facei]; writeOBJ(ccStr, c0, c1, vertI); } @@ -356,11 +356,11 @@ void Foam::processorPolyPatch::initUpdateMesh(PstreamBuffers& pBufs) for (label patchPointI = 0; patchPointI < nPoints(); patchPointI++) { - label faceI = pointFaces()[patchPointI][0]; + label facei = pointFaces()[patchPointI][0]; - pointFace[patchPointI] = faceI; + pointFace[patchPointI] = facei; - const face& f = localFaces()[faceI]; + const face& f = localFaces()[facei]; pointIndex[patchPointI] = findIndex(f, patchPointI); } @@ -371,11 +371,11 @@ void Foam::processorPolyPatch::initUpdateMesh(PstreamBuffers& pBufs) for (label patchEdgeI = 0; patchEdgeI < nEdges(); patchEdgeI++) { - label faceI = edgeFaces()[patchEdgeI][0]; + label facei = edgeFaces()[patchEdgeI][0]; - edgeFace[patchEdgeI] = faceI; + edgeFace[patchEdgeI] = facei; - const labelList& fEdges = faceEdges()[faceI]; + const labelList& fEdges = faceEdges()[facei]; edgeIndex[patchEdgeI] = findIndex(fEdges, patchEdgeI); } @@ -565,9 +565,9 @@ void Foam::processorPolyPatch::initOrder << "Dumping " << fc.size() << " local faceCentres to " << localStr.name() << endl; - forAll(fc, faceI) + forAll(fc, facei) { - writeOBJ(localStr, fc[faceI]); + writeOBJ(localStr, fc[facei]); } } @@ -911,9 +911,9 @@ bool Foam::processorPolyPatch::order Pout<< "processorPolyPatch::order : " << "Dumping neighbour faceCentres to " << nbrStr.name() << endl; - forAll(masterCtrs, faceI) + forAll(masterCtrs, facei) { - writeOBJ(nbrStr, masterCtrs[faceI]); + writeOBJ(nbrStr, masterCtrs[facei]); } } @@ -1024,14 +1024,14 @@ bool Foam::processorPolyPatch::order label vertI = 0; - forAll(pp.faceCentres(), faceI) + forAll(pp.faceCentres(), facei) { - label masterFaceI = faceMap[faceI]; + label masterFaceI = faceMap[facei]; if (masterFaceI != -1) { const point& c0 = masterCtrs[masterFaceI]; - const point& c1 = pp.faceCentres()[faceI]; + const point& c1 = pp.faceCentres()[facei]; writeOBJ(ccStr, c0, c1, vertI); } } @@ -1091,9 +1091,9 @@ bool Foam::processorPolyPatch::order } } - forAll(faceMap, faceI) + forAll(faceMap, facei) { - if (faceMap[faceI] != faceI || rotation[faceI] != 0) + if (faceMap[facei] != facei || rotation[facei] != 0) { return true; } diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C index 5cb0d9c7d89b47e56920b5412686ee9f56048a02..e59c5220be8e7580a7899a2c9cc251de09fb2a05 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C @@ -60,19 +60,19 @@ void Foam::wedgePolyPatch::calcGeometry(PstreamBuffers&) // Check the wedge is planar - forAll(nf, faceI) + forAll(nf, facei) { - if (magSqr(n_ - nf[faceI]) > SMALL) + if (magSqr(n_ - nf[facei]) > SMALL) { // only issue warning instead of error so that the case can // still be read for post-processing WarningInFunction << "Wedge patch '" << name() << "' is not planar." << nl << "At local face at " - << primitivePatch::faceCentres()[faceI] - << " the normal " << nf[faceI] + << primitivePatch::faceCentres()[facei] + << " the normal " << nf[facei] << " differs from the average normal " << n_ - << " by " << magSqr(n_ - nf[faceI]) << nl + << " by " << magSqr(n_ - nf[facei]) << nl << "Either correct the patch or split it into planar parts" << endl; } diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C index 9855309451ad40c3ec27b0cef2e695c38a783ef7..4a85216479d8a20d6483993fd7af6c4a41a97237 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.C +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.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 @@ -48,9 +48,9 @@ void Foam::syncTools::swapBoundaryCellPositions neighbourCellData.setSize(nBnd); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; const labelUList& faceCells = pp.faceCells(); forAll(faceCells, i) { @@ -156,12 +156,12 @@ Foam::PackedBoolList Foam::syncTools::getMasterFaces(const polyMesh& mesh) const polyBoundaryMesh& patches = mesh.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { const coupledPolyPatch& pp = - refCast<const coupledPolyPatch>(patches[patchI]); + refCast<const coupledPolyPatch>(patches[patchi]); if (!pp.owner()) { @@ -186,9 +186,9 @@ Foam::PackedBoolList Foam::syncTools::getInternalOrMasterFaces const polyBoundaryMesh& patches = mesh.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { @@ -222,9 +222,9 @@ Foam::PackedBoolList Foam::syncTools::getInternalOrCoupledFaces const polyBoundaryMesh& patches = mesh.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (!pp.coupled()) { diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C index 4f2de619e968c59aeae35349214100a7748b5166..0fc2cf3a56f96acc0659f56021918ccf45929685 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C @@ -133,16 +133,16 @@ void Foam::syncTools::syncPointMap // Send - forAll(patches, patchI) + forAll(patches, patchi) { if ( - isA<processorPolyPatch>(patches[patchI]) - && patches[patchI].nPoints() > 0 + isA<processorPolyPatch>(patches[patchi]) + && patches[patchi].nPoints() > 0 ) { const processorPolyPatch& procPatch = - refCast<const processorPolyPatch>(patches[patchI]); + refCast<const processorPolyPatch>(patches[patchi]); // Get data per patchPoint in neighbouring point numbers. @@ -173,16 +173,16 @@ void Foam::syncTools::syncPointMap // Receive and combine. - forAll(patches, patchI) + forAll(patches, patchi) { if ( - isA<processorPolyPatch>(patches[patchI]) - && patches[patchI].nPoints() > 0 + isA<processorPolyPatch>(patches[patchi]) + && patches[patchi].nPoints() > 0 ) { const processorPolyPatch& procPatch = - refCast<const processorPolyPatch>(patches[patchI]); + refCast<const processorPolyPatch>(patches[patchi]); UIPstream fromNb(procPatch.neighbProcNo(), pBufs); Map<T> nbrPatchInfo(fromNb); @@ -208,12 +208,12 @@ void Foam::syncTools::syncPointMap } // Do the cyclics. - forAll(patches, patchI) + forAll(patches, patchi) { - if (isA<cyclicPolyPatch>(patches[patchI])) + if (isA<cyclicPolyPatch>(patches[patchi])) { const cyclicPolyPatch& cycPatch = - refCast<const cyclicPolyPatch>(patches[patchI]); + refCast<const cyclicPolyPatch>(patches[patchi]); if (cycPatch.owner()) { @@ -409,16 +409,16 @@ void Foam::syncTools::syncEdgeMap // Send - forAll(patches, patchI) + forAll(patches, patchi) { if ( - isA<processorPolyPatch>(patches[patchI]) - && patches[patchI].nEdges() > 0 + isA<processorPolyPatch>(patches[patchi]) + && patches[patchi].nEdges() > 0 ) { const processorPolyPatch& procPatch = - refCast<const processorPolyPatch>(patches[patchI]); + refCast<const processorPolyPatch>(patches[patchi]); // Get data per patch edge in neighbouring edge. @@ -453,16 +453,16 @@ void Foam::syncTools::syncEdgeMap // Receive and combine. - forAll(patches, patchI) + forAll(patches, patchi) { if ( - isA<processorPolyPatch>(patches[patchI]) - && patches[patchI].nEdges() > 0 + isA<processorPolyPatch>(patches[patchi]) + && patches[patchi].nEdges() > 0 ) { const processorPolyPatch& procPatch = - refCast<const processorPolyPatch>(patches[patchI]); + refCast<const processorPolyPatch>(patches[patchi]); EdgeMap<T> nbrPatchInfo; { @@ -498,12 +498,12 @@ void Foam::syncTools::syncEdgeMap // Swap cyclic info // ~~~~~~~~~~~~~~~~ - forAll(patches, patchI) + forAll(patches, patchi) { - if (isA<cyclicPolyPatch>(patches[patchI])) + if (isA<cyclicPolyPatch>(patches[patchi])) { const cyclicPolyPatch& cycPatch = - refCast<const cyclicPolyPatch>(patches[patchI]); + refCast<const cyclicPolyPatch>(patches[patchi]); if (cycPatch.owner()) { @@ -624,9 +624,9 @@ void Foam::syncTools::syncEdgeMap // on the outside of the mesh. (though might not be on coupled patch // if is single edge and not on coupled face) // Store value (if any) on sharedEdgeValues - for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++) + for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++) { - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, fp) { @@ -803,16 +803,16 @@ void Foam::syncTools::syncEdgeMap // // // Send // -// forAll(patches, patchI) +// forAll(patches, patchi) // { // if // ( -// isA<processorPolyPatch>(patches[patchI]) -// && patches[patchI].nPoints() > 0 +// isA<processorPolyPatch>(patches[patchi]) +// && patches[patchi].nPoints() > 0 // ) // { // const processorPolyPatch& procPatch = -// refCast<const processorPolyPatch>(patches[patchI]); +// refCast<const processorPolyPatch>(patches[patchi]); // // // Get data per patchPoint in neighbouring point numbers. // Field<T> patchInfo(procPatch.nPoints()); @@ -835,16 +835,16 @@ void Foam::syncTools::syncEdgeMap // // // Receive and combine. // -// forAll(patches, patchI) +// forAll(patches, patchi) // { // if // ( -// isA<processorPolyPatch>(patches[patchI]) -// && patches[patchI].nPoints() > 0 +// isA<processorPolyPatch>(patches[patchi]) +// && patches[patchi].nPoints() > 0 // ) // { // const processorPolyPatch& procPatch = -// refCast<const processorPolyPatch>(patches[patchI]); +// refCast<const processorPolyPatch>(patches[patchi]); // // Field<T> nbrPatchInfo(procPatch.nPoints()); // { @@ -867,12 +867,12 @@ void Foam::syncTools::syncEdgeMap // } // // // Do the cyclics. -// forAll(patches, patchI) +// forAll(patches, patchi) // { -// if (isA<cyclicPolyPatch>(patches[patchI])) +// if (isA<cyclicPolyPatch>(patches[patchi])) // { // const cyclicPolyPatch& cycPatch = -// refCast<const cyclicPolyPatch>(patches[patchI]); +// refCast<const cyclicPolyPatch>(patches[patchi]); // // if (cycPatch.owner()) // { @@ -1305,16 +1305,16 @@ void Foam::syncTools::syncBoundaryFaceList // Send - forAll(patches, patchI) + forAll(patches, patchi) { if ( - isA<processorPolyPatch>(patches[patchI]) - && patches[patchI].size() > 0 + isA<processorPolyPatch>(patches[patchi]) + && patches[patchi].size() > 0 ) { const processorPolyPatch& procPatch = - refCast<const processorPolyPatch>(patches[patchI]); + refCast<const processorPolyPatch>(patches[patchi]); label patchStart = procPatch.start()-mesh.nInternalFaces(); @@ -1329,16 +1329,16 @@ void Foam::syncTools::syncBoundaryFaceList // Receive and combine. - forAll(patches, patchI) + forAll(patches, patchi) { if ( - isA<processorPolyPatch>(patches[patchI]) - && patches[patchI].size() > 0 + isA<processorPolyPatch>(patches[patchi]) + && patches[patchi].size() > 0 ) { const processorPolyPatch& procPatch = - refCast<const processorPolyPatch>(patches[patchI]); + refCast<const processorPolyPatch>(patches[patchi]); Field<T> nbrPatchInfo(procPatch.size()); @@ -1358,12 +1358,12 @@ void Foam::syncTools::syncBoundaryFaceList } // Do the cyclics. - forAll(patches, patchI) + forAll(patches, patchi) { - if (isA<cyclicPolyPatch>(patches[patchI])) + if (isA<cyclicPolyPatch>(patches[patchi])) { const cyclicPolyPatch& cycPatch = - refCast<const cyclicPolyPatch>(patches[patchI]); + refCast<const cyclicPolyPatch>(patches[patchi]); if (cycPatch.owner()) { @@ -1424,16 +1424,16 @@ void Foam::syncTools::syncFaceList // Send - forAll(patches, patchI) + forAll(patches, patchi) { if ( - isA<processorPolyPatch>(patches[patchI]) - && patches[patchI].size() > 0 + isA<processorPolyPatch>(patches[patchi]) + && patches[patchi].size() > 0 ) { const processorPolyPatch& procPatch = - refCast<const processorPolyPatch>(patches[patchI]); + refCast<const processorPolyPatch>(patches[patchi]); List<unsigned int> patchInfo(procPatch.size()); forAll(procPatch, i) @@ -1451,16 +1451,16 @@ void Foam::syncTools::syncFaceList // Receive and combine. - forAll(patches, patchI) + forAll(patches, patchi) { if ( - isA<processorPolyPatch>(patches[patchI]) - && patches[patchI].size() > 0 + isA<processorPolyPatch>(patches[patchi]) + && patches[patchi].size() > 0 ) { const processorPolyPatch& procPatch = - refCast<const processorPolyPatch>(patches[patchI]); + refCast<const processorPolyPatch>(patches[patchi]); List<unsigned int> patchInfo(procPatch.size()); { @@ -1482,12 +1482,12 @@ void Foam::syncTools::syncFaceList } // Do the cyclics. - forAll(patches, patchI) + forAll(patches, patchi) { - if (isA<cyclicPolyPatch>(patches[patchI])) + if (isA<cyclicPolyPatch>(patches[patchi])) { const cyclicPolyPatch& cycPatch = - refCast<const cyclicPolyPatch>(patches[patchI]); + refCast<const cyclicPolyPatch>(patches[patchi]); if (cycPatch.owner()) { @@ -1536,9 +1536,9 @@ void Foam::syncTools::swapBoundaryCellList neighbourCellData.setSize(nBnd); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; const labelUList& faceCells = pp.faceCells(); forAll(faceCells, i) { diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C index 6bf2a1109f6e80cfdfb880df4f5ebf8b06780d7e..5f236921d541a2c8ab052f7c4ad5f8012eb77b6b 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C @@ -73,15 +73,15 @@ void Foam::faceZone::calcFaceZonePatch() const const labelList& addr = *this; const boolList& flip = flipMap(); - forAll(addr, faceI) + forAll(addr, facei) { - if (flip[faceI]) + if (flip[facei]) { - patch[faceI] = f[addr[faceI]].reverseFace(); + patch[facei] = f[addr[facei]].reverseFace(); } else { - patch[faceI] = f[addr[faceI]]; + patch[facei] = f[addr[facei]]; } } @@ -125,26 +125,26 @@ void Foam::faceZone::calcCellLayers() const slaveCellsPtr_ = new labelList(mf.size()); labelList& sc = *slaveCellsPtr_; - forAll(mf, faceI) + forAll(mf, facei) { - label ownCellI = own[mf[faceI]]; + label ownCellI = own[mf[facei]]; label neiCellI = ( - zoneMesh().mesh().isInternalFace(mf[faceI]) - ? nei[mf[faceI]] + zoneMesh().mesh().isInternalFace(mf[facei]) + ? nei[mf[facei]] : -1 ); - if (!faceFlip[faceI]) + 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; } } } @@ -397,11 +397,11 @@ void Foam::faceZone::updateMesh(const mapPolyMesh& mpm) forAll(*this, i) { - const label faceI = operator[](i); + const label facei = operator[](i); - if (faceMap[faceI] >= 0) + if (faceMap[facei] >= 0) { - newAddressing[nFaces] = faceMap[faceI]; + newAddressing[nFaces] = faceMap[facei]; newFlipMap[nFaces] = flipMap_[i]; // Keep flip map. nFaces++; } @@ -437,12 +437,12 @@ bool Foam::faceZone::checkParallelSync(const bool report) const boolList neiZoneFlip(mesh.nFaces()-mesh.nInternalFaces(), false); forAll(*this, i) { - const label faceI = operator[](i); + const label facei = operator[](i); - if (!mesh.isInternalFace(faceI)) + if (!mesh.isInternalFace(facei)) { - neiZoneFace[faceI-mesh.nInternalFaces()] = true; - neiZoneFlip[faceI-mesh.nInternalFaces()] = flipMap()[i]; + neiZoneFace[facei-mesh.nInternalFaces()] = true; + neiZoneFlip[facei-mesh.nInternalFaces()] = flipMap()[i]; } } boolList myZoneFace(neiZoneFace); @@ -452,12 +452,12 @@ bool Foam::faceZone::checkParallelSync(const bool report) const forAll(*this, i) { - const label faceI = operator[](i); - const label patchI = bm.whichPatch(faceI); + const label facei = operator[](i); + const label patchi = bm.whichPatch(facei); - if (patchI != -1 && bm[patchI].coupled()) + 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]) @@ -468,9 +468,9 @@ bool Foam::faceZone::checkParallelSync(const bool report) const { Pout<< " ***Problem with faceZone " << index() << " named " << name() - << ". Face " << faceI + << ". Face " << facei << " on coupled patch " - << bm[patchI].name() + << bm[patchi].name() << " is not consistent with its coupled neighbour." << endl; } @@ -489,9 +489,9 @@ bool Foam::faceZone::checkParallelSync(const bool report) const { Pout<< " ***Problem with faceZone " << index() << " named " << name() - << ". Face " << faceI + << ". Face " << facei << " on coupled patch " - << bm[patchI].name() + << bm[patchi].name() << " does not have consistent flipMap" << " across coupled faces." << endl; diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H index dd242f5c19bedcdda86d1b25b097056ba55510f0..c68f8973467955e05a30fffcefc64d5d15be1922 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H +++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchTools.H @@ -84,7 +84,7 @@ public: //- Fill faceZone with currentZone for every face reachable - // from faceI without crossing edge marked in borderEdge. + // from facei without crossing edge marked in borderEdge. // Note: faceZone has to be sized nFaces before calling. template < @@ -98,7 +98,7 @@ public: ( const PrimitivePatch<Face, FaceList, PointField, PointType>&, const BoolListType& borderEdge, - const label faceI, + const label facei, const label currentZone, labelList& faceZone ); diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsCheck.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsCheck.C index 49efd5972d0ef93a6572f562b1a2236092b2bc1b..c0d726c1369b91eb2ac50bc7ea6c95deeab93500 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsCheck.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsCheck.C @@ -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 @@ -46,16 +46,16 @@ Foam::PatchTools::checkOrientation bool foundError = false; // Check edge normals, face normals, point normals. - forAll(p.faceEdges(), faceI) + forAll(p.faceEdges(), facei) { - const labelList& edgeLabels = p.faceEdges()[faceI]; + const labelList& edgeLabels = p.faceEdges()[facei]; bool valid = true; if (edgeLabels.size() < 3) { if (report) { - Info<< "Face[" << faceI << "] " << p[faceI] + Info<< "Face[" << facei << "] " << p[facei] << " has fewer than 3 edges. Edges: " << edgeLabels << endl; } @@ -70,7 +70,7 @@ Foam::PatchTools::checkOrientation if (report) { Info<< "edge number " << edgeLabels[i] - << " on face " << faceI + << " on face " << facei << " out-of-range\n" << "This usually means the input surface has " << "edges with more than 2 faces connected." @@ -91,13 +91,13 @@ Foam::PatchTools::checkOrientation // //- Compute normal from 3 points, use the first as the origin // minor warpage should not be a problem - const Face& f = p[faceI]; + const Face& f = p[facei]; const point& p0 = p.points()[f[0]]; const point& p1 = p.points()[f[1]]; const point& p2 = p.points()[f.last()]; const vector pointNormal((p1 - p0) ^ (p2 - p0)); - if ((pointNormal & p.faceNormals()[faceI]) < 0) + if ((pointNormal & p.faceNormals()[facei]) < 0) { foundError = false; @@ -109,7 +109,7 @@ Foam::PatchTools::checkOrientation << "face: " << f << nl << "points: " << p0 << ' ' << p1 << ' ' << p2 << nl << "pointNormal:" << pointNormal << nl - << "faceNormal:" << p.faceNormals()[faceI] << endl; + << "faceNormal:" << p.faceNormals()[facei] << endl; } } } diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C index 635dd020969d3a551a91a41e7a2daad875bd540a..5a77d50858fc7d58506cdd33ced45bccaf939ab2 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsGatherAndMerge.C @@ -119,9 +119,9 @@ void Foam::PatchTools::gatherAndMerge // Relabel faces List<Face>& faces = mergedFaces; - forAll(faces, faceI) + forAll(faces, facei) { - inplaceRenumber(pointMergeMap, faces[faceI]); + inplaceRenumber(pointMergeMap, faces[facei]); } } } diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsNormals.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsNormals.C index a72c33084247f983742e442c60e0016755be4591..a6708015a12a0179663fc875b16568b44dfe1557 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsNormals.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsNormals.C @@ -164,10 +164,10 @@ Foam::PatchTools::pointNormals const faceList& localFaces = p.localFaces(); const vectorField& faceNormals = p.faceNormals(); - forAll(localFaces, faceI) + forAll(localFaces, facei) { - const face& f = localFaces[faceI]; - const vector& n = faceNormals[faceI]; + const face& f = localFaces[facei]; + const vector& n = faceNormals[facei]; forAll(f, fp) { extrudeN[f[fp]] += n; diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSearch.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSearch.C index 17ea3e17c2901ba820976dc9e8da4f52834ad57b..1058816c9657006027801b9f2aa9f00abfec789a 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSearch.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSearch.C @@ -44,7 +44,7 @@ void Foam::PatchTools::markZone ( const PrimitivePatch<Face, FaceList, PointField, PointType>& p, const BoolListType& borderEdge, - const label faceI, + const label facei, const label currentZone, labelList& faceZone ) @@ -53,7 +53,7 @@ void Foam::PatchTools::markZone const labelListList& edgeFaces = p.edgeFaces(); // List of faces whose faceZone has been set. - labelList changedFaces(1, faceI); + labelList changedFaces(1, facei); while (true) { @@ -62,9 +62,9 @@ void Foam::PatchTools::markZone forAll(changedFaces, i) { - label faceI = changedFaces[i]; + label facei = changedFaces[i]; - const labelList& fEdges = faceEdges[faceI]; + const labelList& fEdges = faceEdges[facei]; forAll(fEdges, fEdgeI) { @@ -89,7 +89,7 @@ void Foam::PatchTools::markZone << "Zones " << faceZone[nbrFaceI] << " at face " << nbrFaceI << " connects to zone " << currentZone - << " at face " << faceI + << " at face " << facei << abort(FatalError); } } @@ -166,7 +166,7 @@ Foam::PatchTools::subsetMap labelList& faceMap ) { - label faceI = 0; + label facei = 0; label pointI = 0; const List<Face>& localFaces = p.localFaces(); @@ -181,7 +181,7 @@ Foam::PatchTools::subsetMap if (includeFaces[oldFaceI]) { // Store new faces compact - faceMap[faceI++] = oldFaceI; + faceMap[facei++] = oldFaceI; // Renumber labels for face const Face& f = localFaces[oldFaceI]; @@ -199,7 +199,7 @@ Foam::PatchTools::subsetMap } // Trim - faceMap.setSize(faceI); + faceMap.setSize(facei); pointMap.setSize(pointI); } @@ -227,9 +227,9 @@ void Foam::PatchTools::calcBounds nPoints = 0; bb = boundBox::invertedBox; - forAll(p, faceI) + forAll(p, facei) { - const Face& f = p[faceI]; + const Face& f = p[facei]; forAll(f, fp) { diff --git a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSortPoints.C b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSortPoints.C index a1e93db9fc4939259abf3ef17f48d4ece6653b32..cbdd9e881215d08b138b1c67dbd3f49b0e96e62f 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSortPoints.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PatchTools/PatchToolsSortPoints.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 @@ -80,14 +80,14 @@ Foam::PatchTools::sortedPointEdges break; } - label faceI = eFaces[0]; - if (faceI == prevFaceI) + label facei = eFaces[0]; + if (facei == prevFaceI) { - faceI = eFaces[1]; + facei = eFaces[1]; } // Cross face to next edge - const labelList& fEdges = faceEdges[faceI]; + const labelList& fEdges = faceEdges[facei]; forAll(fEdges, feI) { @@ -105,7 +105,7 @@ Foam::PatchTools::sortedPointEdges } } - prevFaceI = faceI; + prevFaceI = facei; nVisitedEdges++; if (nVisitedEdges > nPointEdges) diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchAddressing.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchAddressing.C index c6cdcc83dd4764972d80d00e36b41c65af3a6a07..d389e5e4ad4f244d4224c7668f58db1e549f311d 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchAddressing.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchAddressing.C @@ -75,9 +75,9 @@ calcAddressing() const // Guess the max number of edges and neighbours for a face label maxEdges = 0; - forAll(locFcs, faceI) + forAll(locFcs, facei) { - maxEdges += locFcs[faceI].size(); + maxEdges += locFcs[facei].size(); } // create the lists for the various results. (resized on completion) @@ -100,12 +100,12 @@ calcAddressing() const // initialise the lists of subshapes for each face to avoid duplication edgeListList faceIntoEdges(locFcs.size()); - forAll(locFcs, faceI) + forAll(locFcs, facei) { - faceIntoEdges[faceI] = locFcs[faceI].edges(); + faceIntoEdges[facei] = locFcs[facei].edges(); - labelList& curFaceEdges = faceEdges[faceI]; - curFaceEdges.setSize(faceIntoEdges[faceI].size()); + labelList& curFaceEdges = faceEdges[facei]; + curFaceEdges.setSize(faceIntoEdges[facei].size()); forAll(curFaceEdges, faceEdgeI) { @@ -125,11 +125,11 @@ calcAddressing() const // in face (i.e. curEdges[0] is edge between f[0] and f[1]) // For all local faces ... - forAll(locFcs, faceI) + forAll(locFcs, facei) { // Get reference to vertices of current face and corresponding edges. - const Face& curF = locFcs[faceI]; - const edgeList& curEdges = faceIntoEdges[faceI]; + const Face& curF = locFcs[facei]; + const edgeList& curEdges = faceIntoEdges[facei]; // Record the neighbour face. Multiple connectivity allowed List<DynamicList<label>> neiFaces(curF.size()); @@ -141,7 +141,7 @@ calcAddressing() const forAll(curEdges, edgeI) { // If the edge is already detected, skip - if (faceEdges[faceI][edgeI] >= 0) continue; + if (faceEdges[facei][edgeI] >= 0) continue; found = false; @@ -158,7 +158,7 @@ calcAddressing() const label curNei = nbrFaces[nbrFaceI]; // Reject neighbours with the lower label - if (curNei > faceI) + if (curNei > facei) { // get the reference to subshapes of the neighbour const edgeList& searchEdges = faceIntoEdges[curNei]; @@ -174,8 +174,8 @@ calcAddressing() const edgeOfNeiFace[edgeI].append(neiEdgeI); // Record faceFaces both ways - ff[faceI].append(curNei); - ff[curNei].append(faceI); + ff[facei].append(curNei); + ff[curNei].append(facei); // Keep searching due to multiple connectivity } @@ -216,7 +216,7 @@ calcAddressing() const edges[nEdges] = curEdges[nextNei]; // Set face-edge and face-neighbour-edge to current face label - faceEdges[faceI][nextNei] = nEdges; + faceEdges[facei][nextNei] = nEdges; DynamicList<label>& cnf = neiFaces[nextNei]; DynamicList<label>& eonf = edgeOfNeiFace[nextNei]; @@ -224,7 +224,7 @@ calcAddressing() const // Set edge-face addressing labelList& curEf = edgeFaces[nEdges]; curEf.setSize(cnf.size() + 1); - curEf[0] = faceI; + curEf[0] = facei; forAll(cnf, cnfI) { @@ -253,22 +253,22 @@ calcAddressing() const // Do boundary faces - forAll(faceEdges, faceI) + forAll(faceEdges, facei) { - labelList& curEdges = faceEdges[faceI]; + labelList& curEdges = faceEdges[facei]; forAll(curEdges, edgeI) { if (curEdges[edgeI] < 0) { // Grab edge and faceEdge - edges[nEdges] = faceIntoEdges[faceI][edgeI]; + edges[nEdges] = faceIntoEdges[facei][edgeI]; curEdges[edgeI] = nEdges; // Add edgeFace labelList& curEf = edgeFaces[nEdges]; curEf.setSize(1); - curEf[0] = faceI; + curEf[0] = facei; nEdges++; } @@ -285,9 +285,9 @@ calcAddressing() const faceFacesPtr_ = new labelListList(locFcs.size()); labelListList& faceFaces = *faceFacesPtr_; - forAll(faceFaces, faceI) + forAll(faceFaces, facei) { - faceFaces[faceI].transfer(ff[faceI]); + faceFaces[facei].transfer(ff[facei]); } diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchLocalPointOrder.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchLocalPointOrder.C index 7284c313d955abf974b7d59ecd743fb335f50458..b74ea9048f1767f8d52ed0206ba77aa58affa932 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchLocalPointOrder.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchLocalPointOrder.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 @@ -77,11 +77,11 @@ calcLocalPointOrder() const label nPoints = 0; - forAll(lf, faceI) + forAll(lf, facei) { - if (!visitedFace[faceI]) + if (!visitedFace[facei]) { - SLList<label> faceOrder(faceI); + SLList<label> faceOrder(facei); do { diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchMeshEdges.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchMeshEdges.C index 051e0a57c34f94f389d6f4703dbd7b75e37ce122..678de0e20f5fd63815ca11403df17a4338f17f28 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchMeshEdges.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchMeshEdges.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 @@ -77,10 +77,10 @@ meshEdges // get the patch faces sharing the edge const labelList& curFaces = EdgeFaces[edgeI]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { // get the cell next to the face - label curCell = faceCells[curFaces[faceI]]; + label curCell = faceCells[curFaces[facei]]; // get reference to edges on the cell const labelList& ce = cellEdges[curCell]; diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchPointAddressing.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchPointAddressing.C index 1e9ad11835bdab46653d989b3a4be3803d8991ca..b58fd053f0f326e644e631e96998a18af4434ba3 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchPointAddressing.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchPointAddressing.C @@ -101,13 +101,13 @@ calcPointFaces() const // set up storage for pointFaces List<SLList<label>> pointFcs(meshPoints().size()); - forAll(f, faceI) + forAll(f, facei) { - const Face& curPoints = f[faceI]; + const Face& curPoints = f[facei]; forAll(curPoints, pointI) { - pointFcs[curPoints[pointI]].append(faceI); + pointFcs[curPoints[pointI]].append(facei); } } diff --git a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchProjectPoints.C b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchProjectPoints.C index 3fe3c7338adc60e54dd72830debdc998a817447a..407773a3ace397bb59c0e0df1b50de049b1700f5 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchProjectPoints.C +++ b/src/OpenFOAM/meshes/primitiveMesh/PrimitivePatch/PrimitivePatchProjectPoints.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 @@ -80,10 +80,10 @@ projectPoints // Estimate face centre of target side Field<PointType> masterFaceCentres(targetPatch.size()); - forAll(masterFaceCentres, faceI) + forAll(masterFaceCentres, facei) { - masterFaceCentres[faceI] = - average(masterFaces[faceI].points(masterPoints)); + masterFaceCentres[facei] = + average(masterFaces[facei].points(masterPoints)); } // Algorithm: @@ -220,10 +220,10 @@ projectPoints result[curLocalPointLabel] = objectHit(false, -1); scalar minDistance = GREAT; - forAll(masterFaces, faceI) + forAll(masterFaces, facei) { PointHit<PointType> curHit = - masterFaces[faceI].ray + masterFaces[facei].ray ( curPoint, curProjectionDir, @@ -234,8 +234,8 @@ projectPoints if (curHit.hit()) { - result[curLocalPointLabel] = objectHit(true, faceI); - curFace = faceI; + result[curLocalPointLabel] = objectHit(true, facei); + curFace = facei; break; } @@ -249,8 +249,8 @@ projectPoints { minDistance = missDist; - result[curLocalPointLabel] = objectHit(false, faceI); - curFace = faceI; + result[curLocalPointLabel] = objectHit(false, facei); + curFace = facei; } } } @@ -317,10 +317,10 @@ projectFaceCentres const typename ToPatch::PointFieldType& masterPoints = targetPatch.points(); - forAll(masterFaceCentres, faceI) + forAll(masterFaceCentres, facei) { - masterFaceCentres[faceI] = - masterFaces[faceI].centre(masterPoints); + masterFaceCentres[facei] = + masterFaces[facei].centre(masterPoints); } // Result @@ -342,10 +342,10 @@ projectFaceCentres label curFace = 0; label nNSquaredSearches = 0; - forAll(slaveFaceOrder, faceI) + forAll(slaveFaceOrder, facei) { // pick up slave point and direction - const label curLocalFaceLabel = slaveFaceOrder[faceI]; + const label curLocalFaceLabel = slaveFaceOrder[facei]; const point& curFaceCentre = slaveFaces[curLocalFaceLabel].centre(slaveGlobalPoints); @@ -364,7 +364,7 @@ projectFaceCentres // Force the full search for the first point to ensure good // starting face - if (faceI == 0) + if (facei == 0) { doNSquaredSearch = true; } @@ -461,10 +461,10 @@ projectFaceCentres result[curLocalFaceLabel] = objectHit(false, -1); scalar minDistance = GREAT; - forAll(masterFaces, faceI) + forAll(masterFaces, facei) { PointHit<PointType> curHit = - masterFaces[faceI].ray + masterFaces[facei].ray ( curFaceCentre, curProjectionDir, @@ -475,8 +475,8 @@ projectFaceCentres if (curHit.hit()) { - result[curLocalFaceLabel] = objectHit(true, faceI); - curFace = faceI; + result[curLocalFaceLabel] = objectHit(true, facei); + curFace = facei; break; } @@ -490,8 +490,8 @@ projectFaceCentres { minDistance = missDist; - result[curLocalFaceLabel] = objectHit(false, faceI); - curFace = faceI; + result[curLocalFaceLabel] = objectHit(false, facei); + curFace = facei; } } } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C index fe85106c2b31a4b759e1563b909376131027a2d5..78e6ce36ffa1b7b798a9212b2e30b567c2cb4df8 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.C @@ -143,9 +143,9 @@ bool Foam::primitiveMesh::calcPointOrder // from 0 inside oldToNew. (shifted up later on) label nBoundaryPoints = 0; - for (label faceI = nInternalFaces; faceI < faces.size(); faceI++) + for (label facei = nInternalFaces; facei < faces.size(); facei++) { - const face& f = faces[faceI]; + const face& f = faces[facei]; forAll(f, fp) { @@ -179,9 +179,9 @@ bool Foam::primitiveMesh::calcPointOrder bool ordered = true; - for (label faceI = 0; faceI < nInternalFaces; faceI++) + for (label facei = 0; facei < nInternalFaces; facei++) { - const face& f = faces[faceI]; + const face& f = faces[facei]; forAll(f, fp) { @@ -320,9 +320,9 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMesh::movePoints tmp<scalarField> tsweptVols(new scalarField(f.size())); scalarField& sweptVols = tsweptVols.ref(); - forAll(f, faceI) + forAll(f, facei) { - sweptVols[faceI] = f[faceI].sweptVol(oldPoints, newPoints); + sweptVols[facei] = f[facei].sweptVol(oldPoints, newPoints); } // Force recalculation of all geometric data with new points diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H index 143b38419dcb18b6643962f9d17b9b09a849564d..ede3d58ceb207bdab434d846085a3d1d53e1ec77 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMesh.H @@ -812,20 +812,20 @@ public: //- cellCells using cells. const labelList& cellCells ( - const label cellI, + const label celli, DynamicList<label>& ) const; - const labelList& cellCells(const label cellI) const; + const labelList& cellCells(const label celli) const; //- cellPoints using cells const labelList& cellPoints ( - const label cellI, + const label celli, DynamicList<label>& ) const; - const labelList& cellPoints(const label cellI) const; + const labelList& cellPoints(const label celli) const; //- pointCells using pointFaces const labelList& pointCells @@ -848,11 +848,11 @@ public: //- faceEdges using pointFaces, edges, pointEdges const labelList& faceEdges ( - const label faceI, + const label facei, DynamicList<label>& ) const; - const labelList& faceEdges(const label faceI) const; + const labelList& faceEdges(const label facei) const; //- edgeFaces using pointFaces, edges, pointEdges const labelList& edgeFaces @@ -875,11 +875,11 @@ public: //- cellEdges using cells, pointFaces, edges, pointEdges const labelList& cellEdges ( - const label cellI, + const label celli, DynamicList<label>& ) const; - const labelList& cellEdges(const label cellI) const; + const labelList& cellEdges(const label celli) const; //- Clear geometry diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCells.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCells.C index 8cb2c4360d43746c6e8e37d3f96a1683df382639..71ca0f2ab3974f9a979942553f90e513a91d97f0 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCells.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellCells.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 @@ -63,10 +63,10 @@ void Foam::primitiveMesh::calcCellCells() const const labelList& own = faceOwner(); const labelList& nei = faceNeighbour(); - forAll(nei, faceI) + forAll(nei, facei) { - ncc[own[faceI]]++; - ncc[nei[faceI]]++; + ncc[own[facei]]++; + ncc[nei[facei]]++; } // Create the storage @@ -77,16 +77,16 @@ void Foam::primitiveMesh::calcCellCells() const // 2. Size and fill cellFaceAddr - forAll(cellCellAddr, cellI) + forAll(cellCellAddr, celli) { - cellCellAddr[cellI].setSize(ncc[cellI]); + cellCellAddr[celli].setSize(ncc[celli]); } ncc = 0; - forAll(nei, faceI) + 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; @@ -110,35 +110,35 @@ const Foam::labelListList& Foam::primitiveMesh::cellCells() const const Foam::labelList& Foam::primitiveMesh::cellCells ( - const label cellI, + const label celli, DynamicList<label>& storage ) const { if (hasCellCells()) { - return cellCells()[cellI]; + return cellCells()[celli]; } else { const labelList& own = faceOwner(); const labelList& nei = faceNeighbour(); - const cell& cFaces = cells()[cellI]; + const cell& cFaces = cells()[celli]; storage.clear(); forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (faceI < nInternalFaces()) + if (facei < nInternalFaces()) { - if (own[faceI] == cellI) + if (own[facei] == celli) { - storage.append(nei[faceI]); + storage.append(nei[facei]); } else { - storage.append(own[faceI]); + storage.append(own[facei]); } } } @@ -148,9 +148,9 @@ const Foam::labelList& Foam::primitiveMesh::cellCells } -const Foam::labelList& Foam::primitiveMesh::cellCells(const label cellI) const +const Foam::labelList& Foam::primitiveMesh::cellCells(const label celli) const { - return cellCells(cellI, labels_); + return cellCells(celli, labels_); } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellEdges.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellEdges.C index de155dd7f42e68a19d256067e820c4ae4d0bcb3b..1b56bd5268ca01d3b74768cd3e82cd90927aff15 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellEdges.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellEdges.C @@ -69,11 +69,11 @@ void Foam::primitiveMesh::calcCellEdges() const const labelListList& fe = faceEdges(); // loop through the list again and add edges; checking for duplicates - forAll(own, faceI) + forAll(own, facei) { - DynamicList<label, edgesPerCell_>& curCellEdges = ce[own[faceI]]; + DynamicList<label, edgesPerCell_>& curCellEdges = ce[own[facei]]; - const labelList& curEdges = fe[faceI]; + const labelList& curEdges = fe[facei]; forAll(curEdges, edgeI) { @@ -85,11 +85,11 @@ void Foam::primitiveMesh::calcCellEdges() const } } - forAll(nei, faceI) + forAll(nei, facei) { - DynamicList<label, edgesPerCell_>& curCellEdges = ce[nei[faceI]]; + DynamicList<label, edgesPerCell_>& curCellEdges = ce[nei[facei]]; - const labelList& curEdges = fe[faceI]; + const labelList& curEdges = fe[facei]; forAll(curEdges, edgeI) { @@ -105,9 +105,9 @@ void Foam::primitiveMesh::calcCellEdges() const labelListList& cellEdgeAddr = *cePtr_; // reset the size - forAll(ce, cellI) + forAll(ce, celli) { - cellEdgeAddr[cellI].transfer(ce[cellI]); + cellEdgeAddr[celli].transfer(ce[celli]); } } } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellPoints.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellPoints.C index 914b4755aab002aed035622a9f16398d83fdee46..f7c0e4699a0b341442972dffb793ab54b8db7e0c 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellPoints.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCellPoints.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 @@ -57,18 +57,18 @@ const Foam::labelListList& Foam::primitiveMesh::cellPoints() const const Foam::labelList& Foam::primitiveMesh::cellPoints ( - const label cellI, + const label celli, DynamicList<label>& storage ) const { if (hasCellPoints()) { - return cellPoints()[cellI]; + return cellPoints()[celli]; } else { const faceList& fcs = faces(); - const labelList& cFaces = cells()[cellI]; + const labelList& cFaces = cells()[celli]; labelSet_.clear(); @@ -98,9 +98,9 @@ const Foam::labelList& Foam::primitiveMesh::cellPoints } -const Foam::labelList& Foam::primitiveMesh::cellPoints(const label cellI) const +const Foam::labelList& Foam::primitiveMesh::cellPoints(const label celli) const { - return cellPoints(cellI, labels_); + return cellPoints(celli, labels_); } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCells.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCells.C index 5f76854d8dd9b6cbfd7df4dc153c45dfe19062b1..feb44e13da1b81ed24b001bca993b57606b7b3f9 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCells.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCells.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 @@ -41,9 +41,9 @@ void Foam::primitiveMesh::calcCells { nCells = -1; - forAll(own, faceI) + forAll(own, facei) { - nCells = max(nCells, own[faceI]); + nCells = max(nCells, own[facei]); } nCells++; } @@ -52,16 +52,16 @@ void Foam::primitiveMesh::calcCells labelList ncf(nCells, 0); - forAll(own, faceI) + forAll(own, facei) { - ncf[own[faceI]]++; + ncf[own[facei]]++; } - forAll(nei, faceI) + forAll(nei, facei) { - if (nei[faceI] >= 0) + if (nei[facei] >= 0) { - ncf[nei[faceI]]++; + ncf[nei[facei]]++; } } @@ -71,26 +71,26 @@ void Foam::primitiveMesh::calcCells // 2. Size and fill cellFaceAddr - forAll(cellFaceAddr, cellI) + forAll(cellFaceAddr, celli) { - cellFaceAddr[cellI].setSize(ncf[cellI]); + cellFaceAddr[celli].setSize(ncf[celli]); } ncf = 0; - forAll(own, faceI) + forAll(own, facei) { - label cellI = own[faceI]; + label celli = own[facei]; - cellFaceAddr[cellI][ncf[cellI]++] = faceI; + cellFaceAddr[celli][ncf[celli]++] = facei; } - forAll(nei, faceI) + forAll(nei, facei) { - label cellI = nei[faceI]; + label celli = nei[facei]; - if (cellI >= 0) + if (celli >= 0) { - cellFaceAddr[cellI][ncf[cellI]++] = faceI; + cellFaceAddr[celli][ncf[celli]++] = facei; } } } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C index 87a473b6106e132f90390d14bf1aa12610d0999d..86aba8004dbf47a7b3d58c996e3fe59407ff5bf8 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C @@ -61,12 +61,12 @@ bool Foam::primitiveMesh::checkClosedBoundary vector sumClosed(Zero); scalar sumMagClosedBoundary = 0; - for (label faceI = nInternalFaces(); faceI < areas.size(); faceI++) + for (label facei = nInternalFaces(); facei < areas.size(); facei++) { - if (!internalOrCoupledFaces.size() || !internalOrCoupledFaces[faceI]) + if (!internalOrCoupledFaces.size() || !internalOrCoupledFaces[facei]) { - sumClosed += areas[faceI]; - sumMagClosedBoundary += mag(areas[faceI]); + sumClosed += areas[facei]; + sumMagClosedBoundary += mag(areas[facei]); } } @@ -165,23 +165,23 @@ bool Foam::primitiveMesh::checkClosedCells scalar maxAspectRatio = max(aspectRatio); // Check the sums - forAll(openness, cellI) + forAll(openness, celli) { - if (openness[cellI] > closedThreshold_) + if (openness[celli] > closedThreshold_) { if (setPtr) { - setPtr->insert(cellI); + setPtr->insert(celli); } nOpen++; } - if (aspectRatio[cellI] > aspectThreshold_) + if (aspectRatio[celli] > aspectThreshold_) { if (aspectSetPtr) { - aspectSetPtr->insert(cellI); + aspectSetPtr->insert(celli); } nAspect++; @@ -249,37 +249,37 @@ bool Foam::primitiveMesh::checkFaceAreas scalar minArea = GREAT; scalar maxArea = -GREAT; - forAll(magFaceAreas, faceI) + forAll(magFaceAreas, facei) { - if (magFaceAreas[faceI] < VSMALL) + if (magFaceAreas[facei] < VSMALL) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } if (detailedReport) { - if (isInternalFace(faceI)) + if (isInternalFace(facei)) { Pout<< "Zero or negative face area detected for " - << "internal face "<< faceI << " between cells " - << faceOwner()[faceI] << " and " - << faceNeighbour()[faceI] - << ". Face area magnitude = " << magFaceAreas[faceI] + << "internal face "<< facei << " between cells " + << faceOwner()[facei] << " and " + << faceNeighbour()[facei] + << ". Face area magnitude = " << magFaceAreas[facei] << endl; } else { Pout<< "Zero or negative face area detected for " - << "boundary face " << faceI << " next to cell " - << faceOwner()[faceI] << ". Face area magnitude = " - << magFaceAreas[faceI] << endl; + << "boundary face " << facei << " next to cell " + << faceOwner()[facei] << ". Face area magnitude = " + << magFaceAreas[facei] << endl; } } } - minArea = min(minArea, magFaceAreas[faceI]); - maxArea = max(maxArea, magFaceAreas[faceI]); + minArea = min(minArea, magFaceAreas[facei]); + maxArea = max(maxArea, magFaceAreas[facei]); } reduce(minArea, minOp<scalar>()); @@ -327,25 +327,25 @@ bool Foam::primitiveMesh::checkCellVolumes label nNegVolCells = 0; - forAll(vols, cellI) + forAll(vols, celli) { - if (vols[cellI] < VSMALL) + if (vols[celli] < VSMALL) { if (setPtr) { - setPtr->insert(cellI); + setPtr->insert(celli); } if (detailedReport) { Pout<< "Zero or negative cell volume detected for cell " - << cellI << ". Volume = " << vols[cellI] << endl; + << celli << ". Volume = " << vols[celli] << endl; } nNegVolCells++; } - minVolume = min(minVolume, vols[cellI]); - maxVolume = max(maxVolume, vols[cellI]); + minVolume = min(minVolume, vols[celli]); + maxVolume = max(maxVolume, vols[celli]); } reduce(minVolume, minOp<scalar>()); @@ -414,15 +414,15 @@ bool Foam::primitiveMesh::checkFaceOrthogonality label errorNonOrth = 0; - forAll(ortho, faceI) + forAll(ortho, facei) { - if (ortho[faceI] < severeNonorthogonalityThreshold) + if (ortho[facei] < severeNonorthogonalityThreshold) { - if (ortho[faceI] > SMALL) + if (ortho[facei] > SMALL) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } severeNonOrth++; @@ -431,7 +431,7 @@ bool Foam::primitiveMesh::checkFaceOrthogonality { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } errorNonOrth++; @@ -523,42 +523,42 @@ bool Foam::primitiveMesh::checkFacePyramids label nErrorPyrs = 0; - forAll(ownPyrVol, faceI) + forAll(ownPyrVol, facei) { - if (ownPyrVol[faceI] < minPyrVol) + if (ownPyrVol[facei] < minPyrVol) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } if (detailedReport) { - Pout<< "Negative pyramid volume: " << ownPyrVol[faceI] - << " for face " << faceI << " " << f[faceI] - << " and owner cell: " << own[faceI] << endl + Pout<< "Negative pyramid volume: " << ownPyrVol[facei] + << " for face " << facei << " " << f[facei] + << " and owner cell: " << own[facei] << endl << "Owner cell vertex labels: " - << cells()[own[faceI]].labels(faces()) + << cells()[own[facei]].labels(faces()) << endl; } nErrorPyrs++; } - if (isInternalFace(faceI)) + if (isInternalFace(facei)) { - if (neiPyrVol[faceI] < minPyrVol) + if (neiPyrVol[facei] < minPyrVol) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } if (detailedReport) { - Pout<< "Negative pyramid volume: " << neiPyrVol[faceI] - << " for face " << faceI << " " << f[faceI] - << " and neighbour cell: " << nei[faceI] << nl + Pout<< "Negative pyramid volume: " << neiPyrVol[facei] + << " for face " << facei << " " << f[facei] + << " and neighbour cell: " << nei[facei] << nl << "Neighbour cell vertex labels: " - << cells()[nei[faceI]].labels(faces()) + << cells()[nei[facei]].labels(faces()) << endl; } nErrorPyrs++; @@ -622,15 +622,15 @@ bool Foam::primitiveMesh::checkFaceSkewness scalar maxSkew = max(skewness); label nWarnSkew = 0; - forAll(skewness, faceI) + forAll(skewness, facei) { // Check if the skewness vector is greater than the PN vector. // This does not cause trouble but is a good indication of a poor mesh. - if (skewness[faceI] > skewThreshold_) + if (skewness[facei] > skewThreshold_) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nWarnSkew++; @@ -701,15 +701,15 @@ bool Foam::primitiveMesh::checkFaceAngles label nConcave = 0; - forAll(faceAngles, faceI) + forAll(faceAngles, facei) { - if (faceAngles[faceI] > SMALL) + if (faceAngles[facei] > SMALL) { nConcave++; if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } } } @@ -784,22 +784,22 @@ bool Foam::primitiveMesh::checkFaceFlatness label nSummed = 0; label nWarped = 0; - forAll(faceFlatness, faceI) + forAll(faceFlatness, facei) { - if (fcs[faceI].size() > 3 && magAreas[faceI] > VSMALL) + if (fcs[facei].size() > 3 && magAreas[facei] > VSMALL) { - sumFlatness += faceFlatness[faceI]; + sumFlatness += faceFlatness[facei]; nSummed++; - minFlatness = min(minFlatness, faceFlatness[faceI]); + minFlatness = min(minFlatness, faceFlatness[facei]); - if (faceFlatness[faceI] < warnFlatness) + if (faceFlatness[facei] < warnFlatness) { nWarped++; if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } } } @@ -867,9 +867,9 @@ bool Foam::primitiveMesh::checkConcaveCells label nConcaveCells = 0; - forAll(c, cellI) + forAll(c, celli) { - const cell& cFaces = c[cellI]; + const cell& cFaces = c[celli]; bool concave = false; @@ -890,7 +890,7 @@ bool Foam::primitiveMesh::checkConcaveCells // Flip normal if required so that it is always pointing out of // the cell - if (fOwner[fI] != cellI) + if (fOwner[fI] != celli) { fN *= -1; } @@ -924,7 +924,7 @@ bool Foam::primitiveMesh::checkConcaveCells if (setPtr) { - setPtr->insert(cellI); + setPtr->insert(celli); } nConcaveCells++; @@ -988,15 +988,15 @@ bool Foam::primitiveMesh::checkUpperTriangular // Loop through faceCells once more and make sure that for internal cell // the first label is smaller - for (label faceI = 0; faceI < internal; faceI++) + for (label facei = 0; facei < internal; facei++) { - if (own[faceI] >= nei[faceI]) + if (own[facei] >= nei[facei]) { error = true; if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } } } @@ -1005,34 +1005,34 @@ bool Foam::primitiveMesh::checkUpperTriangular // and add it to the check list (upper triangular order). // Once the list is completed, check it against the faceCell list - forAll(c, cellI) + forAll(c, celli) { - const labelList& curFaces = c[cellI]; + const labelList& curFaces = c[celli]; // Neighbouring cells SortableList<label> nbr(curFaces.size()); forAll(curFaces, i) { - label faceI = curFaces[i]; + label facei = curFaces[i]; - if (faceI >= nInternalFaces()) + if (facei >= nInternalFaces()) { // Sort last nbr[i] = labelMax; } 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 + // celli is master nbr[i] = nbrCellI; } else @@ -1141,17 +1141,17 @@ bool Foam::primitiveMesh::checkCellsZipUp const faceList& f = faces(); const cellList& c = cells(); - forAll(c, cellI) + forAll(c, celli) { - const labelList& curFaces = c[cellI]; + const labelList& curFaces = c[celli]; - const edgeList cellEdges = c[cellI].edges(f); + const edgeList cellEdges = c[celli].edges(f); labelList edgeUsage(cellEdges.size(), 0); - forAll(curFaces, faceI) + forAll(curFaces, facei) { - edgeList curFaceEdges = f[curFaces[faceI]].edges(); + edgeList curFaceEdges = f[curFaces[facei]].edges(); forAll(curFaceEdges, faceEdgeI) { @@ -1182,7 +1182,7 @@ bool Foam::primitiveMesh::checkCellsZipUp { if (setPtr) { - setPtr->insert(cellI); + setPtr->insert(celli); } } } @@ -1191,7 +1191,7 @@ bool Foam::primitiveMesh::checkCellsZipUp { if (setPtr) { - setPtr->insert(cellI); + setPtr->insert(celli); } nOpenCells++; @@ -1370,7 +1370,7 @@ bool Foam::primitiveMesh::checkPoints bool Foam::primitiveMesh::checkDuplicateFaces ( - const label faceI, + const label facei, const Map<label>& nCommonPoints, label& nBaffleFaces, labelHashSet* setPtr @@ -1383,7 +1383,7 @@ bool Foam::primitiveMesh::checkDuplicateFaces label nbFaceI = iter.key(); label nCommon = iter(); - const face& curFace = faces()[faceI]; + const face& curFace = faces()[facei]; const face& nbFace = faces()[nbFaceI]; if (nCommon == nbFace.size() || nCommon == curFace.size()) @@ -1399,7 +1399,7 @@ bool Foam::primitiveMesh::checkDuplicateFaces if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); setPtr->insert(nbFaceI); } } @@ -1411,7 +1411,7 @@ bool Foam::primitiveMesh::checkDuplicateFaces bool Foam::primitiveMesh::checkCommonOrder ( - const label faceI, + const label facei, const Map<label>& nCommonPoints, labelHashSet* setPtr ) const @@ -1423,7 +1423,7 @@ bool Foam::primitiveMesh::checkCommonOrder label nbFaceI = iter.key(); label nCommon = iter(); - const face& curFace = faces()[faceI]; + const face& curFace = faces()[facei]; const face& nbFace = faces()[nbFaceI]; if @@ -1548,7 +1548,7 @@ bool Foam::primitiveMesh::checkCommonOrder { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); setPtr->insert(nbFaceI); } @@ -1588,11 +1588,11 @@ bool Foam::primitiveMesh::checkFaceFaces label nErrorOrder = 0; Map<label> nCommonPoints(100); - for (label faceI = 0; faceI < nFaces(); faceI++) + for (label facei = 0; facei < nFaces(); facei++) { - const face& curFace = faces()[faceI]; + const face& curFace = faces()[facei]; - // Calculate number of common points between current faceI and + // Calculate number of common points between current facei and // neighbouring face. Store on map. nCommonPoints.clear(); @@ -1606,7 +1606,7 @@ bool Foam::primitiveMesh::checkFaceFaces { label nbFaceI = nbs[nbI]; - if (faceI < nbFaceI) + if (facei < nbFaceI) { // Only check once for each combination of two faces. @@ -1628,13 +1628,13 @@ bool Foam::primitiveMesh::checkFaceFaces // Perform various checks on common points // Check all vertices shared (duplicate point) - if (checkDuplicateFaces(faceI, nCommonPoints, nBaffleFaces, setPtr)) + if (checkDuplicateFaces(facei, nCommonPoints, nBaffleFaces, setPtr)) { nErrorDuplicate++; } // Check common vertices are consecutive on both faces - if (checkCommonOrder(faceI, nCommonPoints, setPtr)) + if (checkCommonOrder(facei, nCommonPoints, setPtr)) { nErrorOrder++; } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckEdgeLength.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckEdgeLength.C index 76e01fd7cb5b28c547144b4429442c5d709b1d3b..68181a4861f95dde216460c7afb0a934c17ee76a 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckEdgeLength.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheckEdgeLength.C @@ -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 @@ -42,9 +42,9 @@ bool Foam::primitiveMesh::checkEdgeLength labelHashSet smallEdgeSet(nPoints()/100); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; forAll(f, fp) { diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.C index 1be204c19126e7bad88c99551d6d0c19ce5f61fc..391a6a8a37c25e228158ee76b43e2cb70bafaea2 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.C @@ -36,28 +36,28 @@ Foam::scalar Foam::primitiveMeshTools::faceSkewness const vectorField& fCtrs, const vectorField& fAreas, - const label faceI, + const label facei, const point& ownCc, const point& neiCc ) { - vector Cpf = fCtrs[faceI] - ownCc; + vector Cpf = fCtrs[facei] - ownCc; vector d = neiCc - ownCc; // Skewness vector vector sv = Cpf - - ((fAreas[faceI] & Cpf)/((fAreas[faceI] & d) + ROOTVSMALL))*d; + - ((fAreas[facei] & Cpf)/((fAreas[facei] & d) + ROOTVSMALL))*d; vector svHat = sv/(mag(sv) + ROOTVSMALL); // Normalisation distance calculated as the approximate distance // from the face centre to the edge of the face in the direction // of the skewness scalar fd = 0.2*mag(d) + ROOTVSMALL; - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, pi) { - fd = max(fd, mag(svHat & (p[f[pi]] - fCtrs[faceI]))); + fd = max(fd, mag(svHat & (p[f[pi]] - fCtrs[facei]))); } // Normalised skewness @@ -72,13 +72,13 @@ Foam::scalar Foam::primitiveMeshTools::boundaryFaceSkewness const vectorField& fCtrs, const vectorField& fAreas, - const label faceI, + const label facei, const point& ownCc ) { - vector Cpf = fCtrs[faceI] - ownCc; + vector Cpf = fCtrs[facei] - ownCc; - vector normal = fAreas[faceI]; + vector normal = fAreas[facei]; normal /= mag(normal) + ROOTVSMALL; vector d = normal*(normal & Cpf); @@ -86,17 +86,17 @@ Foam::scalar Foam::primitiveMeshTools::boundaryFaceSkewness // Skewness vector vector sv = Cpf - - ((fAreas[faceI] & Cpf)/((fAreas[faceI] & d) + ROOTVSMALL))*d; + - ((fAreas[facei] & Cpf)/((fAreas[facei] & d) + ROOTVSMALL))*d; vector svHat = sv/(mag(sv) + ROOTVSMALL); // Normalisation distance calculated as the approximate distance // from the face centre to the edge of the face in the direction // of the skewness scalar fd = 0.4*mag(d) + ROOTVSMALL; - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, pi) { - fd = max(fd, mag(svHat & (p[f[pi]] - fCtrs[faceI]))); + fd = max(fd, mag(svHat & (p[f[pi]] - fCtrs[facei]))); } // Normalised skewness @@ -133,13 +133,13 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceOrthogonality scalarField& ortho = tortho.ref(); // Internal faces - forAll(nei, faceI) + forAll(nei, facei) { - ortho[faceI] = faceOrthogonality + ortho[facei] = faceOrthogonality ( - cc[own[faceI]], - cc[nei[faceI]], - areas[faceI] + cc[own[facei]], + cc[nei[facei]], + areas[facei] ); } @@ -162,18 +162,18 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceSkewness tmp<scalarField> tskew(new scalarField(mesh.nFaces())); scalarField& skew = tskew.ref(); - forAll(nei, faceI) + forAll(nei, facei) { - skew[faceI] = faceSkewness + skew[facei] = faceSkewness ( mesh, p, fCtrs, fAreas, - faceI, - cellCtrs[own[faceI]], - cellCtrs[nei[faceI]] + facei, + cellCtrs[own[facei]], + cellCtrs[nei[facei]] ); } @@ -181,16 +181,16 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceSkewness // Boundary faces: consider them to have only skewness error. // (i.e. treat as if mirror cell on other side) - for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++) + for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++) { - skew[faceI] = boundaryFaceSkewness + skew[facei] = boundaryFaceSkewness ( mesh, p, fCtrs, fAreas, - faceI, - cellCtrs[own[faceI]] + facei, + cellCtrs[own[facei]] ); } @@ -215,22 +215,22 @@ void Foam::primitiveMeshTools::facePyramidVolume ownPyrVol.setSize(mesh.nFaces()); neiPyrVol.setSize(mesh.nInternalFaces()); - forAll(f, faceI) + forAll(f, facei) { // Create the owner pyramid - ownPyrVol[faceI] = -pyramidPointFaceRef + ownPyrVol[facei] = -pyramidPointFaceRef ( - f[faceI], - ctrs[own[faceI]] + f[facei], + ctrs[own[facei]] ).mag(points); - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { // Create the neighbour pyramid - it will have positive volume - neiPyrVol[faceI] = pyramidPointFaceRef + neiPyrVol[facei] = pyramidPointFaceRef ( - f[faceI], - ctrs[nei[faceI]] + f[facei], + ctrs[nei[facei]] ).mag(points); } } @@ -257,18 +257,18 @@ void Foam::primitiveMeshTools::cellClosedness vectorField sumClosed(mesh.nCells(), Zero); vectorField sumMagClosed(mesh.nCells(), Zero); - forAll(own, faceI) + forAll(own, facei) { // Add to owner - sumClosed[own[faceI]] += areas[faceI]; - sumMagClosed[own[faceI]] += cmptMag(areas[faceI]); + sumClosed[own[facei]] += areas[facei]; + sumMagClosed[own[facei]] += cmptMag(areas[facei]); } - forAll(nei, faceI) + forAll(nei, facei) { // Subtract from neighbour - sumClosed[nei[faceI]] -= areas[faceI]; - sumMagClosed[nei[faceI]] += cmptMag(areas[faceI]); + sumClosed[nei[facei]] -= areas[facei]; + sumMagClosed[nei[facei]] += cmptMag(areas[facei]); } @@ -286,7 +286,7 @@ void Foam::primitiveMeshTools::cellClosedness openness.setSize(mesh.nCells()); aratio.setSize(mesh.nCells()); - forAll(sumClosed, cellI) + forAll(sumClosed, celli) { scalar maxOpenness = 0; @@ -295,11 +295,11 @@ void Foam::primitiveMeshTools::cellClosedness maxOpenness = max ( maxOpenness, - mag(sumClosed[cellI][cmpt]) - /(sumMagClosed[cellI][cmpt] + ROOTVSMALL) + mag(sumClosed[celli][cmpt]) + /(sumMagClosed[celli][cmpt] + ROOTVSMALL) ); } - openness[cellI] = maxOpenness; + openness[celli] = maxOpenness; // Calculate the aspect ration as the maximum of Cartesian component // aspect ratio to the total area hydraulic area aspect ratio @@ -309,24 +309,24 @@ void Foam::primitiveMeshTools::cellClosedness { if (meshD[dir] == 1) { - minCmpt = min(minCmpt, sumMagClosed[cellI][dir]); - maxCmpt = max(maxCmpt, sumMagClosed[cellI][dir]); + minCmpt = min(minCmpt, sumMagClosed[celli][dir]); + maxCmpt = max(maxCmpt, sumMagClosed[celli][dir]); } } scalar aspectRatio = maxCmpt/(minCmpt + ROOTVSMALL); if (nDims == 3) { - scalar v = max(ROOTVSMALL, vols[cellI]); + scalar v = max(ROOTVSMALL, vols[celli]); aspectRatio = max ( aspectRatio, - 1.0/6.0*cmptSum(sumMagClosed[cellI])/pow(v, 2.0/3.0) + 1.0/6.0*cmptSum(sumMagClosed[celli])/pow(v, 2.0/3.0) ); } - aratio[cellI] = aspectRatio; + aratio[celli] = aspectRatio; } } @@ -348,9 +348,9 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceConcavity scalarField& faceAngles = tfaceAngles.ref(); - forAll(fcs, faceI) + forAll(fcs, facei) { - const face& f = fcs[faceI]; + const face& f = fcs[facei]; // Get edge from f[0] to f[size-1]; vector ePrev(p[f.first()] - p[f.last()]); @@ -383,7 +383,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceConcavity // Check normal edgeNormal /= magEdgeNormal; - if ((edgeNormal & faceNormals[faceI]) < SMALL) + if ((edgeNormal & faceNormals[facei]) < SMALL) { maxEdgeSin = max(maxEdgeSin, magEdgeNormal); } @@ -394,7 +394,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceConcavity magEPrev = magE10; } - faceAngles[faceI] = maxEdgeSin; + faceAngles[facei] = maxEdgeSin; } return tfaceAngles; @@ -419,13 +419,13 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceFlatness scalarField& faceFlatness = tfaceFlatness.ref(); - forAll(fcs, faceI) + forAll(fcs, facei) { - const face& f = fcs[faceI]; + const face& f = fcs[facei]; - if (f.size() > 3 && magAreas[faceI] > ROOTVSMALL) + if (f.size() > 3 && magAreas[facei] > ROOTVSMALL) { - const point& fc = fCtrs[faceI]; + const point& fc = fCtrs[facei]; // Calculate the sum of magnitude of areas and compare to magnitude // of sum of areas. @@ -442,7 +442,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::faceFlatness sumA += mag(n); } - faceFlatness[faceI] = magAreas[faceI]/(sumA + ROOTVSMALL); + faceFlatness[facei] = magAreas[facei]/(sumA + ROOTVSMALL); } } @@ -484,9 +484,9 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::cellDeterminant } else { - forAll(c, cellI) + forAll(c, celli) { - const labelList& curFaces = c[cellI]; + const labelList& curFaces = c[celli]; // Calculate local normalization factor scalar avgArea = 0; @@ -505,7 +505,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::cellDeterminant if (nInternalFaces == 0) { - cellDeterminant[cellI] = 0; + cellDeterminant[celli] = 0; } else { @@ -539,7 +539,7 @@ Foam::tmp<Foam::scalarField> Foam::primitiveMeshTools::cellDeterminant } } - cellDeterminant[cellI] = mag(det(areaTensor)); + cellDeterminant[celli] = mag(det(areaTensor)); } } } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.H b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.H index 170d089e117a9be1831d5b0c00733919b0102a2d..34045ec79f2dd54150475feee41dbdae143fd34e 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshTools.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -139,7 +139,7 @@ public: const vectorField& fCtrs, const vectorField& fAreas, - const label faceI, + const label facei, const point& ownCc, const point& neiCc ); @@ -152,7 +152,7 @@ public: const vectorField& fCtrs, const vectorField& fAreas, - const label faceI, + const label facei, const point& ownCc ); diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdgeCells.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdgeCells.C index 9aeba752a3f2af909156d5d2940954a4b4a53b13..7a595b2294aebaaff05b65600e6debcaa62d4da6 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdgeCells.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdgeCells.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 @@ -78,10 +78,10 @@ const Foam::labelList& Foam::primitiveMesh::edgeCells // Do quadratic insertion. forAll(eFaces, i) { - label faceI = eFaces[i]; + label facei = eFaces[i]; { - label ownCellI = own[faceI]; + label ownCellI = own[facei]; // Check if not already in storage forAll(storage, j) @@ -99,9 +99,9 @@ const Foam::labelList& Foam::primitiveMesh::edgeCells } } - if (isInternalFace(faceI)) + if (isInternalFace(facei)) { - label neiCellI = nei[faceI]; + label neiCellI = nei[facei]; forAll(storage, j) { diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C index 4c0a70831736146996921e0b54c9fd496e182826..2240905946c0ac364166b92022a7b4cf539db628 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C @@ -117,9 +117,9 @@ void Foam::primitiveMesh::calcEdges(const bool doFaceEdges) const { fePtr_ = new labelListList(fcs.size()); labelListList& faceEdges = *fePtr_; - forAll(fcs, faceI) + forAll(fcs, facei) { - faceEdges[faceI].setSize(fcs[faceI].size()); + faceEdges[facei].setSize(fcs[facei].size()); } } @@ -140,9 +140,9 @@ void Foam::primitiveMesh::calcEdges(const bool doFaceEdges) const if (nInternalPoints_ == -1) { // No ordering. No distinction between types. - forAll(fcs, faceI) + forAll(fcs, facei) { - const face& f = fcs[faceI]; + const face& f = fcs[facei]; forAll(f, fp) { @@ -153,7 +153,7 @@ void Foam::primitiveMesh::calcEdges(const bool doFaceEdges) const if (doFaceEdges) { - (*fePtr_)[faceI][fp] = edgeI; + (*fePtr_)[facei][fp] = edgeI; } } } @@ -165,9 +165,9 @@ void Foam::primitiveMesh::calcEdges(const bool doFaceEdges) const else { // 1. Do external faces first. This creates external edges. - for (label faceI = nInternalFaces_; faceI < fcs.size(); faceI++) + for (label facei = nInternalFaces_; facei < fcs.size(); facei++) { - const face& f = fcs[faceI]; + const face& f = fcs[facei]; forAll(f, fp) { @@ -183,15 +183,15 @@ void Foam::primitiveMesh::calcEdges(const bool doFaceEdges) const } if (doFaceEdges) { - (*fePtr_)[faceI][fp] = edgeI; + (*fePtr_)[facei][fp] = edgeI; } } } // 2. Do internal faces. This creates internal edges. - for (label faceI = 0; faceI < nInternalFaces_; faceI++) + for (label facei = 0; facei < nInternalFaces_; facei++) { - const face& f = fcs[faceI]; + const face& f = fcs[facei]; forAll(f, fp) { @@ -228,7 +228,7 @@ void Foam::primitiveMesh::calcEdges(const bool doFaceEdges) const } if (doFaceEdges) { - (*fePtr_)[faceI][fp] = edgeI; + (*fePtr_)[facei][fp] = edgeI; } } } @@ -444,9 +444,9 @@ void Foam::primitiveMesh::calcEdges(const bool doFaceEdges) const if (doFaceEdges) { labelListList& faceEdges = *fePtr_; - forAll(faceEdges, faceI) + forAll(faceEdges, facei) { - inplaceRenumber(oldToNew, faceEdges[faceI]); + inplaceRenumber(oldToNew, faceEdges[facei]); } } } @@ -533,11 +533,11 @@ const Foam::labelListList& Foam::primitiveMesh::faceEdges() const fePtr_ = new labelListList(fcs.size()); labelListList& faceEdges = *fePtr_; - forAll(fcs, faceI) + forAll(fcs, facei) { - const face& f = fcs[faceI]; + const face& f = fcs[facei]; - labelList& fEdges = faceEdges[faceI]; + labelList& fEdges = faceEdges[facei]; fEdges.setSize(f.size()); forAll(f, fp) @@ -578,18 +578,18 @@ void Foam::primitiveMesh::clearOutEdges() const Foam::labelList& Foam::primitiveMesh::faceEdges ( - const label faceI, + const label facei, DynamicList<label>& storage ) const { if (hasFaceEdges()) { - return faceEdges()[faceI]; + return faceEdges()[facei]; } else { const labelListList& pointEs = pointEdges(); - const face& f = faces()[faceI]; + const face& f = faces()[facei]; storage.clear(); if (f.size() > storage.capacity()) @@ -614,25 +614,25 @@ const Foam::labelList& Foam::primitiveMesh::faceEdges } -const Foam::labelList& Foam::primitiveMesh::faceEdges(const label faceI) const +const Foam::labelList& Foam::primitiveMesh::faceEdges(const label facei) const { - return faceEdges(faceI, labels_); + return faceEdges(facei, labels_); } const Foam::labelList& Foam::primitiveMesh::cellEdges ( - const label cellI, + const label celli, DynamicList<label>& storage ) const { if (hasCellEdges()) { - return cellEdges()[cellI]; + return cellEdges()[celli]; } else { - const labelList& cFaces = cells()[cellI]; + const labelList& cFaces = cells()[celli]; labelSet_.clear(); @@ -663,9 +663,9 @@ const Foam::labelList& Foam::primitiveMesh::cellEdges } -const Foam::labelList& Foam::primitiveMesh::cellEdges(const label cellI) const +const Foam::labelList& Foam::primitiveMesh::cellEdges(const label celli) const { - return cellEdges(cellI, labels_); + return cellEdges(celli, labels_); } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshPointCells.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshPointCells.C index a30bf8858e5b893b16dd72b3b5c1909b930f4b9c..fc8d581c6fc661063b6f233fb24ea43fc14bd22f 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshPointCells.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshPointCells.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 @@ -63,9 +63,9 @@ void Foam::primitiveMesh::calcPointCells() const labelList npc(nPoints(), 0); - forAll(cf, cellI) + forAll(cf, celli) { - const labelList curPoints = cf[cellI].labels(faces()); + const labelList curPoints = cf[celli].labels(faces()); forAll(curPoints, pointI) { @@ -88,15 +88,15 @@ void Foam::primitiveMesh::calcPointCells() const npc = 0; - forAll(cf, cellI) + forAll(cf, celli) { - const labelList curPoints = cf[cellI].labels(faces()); + const labelList curPoints = cf[celli].labels(faces()); forAll(curPoints, pointI) { label ptI = curPoints[pointI]; - pointCellAddr[ptI][npc[ptI]++] = cellI; + pointCellAddr[ptI][npc[ptI]++] = celli; } } } @@ -136,15 +136,15 @@ const Foam::labelList& Foam::primitiveMesh::pointCells forAll(pFaces, i) { - const label faceI = pFaces[i]; + const label facei = pFaces[i]; // Append owner - storage.append(own[faceI]); + storage.append(own[facei]); // Append neighbour - if (faceI < nInternalFaces()) + if (facei < nInternalFaces()) { - storage.append(nei[faceI]); + storage.append(nei[facei]); } } diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C index 563a77a75eb193d2c5708c717a2f6be66dd04a72..d04c80b722dd9bc7c6dd037e21bc884bbe928dd2 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C @@ -46,9 +46,9 @@ Foam::labelList Foam::patchZones::faceToEdge forAll(changedFaces, i) { - label faceI = changedFaces[i]; + label facei = changedFaces[i]; - const labelList& fEdges = pp_.faceEdges()[faceI]; + const labelList& fEdges = pp_.faceEdges()[facei]; forAll(fEdges, fEdgeI) { @@ -82,13 +82,13 @@ Foam::labelList Foam::patchZones::edgeToFace(const labelList& changedEdges) forAll(eFaces, eFaceI) { - label faceI = eFaces[eFaceI]; + label facei = eFaces[eFaceI]; - if (operator[](faceI) == -1) + if (operator[](facei) == -1) { - operator[](faceI) = nZones_; + operator[](facei) = nZones_; - changedFaces[changedI++] = faceI; + changedFaces[changedI++] = facei; } } } @@ -99,10 +99,10 @@ Foam::labelList Foam::patchZones::edgeToFace(const labelList& changedEdges) } -void Foam::patchZones::markZone(label faceI) +void Foam::patchZones::markZone(label facei) { // List of faces whose faceZone has been set. - labelList changedFaces(1, faceI); + labelList changedFaces(1, facei); // List of edges whose faceZone has been set. labelList changedEdges; @@ -167,24 +167,24 @@ Foam::patchZones::patchZones << abort(FatalError); } - label faceI = 0; + label facei = 0; while (true) { // Find first non-visited face - for (; faceI < pp_.size(); faceI++) + for (; facei < pp_.size(); facei++) { - if (operator[](faceI) == -1) + if (operator[](facei) == -1) { - operator[](faceI) = nZones_; + operator[](facei) = nZones_; - markZone(faceI); + markZone(facei); break; } } - if (faceI == pp_.size()) + if (facei == pp_.size()) { // Finished. break; diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.H b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.H index 7f4f88a21eec220fd42cde16ff4cc298106bdae0..3286849405369f1ad5c3ff72c2533d5adb65064e 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.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 @@ -82,8 +82,8 @@ class patchZones labelList edgeToFace(const labelList& changedEdges); //- Fill *this with current zone for every face reachable - // from faceI without crossing edge marked in borderEdge. - void markZone(label faceI); + // from facei without crossing edge marked in borderEdge. + void markZone(label facei); public: diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C index b35f016c2d4a0bd989309bf01e2ff4fd7f6be575..46226ad568d58c9c11b6dfbcc3ddba111b1deff1 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C @@ -38,13 +38,13 @@ namespace Foam Foam::label Foam::walkPatch::getNeighbour ( - const label faceI, + const label facei, const label fp, const label v0, const label v1 ) const { - const labelList& fEdges = pp_.faceEdges()[faceI]; + const labelList& fEdges = pp_.faceEdges()[facei]; const edgeList& edges = pp_.edges(); @@ -87,7 +87,7 @@ Foam::label Foam::walkPatch::getNeighbour if (nbrEdgeI == -1) { FatalErrorInFunction - << "Did not find edge on face " << faceI << " that uses vertices" + << "Did not find edge on face " << facei << " that uses vertices" << v0 << " and " << v1 << abort(FatalError); } @@ -104,7 +104,7 @@ Foam::label Foam::walkPatch::getNeighbour { label nbrFaceI = eFaces[0]; - if (nbrFaceI == faceI) + if (nbrFaceI == facei) { nbrFaceI = eFaces[1]; } @@ -114,7 +114,7 @@ Foam::label Foam::walkPatch::getNeighbour else { FatalErrorInFunction - << "Illegal surface on patch. Face " << faceI + << "Illegal surface on patch. Face " << facei << " at vertices " << v0 << ',' << v1 << " has fewer than 1 or more than 2 neighbours" << abort(FatalError); @@ -138,16 +138,16 @@ void Foam::walkPatch::faceToFace forAll(changedFaces, i) { - label faceI = changedFaces[i]; + label facei = changedFaces[i]; label enterVertI = enterVerts[i]; - if (!visited_[faceI]) + if (!visited_[facei]) { // Do this face - visited_[faceI] = true; - visitOrder_.append(faceI); + visited_[facei] = true; + visitOrder_.append(facei); - const face& f = pp_.localFaces()[faceI]; + const face& f = pp_.localFaces()[facei]; label fp = findIndex(f, enterVertI); @@ -157,13 +157,13 @@ void Foam::walkPatch::faceToFace forAll(f, i) { label fp1 = reverse_ ? f.rcIndex(fp) : f.fcIndex(fp); - label nbr = getNeighbour(faceI, fp, f[fp], f[fp1]); + label nbr = getNeighbour(facei, fp, f[fp], f[fp1]); if ( nbr != -1 && !visited_[nbr] - && faceZone_[nbr] == faceZone_[faceI] + && faceZone_[nbr] == faceZone_[facei] ) { nbrFaces[changedI] = nbr; @@ -188,7 +188,7 @@ Foam::walkPatch::walkPatch const primitivePatch& pp, const labelList& faceZone, const bool reverse, - const label faceI, + const label facei, const label enterVertI, boolList& visited ) @@ -201,7 +201,7 @@ Foam::walkPatch::walkPatch indexInFace_(pp.size()) { // List of faces that have been visited in the current iteration. - labelList changedFaces(1, faceI); + labelList changedFaces(1, facei); // Corresponding list of entry vertices labelList enterVerts(1, enterVertI); diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.H b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.H index e1cc58c3d1aa77acd7aae9ff932020079c9624b9..bd1443a12407363e38e477c7c0fd7ad9e532080f 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.H +++ b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.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 @@ -76,7 +76,7 @@ class walkPatch //- Get other face using v0, v1. Returns -1 if none. label getNeighbour ( - const label faceI, + const label facei, const label fp, const label v0, const label v1 @@ -113,7 +113,7 @@ public: const primitivePatch& pp, const labelList& faceZone, // Per face which zone it belongs to const bool reverse, // Reverse walk - const label faceI, // Current face + const label facei, // Current face const label enterVertI, // Vertex across which this face // is visited. boolList& visited diff --git a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H index 954cffdabeef04584d66544f22836d5f541264dd..201f14819f4a165b972d8f98ba7cabf595f26fcc 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H +++ b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H @@ -205,7 +205,7 @@ public: inline const Point& d() const; //- Return i-th face - inline triPointRef tri(const label faceI) const; + inline triPointRef tri(const label facei) const; // Properties diff --git a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H index 4863ec2202091ac5a860c5b06d963657592a182f..8406efaa818d897b2093e1c71c95b080451b046a 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H +++ b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedronI.H @@ -100,32 +100,32 @@ inline const Point& Foam::tetrahedron<Point, PointRef>::d() const template<class Point, class PointRef> inline Foam::triPointRef Foam::tetrahedron<Point, PointRef>::tri ( - const label faceI + const label facei ) const { // Warning. Ordering of faces needs to be the same for a tetrahedron // class, a tetrahedron cell shape model and a tetCell - if (faceI == 0) + if (facei == 0) { return triPointRef(b_, c_, d_); } - else if (faceI == 1) + else if (facei == 1) { return triPointRef(a_, d_, c_); } - else if (faceI == 2) + else if (facei == 2) { return triPointRef(a_, b_, d_); } - else if (faceI == 3) + else if (facei == 3) { return triPointRef(a_, c_, b_); } else { FatalErrorInFunction - << "index out of range 0 -> 3. faceI = " << faceI + << "index out of range 0 -> 3. facei = " << facei << abort(FatalError); return triPointRef(b_, c_, d_); } diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C index 3ca3a0e4c725df8c4fb6a00c84a3f1ecc9629ece..e7e94487e499ccd80b8125ead58073707f4ec8fe 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransform.C @@ -134,9 +134,9 @@ void Foam::globalIndexAndTransform::determineTransforms() label dummyMatch = -1; - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; // Note: special check for unordered cyclics. These are in fact // transform bcs and should probably be split off. @@ -355,11 +355,11 @@ void Foam::globalIndexAndTransform::determinePatchTransformSign() label matchTransI = -1; - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; - // Pout<< nl << patchI << " " << pp.name() << endl; + // Pout<< nl << patchi << " " << pp.name() << endl; // Note: special check for unordered cyclics. These are in fact // transform bcs and should probably be split off. @@ -416,7 +416,7 @@ void Foam::globalIndexAndTransform::determinePatchTransformSign() // ] // << endl; - patchTransformSign_[patchI] = + patchTransformSign_[patchi] = Pair<label>(matchTransI, sign); } } @@ -460,7 +460,7 @@ void Foam::globalIndexAndTransform::determinePatchTransformSign() // ] // << endl; - patchTransformSign_[patchI] = + patchTransformSign_[patchi] = Pair<label>(matchTransI, sign); } } @@ -514,13 +514,13 @@ Foam::globalIndexAndTransform::globalIndexAndTransform Info<< "\tpatch\ttransform\tsign" << endl; - forAll(patchTransformSign_, patchI) + forAll(patchTransformSign_, patchi) { - if (patchTransformSign_[patchI].first() != -1) + if (patchTransformSign_[patchi].first() != -1) { - Info<< '\t' << patches[patchI].name() - << '\t' << patchTransformSign_[patchI].first() - << '\t' << patchTransformSign_[patchI].second() + Info<< '\t' << patches[patchi].name() + << '\t' << patchTransformSign_[patchi].first() + << '\t' << patchTransformSign_[patchi].second() << endl; } } diff --git a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H index e37e3fb371a99772a2508855ebf8474b4436934e..e97b330668af4855437fbf1a2b340f818b38b16d 100644 --- a/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H +++ b/src/OpenFOAM/primitives/globalIndexAndTransform/globalIndexAndTransformI.H @@ -175,12 +175,12 @@ Foam::globalIndexAndTransform::decodeTransformIndex Foam::label Foam::globalIndexAndTransform::addToTransformIndex ( const label transformIndex, - const label patchI, + const label patchi, const bool isSendingSide, const scalar tol ) const { - const Pair<label>& transSign = patchTransformSign_[patchI]; + const Pair<label>& transSign = patchTransformSign_[patchi]; label matchTransI = transSign.first(); @@ -208,7 +208,7 @@ Foam::label Foam::globalIndexAndTransform::addToTransformIndex { // sent from patch without a transformation. Do nothing. FatalErrorInFunction - << "patch:" << mesh_.boundaryMesh()[patchI].name() + << "patch:" << mesh_.boundaryMesh()[patchi].name() << " transform:" << matchTransI << " sign:" << sign << " current transforms:" << permutation << exit(FatalError); @@ -245,7 +245,7 @@ Foam::label Foam::globalIndexAndTransform::addToTransformIndex FatalErrorInFunction << "More than one patch accessing the same transform " << "but not of the same sign." << endl - << "patch:" << mesh_.boundaryMesh()[patchI].name() + << "patch:" << mesh_.boundaryMesh()[patchi].name() << " transform:" << matchTransI << " sign:" << sign << " current transforms:" << permutation << exit(FatalError); @@ -450,23 +450,23 @@ const Foam::vectorTensorTransform& Foam::globalIndexAndTransform::transform Foam::labelList Foam::globalIndexAndTransform::transformIndicesForPatches ( - const labelHashSet& patchIs + const labelHashSet& patchis ) const { List<label> permutation(transforms_.size(), 0); labelList selectedTransformIs(0); - if (patchIs.empty() || transforms_.empty()) + if (patchis.empty() || transforms_.empty()) { return selectedTransformIs; } - forAllConstIter(labelHashSet, patchIs, iter) + forAllConstIter(labelHashSet, patchis, iter) { - label patchI = iter.key(); + label patchi = iter.key(); - const Pair<label>& transSign = patchTransformSign_[patchI]; + const Pair<label>& transSign = patchTransformSign_[patchi]; label matchTransI = transSign.first(); @@ -625,13 +625,13 @@ Foam::labelList Foam::globalIndexAndTransform::transformIndicesForPatches Foam::pointField Foam::globalIndexAndTransform::transformPatches ( - const labelHashSet& patchIs, + const labelHashSet& patchis, const point& pt ) const { - labelList transIs = transformIndicesForPatches(patchIs); + labelList transIs = transformIndicesForPatches(patchis); - // Pout<< patchIs << nl << transIs << endl; + // Pout<< patchis << nl << transIs << endl; pointField transPts(transIs.size()); diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C index 8ace068f487521f17f25fb5ba8d32b8fd30bc4e7..46dc30f3e5d9784f59eeea453d1f7e0cb027e7da 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/convectiveHeatTransfer/convectiveHeatTransferFvPatchScalarField.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 @@ -136,19 +136,19 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs() const scalarField Pr(muw*Cpw/kappaw); scalarField& htc = *this; - forAll(htc, faceI) + 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) { - htc[faceI] = 0.664*sqrt(Re)*cbrt(Pr[faceI])*kappaw[faceI]/L_; + htc[facei] = 0.664*sqrt(Re)*cbrt(Pr[facei])*kappaw[facei]/L_; } else { - htc[faceI] = 0.037*pow(Re, 0.8)*cbrt(Pr[faceI])*kappaw[faceI]/L_; + htc[facei] = 0.037*pow(Re, 0.8)*cbrt(Pr[facei])*kappaw[facei]/L_; } } diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C index 8d192f997025482fbfe369d679b9b1e688cd1042..34f91c4552b61d0eddea8da9ec88eea9f1dcc6d8 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/externalCoupledTemperatureMixed/externalCoupledTemperatureMixedFvPatchScalarField.C @@ -121,7 +121,7 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::transferData << endl; } - const label patchI = patch().index(); + const label patchi = patch().index(); // heat flux [W/m2] scalarField qDot(this->patch().size(), 0.0); @@ -146,17 +146,17 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::transferData const basicThermo& thermo = turbModel.transport(); - const fvPatchScalarField& hep = thermo.he().boundaryField()[patchI]; + const fvPatchScalarField& hep = thermo.he().boundaryField()[patchi]; - qDot = turbModel.alphaEff(patchI)*hep.snGrad(); + qDot = turbModel.alphaEff(patchi)*hep.snGrad(); } else if (db().foundObject<basicThermo>(thermoName)) { const basicThermo& thermo = db().lookupObject<basicThermo>(thermoName); - const fvPatchScalarField& hep = thermo.he().boundaryField()[patchI]; + const fvPatchScalarField& hep = thermo.he().boundaryField()[patchi]; - qDot = thermo.alpha().boundaryField()[patchI]*hep.snGrad(); + qDot = thermo.alpha().boundaryField()[patchi]*hep.snGrad(); } else { @@ -207,12 +207,12 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::transferData const Field<scalar>& qDot = qDots[procI]; const Field<scalar>& htc = htcs[procI]; - forAll(magSf, faceI) + forAll(magSf, facei) { - os << magSf[faceI] << token::SPACE - << value[faceI] << token::SPACE - << qDot[faceI] << token::SPACE - << htc[faceI] << token::SPACE + os << magSf[facei] << token::SPACE + << value[facei] << token::SPACE + << qDot[facei] << token::SPACE + << htc[facei] << token::SPACE << nl; } } @@ -224,12 +224,12 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::transferData { const Field<scalar>& magSf(this->patch().magSf()); - forAll(patch(), faceI) + forAll(patch(), facei) { - os << magSf[faceI] << token::SPACE - << Tp[faceI] << token::SPACE - << qDot[faceI] << token::SPACE - << htc[faceI] << token::SPACE + os << magSf[facei] << token::SPACE + << Tp[facei] << token::SPACE + << qDot[facei] << token::SPACE + << htc[facei] << token::SPACE << nl; } diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C index 9ed2dd36484a7812bde2a3ef1138c82d2bc9ee29..03b93bf10f57c9d283fd59466897e15f2716b72f 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.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 @@ -103,7 +103,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa ) const { const fvMesh& mesh = patch_.boundaryMesh().mesh(); - const label patchI = patch_.index(); + const label patchi = patch_.index(); switch (method_) { @@ -121,14 +121,14 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa const turbulenceModel& turbModel = mesh.lookupObject<turbulenceModel>(turbName); - return turbModel.kappaEff(patchI); + return turbModel.kappaEff(patchi); } else if (mesh.foundObject<fluidThermo>(basicThermo::dictName)) { const fluidThermo& thermo = mesh.lookupObject<fluidThermo>(basicThermo::dictName); - return thermo.kappa(patchI); + return thermo.kappa(patchi); } else { @@ -146,7 +146,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa const solidThermo& thermo = mesh.lookupObject<solidThermo>(basicThermo::dictName); - return thermo.kappa(patchI); + return thermo.kappa(patchi); break; } @@ -161,9 +161,9 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa alphaAniName_ ); - const scalarField& pp = thermo.p().boundaryField()[patchI]; + const scalarField& pp = thermo.p().boundaryField()[patchi]; - const symmTensorField kappa(alphaAni*thermo.Cp(pp, Tp, patchI)); + const symmTensorField kappa(alphaAni*thermo.Cp(pp, Tp, patchi)); const vectorField n(patch_.nf()); 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 4b337af0739a65418e7282d0aaf97ecd15eff117..6128271885b67ca1de215bdbd9147034785634f2 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.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 @@ -237,16 +237,16 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() ); // Populate boundary values - forAll(alphatw, faceI) + forAll(alphatw, facei) { - label faceCellI = patch().faceCells()[faceI]; + label faceCellI = patch().faceCells()[facei]; scalar uTau = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = uTau*y[faceI]/(muw[faceI]/rhow[faceI]); + scalar yPlus = uTau*y[facei]/(muw[facei]/rhow[facei]); // Molecular Prandtl number - scalar Pr = muw[faceI]/alphaw[faceI]; + scalar Pr = muw[facei]/alphaw[facei]; // Molecular-to-turbulent Prandtl number ratio scalar Prat = Pr/Prt_; @@ -259,36 +259,36 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() scalar alphaEff = 0.0; if (yPlus < yPlusTherm) { - scalar A = qDot[faceI]*rhow[faceI]*uTau*y[faceI]; - scalar B = qDot[faceI]*Pr*yPlus; - scalar C = Pr*0.5*rhow[faceI]*uTau*sqr(magUp[faceI]); + scalar A = qDot[facei]*rhow[facei]*uTau*y[facei]; + scalar B = qDot[facei]*Pr*yPlus; + scalar C = Pr*0.5*rhow[facei]*uTau*sqr(magUp[facei]); alphaEff = A/(B + C + VSMALL); } else { - scalar A = qDot[faceI]*rhow[faceI]*uTau*y[faceI]; - scalar B = qDot[faceI]*Prt_*(1.0/kappa_*log(E_*yPlus) + P); - scalar magUc = uTau/kappa_*log(E_*yPlusTherm) - mag(Uw[faceI]); + scalar A = qDot[facei]*rhow[facei]*uTau*y[facei]; + scalar B = qDot[facei]*Prt_*(1.0/kappa_*log(E_*yPlus) + P); + scalar magUc = uTau/kappa_*log(E_*yPlusTherm) - mag(Uw[facei]); scalar C = - 0.5*rhow[faceI]*uTau - *(Prt_*sqr(magUp[faceI]) + (Pr - Prt_)*sqr(magUc)); + 0.5*rhow[facei]*uTau + *(Prt_*sqr(magUp[facei]) + (Pr - Prt_)*sqr(magUc)); alphaEff = A/(B + C + VSMALL); } // Update turbulent thermal diffusivity - alphatw[faceI] = max(0.0, alphaEff - alphaw[faceI]); + alphatw[facei] = max(0.0, alphaEff - alphaw[facei]); if (debug) { Info<< " uTau = " << uTau << nl << " Pr = " << Pr << nl << " Prt = " << Prt_ << nl - << " qDot = " << qDot[faceI] << nl + << " qDot = " << qDot[facei] << nl << " yPlus = " << yPlus << nl << " yPlusTherm = " << yPlusTherm << nl << " alphaEff = " << alphaEff << nl - << " alphaw = " << alphaw[faceI] << nl - << " alphatw = " << alphatw[faceI] << nl + << " alphaw = " << alphaw[facei] << nl + << " alphatw = " << alphatw[facei] << nl << endl; } } 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 02ff42ecc30e0528966d674ec62b9a31ba820cea..88228de2dcc0aa87b8c9bcb85c6cd26734d6fbd6 100644 --- a/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/derivedFvPatchFields/wallFunctions/alphatWallFunctions/alphatJayatillekeWallFunction/alphatJayatillekeWallFunctionFvPatchScalarField.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 @@ -234,12 +234,12 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() // Populate boundary values scalarField& alphatw = *this; - forAll(alphatw, faceI) + 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_; @@ -251,13 +251,13 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs() // Update turbulent thermal conductivity if (yPlus > yPlusTherm) { - scalar nu = nuw[faceI]; + scalar nu = nuw[facei]; scalar kt = nu*(yPlus/(Prt_*(log(E_*yPlus)/kappa_ + P)) - 1/Pr); - alphatw[faceI] = max(0.0, kt); + alphatw[facei] = max(0.0, kt); } else { - alphatw[faceI] = 0.0; + alphatw[facei] = 0.0; } } diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C index 865f3fc693b0cde2474a70c57042dcdeca1df2db..c9790c6417f6b8de47c77afa3b0435c3924963a3 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/maxDeltaxyz/maxDeltaxyz.C @@ -49,16 +49,16 @@ void Foam::LESModels::maxDeltaxyz::calcDelta() const cellList& cells = mesh.cells(); scalarField hmax(cells.size()); - forAll(cells,cellI) + forAll(cells,celli) { scalar deltaMaxTmp = 0.0; - const labelList& cFaces = mesh.cells()[cellI]; - const point& centrevector = mesh.cellCentres()[cellI]; + const labelList& cFaces = mesh.cells()[celli]; + const point& centrevector = mesh.cellCentres()[celli]; forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; - const point& facevector = mesh.faceCentres()[faceI]; + label facei = cFaces[cFaceI]; + const point& facevector = mesh.faceCentres()[facei]; scalar tmp = mag(facevector - centrevector); if (tmp > deltaMaxTmp) { @@ -66,7 +66,7 @@ void Foam::LESModels::maxDeltaxyz::calcDelta() } } - hmax[cellI] = deltaCoeff_*deltaMaxTmp; + hmax[celli] = deltaCoeff_*deltaMaxTmp; } if (nD == 3) diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C index 843f1076a62df4a3320f2ee2058e4199cb474ef3..8b1643485864f737698a32135e4ffa4755c66cd9 100644 --- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.C +++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.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 @@ -49,31 +49,31 @@ void Foam::LESModels::smoothDelta::setChangedFaces DynamicList<deltaData>& changedFacesInfo ) { - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - scalar ownDelta = delta[mesh.faceOwner()[faceI]]; + scalar ownDelta = delta[mesh.faceOwner()[facei]]; - scalar neiDelta = delta[mesh.faceNeighbour()[faceI]]; + scalar neiDelta = delta[mesh.faceNeighbour()[facei]]; // Check if owner delta much larger than neighbour delta or vice versa if (ownDelta > maxDeltaRatio_ * neiDelta) { - changedFaces.append(faceI); + changedFaces.append(facei); changedFacesInfo.append(deltaData(ownDelta)); } else if (neiDelta > maxDeltaRatio_ * ownDelta) { - changedFaces.append(faceI); + changedFaces.append(facei); changedFacesInfo.append(deltaData(neiDelta)); } } // Insert all faces of coupled patches no matter what. Let FaceCellWave // sort it out. - forAll(mesh.boundaryMesh(), patchI) + forAll(mesh.boundaryMesh(), patchi) { - const polyPatch& patch = mesh.boundaryMesh()[patchI]; + const polyPatch& patch = mesh.boundaryMesh()[patchi]; if (patch.coupled()) { @@ -109,9 +109,9 @@ void Foam::LESModels::smoothDelta::calcDelta() // Set initial field on cells. List<deltaData> cellDeltaData(mesh.nCells()); - forAll(geometricDelta, cellI) + forAll(geometricDelta, celli) { - cellDeltaData[cellI] = geometricDelta[cellI]; + cellDeltaData[celli] = geometricDelta[celli]; } // Set initial field on faces. @@ -130,9 +130,9 @@ void Foam::LESModels::smoothDelta::calcDelta() maxDeltaRatio_ ); - forAll(delta_, cellI) + forAll(delta_, celli) { - delta_[cellI] = cellDeltaData[cellI].delta(); + delta_[celli] = cellDeltaData[celli].delta(); } } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C index 0b61bfa3f5b8704709d4d315faccad544f28e3cd..fce7258ca8bf25cc9fd3d81e1d3eb90424169b31 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/fWallFunctions/fWallFunction/fWallFunctionFvPatchScalarField.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 @@ -202,13 +202,13 @@ void fWallFunctionFvPatchScalarField::updateCoeffs() scalarField& f = *this; // Set f wall values - forAll(f, faceI) + forAll(f, facei) { - label faceCellI = patch().faceCells()[faceI]; + label faceCellI = patch().faceCells()[facei]; scalar uTau = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = uTau*y[faceI]/nuw[faceI]; + scalar yPlus = uTau*y[facei]/nuw[facei]; if (yPlus > yPlusLam_) { @@ -217,12 +217,12 @@ void fWallFunctionFvPatchScalarField::updateCoeffs() scalar epsc = epsilon[faceCellI]; scalar kc = k[faceCellI]; - f[faceI] = N*v2c*epsc/(sqr(kc) + ROOTVSMALL); - f[faceI] /= sqr(uTau) + ROOTVSMALL; + f[facei] = N*v2c*epsc/(sqr(kc) + ROOTVSMALL); + f[facei] /= sqr(uTau) + ROOTVSMALL; } else { - f[faceI] = 0.0; + f[facei] = 0.0; } } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C index 30308b292606fc472e906a28473324328a1bfc00..5e82db4ef78449d6d97215604521222a10af26f9 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kLowReWallFunction/kLowReWallFunctionFvPatchScalarField.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 @@ -191,28 +191,28 @@ void kLowReWallFunctionFvPatchScalarField::updateCoeffs() scalarField& kw = *this; // Set k wall values - forAll(kw, faceI) + forAll(kw, facei) { - label faceCellI = patch().faceCells()[faceI]; + label faceCellI = patch().faceCells()[facei]; scalar uTau = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = uTau*y[faceI]/nuw[faceI]; + scalar yPlus = uTau*y[facei]/nuw[facei]; if (yPlus > yPlusLam_) { scalar Ck = -0.416; scalar Bk = 8.366; - kw[faceI] = Ck/kappa_*log(yPlus) + Bk; + kw[facei] = Ck/kappa_*log(yPlus) + Bk; } else { scalar C = 11.0; scalar Cf = (1.0/sqr(yPlus + C) + 2.0*yPlus/pow3(C) - 1.0/sqr(C)); - kw[faceI] = 2400.0/sqr(Ceps2_)*Cf; + kw[facei] = 2400.0/sqr(Ceps2_)*Cf; } - kw[faceI] *= sqr(uTau); + kw[facei] *= sqr(uTau); } // Limit kw to avoid failure of the turbulence model due to division by kw diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C index fca1d717d231a395705458bfbb8930ec4a234eea..8541b5f3005d22248e5698cd02f2b2acc7c39552 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUSpaldingWallFunction/nutUSpaldingWallFunctionFvPatchScalarField.C @@ -89,9 +89,9 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau tmp<scalarField> tuTau(new scalarField(patch().size(), 0.0)); scalarField& uTau = tuTau.ref(); - forAll(uTau, faceI) + forAll(uTau, facei) { - scalar ut = sqrt((nutw[faceI] + nuw[faceI])*magGradU[faceI]); + scalar ut = sqrt((nutw[facei] + nuw[facei])*magGradU[facei]); if (ut > ROOTVSMALL) { @@ -100,17 +100,17 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau do { - scalar kUu = min(kappa_*magUp[faceI]/ut, 50); + scalar kUu = min(kappa_*magUp[facei]/ut, 50); scalar fkUu = exp(kUu) - 1 - kUu*(1 + 0.5*kUu); scalar f = - - ut*y[faceI]/nuw[faceI] - + magUp[faceI]/ut + - ut*y[facei]/nuw[facei] + + magUp[facei]/ut + 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu)); scalar df = - y[faceI]/nuw[faceI] - + magUp[faceI]/sqr(ut) + y[facei]/nuw[facei] + + magUp[facei]/sqr(ut) + 1/E_*kUu*fkUu/ut; scalar uTauNew = ut + f/df; @@ -119,7 +119,7 @@ tmp<scalarField> nutUSpaldingWallFunctionFvPatchScalarField::calcUTau } while (ut > ROOTVSMALL && err > 0.01 && ++iter < 10); - uTau[faceI] = max(0.0, ut); + uTau[facei] = max(0.0, ut); } } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C index eb4c55fb94b78c53a0b4c5dfedf32742c67a6ff3..376cad151bf8e613acae2cd69982c8935be8600e 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUTabulatedWallFunction/nutUTabulatedWallFunctionFvPatchScalarField.C @@ -74,9 +74,9 @@ tmp<scalarField> nutUTabulatedWallFunctionFvPatchScalarField::calcUPlus tmp<scalarField> tuPlus(new scalarField(patch().size(), 0.0)); scalarField& uPlus = tuPlus.ref(); - forAll(uPlus, faceI) + forAll(uPlus, facei) { - uPlus[faceI] = uPlusTable_.interpolateLog10(Rey[faceI]); + uPlus[facei] = uPlusTable_.interpolateLog10(Rey[facei]); } return tuPlus; diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C index 710ff8242b909ec08d827eea54169343160d9e33..f74e476f91c316c8285a217a1286c2ae08c420a2 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkAtmRoughWallFunction/nutkAtmRoughWallFunctionFvPatchScalarField.C @@ -59,23 +59,23 @@ tmp<scalarField> nutkAtmRoughWallFunctionFvPatchScalarField::calcNut() const tmp<scalarField> tnutw(new scalarField(*this)); scalarField& nutw = tnutw.ref(); - forAll(nutw, faceI) + forAll(nutw, facei) { - label faceCellI = patch().faceCells()[faceI]; + label faceCellI = patch().faceCells()[facei]; scalar uStar = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = uStar*y[faceI]/nuw[faceI]; + scalar yPlus = uStar*y[facei]/nuw[facei]; - scalar Edash = (y[faceI] + z0_[faceI])/z0_[faceI]; + scalar Edash = (y[facei] + z0_[facei])/z0_[facei]; - nutw[faceI] = - nuw[faceI]*(yPlus*kappa_/log(max(Edash, 1+1e-4)) - 1); + nutw[facei] = + nuw[facei]*(yPlus*kappa_/log(max(Edash, 1+1e-4)) - 1); if (debug) { Info<< "yPlus = " << yPlus << ", Edash = " << Edash - << ", nutw = " << nutw[faceI] + << ", nutw = " << nutw[facei] << endl; } } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C index 67405f0aa8502d6a4cc5d4f3b592c6ad8119775e..9147ef08bc573489bf540ad0bc59786705aae4e2 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkRoughWallFunction/nutkRoughWallFunctionFvPatchScalarField.C @@ -82,30 +82,30 @@ tmp<scalarField> nutkRoughWallFunctionFvPatchScalarField::calcNut() const tmp<scalarField> tnutw(new scalarField(*this)); scalarField& nutw = tnutw.ref(); - forAll(nutw, faceI) + forAll(nutw, facei) { - label faceCellI = patch().faceCells()[faceI]; + label faceCellI = patch().faceCells()[facei]; scalar uStar = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = uStar*y[faceI]/nuw[faceI]; - scalar KsPlus = uStar*Ks_[faceI]/nuw[faceI]; + scalar yPlus = uStar*y[facei]/nuw[facei]; + scalar KsPlus = uStar*Ks_[facei]/nuw[facei]; scalar Edash = E_; if (KsPlus > 2.25) { - Edash /= fnRough(KsPlus, Cs_[faceI]); + Edash /= fnRough(KsPlus, Cs_[facei]); } - scalar limitingNutw = max(nutw[faceI], nuw[faceI]); + scalar limitingNutw = max(nutw[facei], nuw[facei]); // To avoid oscillations limit the change in the wall viscosity // which is particularly important if it temporarily becomes zero - nutw[faceI] = + nutw[facei] = max ( min ( - nuw[faceI] + nuw[facei] *(yPlus*kappa_/log(max(Edash*yPlus, 1+1e-4)) - 1), 2*limitingNutw ), 0.5*limitingNutw @@ -116,7 +116,7 @@ tmp<scalarField> nutkRoughWallFunctionFvPatchScalarField::calcNut() const Info<< "yPlus = " << yPlus << ", KsPlus = " << KsPlus << ", Edash = " << Edash - << ", nutw = " << nutw[faceI] + << ", nutw = " << nutw[facei] << endl; } } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C index 60dcf74b264644879b86c797edefd5d5d8855c22..58036e4df3ba8d062d2924fdb3262f4af2e35d2d 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C @@ -61,15 +61,15 @@ tmp<scalarField> nutkWallFunctionFvPatchScalarField::calcNut() const tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0)); scalarField& nutw = tnutw.ref(); - forAll(nutw, faceI) + 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_) { - nutw[faceI] = nuw[faceI]*(yPlus*kappa_/log(E_*yPlus) - 1.0); + nutw[facei] = nuw[facei]*(yPlus*kappa_/log(E_*yPlus) - 1.0); } } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 105822e97a6412d4ae704c982d591946c53ada83..71d05b0bda38e9985a11b4b60742f2260993eb18 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.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 @@ -135,8 +135,8 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights() const labelUList& faceCells = bf[patchi].patch().faceCells(); forAll(faceCells, i) { - label cellI = faceCells[i]; - weights[cellI]++; + label celli = faceCells[i]; + weights[celli]++; } } } @@ -233,24 +233,24 @@ void omegaWallFunctionFvPatchScalarField::calculate const scalarField magGradUw(mag(Uw.snGrad())); // Set omega and G - forAll(nutw, faceI) + forAll(nutw, facei) { - label cellI = patch.faceCells()[faceI]; + label celli = patch.faceCells()[facei]; - scalar w = cornerWeights[faceI]; + scalar w = cornerWeights[facei]; - scalar omegaVis = 6.0*nuw[faceI]/(beta1_*sqr(y[faceI])); + scalar omegaVis = 6.0*nuw[facei]/(beta1_*sqr(y[facei])); - scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]); + scalar omegaLog = sqrt(k[celli])/(Cmu25*kappa_*y[facei]); - omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog)); + omega[celli] += w*sqrt(sqr(omegaVis) + sqr(omegaLog)); - G[cellI] += + G[celli] += w - *(nutw[faceI] + nuw[faceI]) - *magGradUw[faceI] - *Cmu25*sqrt(k[cellI]) - /(kappa_*y[faceI]); + *(nutw[facei] + nuw[facei]) + *magGradUw[facei] + *Cmu25*sqrt(k[celli]) + /(kappa_*y[facei]); } } @@ -443,12 +443,12 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs() FieldType& omega = const_cast<FieldType&>(dimensionedInternalField()); - forAll(*this, faceI) + forAll(*this, facei) { - label cellI = patch().faceCells()[faceI]; + label celli = patch().faceCells()[facei]; - G[cellI] = G0[cellI]; - omega[cellI] = omega0[cellI]; + G[celli] = G0[celli]; + omega[celli] = omega0[celli]; } fvPatchField<scalar>::updateCoeffs(); @@ -498,17 +498,17 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs scalarField& omegaf = *this; // only set the values if the weights are > tolerance - forAll(weights, faceI) + forAll(weights, facei) { - scalar w = weights[faceI]; + scalar w = weights[facei]; if (w > tolerance_) { - label cellI = patch().faceCells()[faceI]; + label celli = patch().faceCells()[facei]; - G[cellI] = (1.0 - w)*G[cellI] + w*G0[cellI]; - omega[cellI] = (1.0 - w)*omega[cellI] + w*omega0[cellI]; - omegaf[faceI] = omega[cellI]; + G[celli] = (1.0 - w)*G[celli] + w*G0[celli]; + omega[celli] = (1.0 - w)*omega[celli] + w*omega0[celli]; + omegaf[facei] = omega[celli]; } } @@ -553,17 +553,17 @@ void omegaWallFunctionFvPatchScalarField::manipulateMatrix label nConstrainedCells = 0; - forAll(weights, faceI) + forAll(weights, facei) { // only set the values if the weights are > tolerance - if (weights[faceI] > tolerance_) + if (weights[facei] > tolerance_) { nConstrainedCells++; - label cellI = faceCells[faceI]; + label celli = faceCells[facei]; - constraintCells.append(cellI); - constraintomega.append(omega[cellI]); + constraintCells.append(celli); + constraintomega.append(omega[celli]); } } diff --git a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C index 2c24a2688e9d25a938f9ad51875a129a9b9c0af1..ea4ad23d390be73693bf76549464a42d7a030300 100644 --- a/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions/v2WallFunctions/v2WallFunction/v2WallFunctionFvPatchScalarField.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 @@ -194,27 +194,27 @@ void v2WallFunctionFvPatchScalarField::updateCoeffs() scalarField& v2 = *this; // Set v2 wall values - forAll(v2, faceI) + forAll(v2, facei) { - label faceCellI = patch().faceCells()[faceI]; + label faceCellI = patch().faceCells()[facei]; scalar uTau = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = uTau*y[faceI]/nuw[faceI]; + scalar yPlus = uTau*y[facei]/nuw[facei]; if (yPlus > yPlusLam_) { scalar Cv2 = 0.193; scalar Bv2 = -0.94; - v2[faceI] = Cv2/kappa_*log(yPlus) + Bv2; + v2[facei] = Cv2/kappa_*log(yPlus) + Bv2; } else { scalar Cv2 = 0.193; - v2[faceI] = Cv2*pow4(yPlus); + v2[facei] = Cv2*pow4(yPlus); } - v2[faceI] *= sqr(uTau); + v2[facei] *= sqr(uTau); } fixedValueFvPatchField<scalar>::updateCoeffs(); diff --git a/src/combustionModels/FSD/FSD.C b/src/combustionModels/FSD/FSD.C index 8f10a8940ce5c7c39282cdc117919c64f959687d..cc25b9769901759377689758fdffcbf7b7ebc396 100644 --- a/src/combustionModels/FSD/FSD.C +++ b/src/combustionModels/FSD/FSD.C @@ -210,15 +210,15 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm() scalar deltaFt = 1.0/ftDim_; - forAll(ft_, cellI) + forAll(ft_, celli) { - if (ft_[cellI] > ftMin_ && ft_[cellI] < ftMax_) + if (ft_[celli] > ftMin_ && ft_[celli] < ftMax_) { - scalar ftCell = ft_[cellI]; + scalar ftCell = ft_[celli]; - if (ftVar[cellI] > ftVarMin_) //sub-grid beta pdf of ft_ + if (ftVar[celli] > ftVarMin_) //sub-grid beta pdf of ft_ { - scalar ftVarc = ftVar[cellI]; + scalar ftVarc = ftVar[celli]; scalar a = max(ftCell*(ftCell*(1.0 - ftCell)/ftVarc - 1.0), 0.0); scalar b = max(a/ftCell - a, 0.0); @@ -226,35 +226,35 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm() for (int i=1; i<ftDim_; i++) { scalar ft = i*deltaFt; - pc[cellI] += pow(ft, a-1.0)*pow(1.0 - ft, b - 1.0)*deltaFt; + pc[celli] += pow(ft, a-1.0)*pow(1.0 - ft, b - 1.0)*deltaFt; } for (int i=1; i<ftDim_; i++) { scalar ft = i*deltaFt; - omegaFuelBar[cellI] += - omegaFuel[cellI]/omegaF[cellI] + omegaFuelBar[celli] += + omegaFuel[celli]/omegaF[celli] *exp ( -sqr(ft - ftStoich) - /(2.0*sqr(0.01*omegaF[cellI])) + /(2.0*sqr(0.01*omegaF[celli])) ) *pow(ft, a - 1.0) *pow(1.0 - ft, b - 1.0) *deltaFt; } - omegaFuelBar[cellI] /= max(pc[cellI], 1e-4); + omegaFuelBar[celli] /= max(pc[celli], 1e-4); } else { - omegaFuelBar[cellI] = - omegaFuel[cellI]/omegaF[cellI] - *exp(-sqr(ftCell - ftStoich)/(2.0*sqr(0.01*omegaF[cellI]))); + omegaFuelBar[celli] = + omegaFuel[celli]/omegaF[celli] + *exp(-sqr(ftCell - ftStoich)/(2.0*sqr(0.01*omegaF[celli]))); } } else { - omegaFuelBar[cellI] = 0.0; + omegaFuelBar[celli] = 0.0; } } @@ -282,15 +282,15 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm() YprodTotal += this->singleMixturePtr_->Yprod0()[productsIndex[j]]; } - forAll(ft_, cellI) + forAll(ft_, celli) { - if (ft_[cellI] < ftStoich) + if (ft_[celli] < ftStoich) { - pc[cellI] = ft_[cellI]*(YprodTotal/ftStoich); + pc[celli] = ft_[celli]*(YprodTotal/ftStoich); } else { - pc[cellI] = (1.0 - ft_[cellI])*(YprodTotal/(1.0 - ftStoich)); + pc[celli] = (1.0 - ft_[celli])*(YprodTotal/(1.0 - ftStoich)); } } diff --git a/src/conversion/ensight/part/ensightPartCells.C b/src/conversion/ensight/part/ensightPartCells.C index 786b91a92794afe42b89856e292dbf76fe1b2836..e7d48533f421cc2378b9979534da288ec767d07f 100644 --- a/src/conversion/ensight/part/ensightPartCells.C +++ b/src/conversion/ensight/part/ensightPartCells.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 @@ -331,9 +331,9 @@ void Foam::ensightPartCells::writeConnectivity const label id = idList[i] + offset_; const labelUList& cFace = mesh_.cells()[id]; - forAll(cFace, faceI) + forAll(cFace, facei) { - const face& cf = meshFaces[cFace[faceI]]; + const face& cf = meshFaces[cFace[facei]]; os.write(cf.size()); os.newline(); diff --git a/src/conversion/ensight/part/ensightPartFaces.C b/src/conversion/ensight/part/ensightPartFaces.C index 9257e94c9cdcc730144eacfabd2566dbc888b11a..ba28b3a13cdb32b0991bf40c6ef5d7e73d3701cd 100644 --- a/src/conversion/ensight/part/ensightPartFaces.C +++ b/src/conversion/ensight/part/ensightPartFaces.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 @@ -56,9 +56,9 @@ void Foam::ensightPartFaces::classify(const faceList& faces) label nQuad = 0; label nPoly = 0; - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; if (f.size() == 3) { @@ -85,21 +85,21 @@ void Foam::ensightPartFaces::classify(const faceList& faces) nPoly = 0; // classify the shapes - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; if (f.size() == 3) { - triCells[nTri++] = faceI; + triCells[nTri++] = facei; } else if (f.size() == 4) { - quadCells[nQuad++] = faceI; + quadCells[nQuad++] = facei; } else { - polygonCells[nPoly++] = faceI; + polygonCells[nPoly++] = facei; } } diff --git a/src/conversion/ensight/part/ensightParts.C b/src/conversion/ensight/part/ensightParts.C index dce9cabfed270c0e39e5951665295093455e1332..a1cf8051e79869e696630ba8aab593a7e372ada9 100644 --- a/src/conversion/ensight/part/ensightParts.C +++ b/src/conversion/ensight/part/ensightParts.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 @@ -140,9 +140,9 @@ void Foam::ensightParts::recalculate(const polyMesh& mesh) // do boundaries, skipping empty and processor patches - forAll(mesh.boundaryMesh(), patchI) + forAll(mesh.boundaryMesh(), patchi) { - const polyPatch& patch = mesh.boundaryMesh()[patchI]; + const polyPatch& patch = mesh.boundaryMesh()[patchi]; if (patch.size() && !isA<processorPolyPatch>(patch)) { partsList_.set diff --git a/src/conversion/ensight/part/ensightPartsTemplates.C b/src/conversion/ensight/part/ensightPartsTemplates.C index 5fb6ddc07ad27a0dcf2fc966ffb4727280b3ecf6..fe2f712a0b4e9f40d4b1d76cf6129eddc4eb039b 100644 --- a/src/conversion/ensight/part/ensightPartsTemplates.C +++ b/src/conversion/ensight/part/ensightPartsTemplates.C @@ -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 @@ -50,7 +50,7 @@ void Foam::ensightParts::writeField forAll(partsList_, partI) { - label patchI = partI - patchOffset; + label patchi = partI - patchOffset; if (partsList_[partI].isCellData()) { @@ -60,12 +60,12 @@ void Foam::ensightParts::writeField field ); } - else if (patchI < field.boundaryField().size()) + else if (patchi < field.boundaryField().size()) { partsList_[partI].writeField ( os, - field.boundaryField()[patchI] + field.boundaryField()[patchi] ); } } diff --git a/src/conversion/meshReader/calcPointCells.C b/src/conversion/meshReader/calcPointCells.C index fab62003b607751d3021e21ce02bcaec405009bb..7f37f303276d0560dd7f7e671a2547f03736be8b 100644 --- a/src/conversion/meshReader/calcPointCells.C +++ b/src/conversion/meshReader/calcPointCells.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 @@ -65,9 +65,9 @@ void Foam::meshReader::calcPointCells() const faceListList& cFaces = cellFaces(); // For each cell - forAll(cFaces, cellI) + forAll(cFaces, celli) { - const faceList& faces = cFaces[cellI]; + const faceList& faces = cFaces[celli]; forAll(faces, i) { @@ -86,7 +86,7 @@ void Foam::meshReader::calcPointCells() const for (label f = 0; f < curCount; f++) { - if (curPointCells[f] == cellI) + if (curPointCells[f] == celli) { found = true; break; @@ -102,7 +102,7 @@ void Foam::meshReader::calcPointCells() const } // Enter the cell label in the point's cell list - curPointCells[curCount] = cellI; + curPointCells[curCount] = celli; // Increment the cell count for the point addressed cellCount[curPoint]++; @@ -144,9 +144,9 @@ void Foam::meshReader::calcPointCells() const // adjust cellFaces - this could be faster // For each cell - forAll(cFaces, cellI) + forAll(cFaces, celli) { - faceList& faces = cFaces[cellI]; + faceList& faces = cFaces[celli]; // For each face forAll(faces, i) diff --git a/src/conversion/meshReader/createPolyBoundary.C b/src/conversion/meshReader/createPolyBoundary.C index aecf77bcc0e6c04da2d7da418a86077b68a59e7d..37989b5237cd39196be7772df693bf9cd14dc9a3 100644 --- a/src/conversion/meshReader/createPolyBoundary.C +++ b/src/conversion/meshReader/createPolyBoundary.C @@ -105,9 +105,9 @@ void Foam::meshReader::createPolyBoundary() const faceListList& cFaces = cellFaces(); // determine number of non-patched faces: - forAll(cellPolys_, cellI) + forAll(cellPolys_, celli) { - cell& curCell = cellPolys_[cellI]; + cell& curCell = cellPolys_[celli]; forAll(curCell, fI) { @@ -118,9 +118,9 @@ void Foam::meshReader::createPolyBoundary() } } - forAll(boundaryIds_, patchI) + forAll(boundaryIds_, patchi) { - nBoundaryFaces += boundaryIds_[patchI].size(); + nBoundaryFaces += boundaryIds_[patchi].size(); } Info<< nl @@ -136,14 +136,14 @@ void Foam::meshReader::createPolyBoundary() interfaces_.setSize(baffleIds_.size()); nBoundaryFaces = 0; - forAll(boundaryIds_, patchI) + forAll(boundaryIds_, patchi) { - const List<cellFaceIdentifier>& idList = boundaryIds_[patchI]; + const List<cellFaceIdentifier>& idList = boundaryIds_[patchi]; - patchStarts_[patchI] = nCreatedFaces; + patchStarts_[patchi] = nCreatedFaces; // write each baffle side separately - if (patchPhysicalTypes_[patchI] == "baffle") + if (patchPhysicalTypes_[patchi] == "baffle") { label count = 0; @@ -186,7 +186,7 @@ void Foam::meshReader::createPolyBoundary() nInterfaces += (count - (count % 2)) / 2; } - else if (patchPhysicalTypes_[patchI] == "monitoring") + else if (patchPhysicalTypes_[patchi] == "monitoring") { // translate the "monitoring" pseudo-boundaries to face sets List<label> monitoring(idList.size()); @@ -208,7 +208,7 @@ void Foam::meshReader::createPolyBoundary() } } - monitoringSets_.insert(patchNames_[patchI], monitoring); + monitoringSets_.insert(patchNames_[patchi], monitoring); } else { @@ -229,7 +229,7 @@ void Foam::meshReader::createPolyBoundary() } } - patchSizes_[patchI] = nCreatedFaces - patchStarts_[patchI]; + patchSizes_[patchi] = nCreatedFaces - patchStarts_[patchi]; } // add in missing faces @@ -271,9 +271,9 @@ void Foam::meshReader::createPolyBoundary() nInterfaces += (nMissingFaces - (nMissingFaces % 2)) / 2; // scan for any other missing faces - forAll(cellPolys_, cellI) + forAll(cellPolys_, celli) { - const labelList& curFaces = cellPolys_[cellI]; + const labelList& curFaces = cellPolys_[celli]; forAll(curFaces, cellFaceI) { @@ -282,10 +282,10 @@ void Foam::meshReader::createPolyBoundary() // 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 - << " (original cell " << origCellId_[cellI] << ")" + 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++; } @@ -317,13 +317,13 @@ void Foam::meshReader::createPolyBoundary() // (faces addressed once or more than twice) labelList markupFaces(meshFaces_.size(), 0); - forAll(cellPolys_, cellI) + forAll(cellPolys_, celli) { - const labelList& curFaces = cellPolys_[cellI]; + const labelList& curFaces = cellPolys_[celli]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - markupFaces[curFaces[faceI]]++; + markupFaces[curFaces[facei]]++; } } @@ -334,15 +334,15 @@ void Foam::meshReader::createPolyBoundary() label nProblemFaces = 0; - forAll(markupFaces, faceI) + forAll(markupFaces, facei) { - if (markupFaces[faceI] != 2) + if (markupFaces[facei] != 2) { - const face& problemFace = meshFaces_[faceI]; + const face& problemFace = meshFaces_[facei]; InfoInFunction - << "Problem with face " << faceI << ": addressed " - << markupFaces[faceI] << " times (should be 2!). Face: " + << "Problem with face " << facei << ": addressed " + << markupFaces[facei] << " times (should be 2!). Face: " << problemFace << endl; nProblemFaces++; @@ -377,16 +377,16 @@ Foam::meshReader::polyBoundaryPatches(const polyMesh& mesh) // avoid empty patches - move to the end of the lists and truncate labelList oldToNew = identity(nPatches); - forAll(patchSizes_, patchI) + forAll(patchSizes_, patchi) { - if (patchSizes_[patchI] > 0) + if (patchSizes_[patchi] > 0) { - oldToNew[patchI] = nUsed++; + oldToNew[patchi] = nUsed++; } else { nEmpty++; - oldToNew[patchI] = nPatches - nEmpty; + oldToNew[patchi] = nPatches - nEmpty; } } @@ -426,34 +426,34 @@ Foam::meshReader::polyBoundaryPatches(const polyMesh& mesh) "defaultFaces", defaultFacesType ); - forAll(patchDicts, patchI) + forAll(patchDicts, patchi) { - if (!patchDicts.set(patchI)) + if (!patchDicts.set(patchi)) { - patchDicts.set(patchI, new dictionary()); + patchDicts.set(patchi, new dictionary()); } - dictionary& patchDict = patchDicts[patchI]; + dictionary& patchDict = patchDicts[patchi]; // add but not overwrite type - patchDict.add("type", patchTypes_[patchI], false); - if (patchPhysicalTypes_.size() && patchPhysicalTypes_[patchI].size()) + patchDict.add("type", patchTypes_[patchi], false); + if (patchPhysicalTypes_.size() && patchPhysicalTypes_[patchi].size()) { - patchDict.add("startFace", patchPhysicalTypes_[patchI], false); + patchDict.add("startFace", patchPhysicalTypes_[patchi], false); } // overwrite sizes and start - patchDict.add("nFaces", patchSizes_[patchI], true); - patchDict.add("startFace", patchStarts_[patchI], true); + patchDict.add("nFaces", patchSizes_[patchi], true); + patchDict.add("startFace", patchStarts_[patchi], true); } - forAll(patchStarts_, patchI) + forAll(patchStarts_, patchi) { - p[patchI] = polyPatch::New + p[patchi] = polyPatch::New ( - patchNames_[patchI], - patchDicts[patchI], - patchI, + patchNames_[patchi], + patchDicts[patchi], + patchi, mesh.boundaryMesh() ).ptr(); } diff --git a/src/conversion/meshReader/createPolyCells.C b/src/conversion/meshReader/createPolyCells.C index deebfc12aa1606e93169a090c70c60cb70a837bb..6c879701474ff31cb95c2f44de21029affb76af0 100644 --- a/src/conversion/meshReader/createPolyCells.C +++ b/src/conversion/meshReader/createPolyCells.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 @@ -49,11 +49,11 @@ void Foam::meshReader::createPolyCells() label maxFaces = 0; - forAll(cellPolys_, cellI) + forAll(cellPolys_, celli) { - cellPolys_[cellI].setSize(cFaces[cellI].size(), -1); + cellPolys_[celli].setSize(cFaces[celli].size(), -1); - maxFaces += cFaces[cellI].size(); + maxFaces += cFaces[celli].size(); } Info<< "Maximum possible number of faces in mesh: " << maxFaces << endl; @@ -75,10 +75,10 @@ void Foam::meshReader::createPolyCells() // To prevent internal faces, we'll mark the cell faces // with negative cell ids (offset by nCells). // eg, - // cellI = -(nCells + baffleI) + // celli = -(nCells + baffleI) // // To distinguish these from the normal '-1' marker, we require - // cellI = -(nCells + baffleI) < -1 + // celli = -(nCells + baffleI) < -1 // // This condition is met provided that nCells > 1. // ie., baffles require at least 2 volume cells @@ -86,7 +86,7 @@ void Foam::meshReader::createPolyCells() label baffleOffset = cFaces.size(); forAll(baffleFaces_, baffleI) { - label cellI = -(baffleOffset + baffleI); + label celli = -(baffleOffset + baffleI); const face& curFace = baffleFaces_[baffleI]; // get the list of labels @@ -171,7 +171,7 @@ void Foam::meshReader::createPolyCells() if (baffleIds_[baffleI][side].used()) { - cellPolys_[neiCell][neiFace] = cellI; + cellPolys_[neiCell][neiFace] = celli; } } } @@ -197,7 +197,7 @@ void Foam::meshReader::createPolyCells() nInternalFaces_ = 0; - forAll(cFaces, cellI) + forAll(cFaces, celli) { // Note: // Insertion cannot be done in one go as the faces need to be @@ -205,7 +205,7 @@ void Foam::meshReader::createPolyCells() // cells. Therefore, all neighbours will be detected first // and then added in the correct order. - const faceList& curFaces = cFaces[cellI]; + const faceList& curFaces = cFaces[celli]; // Record the neighbour cell labelList neiCells(curFaces.size(), -1); @@ -216,14 +216,14 @@ void Foam::meshReader::createPolyCells() label nNeighbours = 0; // For all faces ... - forAll(curFaces, faceI) + forAll(curFaces, facei) { // Skip already matched faces or those tagged by baffles - if (cellPolys_[cellI][faceI] != -1) continue; + if (cellPolys_[celli][facei] != -1) continue; found = false; - const face& curFace = curFaces[faceI]; + const face& curFace = curFaces[facei]; // get the list of labels const labelList& curPoints = curFace; @@ -241,7 +241,7 @@ void Foam::meshReader::createPolyCells() // reject neighbours with the lower label. This should // also reject current cell. - if (curNei > cellI) + if (curNei > celli) { // get the list of search faces const faceList& searchFaces = cFaces[curNei]; @@ -251,12 +251,12 @@ void Foam::meshReader::createPolyCells() if (searchFaces[neiFaceI] == curFace) { // Record the neighbour cell and face - neiCells[faceI] = curNei; - faceOfNeiCell[faceI] = neiFaceI; + neiCells[facei] = curNei; + faceOfNeiCell[facei] = neiFaceI; nNeighbours++; #ifdef DEBUG_FACE_ORDERING - Info<< " cell " << cellI - << " face " << faceI + Info<< " cell " << celli + << " face " << facei << " point " << pointI << " nei " << curNei << " neiFace " << neiFaceI @@ -296,7 +296,7 @@ void Foam::meshReader::createPolyCells() meshFaces_[nInternalFaces_] = curFaces[nextNei]; // Mark for owner - cellPolys_[cellI][nextNei] = nInternalFaces_; + cellPolys_[celli][nextNei] = nInternalFaces_; // Mark for neighbour cellPolys_[neiCells[nextNei]][faceOfNeiCell[nextNei]] = diff --git a/src/conversion/meshReader/starcd/STARCDMeshReader.C b/src/conversion/meshReader/starcd/STARCDMeshReader.C index 52ffa3594ac3d194628d0a85c84dcaec2af2396a..39037491038b07afadbab4a0c04476a6737cbcb7 100644 --- a/src/conversion/meshReader/starcd/STARCDMeshReader.C +++ b/src/conversion/meshReader/starcd/STARCDMeshReader.C @@ -377,7 +377,7 @@ void Foam::meshReaders::STARCD::readCells(const fileName& inputName) labelList starLabels(64); label lineLabel, shapeId, nLabels, cellTableId, typeId; - label cellI = 0; + label celli = 0; label baffleI = 0; while ((is >> lineLabel).good()) @@ -456,18 +456,18 @@ void Foam::meshReaders::STARCD::readCells(const fileName& inputName) } // record original cell number and lookup - origCellId_[cellI] = starCellId; - mapToFoamCellId_[starCellId] = cellI; + origCellId_[celli] = starCellId; + mapToFoamCellId_[starCellId] = celli; - cellTableId_[cellI] = cellTableId; - cellShapes_[cellI] = cellShape + cellTableId_[celli] = cellTableId; + cellShapes_[celli] = cellShape ( *curModelPtr, SubList<label>(starLabels, nLabels) ); - cellFaces_[cellI] = cellShapes_[cellI].faces(); - cellI++; + cellFaces_[celli] = cellShapes_[celli].faces(); + celli++; } else if (shapeId == starcdPoly) { @@ -498,7 +498,7 @@ void Foam::meshReaders::STARCD::readCells(const fileName& inputName) // traverse beg/end indices faceList faces(nFaces); - label faceI = 0; + label facei = 0; for (label i=0; i < nFaces; ++i) { label beg = starLabels[i]; @@ -514,19 +514,19 @@ void Foam::meshReaders::STARCD::readCells(const fileName& inputName) // valid faces only if (f.size() >= 3) { - faces[faceI++] = f; + faces[facei++] = f; } } - if (nFaces > faceI) + if (nFaces > facei) { Info<< "star cell " << starCellId << " has " - << (nFaces - faceI) + << (nFaces - facei) << " empty faces - could cause boundary " << "addressing problems" << endl; - nFaces = faceI; + nFaces = facei; faces.setSize(nFaces); } @@ -538,13 +538,13 @@ void Foam::meshReaders::STARCD::readCells(const fileName& inputName) } // record original cell number and lookup - origCellId_[cellI] = starCellId; - mapToFoamCellId_[starCellId] = cellI; + origCellId_[celli] = starCellId; + mapToFoamCellId_[starCellId] = celli; - cellTableId_[cellI] = cellTableId; - cellShapes_[cellI] = genericShape; - cellFaces_[cellI] = faces; - cellI++; + cellTableId_[celli] = cellTableId; + cellShapes_[celli] = genericShape; + cellFaces_[celli] = faces; + celli++; } else if (typeId == starcdBaffleType) { @@ -732,12 +732,12 @@ void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName) // create names // - use 'Label' entry from "constant/boundaryRegion" dictionary - forAll(patchTypes_, patchI) + forAll(patchTypes_, patchi) { bool foundName = false, foundType = false; Map<dictionary>::const_iterator - iter = boundaryRegion_.find(origRegion[patchI]); + iter = boundaryRegion_.find(origRegion[patchi]); if ( @@ -747,13 +747,13 @@ void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName) foundType = iter().readIfPresent ( "BoundaryType", - patchTypes_[patchI] + patchTypes_[patchi] ); foundName = iter().readIfPresent ( "Label", - patchNames_[patchI] + patchNames_[patchi] ); } @@ -761,34 +761,34 @@ void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName) if (!foundType) { // transform - forAllIter(string, patchTypes_[patchI], i) + forAllIter(string, patchTypes_[patchi], i) { *i = tolower(*i); } - if (patchTypes_[patchI] == "symp") + if (patchTypes_[patchi] == "symp") { - patchTypes_[patchI] = "symplane"; + patchTypes_[patchi] = "symplane"; } - else if (patchTypes_[patchI] == "cycl") + else if (patchTypes_[patchi] == "cycl") { - patchTypes_[patchI] = "cyclic"; + patchTypes_[patchi] = "cyclic"; } - else if (patchTypes_[patchI] == "baff") + else if (patchTypes_[patchi] == "baff") { - patchTypes_[patchI] = "baffle"; + patchTypes_[patchi] = "baffle"; } - else if (patchTypes_[patchI] == "moni") + else if (patchTypes_[patchi] == "moni") { - patchTypes_[patchI] = "monitoring"; + patchTypes_[patchi] = "monitoring"; } } // create a name if needed if (!foundName) { - patchNames_[patchI] = - patchTypes_[patchI] + "_" + name(origRegion[patchI]); + patchNames_[patchi] = + patchTypes_[patchi] + "_" + name(origRegion[patchi]); } } @@ -840,16 +840,16 @@ void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName) } mapToFoamPatchId.setSize(maxId+1, -1); - forAll(origRegion, patchI) + forAll(origRegion, patchi) { - mapToFoamPatchId[origRegion[patchI]] = patchI; + mapToFoamPatchId[origRegion[patchi]] = patchi; } boundaryIds_.setSize(nPatches); - forAll(boundaryIds_, patchI) + forAll(boundaryIds_, patchi) { - boundaryIds_[patchI].setSize(nPatchFaces[patchI]); - nPatchFaces[patchI] = 0; + boundaryIds_[patchi].setSize(nPatchFaces[patchi]); + nPatchFaces[patchi] = 0; } @@ -869,7 +869,7 @@ void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName) >> configNumber >> patchType; - label patchI = mapToFoamPatchId[starRegion]; + label patchi = mapToFoamPatchId[starRegion]; // zero-based indexing cellFaceId--; @@ -908,14 +908,14 @@ void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName) cellFaceId = -1; } - boundaryIds_[patchI][nPatchFaces[patchI]] = + boundaryIds_[patchi][nPatchFaces[patchi]] = cellFaceIdentifier(cellId, cellFaceId); #ifdef DEBUG_BOUNDARY Info<< "bnd " << cellId << " " << cellFaceId << endl; #endif // increment counter of faces in current patch - nPatchFaces[patchI]++; + nPatchFaces[patchi]++; } } } @@ -924,50 +924,50 @@ void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName) patchPhysicalTypes_.setSize(patchTypes_.size()); - forAll(boundaryIds_, patchI) + forAll(boundaryIds_, patchi) { // resize - avoid invalid boundaries - if (nPatchFaces[patchI] < boundaryIds_[patchI].size()) + if (nPatchFaces[patchi] < boundaryIds_[patchi].size()) { - boundaryIds_[patchI].setSize(nPatchFaces[patchI]); + boundaryIds_[patchi].setSize(nPatchFaces[patchi]); } - word origType = patchTypes_[patchI]; - patchPhysicalTypes_[patchI] = origType; + word origType = patchTypes_[patchi]; + patchPhysicalTypes_[patchi] = origType; if (origType == "symplane") { - patchTypes_[patchI] = symmetryPolyPatch::typeName; - patchPhysicalTypes_[patchI] = patchTypes_[patchI]; + patchTypes_[patchi] = symmetryPolyPatch::typeName; + patchPhysicalTypes_[patchi] = patchTypes_[patchi]; } else if (origType == "wall") { - patchTypes_[patchI] = wallPolyPatch::typeName; - patchPhysicalTypes_[patchI] = patchTypes_[patchI]; + patchTypes_[patchi] = wallPolyPatch::typeName; + patchPhysicalTypes_[patchi] = patchTypes_[patchi]; } else if (origType == "cyclic") { // incorrect. should be cyclicPatch but this // requires info on connected faces. - patchTypes_[patchI] = oldCyclicPolyPatch::typeName; - patchPhysicalTypes_[patchI] = patchTypes_[patchI]; + patchTypes_[patchi] = oldCyclicPolyPatch::typeName; + patchPhysicalTypes_[patchi] = patchTypes_[patchi]; } else if (origType == "baffle") { // incorrect. tag the patch until we get proper support. // set physical type to a canonical "baffle" - patchTypes_[patchI] = emptyPolyPatch::typeName; - patchPhysicalTypes_[patchI] = "baffle"; + patchTypes_[patchi] = emptyPolyPatch::typeName; + patchPhysicalTypes_[patchi] = "baffle"; } else { - patchTypes_[patchI] = polyPatch::typeName; + patchTypes_[patchi] = polyPatch::typeName; } - Info<< "patch " << patchI - << " (region " << origRegion[patchI] - << ": " << origType << ") type: '" << patchTypes_[patchI] - << "' name: " << patchNames_[patchI] << endl; + Info<< "patch " << patchi + << " (region " << origRegion[patchi] + << ": " << origType << ") type: '" << patchTypes_[patchi] + << "' name: " << patchNames_[patchi] << endl; } // cleanup @@ -985,9 +985,9 @@ void Foam::meshReaders::STARCD::cullPoints() labelList oldToNew(nPoints, -1); // loop through cell faces and note which points are being used - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { - const faceList& faces = cellFaces_[cellI]; + const faceList& faces = cellFaces_[celli]; forAll(faces, i) { const labelList& labels = faces[i]; @@ -1019,9 +1019,9 @@ void Foam::meshReaders::STARCD::cullPoints() points_.setSize(nPoints); // adjust cellFaces - with mesh shapes this might be faster - forAll(cellFaces_, cellI) + forAll(cellFaces_, celli) { - faceList& faces = cellFaces_[cellI]; + faceList& faces = cellFaces_[celli]; forAll(faces, i) { inplaceRenumber(oldToNew, faces[i]); @@ -1029,9 +1029,9 @@ void Foam::meshReaders::STARCD::cullPoints() } // adjust baffles - forAll(baffleFaces_, faceI) + forAll(baffleFaces_, facei) { - inplaceRenumber(oldToNew, baffleFaces_[faceI]); + inplaceRenumber(oldToNew, baffleFaces_[facei]); } } } diff --git a/src/conversion/meshTables/cellTable.C b/src/conversion/meshTables/cellTable.C index d745d7dc5a2e3d8cf750f0e1dc9d7619f1e2535b..5d9e137caba2c3177d113e7695d97e082172f578 100644 --- a/src/conversion/meshTables/cellTable.C +++ b/src/conversion/meshTables/cellTable.C @@ -446,12 +446,12 @@ void Foam::cellTable::addCellZones Map<label> typeToZone = zoneMap(); List<DynamicList<label>> zoneCells(size()); - forAll(tableIds, cellI) + forAll(tableIds, celli) { - Map<label>::const_iterator iter = typeToZone.find(tableIds[cellI]); + Map<label>::const_iterator iter = typeToZone.find(tableIds[celli]); if (iter != typeToZone.end()) { - zoneCells[iter()].append(cellI); + zoneCells[iter()].append(celli); } } diff --git a/src/conversion/meshWriter/starcd/STARCDMeshWriter.C b/src/conversion/meshWriter/starcd/STARCDMeshWriter.C index a308dfbc545e1e7169d1605b6a21c57fb1fb21a2..afdc5a113c408960d47e294fd681eccd38888b8a 100644 --- a/src/conversion/meshWriter/starcd/STARCDMeshWriter.C +++ b/src/conversion/meshWriter/starcd/STARCDMeshWriter.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 @@ -52,11 +52,11 @@ Foam::label Foam::meshWriters::STARCD::findDefaultBoundary() const label id = -1; // find Default_Boundary_Region if it exists - forAll(patches, patchI) + forAll(patches, patchi) { - if (defaultBoundaryName == patches[patchI].name()) + if (defaultBoundaryName == patches[patchi].name()) { - id = patchI; + id = patchi; break; } } @@ -298,10 +298,10 @@ void Foam::meshWriters::STARCD::writeCells(const fileName& prefix) const label count = indices.size(); // determine the total number of vertices - forAll(cFaces, faceI) + forAll(cFaces, facei) { - count += faces[cFaces[faceI]].size(); - indices[faceI+1] = count; + count += faces[cFaces[facei]].size(); + indices[facei+1] = count; } os << cellId + 1 @@ -325,9 +325,9 @@ void Foam::meshWriters::STARCD::writeCells(const fileName& prefix) const } // write faces - max 8 per line - forAll(cFaces, faceI) + forAll(cFaces, facei) { - label meshFace = cFaces[faceI]; + label meshFace = cFaces[facei]; face f; if (owner[meshFace] == cellId) @@ -388,9 +388,9 @@ void Foam::meshWriters::STARCD::writeBoundary(const fileName& prefix) const // write boundary faces - skip Default_Boundary_Region entirely // label boundId = 0; - forAll(patches, patchI) + forAll(patches, patchi) { - label regionId = patchI; + label regionId = patchi; if (regionId == defaultId) { continue; // skip - already written @@ -400,24 +400,24 @@ void Foam::meshWriters::STARCD::writeBoundary(const fileName& prefix) const regionId++; } - label patchStart = patches[patchI].start(); - label patchSize = patches[patchI].size(); - word bndType = boundaryRegion_.boundaryType(patches[patchI].name()); + label patchStart = patches[patchi].start(); + label patchSize = patches[patchi].size(); + word bndType = boundaryRegion_.boundaryType(patches[patchi].name()); for ( - label faceI = patchStart; - faceI < (patchStart + patchSize); - ++faceI + label facei = patchStart; + facei < (patchStart + patchSize); + ++facei ) { - label cellId = owner[faceI]; + label cellId = owner[facei]; const labelList& cFaces = cells[cellId]; const cellShape& shape = shapes[cellId]; - label cellFaceId = findIndex(cFaces, faceI); + label cellFaceId = findIndex(cFaces, facei); - // Info<< "cell " << cellId + 1 << " face " << faceI - // << " == " << faces[faceI] + // Info<< "cell " << cellId + 1 << " face " << facei + // << " == " << faces[facei] // << " is index " << cellFaceId << " from " << cFaces; // Unfortunately, the order of faces returned by @@ -435,7 +435,7 @@ void Foam::meshWriters::STARCD::writeBoundary(const fileName& prefix) const const faceList sFaces = shape.faces(); forAll(sFaces, sFaceI) { - if (faces[faceI] == sFaces[sFaceI]) + if (faces[facei] == sFaces[sFaceI]) { cellFaceId = sFaceI; break; diff --git a/src/conversion/polyDualMesh/polyDualMesh.C b/src/conversion/polyDualMesh/polyDualMesh.C index ed76d92d722ed84a54f356b08c1f3cbcb103a3f8..379bd272964d51fdd81065351b1656244845117f 100644 --- a/src/conversion/polyDualMesh/polyDualMesh.C +++ b/src/conversion/polyDualMesh/polyDualMesh.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 @@ -58,27 +58,27 @@ Foam::labelList Foam::polyDualMesh::getFaceOrder // First unassigned face label newFaceI = 0; - forAll(cells, cellI) + forAll(cells, celli) { - const labelList& cFaces = cells[cellI]; + const labelList& cFaces = cells[celli]; SortableList<label> nbr(cFaces.size()); forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - label nbrCellI = faceNeighbour[faceI]; + label nbrCellI = faceNeighbour[facei]; 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; @@ -114,20 +114,20 @@ Foam::labelList Foam::polyDualMesh::getFaceOrder 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; + oldToNew[facei] = facei; } // Check done all faces. - forAll(oldToNew, faceI) + forAll(oldToNew, facei) { - if (oldToNew[faceI] == -1) + if (oldToNew[facei] == -1) { FatalErrorInFunction << "Did not determine new position" - << " for face " << faceI + << " for face " << facei << abort(FatalError); } } @@ -136,7 +136,7 @@ Foam::labelList Foam::polyDualMesh::getFaceOrder } -// Get the two edges on faceI using pointI. Returns them such that the order +// Get the two edges on facei using pointI. Returns them such that the order // - otherVertex of e0 // - pointI // - otherVertex(pointI) of e1 @@ -144,14 +144,14 @@ Foam::labelList Foam::polyDualMesh::getFaceOrder void Foam::polyDualMesh::getPointEdges ( const primitivePatch& patch, - const label faceI, + const label facei, const label pointI, label& e0, label& e1 ) { - const labelList& fEdges = patch.faceEdges()[faceI]; - const face& f = patch.localFaces()[faceI]; + const labelList& fEdges = patch.faceEdges()[facei]; + const face& f = patch.localFaces()[facei]; e0 = -1; e1 = -1; @@ -203,7 +203,7 @@ void Foam::polyDualMesh::getPointEdges } FatalErrorInFunction - << " vertices:" << patch.localFaces()[faceI] + << " vertices:" << patch.localFaces()[facei] << " that uses point:" << pointI << abort(FatalError); } @@ -250,13 +250,13 @@ Foam::labelList Foam::polyDualMesh::collectPatchSideFace dualFace.append(edgeToDualPoint[patch.meshEdges()[edgeI]]); - label faceI = patch.edgeFaces()[edgeI][0]; + label facei = patch.edgeFaces()[edgeI][0]; // Check order of vertices of edgeI in face to see if we need to reverse. bool reverseFace; label e0, e1; - getPointEdges(patch, faceI, pointI, e0, e1); + getPointEdges(patch, facei, pointI, e0, e1); if (e0 == edgeI) { @@ -269,12 +269,12 @@ Foam::labelList Foam::polyDualMesh::collectPatchSideFace while (true) { - // Store dual vertex for faceI. - dualFace.append(faceI + patchToDualOffset); + // Store dual vertex for facei. + dualFace.append(facei + patchToDualOffset); // Cross face to other edge on pointI label e0, e1; - getPointEdges(patch, faceI, pointI, e0, e1); + getPointEdges(patch, facei, pointI, e0, e1); if (e0 == edgeI) { @@ -300,13 +300,13 @@ Foam::labelList Foam::polyDualMesh::collectPatchSideFace } // Cross edge to other face. - if (eFaces[0] == faceI) + if (eFaces[0] == facei) { - faceI = eFaces[1]; + facei = eFaces[1]; } else { - faceI = eFaces[0]; + facei = eFaces[0]; } } @@ -348,13 +348,13 @@ void Foam::polyDualMesh::collectPatchInternalFace label edgeI = startEdgeI; - label faceI = patch.edgeFaces()[edgeI][0]; + label facei = patch.edgeFaces()[edgeI][0]; // Check order of vertices of edgeI in face to see if we need to reverse. bool reverseFace; label e0, e1; - getPointEdges(patch, faceI, pointI, e0, e1); + getPointEdges(patch, facei, pointI, e0, e1); if (e0 == edgeI) { @@ -368,11 +368,11 @@ void Foam::polyDualMesh::collectPatchInternalFace while (true) { // Insert dual vertex for face - dualFace.append(faceI + patchToDualOffset); + dualFace.append(facei + patchToDualOffset); // Cross face to other edge on pointI label e0, e1; - getPointEdges(patch, faceI, pointI, e0, e1); + getPointEdges(patch, facei, pointI, e0, e1); if (e0 == edgeI) { @@ -398,13 +398,13 @@ void Foam::polyDualMesh::collectPatchInternalFace // Cross edge to other face. const labelList& eFaces = patch.edgeFaces()[edgeI]; - if (eFaces[0] == faceI) + if (eFaces[0] == facei) { - faceI = eFaces[1]; + facei = eFaces[1]; } else { - faceI = eFaces[0]; + facei = eFaces[0]; } } @@ -774,8 +774,8 @@ void Foam::polyDualMesh::calcDual // mesh label dualMesh vertex // ---------- --------------- - // cellI cellI - // faceI nCells+faceI-nIntFaces + // celli celli + // facei nCells+facei-nIntFaces // featEdgeI nCells+nFaces-nIntFaces+featEdgeI // featPointI nCells+nFaces-nIntFaces+nFeatEdges+featPointI @@ -795,10 +795,10 @@ void Foam::polyDualMesh::calcDual cellPoint_.setSize(cellCentres.size()); - forAll(cellCentres, cellI) + forAll(cellCentres, celli) { - cellPoint_[cellI] = dualPointI; - dualPoints[dualPointI++] = cellCentres[cellI]; + cellPoint_[celli] = dualPointI; + dualPoints[dualPointI++] = cellCentres[celli]; } // Boundary faces centres @@ -806,10 +806,10 @@ void Foam::polyDualMesh::calcDual boundaryFacePoint_.setSize(mesh.nFaces() - nIntFaces); - for (label faceI = nIntFaces; faceI < mesh.nFaces(); faceI++) + for (label facei = nIntFaces; facei < mesh.nFaces(); facei++) { - boundaryFacePoint_[faceI - nIntFaces] = dualPointI; - dualPoints[dualPointI++] = faceCentres[faceI]; + boundaryFacePoint_[facei - nIntFaces] = dualPointI; + dualPoints[dualPointI++] = faceCentres[facei]; } // Edge status: @@ -844,16 +844,16 @@ void Foam::polyDualMesh::calcDual // -3 : is internal point. labelList pointToDualPoint(mesh.nPoints(), -3); - forAll(patches, patchI) + forAll(patches, patchi) { - const labelList& meshPoints = patches[patchI].meshPoints(); + const labelList& meshPoints = patches[patchi].meshPoints(); forAll(meshPoints, i) { pointToDualPoint[meshPoints[i]] = -2; } - const labelListList& loops = patches[patchI].edgeLoops(); + const labelListList& loops = patches[patchi].edgeLoops(); forAll(loops, i) { @@ -961,40 +961,40 @@ void Foam::polyDualMesh::calcDual // Store dual vertex for starting face. dualFace.append(mesh.nCells() + startFaceI - nIntFaces); - label cellI = mesh.faceOwner()[startFaceI]; - label faceI = startFaceI; + label celli = mesh.faceOwner()[startFaceI]; + label facei = startFaceI; while (true) { - // Store dual vertex from cellI. - dualFace.append(cellI); + // Store dual vertex from celli. + dualFace.append(celli); // Cross cell to other face on edge. label f0, f1; - meshTools::getEdgeFaces(mesh, cellI, edgeI, f0, f1); + meshTools::getEdgeFaces(mesh, celli, edgeI, f0, f1); - if (f0 == faceI) + if (f0 == facei) { - faceI = f1; + facei = f1; } else { - faceI = f0; + facei = f0; } // Cross face to other cell. - if (faceI == endFaceI) + if (facei == endFaceI) { break; } - if (mesh.faceOwner()[faceI] == cellI) + if (mesh.faceOwner()[facei] == celli) { - cellI = mesh.faceNeighbour()[faceI]; + celli = mesh.faceNeighbour()[facei]; } else { - cellI = mesh.faceOwner()[faceI]; + celli = mesh.faceOwner()[facei]; } } @@ -1052,11 +1052,11 @@ void Foam::polyDualMesh::calcDual // Get a starting cell const labelList& eCells = mesh.edgeCells()[edgeI]; - label cellI = eCells[0]; + label celli = eCells[0]; // Get the two faces on the cell and edge. label face0, face1; - meshTools::getEdgeFaces(mesh, cellI, edgeI, face0, face1); + meshTools::getEdgeFaces(mesh, celli, edgeI, face0, face1); // Find the starting face by looking at the order in which // the face uses the owner, neighbour @@ -1068,7 +1068,7 @@ void Foam::polyDualMesh::calcDual label startFaceI = -1; - if (f0OrderOk == (mesh.faceOwner()[face0] == cellI)) + if (f0OrderOk == (mesh.faceOwner()[face0] == celli)) { startFaceI = face0; } @@ -1080,39 +1080,39 @@ void Foam::polyDualMesh::calcDual // Walk face-cell-face until starting face reached. DynamicList<label> dualFace(mesh.edgeCells()[edgeI].size()); - label faceI = startFaceI; + label facei = startFaceI; while (true) { - // Store dual vertex from cellI. - dualFace.append(cellI); + // Store dual vertex from celli. + dualFace.append(celli); // Cross cell to other face on edge. label f0, f1; - meshTools::getEdgeFaces(mesh, cellI, edgeI, f0, f1); + meshTools::getEdgeFaces(mesh, celli, edgeI, f0, f1); - if (f0 == faceI) + if (f0 == facei) { - faceI = f1; + facei = f1; } else { - faceI = f0; + facei = f0; } // Cross face to other cell. - if (faceI == startFaceI) + if (facei == startFaceI) { break; } - if (mesh.faceOwner()[faceI] == cellI) + if (mesh.faceOwner()[facei] == celli) { - cellI = mesh.faceNeighbour()[faceI]; + celli = mesh.faceNeighbour()[facei]; } else { - cellI = mesh.faceOwner()[faceI]; + celli = mesh.faceOwner()[facei]; } } @@ -1171,9 +1171,9 @@ void Foam::polyDualMesh::calcDual // Outside faces // ~~~~~~~~~~~~~ - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; dualPatch ( @@ -1235,32 +1235,32 @@ void Foam::polyDualMesh::calcDual // Create cells. cellList dualCells(mesh.nPoints()); - forAll(dualCells, cellI) + forAll(dualCells, celli) { - dualCells[cellI].setSize(0); + dualCells[celli].setSize(0); } - forAll(dualOwner, faceI) + forAll(dualOwner, facei) { - label cellI = dualOwner[faceI]; + label celli = dualOwner[facei]; - labelList& cFaces = dualCells[cellI]; + labelList& cFaces = dualCells[celli]; label sz = cFaces.size(); cFaces.setSize(sz+1); - cFaces[sz] = faceI; + cFaces[sz] = facei; } - forAll(dualNeighbour, faceI) + forAll(dualNeighbour, facei) { - label cellI = dualNeighbour[faceI]; + label celli = dualNeighbour[facei]; - if (cellI != -1) + if (celli != -1) { - labelList& cFaces = dualCells[cellI]; + labelList& cFaces = dualCells[celli]; label sz = cFaces.size(); cFaces.setSize(sz+1); - cFaces[sz] = faceI; + cFaces[sz] = facei; } } @@ -1285,32 +1285,32 @@ void Foam::polyDualMesh::calcDual inplaceReorder(oldToNew, dualOwner); inplaceReorder(oldToNew, dualNeighbour); inplaceReorder(oldToNew, dualRegion); - forAll(dualCells, cellI) + forAll(dualCells, celli) { - inplaceRenumber(oldToNew, dualCells[cellI]); + inplaceRenumber(oldToNew, dualCells[celli]); } // Create patches labelList patchSizes(patches.size(), 0); - forAll(dualRegion, faceI) + forAll(dualRegion, facei) { - if (dualRegion[faceI] >= 0) + if (dualRegion[facei] >= 0) { - patchSizes[dualRegion[faceI]]++; + patchSizes[dualRegion[facei]]++; } } labelList patchStarts(patches.size(), 0); - label faceI = nInternalFaces; + label facei = nInternalFaces; - forAll(patches, patchI) + forAll(patches, patchi) { - patchStarts[patchI] = faceI; + patchStarts[patchi] = facei; - faceI += patchSizes[patchI]; + facei += patchSizes[patchi]; } @@ -1323,16 +1323,16 @@ void Foam::polyDualMesh::calcDual // Add patches. First add zero sized (since mesh still 0 size) List<polyPatch*> dualPatches(patches.size()); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; - dualPatches[patchI] = pp.clone + dualPatches[patchi] = pp.clone ( boundaryMesh(), - patchI, - 0, //patchSizes[patchI], - 0 //patchStarts[patchI] + patchi, + 0, //patchSizes[patchi], + 0 //patchStarts[patchi] ).ptr(); } addPatches(dualPatches); @@ -1502,13 +1502,13 @@ void Foam::polyDualMesh::calcFeatures const polyBoundaryMesh& patches = mesh.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; forAll(pp, i) { - allRegion[i + pp.start() - mesh.nInternalFaces()] = patchI; + allRegion[i + pp.start() - mesh.nInternalFaces()] = patchi; } } diff --git a/src/conversion/polyDualMesh/polyDualMesh.H b/src/conversion/polyDualMesh/polyDualMesh.H index f063138766ad6ea8ce4776ca038bd0ac0e982b19..2cea41b7d0acf3c684ad381a9be964ba2b87c6c5 100644 --- a/src/conversion/polyDualMesh/polyDualMesh.H +++ b/src/conversion/polyDualMesh/polyDualMesh.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 @@ -79,7 +79,7 @@ class polyDualMesh static void getPointEdges ( const primitivePatch& patch, - const label faceI, + const label facei, const label pointI, label& e0, label& e1 diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index 3446cedd5e8ecb1fb214d42857803cf401e48330..4b246e7c9bf2230bbf7ef1cf42af540789a39e59 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -90,9 +90,9 @@ void Foam::dynamicRefineFvMesh::calculateProtectedCells // Get neighbouring cell level labelList neiLevel(nFaces()-nInternalFaces()); - for (label faceI = nInternalFaces(); faceI < nFaces(); faceI++) + for (label facei = nInternalFaces(); facei < nFaces(); facei++) { - neiLevel[faceI-nInternalFaces()] = cellLevel[faceOwner()[faceI]]; + neiLevel[facei-nInternalFaces()] = cellLevel[faceOwner()[facei]]; } syncTools::swapBoundaryFaceList(*this, neiLevel); @@ -102,33 +102,33 @@ void Foam::dynamicRefineFvMesh::calculateProtectedCells // Pick up faces on border of protected cells boolList seedFace(nFaces(), false); - forAll(faceNeighbour(), faceI) + forAll(faceNeighbour(), facei) { - label own = faceOwner()[faceI]; + label own = faceOwner()[facei]; bool ownProtected = unrefineableCell.get(own); - label nei = faceNeighbour()[faceI]; + label nei = faceNeighbour()[facei]; bool neiProtected = unrefineableCell.get(nei); if (ownProtected && (cellLevel[nei] > cellLevel[own])) { - seedFace[faceI] = true; + seedFace[facei] = true; } else if (neiProtected && (cellLevel[own] > cellLevel[nei])) { - seedFace[faceI] = true; + seedFace[facei] = true; } } - for (label faceI = nInternalFaces(); faceI < nFaces(); faceI++) + for (label facei = nInternalFaces(); facei < nFaces(); facei++) { - label own = faceOwner()[faceI]; + label own = faceOwner()[facei]; bool ownProtected = unrefineableCell.get(own); if ( ownProtected - && (neiLevel[faceI-nInternalFaces()] > cellLevel[own]) + && (neiLevel[facei-nInternalFaces()] > cellLevel[own]) ) { - seedFace[faceI] = true; + seedFace[facei] = true; } } @@ -138,18 +138,18 @@ void Foam::dynamicRefineFvMesh::calculateProtectedCells // Extend unrefineableCell bool hasExtended = false; - for (label faceI = 0; faceI < nInternalFaces(); faceI++) + for (label facei = 0; facei < nInternalFaces(); facei++) { - if (seedFace[faceI]) + if (seedFace[facei]) { - label own = faceOwner()[faceI]; + label own = faceOwner()[facei]; if (unrefineableCell.get(own) == 0) { unrefineableCell.set(own, 1); hasExtended = true; } - label nei = faceNeighbour()[faceI]; + label nei = faceNeighbour()[facei]; if (unrefineableCell.get(nei) == 0) { unrefineableCell.set(nei, 1); @@ -157,11 +157,11 @@ void Foam::dynamicRefineFvMesh::calculateProtectedCells } } } - for (label faceI = nInternalFaces(); faceI < nFaces(); faceI++) + for (label facei = nInternalFaces(); facei < nFaces(); facei++) { - if (seedFace[faceI]) + if (seedFace[facei]) { - label own = faceOwner()[faceI]; + label own = faceOwner()[facei]; if (unrefineableCell.get(own) == 0) { unrefineableCell.set(own, 1); @@ -235,15 +235,15 @@ Foam::dynamicRefineFvMesh::refine if (debug) { // Check map. - for (label faceI = 0; faceI < nInternalFaces(); faceI++) + for (label facei = 0; facei < nInternalFaces(); facei++) { - label oldFaceI = map().faceMap()[faceI]; + label oldFaceI = map().faceMap()[facei]; if (oldFaceI >= nInternalFaces()) { FatalErrorInFunction - << "New internal face:" << faceI - << " fc:" << faceCentres()[faceI] + << "New internal face:" << facei + << " fc:" << faceCentres()[facei] << " originates from boundary oldFace:" << oldFaceI << abort(FatalError); } @@ -284,9 +284,9 @@ Foam::dynamicRefineFvMesh::refine // master face gets modified and three faces get added from the master) labelHashSet masterFaces(4*cellsToRefine.size()); - forAll(faceMap, faceI) + forAll(faceMap, facei) { - label oldFaceI = faceMap[faceI]; + label oldFaceI = faceMap[facei]; if (oldFaceI >= 0) { @@ -297,9 +297,9 @@ Foam::dynamicRefineFvMesh::refine FatalErrorInFunction << "Problem: should not have removed faces" << " when refining." - << nl << "face:" << faceI << abort(FatalError); + << nl << "face:" << facei << abort(FatalError); } - else if (masterFaceI != faceI) + else if (masterFaceI != facei) { masterFaces.insert(masterFaceI); } @@ -367,70 +367,70 @@ Foam::dynamicRefineFvMesh::refine ); // Recalculate new internal faces. - for (label faceI = 0; faceI < nInternalFaces(); faceI++) + for (label facei = 0; facei < nInternalFaces(); facei++) { - label oldFaceI = faceMap[faceI]; + label oldFaceI = faceMap[facei]; if (oldFaceI == -1) { // Inflated/appended - phi[faceI] = phiU[faceI]; + phi[facei] = phiU[facei]; } - else if (reverseFaceMap[oldFaceI] != faceI) + else if (reverseFaceMap[oldFaceI] != facei) { // face-from-masterface - phi[faceI] = phiU[faceI]; + phi[facei] = phiU[facei]; } } // Recalculate new boundary faces. surfaceScalarField::GeometricBoundaryField& phiBf = phi.boundaryFieldRef(); - forAll(phiBf, patchI) + forAll(phiBf, patchi) { - fvsPatchScalarField& patchPhi = phiBf[patchI]; + fvsPatchScalarField& patchPhi = phiBf[patchi]; const fvsPatchScalarField& patchPhiU = - phiU.boundaryField()[patchI]; + phiU.boundaryField()[patchi]; - label faceI = patchPhi.patch().start(); + label facei = patchPhi.patch().start(); forAll(patchPhi, i) { - label oldFaceI = faceMap[faceI]; + label oldFaceI = faceMap[facei]; 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]; } - faceI++; + facei++; } } // Update master faces forAllConstIter(labelHashSet, masterFaces, iter) { - label faceI = iter.key(); + label facei = iter.key(); - if (isInternalFace(faceI)) + if (isInternalFace(facei)) { - phi[faceI] = phiU[faceI]; + phi[facei] = phiU[facei]; } else { - label patchI = boundaryMesh().whichPatch(faceI); - label i = faceI - boundaryMesh()[patchI].start(); + label patchi = boundaryMesh().whichPatch(facei); + label i = facei - boundaryMesh()[patchi].start(); const fvsPatchScalarField& patchPhiU = - phiU.boundaryField()[patchI]; + phiU.boundaryField()[patchi]; - fvsPatchScalarField& patchPhi = phiBf[patchI]; + fvsPatchScalarField& patchPhi = phiBf[patchi]; patchPhi[i] = patchPhiU[i]; } @@ -448,10 +448,10 @@ Foam::dynamicRefineFvMesh::refine { PackedBoolList newProtectedCell(nCells()); - forAll(newProtectedCell, cellI) + 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); } @@ -595,22 +595,22 @@ Foam::dynamicRefineFvMesh::unrefine if (reversePointMap[oldPointI] < 0) { // midpoint was removed. See if face still exists. - label faceI = reverseFaceMap[oldFaceI]; + label facei = reverseFaceMap[oldFaceI]; - if (faceI >= 0) + if (facei >= 0) { - if (isInternalFace(faceI)) + if (isInternalFace(facei)) { - phi[faceI] = phiU[faceI]; + phi[facei] = phiU[facei]; } else { - label patchI = boundaryMesh().whichPatch(faceI); - label i = faceI - boundaryMesh()[patchI].start(); + label patchi = boundaryMesh().whichPatch(facei); + label i = facei - boundaryMesh()[patchi].start(); const fvsPatchScalarField& patchPhiU = - phiU.boundaryField()[patchI]; - fvsPatchScalarField& patchPhi = phiBf[patchI]; + phiU.boundaryField()[patchi]; + fvsPatchScalarField& patchPhi = phiBf[patchi]; patchPhi[i] = patchPhiU[i]; } } @@ -628,12 +628,12 @@ Foam::dynamicRefineFvMesh::unrefine { PackedBoolList newProtectedCell(nCells()); - forAll(newProtectedCell, cellI) + forAll(newProtectedCell, celli) { - label oldCellI = map().cellMap()[cellI]; + label oldCellI = map().cellMap()[celli]; if (oldCellI >= 0) { - newProtectedCell.set(cellI, protectedCell_.get(oldCellI)); + newProtectedCell.set(celli, protectedCell_.get(oldCellI)); } } protectedCell_.transfer(newProtectedCell); @@ -752,11 +752,11 @@ void Foam::dynamicRefineFvMesh::selectRefineCandidates ); // Mark cells that are candidates for refinement. - forAll(cellError, cellI) + forAll(cellError, celli) { - if (cellError[cellI] > 0) + if (cellError[celli] > 0) { - candidateCell.set(cellI, 1); + candidateCell.set(celli, 1); } } } @@ -788,19 +788,19 @@ Foam::labelList Foam::dynamicRefineFvMesh::selectRefineCells if (nCandidates < nTotToRefine) { - forAll(candidateCell, cellI) + forAll(candidateCell, celli) { if ( - cellLevel[cellI] < maxRefinement - && candidateCell.get(cellI) + cellLevel[celli] < maxRefinement + && candidateCell.get(celli) && ( unrefineableCell.empty() - || !unrefineableCell.get(cellI) + || !unrefineableCell.get(celli) ) ) { - candidates.append(cellI); + candidates.append(celli); } } } @@ -809,19 +809,19 @@ Foam::labelList Foam::dynamicRefineFvMesh::selectRefineCells // Sort by error? For now just truncate. for (label level = 0; level < maxRefinement; level++) { - forAll(candidateCell, cellI) + forAll(candidateCell, celli) { if ( - cellLevel[cellI] == level - && candidateCell.get(cellI) + cellLevel[celli] == level + && candidateCell.get(celli) && ( unrefineableCell.empty() - || !unrefineableCell.get(cellI) + || !unrefineableCell.get(celli) ) ) { - candidates.append(cellI); + candidates.append(celli); } } @@ -918,11 +918,11 @@ void Foam::dynamicRefineFvMesh::extendMarkedCells // Mark faces using any marked cell boolList markedFace(nFaces(), false); - forAll(markedCell, cellI) + forAll(markedCell, celli) { - if (markedCell.get(cellI)) + if (markedCell.get(celli)) { - const cell& cFaces = cells()[cellI]; + const cell& cFaces = cells()[celli]; forAll(cFaces, i) { @@ -934,19 +934,19 @@ void Foam::dynamicRefineFvMesh::extendMarkedCells syncTools::syncFaceList(*this, markedFace, orEqOp<bool>()); // Update cells using any markedFace - for (label faceI = 0; faceI < nInternalFaces(); faceI++) + for (label facei = 0; facei < nInternalFaces(); facei++) { - if (markedFace[faceI]) + if (markedFace[facei]) { - markedCell.set(faceOwner()[faceI], 1); - markedCell.set(faceNeighbour()[faceI], 1); + markedCell.set(faceOwner()[facei], 1); + markedCell.set(faceNeighbour()[facei], 1); } } - for (label faceI = nInternalFaces(); faceI < nFaces(); faceI++) + for (label facei = nInternalFaces(); facei < nFaces(); facei++) { - if (markedFace[faceI]) + if (markedFace[facei]) { - markedCell.set(faceOwner()[faceI], 1); + markedCell.set(faceOwner()[facei], 1); } } } @@ -969,33 +969,33 @@ void Foam::dynamicRefineFvMesh::checkEightAnchorPoints forAll(pCells, pCellI) { - label cellI = pCells[pCellI]; + label celli = pCells[pCellI]; - if (pointLevel[pointI] <= cellLevel[cellI]) + if (pointLevel[pointI] <= cellLevel[celli]) { // Check if cell has already 8 anchor points -> protect cell - if (nAnchorPoints[cellI] == 8) + if (nAnchorPoints[celli] == 8) { - if (protectedCell.set(cellI, true)) + if (protectedCell.set(celli, true)) { nProtected++; } } - if (!protectedCell[cellI]) + if (!protectedCell[celli]) { - nAnchorPoints[cellI]++; + nAnchorPoints[celli]++; } } } } - forAll(protectedCell, cellI) + forAll(protectedCell, celli) { - if (!protectedCell[cellI] && nAnchorPoints[cellI] != 8) + if (!protectedCell[celli] && nAnchorPoints[celli] != 8) { - protectedCell.set(cellI, true); + protectedCell.set(celli, true); nProtected++; } } @@ -1037,17 +1037,17 @@ Foam::dynamicRefineFvMesh::dynamicRefineFvMesh(const IOobject& io) forAll(pCells, i) { - label cellI = pCells[i]; + label celli = pCells[i]; - if (!protectedCell_.get(cellI)) + if (!protectedCell_.get(celli)) { - if (pointLevel[pointI] <= cellLevel[cellI]) + if (pointLevel[pointI] <= cellLevel[celli]) { - nAnchors[cellI]++; + nAnchors[celli]++; - if (nAnchors[cellI] > 8) + if (nAnchors[celli] > 8) { - protectedCell_.set(cellI, 1); + protectedCell_.set(celli, 1); nProtected++; } } @@ -1064,28 +1064,28 @@ Foam::dynamicRefineFvMesh::dynamicRefineFvMesh(const IOobject& io) { labelList neiLevel(nFaces()); - for (label faceI = 0; faceI < nInternalFaces(); faceI++) + for (label facei = 0; facei < nInternalFaces(); facei++) { - neiLevel[faceI] = cellLevel[faceNeighbour()[faceI]]; + neiLevel[facei] = cellLevel[faceNeighbour()[facei]]; } - for (label faceI = nInternalFaces(); faceI < nFaces(); faceI++) + for (label facei = nInternalFaces(); facei < nFaces(); facei++) { - neiLevel[faceI] = cellLevel[faceOwner()[faceI]]; + neiLevel[facei] = cellLevel[faceOwner()[facei]]; } syncTools::swapFaceList(*this, neiLevel); boolList protectedFace(nFaces(), false); - forAll(faceOwner(), faceI) + forAll(faceOwner(), facei) { label faceLevel = max ( - cellLevel[faceOwner()[faceI]], - neiLevel[faceI] + cellLevel[faceOwner()[facei]], + neiLevel[facei] ); - const face& f = faces()[faceI]; + const face& f = faces()[facei]; label nAnchors = 0; @@ -1097,7 +1097,7 @@ Foam::dynamicRefineFvMesh::dynamicRefineFvMesh(const IOobject& io) if (nAnchors > 4) { - protectedFace[faceI] = true; + protectedFace[facei] = true; break; } } @@ -1106,33 +1106,33 @@ Foam::dynamicRefineFvMesh::dynamicRefineFvMesh(const IOobject& io) syncTools::syncFaceList(*this, protectedFace, orEqOp<bool>()); - for (label faceI = 0; faceI < nInternalFaces(); faceI++) + for (label facei = 0; facei < nInternalFaces(); facei++) { - if (protectedFace[faceI]) + if (protectedFace[facei]) { - protectedCell_.set(faceOwner()[faceI], 1); + protectedCell_.set(faceOwner()[facei], 1); nProtected++; - protectedCell_.set(faceNeighbour()[faceI], 1); + protectedCell_.set(faceNeighbour()[facei], 1); nProtected++; } } - for (label faceI = nInternalFaces(); faceI < nFaces(); faceI++) + for (label facei = nInternalFaces(); facei < nFaces(); facei++) { - if (protectedFace[faceI]) + if (protectedFace[facei]) { - protectedCell_.set(faceOwner()[faceI], 1); + protectedCell_.set(faceOwner()[facei], 1); nProtected++; } } // Also protect any cells that are less than hex - forAll(cells(), cellI) + forAll(cells(), celli) { - const cell& cFaces = cells()[cellI]; + const cell& cFaces = cells()[celli]; if (cFaces.size() < 6) { - if (protectedCell_.set(cellI, 1)) + if (protectedCell_.set(celli, 1)) { nProtected++; } @@ -1143,7 +1143,7 @@ Foam::dynamicRefineFvMesh::dynamicRefineFvMesh(const IOobject& io) { if (faces()[cFaces[cFaceI]].size() < 4) { - if (protectedCell_.set(cellI, 1)) + if (protectedCell_.set(celli, 1)) { nProtected++; } @@ -1165,11 +1165,11 @@ Foam::dynamicRefineFvMesh::dynamicRefineFvMesh(const IOobject& io) { cellSet protectedCells(*this, "protectedCells", nProtected); - forAll(protectedCell_, cellI) + forAll(protectedCell_, celli) { - if (protectedCell_[cellI]) + if (protectedCell_[celli]) { - protectedCells.insert(cellI); + protectedCells.insert(celli); } } @@ -1322,21 +1322,21 @@ bool Foam::dynamicRefineFvMesh::update() PackedBoolList newRefineCell(cellMap.size()); - forAll(cellMap, cellI) + forAll(cellMap, celli) { - label oldCellI = cellMap[cellI]; + label oldCellI = cellMap[celli]; if (oldCellI < 0) { - newRefineCell.set(cellI, 1); + newRefineCell.set(celli, 1); } - else if (reverseCellMap[oldCellI] != cellI) + else if (reverseCellMap[oldCellI] != celli) { - newRefineCell.set(cellI, 1); + newRefineCell.set(celli, 1); } else { - newRefineCell.set(cellI, refineCell.get(oldCellI)); + newRefineCell.set(celli, refineCell.get(oldCellI)); } } refineCell.transfer(newRefineCell); @@ -1438,9 +1438,9 @@ bool Foam::dynamicRefineFvMesh::writeObject const labelList& cellLevel = meshCutter_.cellLevel(); - forAll(cellLevel, cellI) + forAll(cellLevel, celli) { - scalarCellLevel[cellI] = cellLevel[cellI]; + scalarCellLevel[celli] = cellLevel[celli]; } writeOk = writeOk && scalarCellLevel.write(); diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C index 3e6d98ea8edc6de8ad71f8e731d3ef9b8d2804c4..1dc985485f11683a5ff10c84bf20e593b5249f3b 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/multiSolidBodyMotionFvMesh.C @@ -127,8 +127,8 @@ Foam::multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(const IOobject& io) forAll(cz, i) { - label cellI = cz[i]; - const cell& c = cells()[cellI]; + label celli = cz[i]; + const cell& c = cells()[celli]; forAll(c, j) { const face& f = faces()[c[j]]; diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C index 4271a894309c7afeafe13dc5d29f8ed23021794b..64630a06c3c2b92ae69fcf9a22b63ca6dc62b62d 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFvMesh.C @@ -148,8 +148,8 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io) forAll(cellIDs, i) { - label cellI = cellIDs[i]; - const cell& c = cells()[cellI]; + label celli = cellIDs[i]; + const cell& c = cells()[celli]; forAll(c, j) { const face& f = faces()[c[j]]; diff --git a/src/dynamicMesh/attachDetach/attachDetach.C b/src/dynamicMesh/attachDetach/attachDetach.C index 4627bf6d700e89e3028d8fd42bcb51d36c2b9927..3bec7005c0dd7b1d34f2adc9d43121dc45f1442f 100644 --- a/src/dynamicMesh/attachDetach/attachDetach.C +++ b/src/dynamicMesh/attachDetach/attachDetach.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,11 +107,11 @@ void Foam::attachDetach::checkDefinition() DynamicList<label> bouFacesInZone(addr.size()); - forAll(addr, faceI) + forAll(addr, facei) { - if (!mesh.isInternalFace(addr[faceI])) + if (!mesh.isInternalFace(addr[facei])) { - bouFacesInZone.append(addr[faceI]); + bouFacesInZone.append(addr[facei]); } } @@ -171,10 +171,10 @@ void Foam::attachDetach::checkDefinition() DynamicList<label> zoneProblemFaces(addr.size()); - forAll(addr, faceI) + forAll(addr, facei) { label facePatch = - mesh.boundaryMesh().whichPatch(addr[faceI]); + mesh.boundaryMesh().whichPatch(addr[facei]); if ( @@ -182,7 +182,7 @@ void Foam::attachDetach::checkDefinition() && facePatch != slavePatchID_.index() ) { - zoneProblemFaces.append(addr[faceI]); + zoneProblemFaces.append(addr[facei]); } } diff --git a/src/dynamicMesh/attachDetach/attachDetachPointMatchMap.C b/src/dynamicMesh/attachDetach/attachDetachPointMatchMap.C index cb1eadf6a6596d986930dfa30d2ebf96e70587b2..c6e9485b81e89e012c964590d1d297e39bf75cec 100644 --- a/src/dynamicMesh/attachDetach/attachDetachPointMatchMap.C +++ b/src/dynamicMesh/attachDetach/attachDetachPointMatchMap.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,10 +74,10 @@ void Foam::attachDetach::calcPointMatchMap() const const label slavePatchStart = slavePatch.start(); - forAll(reverseSlavePatch, faceI) + forAll(reverseSlavePatch, facei) { - reverseSlavePatch[faceI] = - faces[slavePatchStart + faceI].reverseFace(); + reverseSlavePatch[facei] = + faces[slavePatchStart + facei].reverseFace(); } // Create point merge list and remove merged points @@ -90,10 +90,10 @@ void Foam::attachDetach::calcPointMatchMap() const pointMatchMapPtr_ = new Map<label>(2*slaveMeshPoints.size()); Map<label>& removedPointMap = *pointMatchMapPtr_; - forAll(masterLocalFaces, faceI) + forAll(masterLocalFaces, facei) { - const face& curMasterPoints = masterLocalFaces[faceI]; - const face& curSlavePoints = slaveLocalFaces[faceI]; + const face& curMasterPoints = masterLocalFaces[facei]; + const face& curSlavePoints = slaveLocalFaces[facei]; forAll(curMasterPoints, pointI) { diff --git a/src/dynamicMesh/attachDetach/attachInterface.C b/src/dynamicMesh/attachDetach/attachInterface.C index 40c68cb8453c246bfa9bded9b2db6883bddf2caa..8272a6f4641a1462331e472c277fa68323d7e3fd 100644 --- a/src/dynamicMesh/attachDetach/attachInterface.C +++ b/src/dynamicMesh/attachDetach/attachInterface.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 @@ -112,25 +112,25 @@ void Foam::attachDetach::attachInterface const boolList& mfFlip = mesh.faceZones()[faceZoneID_.index()].flipMap(); - forAll(masterFaceCells, faceI) + forAll(masterFaceCells, facei) { // If slave neighbour is greater than master, face does not need // turning. Modify it to become internal - if (masterFaceCells[faceI] < slaveFaceCells[faceI]) + if (masterFaceCells[facei] < slaveFaceCells[facei]) { ref.setAction ( polyModifyFace ( - faces[masterPatchStart + faceI], // modified face - masterPatchStart + faceI, // label of face being modified - masterFaceCells[faceI], // owner - slaveFaceCells[faceI], // neighbour + faces[masterPatchStart + facei], // modified face + masterPatchStart + facei, // label of face being modified + masterFaceCells[facei], // owner + slaveFaceCells[facei], // neighbour false, // face flip -1, // patch for face false, // remove from zone faceZoneID_.index(), // zone for face - mfFlip[faceI] // face flip in zone + mfFlip[facei] // face flip in zone ) ); } @@ -141,15 +141,15 @@ void Foam::attachDetach::attachInterface ( polyModifyFace ( - faces[masterPatchStart + faceI].reverseFace(), // mod face - masterPatchStart + faceI, // label of face being modified - slaveFaceCells[faceI], // owner - masterFaceCells[faceI], // neighbour + faces[masterPatchStart + facei].reverseFace(), // mod face + masterPatchStart + facei, // label of face being modified + slaveFaceCells[facei], // owner + masterFaceCells[facei], // neighbour true, // face flip -1, // patch for face false, // remove from zone faceZoneID_.index(), // zone for face - !mfFlip[faceI] // face flip in zone + !mfFlip[facei] // face flip in zone ) ); } @@ -171,11 +171,11 @@ void Foam::attachDetach::attachInterface { const labelList& curFaces = pf[slaveMeshPoints[pointI]]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - if (!ref.faceRemoved(curFaces[faceI])) + if (!ref.faceRemoved(curFaces[facei])) { - facesToModifyMap.insert(curFaces[faceI]); + facesToModifyMap.insert(curFaces[facei]); } } } @@ -183,12 +183,12 @@ void Foam::attachDetach::attachInterface // Grab the faces to be renumbered const labelList ftm = facesToModifyMap.toc(); - forAll(ftm, faceI) + forAll(ftm, facei) { // For every face to modify, copy the face and re-map the vertices. // It is known all the faces will be changed since they hang off // re-mapped vertices - label curFaceID = ftm[faceI]; + label curFaceID = ftm[facei]; face newFace(faces[curFaceID]); diff --git a/src/dynamicMesh/attachDetach/detachInterface.C b/src/dynamicMesh/attachDetach/detachInterface.C index e457967b073ace8c3d59de1848a110fcced67477..0bd48e4d14ab8bbf35b1d05ac5f20c5426992eeb 100644 --- a/src/dynamicMesh/attachDetach/detachInterface.C +++ b/src/dynamicMesh/attachDetach/detachInterface.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 @@ -124,9 +124,9 @@ void Foam::attachDetach::detachInterface bool edgeIsInternal = true; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - if (!mesh.isInternalFace(curFaces[faceI])) + if (!mesh.isInternalFace(curFaces[facei])) { // The edge belongs to a boundary face edgeIsInternal = false; @@ -178,12 +178,12 @@ void Foam::attachDetach::detachInterface const labelList& own = mesh.faceOwner(); const labelList& nei = mesh.faceNeighbour(); - forAll(mf, faceI) + forAll(mf, facei) { - const label curFaceID = mf[faceI]; + const label curFaceID = mf[facei]; // Build the face for the slave patch by renumbering - const face oldFace = zoneFaces[faceI].reverseFace(); + const face oldFace = zoneFaces[facei].reverseFace(); face newFace(oldFace.size()); @@ -192,7 +192,7 @@ void Foam::attachDetach::detachInterface newFace[pointI] = addedPoints[oldFace[pointI]]; } - if (mfFlip[faceI]) + if (mfFlip[facei]) { // Face needs to be flipped for the master patch ref.setAction @@ -207,7 +207,7 @@ void Foam::attachDetach::detachInterface masterPatchID_.index(), // patch for face false, // remove from zone faceZoneID_.index(), // zone for face - !mfFlip[faceI] // face flip in zone + !mfFlip[facei] // face flip in zone ) ); @@ -254,7 +254,7 @@ void Foam::attachDetach::detachInterface masterPatchID_.index(), // patch for face false, // remove from zone faceZoneID_.index(), // zone for face - mfFlip[faceI] // face flip in zone + mfFlip[facei] // face flip in zone ) ); @@ -310,16 +310,16 @@ void Foam::attachDetach::detachInterface const cellList& cells = mesh.cells(); - forAll(mc, cellI) + forAll(mc, celli) { - const labelList& curFaces = cells[mc[cellI]]; + const labelList& curFaces = cells[mc[celli]]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { // Check if the face belongs to the master patch; if not add it - if (zoneMesh.whichZone(curFaces[faceI]) != faceZoneID_.index()) + if (zoneMesh.whichZone(curFaces[facei]) != faceZoneID_.index()) { - masterCellFaceMap.insert(curFaces[faceI]); + masterCellFaceMap.insert(curFaces[facei]); } } } @@ -350,9 +350,9 @@ void Foam::attachDetach::detachInterface // Cell not found. Add its faces to the map const cell& curFaces = cells[ownCell]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - masterCellFaceMap.insert(curFaces[faceI]); + masterCellFaceMap.insert(curFaces[facei]); } } @@ -366,9 +366,9 @@ void Foam::attachDetach::detachInterface // Cell not found. Add its faces to the map const cell& curFaces = cells[neiCell]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - masterCellFaceMap.insert(curFaces[faceI]); + masterCellFaceMap.insert(curFaces[facei]); } } } @@ -390,12 +390,12 @@ void Foam::attachDetach::detachInterface // Grab the list of faces of the master layer const labelList masterCellFaces = masterCellFaceMap.toc(); - forAll(masterCellFaces, faceI) + forAll(masterCellFaces, facei) { // Attempt to renumber the face using the masterLayerPointMap. // Missing point remain the same - const label curFaceID = masterCellFaces[faceI]; + const label curFaceID = masterCellFaces[facei]; const face& oldFace = faces[curFaceID]; diff --git a/src/dynamicMesh/boundaryMesh/boundaryMesh.C b/src/dynamicMesh/boundaryMesh/boundaryMesh.C index 29b9450f55ad8fd67af2283be92cc3b7427b688f..125367be0b31694b90221a5e51407a80774d89f0 100644 --- a/src/dynamicMesh/boundaryMesh/boundaryMesh.C +++ b/src/dynamicMesh/boundaryMesh/boundaryMesh.C @@ -256,11 +256,11 @@ Foam::label Foam::boundaryMesh::findPatchID const word& patchName ) const { - forAll(patches, patchI) + forAll(patches, patchi) { - if (patches[patchI].name() == patchName) + if (patches[patchi].name() == patchName) { - return patchI; + return patchi; } } @@ -272,9 +272,9 @@ Foam::wordList Foam::boundaryMesh::patchNames() const { wordList names(patches_.size()); - forAll(patches_, patchI) + forAll(patches_, patchi) { - names[patchI] = patches_[patchI].name(); + names[patchi] = patches_[patchi].name(); } return names; } @@ -283,16 +283,16 @@ Foam::wordList Foam::boundaryMesh::patchNames() const Foam::label Foam::boundaryMesh::whichPatch ( const polyPatchList& patches, - const label faceI + const label facei ) const { - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; - if ((faceI >= pp.start()) && (faceI < (pp.start() + pp.size()))) + if ((facei >= pp.start()) && (facei < (pp.start() + pp.size()))) { - return patchI; + return patchi; } } return -1; @@ -314,9 +314,9 @@ Foam::labelList Foam::boundaryMesh::faceToEdge forAll(changedFaces, i) { - label faceI = changedFaces[i]; + label facei = changedFaces[i]; - const labelList& fEdges = mesh().faceEdges()[faceI]; + const labelList& fEdges = mesh().faceEdges()[facei]; forAll(fEdges, fEdgeI) { @@ -356,13 +356,13 @@ Foam::labelList Foam::boundaryMesh::edgeToFace forAll(eFaces, eFaceI) { - label faceI = eFaces[eFaceI]; + label facei = eFaces[eFaceI]; - if (faceRegion[faceI] == -1) + if (faceRegion[facei] == -1) { - faceRegion[faceI] = region; + faceRegion[facei] = region; - changedFaces[changedI++] = faceI; + changedFaces[changedI++] = facei; } } } @@ -373,19 +373,19 @@ Foam::labelList Foam::boundaryMesh::edgeToFace } -// Finds area, starting at faceI, delimited by borderEdge +// Finds area, starting at facei, delimited by borderEdge void Foam::boundaryMesh::markZone ( const boolList& borderEdge, - label faceI, + label facei, label currentZone, labelList& faceZone ) const { - faceZone[faceI] = currentZone; + faceZone[facei] = currentZone; // List of faces whose faceZone has been set. - labelList changedFaces(1, faceI); + labelList changedFaces(1, facei); // List of edges whose faceZone has been set. labelList changedEdges; @@ -485,17 +485,17 @@ void Foam::boundaryMesh::read(const polyMesh& mesh) label bFaceI = 0; // Collect all boundary faces. - forAll(mesh.boundaryMesh(), patchI) + forAll(mesh.boundaryMesh(), patchi) { - const polyPatch& pp = mesh.boundaryMesh()[patchI]; + const polyPatch& pp = mesh.boundaryMesh()[patchi]; patches_.set ( - patchI, + patchi, new boundaryPatch ( pp.name(), - patchI, + patchi, pp.size(), bFaceI, pp.type() @@ -518,9 +518,9 @@ void Foam::boundaryMesh::read(const polyMesh& mesh) { Pout<< "read : patches now:" << endl; - forAll(patches_, patchI) + forAll(patches_, patchi) { - const boundaryPatch& bp = patches_[patchI]; + const boundaryPatch& bp = patches_[patchi]; Pout<< " name : " << bp.name() << endl << " size : " << bp.size() << endl @@ -553,9 +553,9 @@ void Foam::boundaryMesh::read(const polyMesh& mesh) Pout<< "** Start of Faces **" << endl; - forAll(msh, faceI) + forAll(msh, facei) { - const face& f = msh[faceI]; + const face& f = msh[facei]; point ctr(Zero); @@ -565,7 +565,7 @@ void Foam::boundaryMesh::read(const polyMesh& mesh) } ctr /= f.size(); - Pout<< " " << faceI + Pout<< " " << facei << " ctr:" << ctr << " verts:" << f << endl; @@ -646,17 +646,17 @@ void Foam::boundaryMesh::readTriSurface(const fileName& fName) patches_.setSize(surfPatches.size()); // Take over patches, setting size to 0 for now. - forAll(surfPatches, patchI) + forAll(surfPatches, patchi) { - const geometricSurfacePatch& surfPatch = surfPatches[patchI]; + const geometricSurfacePatch& surfPatch = surfPatches[patchi]; patches_.set ( - patchI, + patchi, new boundaryPatch ( surfPatch.name(), - patchI, + patchi, 0, 0, surfPatch.geometricType() @@ -670,15 +670,15 @@ void Foam::boundaryMesh::readTriSurface(const fileName& fName) patches_.setSize(regionToBoundaryPatch.size()); - forAll(patches_, patchI) + forAll(patches_, patchi) { patches_.set ( - patchI, + patchi, new boundaryPatch ( - "patch" + name(patchI), - patchI, + "patch" + name(patchi), + patchi, 0, 0, "empty" @@ -772,16 +772,16 @@ void Foam::boundaryMesh::writeTriSurface(const fileName& fName) const { geometricSurfacePatchList surfPatches(patches_.size()); - forAll(patches_, patchI) + forAll(patches_, patchi) { - const boundaryPatch& bp = patches_[patchI]; + const boundaryPatch& bp = patches_[patchi]; - surfPatches[patchI] = + surfPatches[patchi] = geometricSurfacePatch ( bp.physicalType(), bp.name(), - patchI + patchi ); } @@ -799,11 +799,11 @@ void Foam::boundaryMesh::writeTriSurface(const fileName& fName) const label triI = 0; - forAll(mesh(), faceI) + forAll(mesh(), facei) { - startTri[faceI] = triI; + startTri[facei] = triI; - triI += nTris[faceI]; + triI += nTris[facei]; } // Triangulate @@ -817,23 +817,23 @@ void Foam::boundaryMesh::writeTriSurface(const fileName& fName) const triI = 0; - forAll(patches_, patchI) + forAll(patches_, patchi) { - const boundaryPatch& bp = patches_[patchI]; + const boundaryPatch& bp = patches_[patchi]; forAll(bp, patchFaceI) { - label faceI = bp.start() + patchFaceI; + label facei = bp.start() + patchFaceI; - label triVertI = 3*startTri[faceI]; + label triVertI = 3*startTri[facei]; - for (label faceTriI = 0; faceTriI < nTris[faceI]; faceTriI++) + for (label faceTriI = 0; faceTriI < nTris[facei]; faceTriI++) { label v0 = triVerts[triVertI++]; label v1 = triVerts[triVertI++]; label v2 = triVerts[triVertI++]; - tris[triI++] = labelledTri(v0, v1, v2, patchI); + tris[triI++] = labelledTri(v0, v1, v2, patchi); } } } @@ -1234,9 +1234,9 @@ void Foam::boundaryMesh::patchify { Pout<< "Patchify : new polyPatch list:" << endl; - forAll(newPatchPtrList, patchI) + forAll(newPatchPtrList, patchi) { - const polyPatch& newPatch = *newPatchPtrList[patchI]; + const polyPatch& newPatch = *newPatchPtrList[patchi]; if (debug) { @@ -1244,7 +1244,7 @@ void Foam::boundaryMesh::patchify << " type :" << newPatch.typeName << endl << " size :" << newPatch.size() << endl << " start:" << newPatch.start() << endl - << " index:" << patchI << endl; + << " index:" << patchi << endl; } } } @@ -1532,20 +1532,20 @@ void Foam::boundaryMesh::setExtraEdges(const label edgeI) } -Foam::label Foam::boundaryMesh::whichPatch(const label faceI) const +Foam::label Foam::boundaryMesh::whichPatch(const label facei) const { - forAll(patches_, patchI) + forAll(patches_, patchi) { - const boundaryPatch& bp = patches_[patchI]; + const boundaryPatch& bp = patches_[patchi]; - if ((faceI >= bp.start()) && (faceI < (bp.start() + bp.size()))) + if ((facei >= bp.start()) && (facei < (bp.start() + bp.size()))) { - return patchI; + return patchi; } } FatalErrorInFunction - << "Cannot find face " << faceI << " in list of boundaryPatches " + << "Cannot find face " << facei << " in list of boundaryPatches " << patches_ << abort(FatalError); @@ -1555,11 +1555,11 @@ Foam::label Foam::boundaryMesh::whichPatch(const label faceI) const Foam::label Foam::boundaryMesh::findPatchID(const word& patchName) const { - forAll(patches_, patchI) + forAll(patches_, patchi) { - if (patches_[patchI].name() == patchName) + if (patches_[patchi].name() == patchName) { - return patchI; + return patchi; } } @@ -1573,26 +1573,26 @@ void Foam::boundaryMesh::addPatch(const word& patchName) // Add empty patch at end of patch list. - label patchI = patches_.size()-1; + label patchi = patches_.size()-1; boundaryPatch* bpPtr = new boundaryPatch ( patchName, - patchI, + patchi, 0, mesh().size(), "empty" ); - patches_.set(patchI, bpPtr); + patches_.set(patchi, bpPtr); if (debug) { Pout<< "addPatch : patches now:" << endl; - forAll(patches_, patchI) + forAll(patches_, patchi) { - const boundaryPatch& bp = patches_[patchI]; + const boundaryPatch& bp = patches_[patchi]; Pout<< " name : " << bp.name() << endl << " size : " << bp.size() << endl @@ -1625,16 +1625,16 @@ void Foam::boundaryMesh::deletePatch(const word& patchName) 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()); + newPatches.set(patchi, patches_[patchi].clone()); } // 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()); + newPatches.set(patchi - 1, patches_[patchi].clone()); } patches_.clear(); @@ -1645,9 +1645,9 @@ void Foam::boundaryMesh::deletePatch(const word& patchName) { Pout<< "deletePatch : patches now:" << endl; - forAll(patches_, patchI) + forAll(patches_, patchi) { - const boundaryPatch& bp = patches_[patchI]; + const boundaryPatch& bp = patches_[patchi]; Pout<< " name : " << bp.name() << endl << " size : " << bp.size() << endl @@ -1681,12 +1681,12 @@ void Foam::boundaryMesh::changePatchType PtrList<boundaryPatch> newPatches(patches_.size()); - forAll(patches_, patchI) + forAll(patches_, patchi) { - if (patchI == changeI) + if (patchi == changeI) { // Create copy but for type - const boundaryPatch& oldBp = patches_[patchI]; + const boundaryPatch& oldBp = patches_[patchi]; boundaryPatch* bpPtr = new boundaryPatch ( @@ -1697,12 +1697,12 @@ void Foam::boundaryMesh::changePatchType patchType ); - newPatches.set(patchI, bpPtr); + newPatches.set(patchi, bpPtr); } else { // Create copy - newPatches.set(patchI, patches_[patchI].clone()); + newPatches.set(patchi, patches_[patchi].clone()); } } @@ -1729,9 +1729,9 @@ void Foam::boundaryMesh::changeFaces labelList nFaces(patches_.size(), 0); - forAll(patchIDs, faceI) + forAll(patchIDs, facei) { - label patchID = patchIDs[faceI]; + label patchID = patchIDs[facei]; if (patchID < 0 || patchID >= patches_.size()) { @@ -1749,27 +1749,27 @@ void Foam::boundaryMesh::changeFaces startFace[0] = 0; - for (label patchI = 1; patchI < patches_.size(); patchI++) + for (label patchi = 1; patchi < patches_.size(); patchi++) { - startFace[patchI] = startFace[patchI-1] + nFaces[patchI-1]; + startFace[patchi] = startFace[patchi-1] + nFaces[patchi-1]; } // Update patch info PtrList<boundaryPatch> newPatches(patches_.size()); - forAll(patches_, patchI) + forAll(patches_, patchi) { - const boundaryPatch& bp = patches_[patchI]; + const boundaryPatch& bp = patches_[patchi]; newPatches.set ( - patchI, + patchi, new boundaryPatch ( bp.name(), - patchI, - nFaces[patchI], - startFace[patchI], + patchi, + nFaces[patchi], + startFace[patchi], bp.physicalType() ) ); @@ -1780,9 +1780,9 @@ void Foam::boundaryMesh::changeFaces { Pout<< "changeFaces : patches now:" << endl; - forAll(patches_, patchI) + forAll(patches_, patchi) { - const boundaryPatch& bp = patches_[patchI]; + const boundaryPatch& bp = patches_[patchi]; Pout<< " name : " << bp.name() << endl << " size : " << bp.size() << endl @@ -1796,11 +1796,11 @@ void Foam::boundaryMesh::changeFaces // Construct face mapping array oldToNew.setSize(patchIDs.size()); - forAll(patchIDs, faceI) + forAll(patchIDs, facei) { - int patchID = patchIDs[faceI]; + int patchID = patchIDs[facei]; - oldToNew[faceI] = startFace[patchID]++; + oldToNew[facei] = startFace[patchID]++; } // Copy faces into correct position and maintain label of original face @@ -1808,10 +1808,10 @@ void Foam::boundaryMesh::changeFaces labelList newMeshFace(mesh().size()); - forAll(oldToNew, faceI) + forAll(oldToNew, facei) { - newFaces[oldToNew[faceI]] = mesh()[faceI]; - newMeshFace[oldToNew[faceI]] = meshFace_[faceI]; + newFaces[oldToNew[facei]] = mesh()[facei]; + newMeshFace[oldToNew[facei]] = meshFace_[facei]; } // Reconstruct 'mesh' from new faces and (copy of) existing points. @@ -1829,9 +1829,9 @@ void Foam::boundaryMesh::changeFaces } -Foam::label Foam::boundaryMesh::getNTris(const label faceI) const +Foam::label Foam::boundaryMesh::getNTris(const label facei) const { - const face& f = mesh()[faceI]; + const face& f = mesh()[facei]; return f.nTriangles(mesh().points()); } @@ -1877,9 +1877,9 @@ void Foam::boundaryMesh::triangulate for (label i = 0; i < nFaces; i++) { - label faceI = startFaceI + i; + label facei = startFaceI + i; - const face& f = mesh()[faceI]; + const face& f = mesh()[facei]; // Have face triangulate itself (results in faceList) faceList triFaces(f.nTriangles(mesh().points())); @@ -1989,15 +1989,15 @@ void Foam::boundaryMesh::markFaces // Set in visited all reached ones. visited.setSize(mesh().size()); - forAll(currentZone, faceI) + forAll(currentZone, facei) { - if (currentZone[faceI] == 0) + if (currentZone[facei] == 0) { - visited[faceI] = true; + visited[facei] = true; } else { - visited[faceI] = false; + visited[facei] = false; } } } diff --git a/src/dynamicMesh/boundaryMesh/boundaryMesh.H b/src/dynamicMesh/boundaryMesh/boundaryMesh.H index 37fd4c64d48645b218fb0578629f05b76f4c6fa0..e203b98cae9290c810fdc348b124568cac37387a 100644 --- a/src/dynamicMesh/boundaryMesh/boundaryMesh.H +++ b/src/dynamicMesh/boundaryMesh/boundaryMesh.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 @@ -160,12 +160,12 @@ class boundaryMesh labelList& faceRegion ) const; - //- Finds area, starting at faceI, delimited by borderEdge. Marks all + //- Finds area, starting at facei, delimited by borderEdge. Marks all // faces thus visited with currentZone. void markZone ( const boolList& borderEdge, - label faceI, + label facei, label currentZone, labelList& faceZone ) const; @@ -298,7 +298,7 @@ public: // Patches //- Get index of patch face is in - label whichPatch(const label faceI) const; + label whichPatch(const label facei) const; //- Get index of patch by name label findPatchID(const word& patchName) const; @@ -335,7 +335,7 @@ public: //- Simple triangulation of face subset. Returns number of triangles // needed. - label getNTris(const label faceI) const; + label getNTris(const label facei) const; //- Simple triangulation of face subset. TotalNTris is total number // of triangles, nTris is per face number of triangles. @@ -377,7 +377,7 @@ public: void markFaces ( const labelList& protectedEdges, - const label faceI, + const label facei, boolList& visited ) const; }; diff --git a/src/dynamicMesh/createShellMesh/createShellMesh.C b/src/dynamicMesh/createShellMesh/createShellMesh.C index 7d2d36d1dc64bf6f0ea6535250d4786e826109ce..d778f1509d3daad710626d2052b9cd226a67931d 100644 --- a/src/dynamicMesh/createShellMesh/createShellMesh.C +++ b/src/dynamicMesh/createShellMesh/createShellMesh.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 @@ -185,9 +185,9 @@ void Foam::createShellMesh::calcPointRegions // 1. Count label nMaxRegions = 0; - forAll(patch.localFaces(), faceI) + forAll(patch.localFaces(), facei) { - const face& f = patch.localFaces()[faceI]; + const face& f = patch.localFaces()[facei]; nMaxRegions += f.size(); } @@ -197,10 +197,10 @@ void Foam::createShellMesh::calcPointRegions label nRegions = 0; pointGlobalRegions.setSize(patch.size()); - forAll(pointGlobalRegions, faceI) + forAll(pointGlobalRegions, facei) { - const face& f = patch.localFaces()[faceI]; - labelList& pRegions = pointGlobalRegions[faceI]; + const face& f = patch.localFaces()[facei]; + labelList& pRegions = pointGlobalRegions[facei]; pRegions.setSize(f.size()); forAll(pRegions, fp) { @@ -223,15 +223,15 @@ void Foam::createShellMesh::calcPointRegions { // Take over value from one face only. const edge& e = patch.edges()[edgeI]; - label faceI = patch.edgeFaces()[edgeI][0]; - const face& f = patch.localFaces()[faceI]; + label facei = patch.edgeFaces()[edgeI][0]; + const face& f = patch.localFaces()[facei]; label fp0 = findIndex(f, e[0]); label fp1 = findIndex(f, e[1]); allEdgeData[edgeI] = labelPair ( - pointGlobalRegions[faceI][fp0], - pointGlobalRegions[faceI][fp1] + pointGlobalRegions[facei][fp0], + pointGlobalRegions[facei][fp1] ); if (!isChangedEdge[edgeI]) { @@ -279,29 +279,29 @@ void Foam::createShellMesh::calcPointRegions forAll(eFaces, i) { - label faceI = eFaces[i]; - const face& f = patch.localFaces()[faceI]; + label facei = eFaces[i]; + const face& f = patch.localFaces()[facei]; // Combine edgeData with face data label fp0 = findIndex(f, e[0]); - if (pointGlobalRegions[faceI][fp0] > edgeData[0]) + if (pointGlobalRegions[facei][fp0] > edgeData[0]) { - pointGlobalRegions[faceI][fp0] = edgeData[0]; - if (!isChangedFace[faceI]) + pointGlobalRegions[facei][fp0] = edgeData[0]; + if (!isChangedFace[facei]) { - isChangedFace[faceI] = true; - changedFaces.append(faceI); + isChangedFace[facei] = true; + changedFaces.append(facei); } } label fp1 = findIndex(f, e[1]); - if (pointGlobalRegions[faceI][fp1] > edgeData[1]) + if (pointGlobalRegions[facei][fp1] > edgeData[1]) { - pointGlobalRegions[faceI][fp1] = edgeData[1]; - if (!isChangedFace[faceI]) + pointGlobalRegions[facei][fp1] = edgeData[1]; + if (!isChangedFace[facei]) { - isChangedFace[faceI] = true; - changedFaces.append(faceI); + isChangedFace[facei] = true; + changedFaces.append(facei); } } } @@ -323,9 +323,9 @@ void Foam::createShellMesh::calcPointRegions forAll(changedFaces, i) { - label faceI = changedFaces[i]; - const face& f = patch.localFaces()[faceI]; - const labelList& fEdges = patch.faceEdges()[faceI]; + label facei = changedFaces[i]; + const face& f = patch.localFaces()[facei]; + const labelList& fEdges = patch.faceEdges()[facei]; forAll(fEdges, fp) { @@ -335,9 +335,9 @@ void Foam::createShellMesh::calcPointRegions { const edge& e = patch.edges()[edgeI]; label fp0 = findIndex(f, e[0]); - label region0 = pointGlobalRegions[faceI][fp0]; + label region0 = pointGlobalRegions[facei][fp0]; label fp1 = findIndex(f, e[1]); - label region1 = pointGlobalRegions[faceI][fp1]; + label region1 = pointGlobalRegions[facei][fp1]; if ( @@ -387,14 +387,14 @@ void Foam::createShellMesh::calcPointRegions pointLocalRegions.setSize(patch.size()); Map<label> globalToLocalRegion(globalRegions.localSize()/4); DynamicList<label> dynLocalToGlobalRegion(globalToLocalRegion.size()); - forAll(patch.localFaces(), faceI) + forAll(patch.localFaces(), facei) { - const face& f = patch.localFaces()[faceI]; - face& pRegions = pointLocalRegions[faceI]; + const face& f = patch.localFaces()[facei]; + face& pRegions = pointLocalRegions[facei]; pRegions.setSize(f.size()); forAll(f, fp) { - label globalRegionI = pointGlobalRegions[faceI][fp]; + label globalRegionI = pointGlobalRegions[facei][fp]; Map<label>::iterator fnd = globalToLocalRegion.find(globalRegionI); @@ -501,11 +501,11 @@ void Foam::createShellMesh::setRefinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ labelList addedCells(nLayers*patch_.size()); - forAll(patch_, faceI) + forAll(patch_, facei) { for (label layerI = 0; layerI < nLayers; layerI++) { - addedCells[nLayers*faceI+layerI] = meshMod.addCell + addedCells[nLayers*facei+layerI] = meshMod.addCell ( -1, // masterPointID -1, // masterEdgeID @@ -513,7 +513,7 @@ void Foam::createShellMesh::setRefinement cellToFaceMap.size(), // masterCellID -1 // zoneID ); - cellToFaceMap.append(faceI); + cellToFaceMap.append(facei); } } @@ -570,39 +570,39 @@ void Foam::createShellMesh::setRefinement // Add face on bottom side - forAll(patch_.localFaces(), faceI) + forAll(patch_.localFaces(), facei) { meshMod.addFace ( - patch_.localFaces()[faceI].reverseFace(),// vertices - addedCells[nLayers*faceI], // own + patch_.localFaces()[facei].reverseFace(),// vertices + addedCells[nLayers*facei], // own -1, // nei -1, // masterPointID -1, // masterEdgeID - faceToFaceMap.size(), // masterFaceID : current faceI + faceToFaceMap.size(), // masterFaceID : current facei true, // flipFaceFlux - bottomPatchID[faceI], // patchID + bottomPatchID[facei], // patchID -1, // zoneID false // zoneFlip ); - faceToFaceMap.append(-faceI-1); // points to flipped original face + faceToFaceMap.append(-facei-1); // points to flipped original face faceToEdgeMap.append(-1); - //const face newF(patch_.localFaces()[faceI].reverseFace()); + //const face newF(patch_.localFaces()[facei].reverseFace()); //Pout<< "Added bottom face " // << newF // << " coords:" << UIndirectList<point>(meshMod.points(), newF) - // << " own " << addedCells[faceI] - // << " patch:" << bottomPatchID[faceI] - // << " at " << patch_.faceCentres()[faceI] + // << " own " << addedCells[facei] + // << " patch:" << bottomPatchID[facei] + // << " at " << patch_.faceCentres()[facei] // << endl; } // Add inbetween faces and face on top - forAll(patch_.localFaces(), faceI) + forAll(patch_.localFaces(), facei) { // Get face in original ordering - const face& f = patch_.localFaces()[faceI]; + const face& f = patch_.localFaces()[facei]; face newF(f.size()); @@ -611,21 +611,21 @@ void Foam::createShellMesh::setRefinement // Pick up point based on region and layer forAll(f, fp) { - label region = pointRegions_[faceI][fp]; + label region = pointRegions_[facei][fp]; newF[fp] = addedPoints[region*nLayers+layerI]; } - label own = addedCells[faceI*nLayers+layerI]; + label own = addedCells[facei*nLayers+layerI]; label nei; label patchI; if (layerI == nLayers-1) { nei = -1; - patchI = topPatchID[faceI]; + patchI = topPatchID[facei]; } else { - nei = addedCells[faceI*nLayers+layerI+1]; + nei = addedCells[facei*nLayers+layerI+1]; patchI = -1; } @@ -636,13 +636,13 @@ void Foam::createShellMesh::setRefinement nei, // nei -1, // masterPointID -1, // masterEdgeID - faceToFaceMap.size(), // masterFaceID : current faceI + faceToFaceMap.size(), // masterFaceID : current facei false, // flipFaceFlux patchI, // patchID -1, // zoneID false // zoneFlip ); - faceToFaceMap.append(faceI+1); // unflipped + faceToFaceMap.append(facei+1); // unflipped faceToEdgeMap.append(-1); //Pout<< "Added inbetween face " << newF @@ -650,7 +650,7 @@ void Foam::createShellMesh::setRefinement // << " at layer " << layerI // << " own " << own // << " nei " << nei - // << " at " << patch_.faceCentres()[faceI] + // << " at " << patch_.faceCentres()[facei] // << endl; } } diff --git a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C index fc066d7e9e4f945c634c50f08772d86915b04e5c..7873504aa8bf246af2883302fc0b5ac3e42d3d2e 100644 --- a/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C +++ b/src/dynamicMesh/extrudePatchMesh/extrudePatchMesh.C @@ -110,11 +110,11 @@ extrudePatchMesh::extrudePatchMesh List<word> patchTypes(regionPatches.size()); PtrList<dictionary> dicts(regionPatches.size()); - forAll(dicts, patchI) + forAll(dicts, patchi) { - if (!dicts.set(patchI)) + if (!dicts.set(patchi)) { - dicts.set(patchI, new dictionary()); + dicts.set(patchi, new dictionary()); } } @@ -122,23 +122,23 @@ extrudePatchMesh::extrudePatchMesh dicts[sidePatchID] = dict_.subDict("sideCoeffs"); dicts[topPatchID] = dict_.subDict("topCoeffs"); - forAll(dicts, patchI) + forAll(dicts, patchi) { - dicts[patchI].lookup("name") >> patchNames[patchI]; - dicts[patchI].lookup("type") >> patchTypes[patchI]; + dicts[patchi].lookup("name") >> patchNames[patchi]; + dicts[patchi].lookup("type") >> patchTypes[patchi]; } - forAll(regionPatches, patchI) + forAll(regionPatches, patchi) { - dictionary& patchDict = dicts[patchI]; + dictionary& patchDict = dicts[patchi]; patchDict.set("nFaces", 0); patchDict.set("startFace", 0); - regionPatches[patchI] = polyPatch::New + regionPatches[patchi] = polyPatch::New ( - patchNames[patchI], + patchNames[patchi], patchDict, - patchI, + patchi, mesh.boundaryMesh() ).ptr(); @@ -190,10 +190,10 @@ void extrudePatchMesh::extrudeMesh(const List<polyPatch*>& regionPatches) // Per local region an originating point labelList localRegionPoints(localToGlobalRegion.size()); - forAll(pointLocalRegions, faceI) + forAll(pointLocalRegions, facei) { - const face& f = extrudedPatch_.localFaces()[faceI]; - const face& pRegions = pointLocalRegions[faceI]; + const face& f = extrudedPatch_.localFaces()[facei]; + const face& pRegions = pointLocalRegions[facei]; forAll(pRegions, fp) { localRegionPoints[pRegions[fp]] = f[fp]; @@ -205,14 +205,14 @@ void extrudePatchMesh::extrudeMesh(const List<polyPatch*>& regionPatches) { pointField localSum(localToGlobalRegion.size(), Zero); - forAll(pointLocalRegions, faceI) + forAll(pointLocalRegions, facei) { - const face& pRegions = pointLocalRegions[faceI]; + const face& pRegions = pointLocalRegions[facei]; forAll(pRegions, fp) { label localRegionI = pRegions[fp]; localSum[localRegionI] += - extrudedPatch_.faceNormals()[faceI]; + extrudedPatch_.faceNormals()[facei]; } } @@ -267,11 +267,11 @@ void extrudePatchMesh::extrudeMesh(const List<polyPatch*>& regionPatches) List<word> patchTypes(regionPatches.size()); PtrList<dictionary> dicts(regionPatches.size()); - forAll(dicts, patchI) + forAll(dicts, patchi) { - if (!dicts.set(patchI)) + if (!dicts.set(patchi)) { - dicts.set(patchI, new dictionary()); + dicts.set(patchi, new dictionary()); } } @@ -279,23 +279,23 @@ void extrudePatchMesh::extrudeMesh(const List<polyPatch*>& regionPatches) dicts[sidePatchID] = dict_.subDict("sideCoeffs"); dicts[topPatchID] = dict_.subDict("topCoeffs"); - forAll(dicts, patchI) + forAll(dicts, patchi) { - dicts[patchI].lookup("name") >> patchNames[patchI]; - dicts[patchI].lookup("type") >> patchTypes[patchI]; + dicts[patchi].lookup("name") >> patchNames[patchi]; + dicts[patchi].lookup("type") >> patchTypes[patchi]; } - forAll(regionPatches, patchI) + forAll(regionPatches, patchi) { - dictionary& patchDict = dicts[patchI]; + dictionary& patchDict = dicts[patchi]; patchDict.set("nFaces", 0); patchDict.set("startFace", 0); - regionPatches[patchI] = polyPatch::New + regionPatches[patchi] = polyPatch::New ( - patchNames[patchI], + patchNames[patchi], patchDict, - patchI, + patchi, mesh.boundaryMesh() ).ptr(); diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C b/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C index 887b5ac0289c2b712776acd7d8343a077cebe3c3..f60ba6348750bdad7ff1ed8a57b19bd8a621364e 100644 --- a/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C +++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdder.C @@ -86,9 +86,9 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::fvMeshAdder::add fvBoundaryMesh& fvPatches = const_cast<fvBoundaryMesh&>(mesh0.boundary()); fvPatches.setSize(patches.size()); - forAll(patches, patchI) + forAll(patches, patchi) { - fvPatches.set(patchI, fvPatch::New(patches[patchI], fvPatches)); + fvPatches.set(patchi, fvPatch::New(patches[patchi], fvPatches)); } // Do the mapping of the stored fields diff --git a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C index a9cdcc02c6eac9a948a4b907b3ac6239173b9b6e..5aa4a0ee87a7100c0176b9f6050adaf5a0cea81a 100644 --- a/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C +++ b/src/dynamicMesh/fvMeshAdder/fvMeshAdderTemplates.C @@ -73,9 +73,9 @@ void Foam::fvMeshAdder::MapVolField label unusedPatchI = 0; - forAll(oldPatchMap, patchI) + forAll(oldPatchMap, patchi) { - label newPatchI = oldPatchMap[patchI]; + label newPatchI = oldPatchMap[patchi]; if (newPatchI != -1) { @@ -88,17 +88,17 @@ void Foam::fvMeshAdder::MapVolField // Reorder list for patchFields labelList oldToNew(oldPatchMap.size()); - forAll(oldPatchMap, patchI) + forAll(oldPatchMap, patchi) { - label newPatchI = oldPatchMap[patchI]; + label newPatchI = oldPatchMap[patchi]; if (newPatchI != -1) { - oldToNew[patchI] = newPatchI; + oldToNew[patchi] = newPatchI; } else { - oldToNew[patchI] = unusedPatchI++; + oldToNew[patchi] = unusedPatchI++; } } @@ -122,9 +122,9 @@ void Foam::fvMeshAdder::MapVolField // Map old values // ~~~~~~~~~~~~~~ - forAll(oldPatchMap, patchI) + forAll(oldPatchMap, patchi) { - label newPatchI = oldPatchMap[patchI]; + label newPatchI = oldPatchMap[patchi]; if (newPatchI != -1) { @@ -132,8 +132,8 @@ void Foam::fvMeshAdder::MapVolField ( calcPatchMap ( - oldPatchStarts[patchI], - oldPatchSizes[patchI], + oldPatchStarts[patchi], + oldPatchSizes[patchi], meshMap.oldFaceMap(), mesh.boundaryMesh()[newPatchI], -1 // unmapped value @@ -174,15 +174,15 @@ void Foam::fvMeshAdder::MapVolField const labelList& addedPatchMap = meshMap.addedPatchMap(); // Add addedMesh patches - forAll(addedPatchMap, patchI) + forAll(addedPatchMap, patchi) { - label newPatchI = addedPatchMap[patchI]; + label newPatchI = addedPatchMap[patchi]; if (newPatchI != -1) { const polyPatch& newPatch = mesh.boundaryMesh()[newPatchI]; const polyPatch& oldPatch = - fldToAdd.mesh().boundaryMesh()[patchI]; + fldToAdd.mesh().boundaryMesh()[patchi]; if (!bfld(newPatchI)) { @@ -209,7 +209,7 @@ void Foam::fvMeshAdder::MapVolField newPatchI, fvPatchField<Type>::New ( - fldToAdd.boundaryField()[patchI], // added field + fldToAdd.boundaryField()[patchi], // added field mesh.boundary()[newPatchI], // new fvPatch fld.dimensionedInternalField(), // new int. field patchMapper // mapper @@ -235,7 +235,7 @@ void Foam::fvMeshAdder::MapVolField bfld[newPatchI].rmap ( - fldToAdd.boundaryField()[patchI], + fldToAdd.boundaryField()[patchi], addedToNew ); } @@ -351,11 +351,11 @@ void Foam::fvMeshAdder::MapSurfaceField // Faces that were boundary faces but are not anymore. // Use owner value (so lowest numbered cell, i.e. from 'old' not 'added' // mesh) - forAll(bfld, patchI) + forAll(bfld, patchi) { - const fvsPatchField<Type>& pf = bfld[patchI]; + const fvsPatchField<Type>& pf = bfld[patchi]; - label start = oldPatchStarts[patchI]; + label start = oldPatchStarts[patchi]; forAll(pf, i) { @@ -381,9 +381,9 @@ void Foam::fvMeshAdder::MapSurfaceField label unusedPatchI = 0; - forAll(oldPatchMap, patchI) + forAll(oldPatchMap, patchi) { - label newPatchI = oldPatchMap[patchI]; + label newPatchI = oldPatchMap[patchi]; if (newPatchI != -1) { @@ -396,17 +396,17 @@ void Foam::fvMeshAdder::MapSurfaceField // Reorder list for patchFields labelList oldToNew(oldPatchMap.size()); - forAll(oldPatchMap, patchI) + forAll(oldPatchMap, patchi) { - label newPatchI = oldPatchMap[patchI]; + label newPatchI = oldPatchMap[patchi]; if (newPatchI != -1) { - oldToNew[patchI] = newPatchI; + oldToNew[patchi] = newPatchI; } else { - oldToNew[patchI] = unusedPatchI++; + oldToNew[patchi] = unusedPatchI++; } } @@ -430,9 +430,9 @@ void Foam::fvMeshAdder::MapSurfaceField // Map old values // ~~~~~~~~~~~~~~ - forAll(oldPatchMap, patchI) + forAll(oldPatchMap, patchi) { - label newPatchI = oldPatchMap[patchI]; + label newPatchI = oldPatchMap[patchi]; if (newPatchI != -1) { @@ -440,8 +440,8 @@ void Foam::fvMeshAdder::MapSurfaceField ( calcPatchMap ( - oldPatchStarts[patchI], - oldPatchSizes[patchI], + oldPatchStarts[patchi], + oldPatchSizes[patchi], meshMap.oldFaceMap(), mesh.boundaryMesh()[newPatchI], -1 // unmapped value @@ -481,15 +481,15 @@ void Foam::fvMeshAdder::MapSurfaceField const labelList& addedPatchMap = meshMap.addedPatchMap(); // Add addedMesh patches - forAll(addedPatchMap, patchI) + forAll(addedPatchMap, patchi) { - label newPatchI = addedPatchMap[patchI]; + label newPatchI = addedPatchMap[patchi]; if (newPatchI != -1) { const polyPatch& newPatch = mesh.boundaryMesh()[newPatchI]; const polyPatch& oldPatch = - fldToAdd.mesh().boundaryMesh()[patchI]; + fldToAdd.mesh().boundaryMesh()[patchi]; if (!bfld(newPatchI)) { @@ -516,7 +516,7 @@ void Foam::fvMeshAdder::MapSurfaceField newPatchI, fvsPatchField<Type>::New ( - fldToAdd.boundaryField()[patchI],// added field + fldToAdd.boundaryField()[patchi],// added field mesh.boundary()[newPatchI], // new fvPatch fld.dimensionedInternalField(), // new int. field patchMapper // mapper @@ -542,7 +542,7 @@ void Foam::fvMeshAdder::MapSurfaceField bfld[newPatchI].rmap ( - fldToAdd.boundaryField()[patchI], + fldToAdd.boundaryField()[patchi], addedToNew ); } diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index cb16af49074bf870233e82bb61e11ed07eff1cda..5488e5ef3583b9e15b08e1a0ebf1329436f28820 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -141,11 +141,11 @@ void Foam::fvMeshDistribute::printMeshInfo(const fvMesh& mesh) const fvBoundaryMesh& patches = mesh.boundary(); Pout<< "Patches:" << endl; - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI].patch(); + const polyPatch& pp = patches[patchi].patch(); - Pout<< " " << patchI << " name:" << pp.name() + Pout<< " " << patchi << " name:" << pp.name() << " size:" << pp.size() << " start:" << pp.start() << " type:" << pp.type() @@ -222,13 +222,13 @@ Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const label nonEmptyPatchI = -1; - forAllReverse(patches, patchI) + forAllReverse(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (!isA<emptyPolyPatch>(pp) && !pp.coupled()) { - nonEmptyPatchI = patchI; + nonEmptyPatchI = patchi; break; } } @@ -255,11 +255,11 @@ Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const // patches. label procPatchI = -1; - forAll(patches, patchI) + forAll(patches, patchi) { - if (isA<processorPolyPatch>(patches[patchI])) + if (isA<processorPolyPatch>(patches[patchi])) { - procPatchI = patchI; + procPatchI = patchi; } else if (procPatchI != -1) { @@ -267,7 +267,7 @@ Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const << "Processor patches should be at end of patch list." << endl << "Have processor patch " << procPatchI - << " followed by non-processor patch " << patchI + << " followed by non-processor patch " << patchi << " in patches " << patches.names() << abort(FatalError); } @@ -290,9 +290,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::deleteProcPatches label nProcPatches = 0; - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { - const polyPatch& pp = mesh_.boundaryMesh()[patchI]; + const polyPatch& pp = mesh_.boundaryMesh()[patchi]; if (isA<processorPolyPatch>(pp)) { @@ -326,21 +326,21 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::deleteProcPatches labelList oldToNew(identity(mesh_.boundaryMesh().size())); label newI = 0; // Non processor patches first - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { - if (!isA<processorPolyPatch>(mesh_.boundaryMesh()[patchI])) + if (!isA<processorPolyPatch>(mesh_.boundaryMesh()[patchi])) { - oldToNew[patchI] = newI++; + oldToNew[patchi] = newI++; } } label nNonProcPatches = newI; // Processor patches as last - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { - if (isA<processorPolyPatch>(mesh_.boundaryMesh()[patchI])) + if (isA<processorPolyPatch>(mesh_.boundaryMesh()[patchi])) { - oldToNew[patchI] = newI++; + oldToNew[patchi] = newI++; } } fvMeshTools::reorderPatches(mesh_, oldToNew, nNonProcPatches, false); @@ -363,24 +363,24 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::repatch { if (newPatchID[bFaceI] != -1) { - label faceI = mesh_.nInternalFaces() + bFaceI; + label facei = mesh_.nInternalFaces() + bFaceI; - label zoneID = mesh_.faceZones().whichZone(faceI); + label zoneID = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } meshMod.setAction ( polyModifyFace ( - mesh_.faces()[faceI], // modified face - faceI, // label of face - mesh_.faceOwner()[faceI], // owner + mesh_.faces()[facei], // modified face + facei, // label of face + mesh_.faceOwner()[facei], // owner -1, // neighbour false, // face flip newPatchID[bFaceI], // patch for face @@ -550,9 +550,9 @@ void Foam::fvMeshDistribute::getNeighbourData labelList nbrFaces(nBnd, -1); labelList nbrNewNbrProc(nBnd, -1); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { @@ -577,9 +577,9 @@ void Foam::fvMeshDistribute::getNeighbourData syncTools::swapBoundaryFaceList(mesh_, nbrNewNbrProc); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; label offset = pp.start() - mesh_.nInternalFaces(); if (isA<processorPolyPatch>(pp)) @@ -613,10 +613,10 @@ void Foam::fvMeshDistribute::getNeighbourData } - label patchI = -1; + label patchi = -1; if (isA<processorCyclicPolyPatch>(pp)) { - patchI = refCast<const processorCyclicPolyPatch> + patchi = refCast<const processorCyclicPolyPatch> ( pp ).referPatchID(); @@ -625,7 +625,7 @@ void Foam::fvMeshDistribute::getNeighbourData forAll(pp, i) { label bndI = offset + i; - sourcePatch[bndI] = patchI; + sourcePatch[bndI] = patchi; } } else if (isA<cyclicPolyPatch>(pp)) @@ -639,7 +639,7 @@ void Foam::fvMeshDistribute::getNeighbourData label bndI = offset + i; sourceFace[bndI] = pp.start()+i; sourceProc[bndI] = Pstream::myProcNo(); - sourcePatch[bndI] = patchI; + sourcePatch[bndI] = patchi; sourceNewNbrProc[bndI] = nbrNewNbrProc[bndI]; } } @@ -650,7 +650,7 @@ void Foam::fvMeshDistribute::getNeighbourData label bndI = offset + i; sourceFace[bndI] = nbrFaces[bndI]; sourceProc[bndI] = Pstream::myProcNo(); - sourcePatch[bndI] = patchI; + sourcePatch[bndI] = patchi; sourceNewNbrProc[bndI] = nbrNewNbrProc[bndI]; } } @@ -663,7 +663,7 @@ void Foam::fvMeshDistribute::getNeighbourData label bndI = offset + i; sourceFace[bndI] = -1; sourceProc[bndI] = -1; - sourcePatch[bndI] = patchI; + sourcePatch[bndI] = patchi; sourceNewNbrProc[bndI] = -1; } } @@ -1236,13 +1236,13 @@ Foam::autoPtr<Foam::fvMesh> Foam::fvMeshDistribute::receiveMesh List<polyPatch*> patches(patchEntries.size()); - forAll(patchEntries, patchI) + forAll(patchEntries, patchi) { - patches[patchI] = polyPatch::New + patches[patchi] = polyPatch::New ( - patchEntries[patchI].keyword(), - patchEntries[patchI].dict(), - patchI, + patchEntries[patchi].keyword(), + patchEntries[patchi].dict(), + patchi, domainMesh.boundaryMesh() ).ptr(); } @@ -1310,16 +1310,16 @@ Foam::labelList Foam::fvMeshDistribute::countCells ) { labelList nCells(Pstream::nProcs(), 0); - forAll(distribution, cellI) + forAll(distribution, celli) { - label newProc = distribution[cellI]; + label newProc = distribution[celli]; if (newProc < 0 || newProc >= Pstream::nProcs()) { FatalErrorInFunction << "Distribution should be in range 0.." << Pstream::nProcs()-1 << endl - << "At index " << cellI << " distribution:" << newProc + << "At index " << celli << " distribution:" << newProc << abort(FatalError); } nCells[newProc]++; @@ -1363,10 +1363,10 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute const label nOldCells(mesh_.nCells()); labelList oldPatchStarts(patches.size()); labelList oldPatchNMeshPoints(patches.size()); - forAll(patches, patchI) + forAll(patches, patchi) { - oldPatchStarts[patchI] = patches[patchI].start(); - oldPatchNMeshPoints[patchI] = patches[patchI].nPoints(); + oldPatchStarts[patchi] = patches[patchi].start(); + oldPatchNMeshPoints[patchi] = patches[patchi].nPoints(); } diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C index 87b87d0ee8a86052f5f6d1415c616c71c0726776..318c871eea2ccd6e124403c9bd7b353d29105376 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C @@ -43,12 +43,12 @@ void Foam::fvMeshDistribute::printFieldInfo(const fvMesh& mesh) //<< " value:" << fld << endl; - forAll(fld.boundaryField(), patchI) + forAll(fld.boundaryField(), patchi) { - Pout<< " " << patchI - << ' ' << fld.boundaryField()[patchI].patch().name() - << ' ' << fld.boundaryField()[patchI].type() - << ' ' << fld.boundaryField()[patchI].size() + Pout<< " " << patchi + << ' ' << fld.boundaryField()[patchi].patch().name() + << ' ' << fld.boundaryField()[patchi].type() + << ' ' << fld.boundaryField()[patchi].size() << endl; } } @@ -120,14 +120,14 @@ void Foam::fvMeshDistribute::mapBoundaryFields // Pull from old boundary field into bfld. - forAll(bfld, patchI) + forAll(bfld, patchi) { - fvsPatchField<T>& patchFld = bfld[patchI]; - label faceI = patchFld.patch().start(); + fvsPatchField<T>& patchFld = bfld[patchi]; + label facei = patchFld.patch().start(); forAll(patchFld, i) { - label oldFaceI = faceMap[faceI++]; + label oldFaceI = faceMap[facei++]; // Find patch and local patch face oldFaceI was in. forAll(oldPatchStarts, oldPatchI) @@ -164,11 +164,11 @@ void Foam::fvMeshDistribute::initPatchFields typename GeoField::GeometricBoundaryField& bfld = fld.boundaryFieldRef(); - forAll(bfld, patchI) + forAll(bfld, patchi) { - if (isA<PatchFieldType>(bfld[patchI])) + if (isA<PatchFieldType>(bfld[patchi])) { - bfld[patchI] == initVal; + bfld[patchi] == initVal; } } } diff --git a/src/dynamicMesh/fvMeshTools/fvMeshTools.C b/src/dynamicMesh/fvMeshTools/fvMeshTools.C index cab0199354b0178bd644bcfaf0d4890a6284f49c..a5d41cf6d0162445aa3f45e2f457077077f4e759 100644 --- a/src/dynamicMesh/fvMeshTools/fvMeshTools.C +++ b/src/dynamicMesh/fvMeshTools/fvMeshTools.C @@ -40,11 +40,11 @@ Foam::label Foam::fvMeshTools::addPatch polyBoundaryMesh& polyPatches = const_cast<polyBoundaryMesh&>(mesh.boundaryMesh()); - label patchI = polyPatches.findPatchID(patch.name()); - if (patchI != -1) + label patchi = polyPatches.findPatchID(patch.name()); + if (patchi != -1) { // Already there - return patchI; + return patchi; } @@ -54,13 +54,13 @@ Foam::label Foam::fvMeshTools::addPatch if (!isA<processorPolyPatch>(patch)) { - forAll(polyPatches, patchI) + forAll(polyPatches, patchi) { - const polyPatch& pp = polyPatches[patchI]; + const polyPatch& pp = polyPatches[patchi]; if (isA<processorPolyPatch>(pp)) { - insertPatchI = patchI; + insertPatchI = patchi; startFaceI = pp.start(); break; } @@ -213,60 +213,60 @@ Foam::label Foam::fvMeshTools::addPatch void Foam::fvMeshTools::setPatchFields ( fvMesh& mesh, - const label patchI, + const label patchi, const dictionary& patchFieldDict ) { - setPatchFields<volScalarField>(mesh, patchI, patchFieldDict); - setPatchFields<volVectorField>(mesh, patchI, patchFieldDict); - setPatchFields<volSphericalTensorField>(mesh, patchI, patchFieldDict); - setPatchFields<volSymmTensorField>(mesh, patchI, patchFieldDict); - setPatchFields<volTensorField>(mesh, patchI, patchFieldDict); - setPatchFields<surfaceScalarField>(mesh, patchI, patchFieldDict); - setPatchFields<surfaceVectorField>(mesh, patchI, patchFieldDict); + setPatchFields<volScalarField>(mesh, patchi, patchFieldDict); + setPatchFields<volVectorField>(mesh, patchi, patchFieldDict); + setPatchFields<volSphericalTensorField>(mesh, patchi, patchFieldDict); + setPatchFields<volSymmTensorField>(mesh, patchi, patchFieldDict); + setPatchFields<volTensorField>(mesh, patchi, patchFieldDict); + setPatchFields<surfaceScalarField>(mesh, patchi, patchFieldDict); + setPatchFields<surfaceVectorField>(mesh, patchi, patchFieldDict); setPatchFields<surfaceSphericalTensorField> ( mesh, - patchI, + patchi, patchFieldDict ); - setPatchFields<surfaceSymmTensorField>(mesh, patchI, patchFieldDict); - setPatchFields<surfaceTensorField>(mesh, patchI, patchFieldDict); + setPatchFields<surfaceSymmTensorField>(mesh, patchi, patchFieldDict); + setPatchFields<surfaceTensorField>(mesh, patchi, patchFieldDict); } -void Foam::fvMeshTools::zeroPatchFields(fvMesh& mesh, const label patchI) +void Foam::fvMeshTools::zeroPatchFields(fvMesh& mesh, const label patchi) { - setPatchFields<volScalarField>(mesh, patchI, Zero); - setPatchFields<volVectorField>(mesh, patchI, Zero); + setPatchFields<volScalarField>(mesh, patchi, Zero); + setPatchFields<volVectorField>(mesh, patchi, Zero); setPatchFields<volSphericalTensorField> ( mesh, - patchI, + patchi, Zero ); setPatchFields<volSymmTensorField> ( mesh, - patchI, + patchi, Zero ); - setPatchFields<volTensorField>(mesh, patchI, Zero); - setPatchFields<surfaceScalarField>(mesh, patchI, Zero); - setPatchFields<surfaceVectorField>(mesh, patchI, Zero); + setPatchFields<volTensorField>(mesh, patchi, Zero); + setPatchFields<surfaceScalarField>(mesh, patchi, Zero); + setPatchFields<surfaceVectorField>(mesh, patchi, Zero); setPatchFields<surfaceSphericalTensorField> ( mesh, - patchI, + patchi, Zero ); setPatchFields<surfaceSymmTensorField> ( mesh, - patchI, + patchi, Zero ); - setPatchFields<surfaceTensorField>(mesh, patchI, Zero); + setPatchFields<surfaceTensorField>(mesh, patchi, Zero); } @@ -288,9 +288,9 @@ void Foam::fvMeshTools::trimPatches(fvMesh& mesh, const label nPatches) } label nFaces = 0; - for (label patchI = nPatches; patchI < polyPatches.size(); patchI++) + for (label patchi = nPatches; patchi < polyPatches.size(); patchi++) { - nFaces += polyPatches[patchI].size(); + nFaces += polyPatches[patchi].size(); } reduce(nFaces, sumOp<label>()); diff --git a/src/dynamicMesh/fvMeshTools/fvMeshToolsTemplates.C b/src/dynamicMesh/fvMeshTools/fvMeshToolsTemplates.C index fa033a357ada85a8509257fad9aaf1c15662b4ee..b63826a0e2ed04e0c1c741a1234f950c1acd227e 100644 --- a/src/dynamicMesh/fvMeshTools/fvMeshToolsTemplates.C +++ b/src/dynamicMesh/fvMeshTools/fvMeshToolsTemplates.C @@ -88,7 +88,7 @@ template<class GeoField> void Foam::fvMeshTools::setPatchFields ( fvMesh& mesh, - const label patchI, + const label patchi, const dictionary& patchFieldDict ) { @@ -108,10 +108,10 @@ void Foam::fvMeshTools::setPatchFields { bfld.set ( - patchI, + patchi, GeoField::PatchFieldType::New ( - mesh.boundary()[patchI], + mesh.boundary()[patchi], fld.dimensionedInternalField(), patchFieldDict.subDict(fld.name()) ) @@ -127,7 +127,7 @@ template<class GeoField> void Foam::fvMeshTools::setPatchFields ( fvMesh& mesh, - const label patchI, + const label patchi, const typename GeoField::value_type& value ) { @@ -143,7 +143,7 @@ void Foam::fvMeshTools::setPatchFields typename GeoField::GeometricBoundaryField& bfld = fld.boundaryFieldRef(); - bfld[patchI] == value; + bfld[patchi] == value; } } diff --git a/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C b/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C index 085cc99079e6b008dcfbed37b8356ba2ffac28ab..dfef7b114d072a373f2c72a83e695bb4597df687 100644 --- a/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C +++ b/src/dynamicMesh/layerAdditionRemoval/addCellLayer.C @@ -163,19 +163,19 @@ void Foam::layerAdditionRemoval::addCellLayer labelList addedCells(mf.size()); - forAll(mf, faceI) + forAll(mf, facei) { - label cellI = mc[faceI]; - label zoneI = mesh.cellZones().whichZone(cellI); + label celli = mc[facei]; + label zoneI = mesh.cellZones().whichZone(celli); - addedCells[faceI] = + addedCells[facei] = ref.setAction ( polyAddCell ( -1, // master point -1, // master edge - mf[faceI], // master face + mf[facei], // master face -1, // master cell zoneI // zone for cell ) @@ -194,9 +194,9 @@ void Foam::layerAdditionRemoval::addCellLayer // owner: if the master cell is equal to the face owner the flux // remains the same; otherwise it is flipped - forAll(zoneFaces, faceI) + forAll(zoneFaces, facei) { - const face oldFace = zoneFaces[faceI].reverseFace(); + const face oldFace = zoneFaces[facei].reverseFace(); face newFace(oldFace.size()); @@ -210,8 +210,8 @@ void Foam::layerAdditionRemoval::addCellLayer // Flip the face as necessary if ( - !mesh.isInternalFace(mf[faceI]) - || mc[faceI] == nei[mf[faceI]] + !mesh.isInternalFace(mf[facei]) + || mc[facei] == nei[mf[facei]] ) { flipFaceFlux = true; @@ -223,11 +223,11 @@ void Foam::layerAdditionRemoval::addCellLayer polyAddFace ( newFace, // face - mc[faceI], // owner - addedCells[faceI], // neighbour + mc[facei], // owner + addedCells[facei], // neighbour -1, // master point -1, // master edge - mf[faceI], // master face for addition + mf[facei], // master face for addition flipFaceFlux, // flux flip -1, // patch for face -1, // zone for face @@ -238,8 +238,8 @@ void Foam::layerAdditionRemoval::addCellLayer if (debug > 1) { Pout<< "adding face: " << newFace - << " own: " << mc[faceI] - << " nei: " << addedCells[faceI] + << " own: " << mc[facei] + << " nei: " << addedCells[facei] << endl; } } @@ -250,9 +250,9 @@ void Foam::layerAdditionRemoval::addCellLayer // Pout<< "mfFlip: " << mfFlip << endl; - forAll(mf, faceI) + forAll(mf, facei) { - const label curfaceID = mf[faceI]; + const label curfaceID = mf[facei]; // If the face is internal, modify its owner to be the newly // created cell. No flip is necessary @@ -264,20 +264,20 @@ void Foam::layerAdditionRemoval::addCellLayer ( faces[curfaceID], // modified face curfaceID, // label of face being modified - addedCells[faceI], // owner + addedCells[facei], // owner -1, // neighbour false, // face flip mesh.boundaryMesh().whichPatch(curfaceID),// patch for face false, // remove from zone faceZoneID_.index(), // zone for face - mfFlip[faceI] // face flip in zone + mfFlip[facei] // face flip in zone ) ); if (debug > 1) { Pout<< "Modifying a boundary face. Face: " << curfaceID - << " flip: " << mfFlip[faceI] + << " flip: " << mfFlip[facei] << endl; } } @@ -285,7 +285,7 @@ void Foam::layerAdditionRemoval::addCellLayer // If slave cell is owner, the face remains the same (but with // a new neighbour - the newly created cell). Otherwise, the // face is flipped. - else if (sc[faceI] == own[curfaceID]) + else if (sc[facei] == own[curfaceID]) { // Orientation is good, just change neighbour ref.setAction @@ -295,12 +295,12 @@ void Foam::layerAdditionRemoval::addCellLayer faces[curfaceID], // modified face curfaceID, // label of face being modified own[curfaceID], // owner - addedCells[faceI], // neighbour + addedCells[facei], // neighbour false, // face flip mesh.boundaryMesh().whichPatch(curfaceID),// patch for face false, // remove from zone faceZoneID_.index(), // zone for face - mfFlip[faceI] // face flip in zone + mfFlip[facei] // face flip in zone ) ); @@ -308,7 +308,7 @@ void Foam::layerAdditionRemoval::addCellLayer { Pout<< "modify face, no flip " << curfaceID << " own: " << own[curfaceID] - << " nei: " << addedCells[faceI] + << " nei: " << addedCells[facei] << endl; } } @@ -322,12 +322,12 @@ void Foam::layerAdditionRemoval::addCellLayer faces[curfaceID].reverseFace(), // modified face curfaceID, // label of face being modified nei[curfaceID], // owner - addedCells[faceI], // neighbour + addedCells[facei], // neighbour true, // face flip mesh.boundaryMesh().whichPatch(curfaceID), // patch for face false, // remove from zone faceZoneID_.index(), // zone for face - !mfFlip[faceI] // face flip in zone + !mfFlip[facei] // face flip in zone ) ); @@ -335,7 +335,7 @@ void Foam::layerAdditionRemoval::addCellLayer { Pout<< "modify face, with flip " << curfaceID << " own: " << own[curfaceID] - << " nei: " << addedCells[faceI] + << " nei: " << addedCells[facei] << endl; } } @@ -422,9 +422,9 @@ void Foam::layerAdditionRemoval::addCellLayer label patchID = -1; label zoneID = -1; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - const label cf = curFaces[faceI]; + const label cf = curFaces[facei]; if (!mesh.isInternalFace(cf)) { @@ -492,16 +492,16 @@ void Foam::layerAdditionRemoval::addCellLayer const cellList& cells = mesh.cells(); - forAll(mc, cellI) + forAll(mc, celli) { - const labelList& curFaces = cells[mc[cellI]]; + const labelList& curFaces = cells[mc[celli]]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { // Check if the face belongs to the master zone; if not add it - if (zoneMesh.whichZone(curFaces[faceI]) != faceZoneID_.index()) + if (zoneMesh.whichZone(curFaces[facei]) != faceZoneID_.index()) { - masterCellFaceMap.insert(curFaces[faceI]); + masterCellFaceMap.insert(curFaces[facei]); } } } @@ -521,12 +521,12 @@ void Foam::layerAdditionRemoval::addCellLayer // Grab the list of faces of the master layer const labelList masterCellFaces = masterCellFaceMap.toc(); - forAll(masterCellFaces, faceI) + forAll(masterCellFaces, facei) { // Attempt to renumber the face using the masterLayerPointMap. // Missing point remain the same - const label curFaceID = masterCellFaces[faceI]; + const label curFaceID = masterCellFaces[facei]; const face& oldFace = faces[curFaceID]; diff --git a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C index 0ea18976a220f6b679869cf708ff24dec8ccbdc3..0e0d45cd439c4dd09d74b9c3bafd10f88e8334b2 100644 --- a/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.C +++ b/src/dynamicMesh/layerAdditionRemoval/layerAdditionRemoval.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 @@ -234,9 +234,9 @@ bool Foam::layerAdditionRemoval::changeTopology() const if (thicknessFromVolume_) { // Thickness calculated from cell volume/face area - forAll(fz, faceI) + forAll(fz, facei) { - scalar curDelta = V[mc[faceI]]/mag(S[fz[faceI]]); + scalar curDelta = V[mc[facei]]/mag(S[fz[facei]]); avgDelta += curDelta; minDelta = min(minDelta, curDelta); maxDelta = max(maxDelta, curDelta); @@ -250,9 +250,9 @@ bool Foam::layerAdditionRemoval::changeTopology() const const Map<label>& zoneMeshPointMap = fz().meshPointMap(); // Edges with only one point on zone - forAll(mc, faceI) + forAll(mc, facei) { - const cell& cFaces = mesh.cells()[mc[faceI]]; + const cell& cFaces = mesh.cells()[mc[facei]]; const edgeList cellEdges(cFaces.edges(mesh.faces())); forAll(cellEdges, i) diff --git a/src/dynamicMesh/layerAdditionRemoval/removeCellLayer.C b/src/dynamicMesh/layerAdditionRemoval/removeCellLayer.C index 5569cc876ef92778caffc921e3b2400484376c7c..f32dbfb8a08113e7f301d0ac03caa3f9fb6f3aa1 100644 --- a/src/dynamicMesh/layerAdditionRemoval/removeCellLayer.C +++ b/src/dynamicMesh/layerAdditionRemoval/removeCellLayer.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 @@ -54,12 +54,12 @@ bool Foam::layerAdditionRemoval::validCollapse() const label nBoundaryHits = 0; - forAll(mf, faceI) + forAll(mf, facei) { if ( - !mesh.isInternalFace(mf[faceI]) - && !mesh.isInternalFace(ftc[faceI]) + !mesh.isInternalFace(mf[facei]) + && !mesh.isInternalFace(ftc[facei]) ) { nBoundaryHits++; @@ -115,18 +115,18 @@ void Foam::layerAdditionRemoval::removeCellLayer const labelList& mc = mesh.faceZones()[faceZoneID_.index()].masterCells(); - forAll(mc, faceI) + forAll(mc, facei) { - label slaveSideCell = own[ftc[faceI]]; + label slaveSideCell = own[ftc[facei]]; - if (mesh.isInternalFace(ftc[faceI]) && slaveSideCell == mc[faceI]) + if (mesh.isInternalFace(ftc[facei]) && slaveSideCell == mc[facei]) { // Owner cell of the face is being removed. // Grab the neighbour instead - slaveSideCell = nei[ftc[faceI]]; + slaveSideCell = nei[ftc[facei]]; } - ref.setAction(polyRemoveCell(mc[faceI], slaveSideCell)); + ref.setAction(polyRemoveCell(mc[facei], slaveSideCell)); } // Remove all the faces from the master layer cells which are not in @@ -135,20 +135,20 @@ void Foam::layerAdditionRemoval::removeCellLayer const cellList& cells = mesh.cells(); - forAll(mc, cellI) + forAll(mc, celli) { - const cell& curCell = cells[mc[cellI]]; + const cell& curCell = cells[mc[celli]]; - forAll(curCell, faceI) + forAll(curCell, facei) { // Check if the face is in the master zone. If not, remove it if ( - mesh.faceZones().whichZone(curCell[faceI]) + mesh.faceZones().whichZone(curCell[facei]) != faceZoneID_.index() ) { - facesToRemoveMap.insert(curCell[faceI]); + facesToRemoveMap.insert(curCell[facei]); } } } @@ -192,11 +192,11 @@ void Foam::layerAdditionRemoval::removeCellLayer { const labelList& curFaces = pf[ptc[pointI]]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - if (!facesToRemoveMap.found(curFaces[faceI])) + if (!facesToRemoveMap.found(curFaces[facei])) { - facesToModify.insert(curFaces[faceI]); + facesToModify.insert(curFaces[facei]); } } } @@ -208,12 +208,12 @@ void Foam::layerAdditionRemoval::removeCellLayer Pout<< "faces to modify: " << ftm << endl; } - forAll(ftm, faceI) + forAll(ftm, facei) { // For every face to modify, copy the face and re-map the vertices. // It is known all the faces will be changed since they hang off // re-mapped vertices - label curFaceID = ftm[faceI]; + label curFaceID = ftm[facei]; face newFace(faces[curFaceID]); @@ -276,19 +276,19 @@ void Foam::layerAdditionRemoval::removeCellLayer const labelList& mf = mesh.faceZones()[faceZoneID_.index()]; const boolList& mfFlip = mesh.faceZones()[faceZoneID_.index()].flipMap(); - forAll(mf, faceI) + forAll(mf, facei) { // Grab the owner and neighbour of the faces to be collapsed and get rid // of the cell to be removed - label masterSideCell = own[mf[faceI]]; + label masterSideCell = own[mf[facei]]; - if (masterSideCell == mc[faceI]) + if (masterSideCell == mc[facei]) { - if (mesh.isInternalFace(mf[faceI])) + if (mesh.isInternalFace(mf[facei])) { // Owner cell of the face is being removed. // Grab the neighbour instead - masterSideCell = nei[mf[faceI]]; + masterSideCell = nei[mf[facei]]; } else { @@ -296,15 +296,15 @@ void Foam::layerAdditionRemoval::removeCellLayer } } - label slaveSideCell = own[ftc[faceI]]; + label slaveSideCell = own[ftc[facei]]; - if (slaveSideCell == mc[faceI]) + if (slaveSideCell == mc[facei]) { - if (mesh.isInternalFace(ftc[faceI])) + if (mesh.isInternalFace(ftc[facei])) { // Owner cell of the face is being removed. // Grab the neighbour instead - slaveSideCell = nei[ftc[faceI]]; + slaveSideCell = nei[ftc[facei]]; } else { @@ -323,23 +323,23 @@ void Foam::layerAdditionRemoval::removeCellLayer // A boundary-to-boundary collapse is checked for in validCollapse() // and cannot happen here. - if (!mesh.isInternalFace(mf[faceI])) + if (!mesh.isInternalFace(mf[facei])) { // Master is the boundary face: it gets a new owner but no flip newOwner = slaveSideCell; newNeighbour = -1; flipFace = false; - newPatchID = mesh.boundaryMesh().whichPatch(mf[faceI]); - newZoneID = mesh.faceZones().whichZone(mf[faceI]); + newPatchID = mesh.boundaryMesh().whichPatch(mf[facei]); + newZoneID = mesh.faceZones().whichZone(mf[facei]); } - else if (!mesh.isInternalFace(ftc[faceI])) + else if (!mesh.isInternalFace(ftc[facei])) { // Slave is the boundary face: grab its patch newOwner = slaveSideCell; newNeighbour = -1; // Find out if the face flip is necessary - if (own[mf[faceI]] == slaveSideCell) + if (own[mf[facei]] == slaveSideCell) { flipFace = false; } @@ -348,10 +348,10 @@ void Foam::layerAdditionRemoval::removeCellLayer flipFace = true; } - newPatchID = mesh.boundaryMesh().whichPatch(ftc[faceI]); + newPatchID = mesh.boundaryMesh().whichPatch(ftc[facei]); // The zone of the master face is preserved - newZoneID = mesh.faceZones().whichZone(mf[faceI]); + newZoneID = mesh.faceZones().whichZone(mf[facei]); } else { @@ -360,7 +360,7 @@ void Foam::layerAdditionRemoval::removeCellLayer newOwner = min(masterSideCell, slaveSideCell); newNeighbour = max(masterSideCell, slaveSideCell); - if (newOwner == own[mf[faceI]] || newNeighbour == nei[mf[faceI]]) + if (newOwner == own[mf[facei]] || newNeighbour == nei[mf[facei]]) { flipFace = false; } @@ -372,12 +372,12 @@ void Foam::layerAdditionRemoval::removeCellLayer newPatchID = -1; // The zone of the master face is preserved - newZoneID = mesh.faceZones().whichZone(mf[faceI]); + newZoneID = mesh.faceZones().whichZone(mf[facei]); } // Modify the face and flip if necessary - face newFace = faces[mf[faceI]]; - bool zoneFlip = mfFlip[faceI]; + face newFace = faces[mf[facei]]; + bool zoneFlip = mfFlip[facei]; if (flipFace) { @@ -387,15 +387,15 @@ void Foam::layerAdditionRemoval::removeCellLayer if (debug > 1) { - Pout<< "Modifying face " << mf[faceI] + Pout<< "Modifying face " << mf[facei] << " newFace: " << newFace << nl << " newOwner: " << newOwner << " newNeighbour: " << newNeighbour << " flipFace: " << flipFace << " newPatchID: " << newPatchID << " newZoneID: " << newZoneID << nl - << " oldOwn: " << own[mf[faceI]] - << " oldNei: " << nei[mf[faceI]] << endl; + << " oldOwn: " << own[mf[facei]] + << " oldNei: " << nei[mf[facei]] << endl; } ref.setAction @@ -403,7 +403,7 @@ void Foam::layerAdditionRemoval::removeCellLayer polyModifyFace ( newFace, // modified face - mf[faceI], // label of face being modified + mf[facei], // label of face being modified newOwner, // owner newNeighbour, // neighbour flipFace, // flip diff --git a/src/dynamicMesh/layerAdditionRemoval/setLayerPairing.C b/src/dynamicMesh/layerAdditionRemoval/setLayerPairing.C index c4975633f80f201bb4e1895a44ea1e599600c1cd..85ec543d28633466116deabfe255e70b9aec056d 100644 --- a/src/dynamicMesh/layerAdditionRemoval/setLayerPairing.C +++ b/src/dynamicMesh/layerAdditionRemoval/setLayerPairing.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 @@ -99,20 +99,20 @@ bool Foam::layerAdditionRemoval::setLayerPairing() const label nPointErrors = 0; label nFaceErrors = 0; - forAll(mf, faceI) + forAll(mf, facei) { // Get the local master face - face curLocalFace = mlf[faceI]; + face curLocalFace = mlf[facei]; // Flip face based on flip index to recover original orientation - if (mfFlip[faceI]) + if (mfFlip[facei]) { curLocalFace.flip(); } // Get the opposing face from the master cell oppositeFace lidFace = - cells[mc[faceI]].opposingFace(mf[faceI], faces); + cells[mc[facei]].opposingFace(mf[facei], faces); if (!lidFace.found()) { @@ -123,8 +123,8 @@ bool Foam::layerAdditionRemoval::setLayerPairing() const if (debug > 1) { - Pout<< "curMasterFace: " << faces[mf[faceI]] << nl - << "cell shape: " << mesh.cellShapes()[mc[faceI]] << nl + Pout<< "curMasterFace: " << faces[mf[facei]] << nl + << "cell shape: " << mesh.cellShapes()[mc[facei]] << nl << "curLocalFace: " << curLocalFace << nl << "lidFace: " << lidFace << " master index: " << lidFace.masterIndex() @@ -132,7 +132,7 @@ bool Foam::layerAdditionRemoval::setLayerPairing() const } // Grab the opposite face for face collapse addressing - ftc[faceI] = lidFace.oppositeIndex(); + ftc[facei] = lidFace.oppositeIndex(); // Using the local face insert the points into the lid list forAll(curLocalFace, pointI) diff --git a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C index c499fbcb5d35de7bc111834118bdc7ff36ddc48c..b797e9696177f836b5fe094e3a466ba2fc84dac3 100644 --- a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C +++ b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C @@ -117,11 +117,11 @@ Foam::label Foam::cellCuts::firstUnique void Foam::cellCuts::writeUncutOBJ ( const fileName& dir, - const label cellI + const label celli ) const { // Cell edges - OFstream cutsStream(dir / "cell_" + name(cellI) + ".obj"); + OFstream cutsStream(dir / "cell_" + name(celli) + ".obj"); Pout<< "Writing cell for time " << mesh().time().timeName() << " to " << cutsStream.name() << nl; @@ -132,16 +132,16 @@ void Foam::cellCuts::writeUncutOBJ mesh().cells(), mesh().faces(), mesh().points(), - labelList(1, cellI) + labelList(1, celli) ); // Loop cutting cell in two - OFstream cutStream(dir / "cellCuts_" + name(cellI) + ".obj"); + OFstream cutStream(dir / "cellCuts_" + name(celli) + ".obj"); Pout<< "Writing raw cuts on cell for time " << mesh().time().timeName() << " to " << cutStream.name() << nl; - const labelList& cPoints = mesh().cellPoints()[cellI]; + const labelList& cPoints = mesh().cellPoints()[celli]; forAll(cPoints, i) { @@ -154,7 +154,7 @@ void Foam::cellCuts::writeUncutOBJ const pointField& pts = mesh().points(); - const labelList& cEdges = mesh().cellEdges()[cellI]; + const labelList& cEdges = mesh().cellEdges()[celli]; forAll(cEdges, i) { @@ -175,13 +175,13 @@ void Foam::cellCuts::writeUncutOBJ void Foam::cellCuts::writeOBJ ( const fileName& dir, - const label cellI, + const label celli, const pointField& loopPoints, const labelList& anchors ) const { // Cell edges - OFstream cutsStream(dir / "cell_" + name(cellI) + ".obj"); + OFstream cutsStream(dir / "cell_" + name(celli) + ".obj"); Pout<< "Writing cell for time " << mesh().time().timeName() << " to " << cutsStream.name() << nl; @@ -192,12 +192,12 @@ void Foam::cellCuts::writeOBJ mesh().cells(), mesh().faces(), mesh().points(), - labelList(1, cellI) + labelList(1, celli) ); // Loop cutting cell in two - OFstream loopStream(dir / "cellLoop_" + name(cellI) + ".obj"); + OFstream loopStream(dir / "cellLoop_" + name(celli) + ".obj"); Pout<< "Writing loop for time " << mesh().time().timeName() << " to " << loopStream.name() << nl; @@ -208,7 +208,7 @@ void Foam::cellCuts::writeOBJ // Anchors for cell - OFstream anchorStream(dir / "anchors_" + name(cellI) + ".obj"); + OFstream anchorStream(dir / "anchors_" + name(celli) + ".obj"); Pout<< "Writing anchors for time " << mesh().time().timeName() << " to " << anchorStream.name() << endl; @@ -222,18 +222,18 @@ void Foam::cellCuts::writeOBJ Foam::label Foam::cellCuts::edgeEdgeToFace ( - const label cellI, + const label celli, const label edgeA, const label edgeB ) const { - const labelList& cFaces = mesh().cells()[cellI]; + const labelList& cFaces = mesh().cells()[celli]; forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - const labelList& fEdges = mesh().faceEdges()[faceI]; + const labelList& fEdges = mesh().faceEdges()[facei]; if ( @@ -241,7 +241,7 @@ Foam::label Foam::cellCuts::edgeEdgeToFace && findIndex(fEdges, edgeB) != -1 ) { - return faceI; + return facei; } } @@ -250,7 +250,7 @@ Foam::label Foam::cellCuts::edgeEdgeToFace WarningInFunction << "cellCuts : Cannot find face on cell " - << cellI << " that has both edges " << edgeA << ' ' << edgeB << endl + << celli << " that has both edges " << edgeA << ' ' << edgeB << endl << "faces : " << cFaces << endl << "edgeA : " << mesh().edges()[edgeA] << endl << "edgeB : " << mesh().edges()[edgeB] << endl @@ -262,20 +262,20 @@ Foam::label Foam::cellCuts::edgeEdgeToFace Foam::label Foam::cellCuts::edgeVertexToFace ( - const label cellI, + const label celli, const label edgeI, const label vertI ) const { - const labelList& cFaces = mesh().cells()[cellI]; + const labelList& cFaces = mesh().cells()[celli]; forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - const face& f = mesh().faces()[faceI]; + const face& f = mesh().faces()[facei]; - const labelList& fEdges = mesh().faceEdges()[faceI]; + const labelList& fEdges = mesh().faceEdges()[facei]; if ( @@ -283,13 +283,13 @@ Foam::label Foam::cellCuts::edgeVertexToFace && findIndex(f, vertI) != -1 ) { - return faceI; + return facei; } } WarningInFunction << "cellCuts : Cannot find face on cell " - << cellI << " that has both edge " << edgeI << " and vertex " + << celli << " that has both edge " << edgeI << " and vertex " << vertI << endl << "faces : " << cFaces << endl << "edge : " << mesh().edges()[edgeI] << endl @@ -301,18 +301,18 @@ Foam::label Foam::cellCuts::edgeVertexToFace Foam::label Foam::cellCuts::vertexVertexToFace ( - const label cellI, + const label celli, const label vertA, const label vertB ) const { - const labelList& cFaces = mesh().cells()[cellI]; + const labelList& cFaces = mesh().cells()[celli]; forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - const face& f = mesh().faces()[faceI]; + const face& f = mesh().faces()[facei]; if ( @@ -320,13 +320,13 @@ Foam::label Foam::cellCuts::vertexVertexToFace && findIndex(f, vertB) != -1 ) { - return faceI; + return facei; } } WarningInFunction << "cellCuts : Cannot find face on cell " - << cellI << " that has vertex " << vertA << " and vertex " + << celli << " that has vertex " << vertA << " and vertex " << vertB << endl << "faces : " << cFaces << endl << "Marking the loop across this cell as invalid" << endl; @@ -349,13 +349,13 @@ void Foam::cellCuts::calcFaceCuts() const faceCutsPtr_ = new labelListList(mesh().nFaces()); labelListList& faceCuts = *faceCutsPtr_; - for (label faceI = 0; faceI < mesh().nFaces(); faceI++) + for (label facei = 0; facei < mesh().nFaces(); facei++) { - const face& f = faces[faceI]; + const face& f = faces[facei]; // Big enough storage (possibly all points and all edges cut). Shrink // later on. - labelList& cuts = faceCuts[faceI]; + labelList& cuts = faceCuts[facei]; cuts.setSize(2*f.size()); @@ -380,7 +380,7 @@ void Foam::cellCuts::calcFaceCuts() const if ( !pointIsCut_[vMin1] - && !edgeIsCut_[findEdge(faceI, v0, vMin1)] + && !edgeIsCut_[findEdge(facei, v0, vMin1)] ) { cuts[cutI++] = vertToEVert(v0); @@ -400,7 +400,7 @@ void Foam::cellCuts::calcFaceCuts() const label v0 = f[fp]; label v1 = f[fp1]; - label edgeI = findEdge(faceI, v0, v1); + label edgeI = findEdge(facei, v0, v1); if (edgeIsCut_[edgeI] && !pointIsCut_[v0]) { @@ -431,7 +431,7 @@ void Foam::cellCuts::calcFaceCuts() const // inbetween label v0 = f[fp]; label v1 = f[fp1]; - label edgeI = findEdge(faceI, v0, v1); + label edgeI = findEdge(facei, v0, v1); if (pointIsCut_[v0]) { @@ -455,7 +455,7 @@ void Foam::cellCuts::calcFaceCuts() const if (allVerticesCut) { WarningInFunction - << "Face " << faceI << " vertices " << f + << "Face " << facei << " vertices " << f << " has all its vertices cut. Not cutting face." << endl; cutI = 0; @@ -473,14 +473,14 @@ void Foam::cellCuts::calcFaceCuts() const Foam::label Foam::cellCuts::findEdge ( - const label faceI, + const label facei, const label v0, const label v1 ) const { const edgeList& edges = mesh().edges(); - const labelList& fEdges = mesh().faceEdges()[faceI]; + const labelList& fEdges = mesh().faceEdges()[facei]; forAll(fEdges, i) { @@ -502,18 +502,18 @@ Foam::label Foam::cellCuts::findEdge Foam::label Foam::cellCuts::loopFace ( - const label cellI, + const label celli, const labelList& loop ) const { - const cell& cFaces = mesh().cells()[cellI]; + const cell& cFaces = mesh().cells()[celli]; forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - const labelList& fEdges = mesh().faceEdges()[faceI]; - const face& f = mesh().faces()[faceI]; + const labelList& fEdges = mesh().faceEdges()[facei]; + const face& f = mesh().faces()[facei]; bool allOnFace = true; @@ -544,7 +544,7 @@ Foam::label Foam::cellCuts::loopFace if (allOnFace) { // Found face where all elements of loop are on the face. - return faceI; + return facei; } } return -1; @@ -553,7 +553,7 @@ Foam::label Foam::cellCuts::loopFace bool Foam::cellCuts::walkPoint ( - const label cellI, + const label celli, const label startCut, const label exclude0, @@ -577,7 +577,7 @@ bool Foam::cellCuts::walkPoint ( otherFaceI != exclude0 && otherFaceI != exclude1 - && meshTools::faceOnCell(mesh(), cellI, otherFaceI) + && meshTools::faceOnCell(mesh(), celli, otherFaceI) ) { label oldNVisited = nVisited; @@ -585,7 +585,7 @@ bool Foam::cellCuts::walkPoint bool foundLoop = walkCell ( - cellI, + celli, startCut, otherFaceI, otherCut, @@ -608,9 +608,9 @@ bool Foam::cellCuts::walkPoint bool Foam::cellCuts::crossEdge ( - const label cellI, + const label celli, const label startCut, - const label faceI, + const label facei, const label otherCut, label& nVisited, @@ -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; @@ -629,7 +629,7 @@ bool Foam::cellCuts::crossEdge bool foundLoop = walkCell ( - cellI, + celli, startCut, otherFaceI, otherCut, @@ -653,7 +653,7 @@ bool Foam::cellCuts::crossEdge bool Foam::cellCuts::addCut ( - const label cellI, + const label celli, const label cut, label& nVisited, labelList& visited @@ -666,7 +666,7 @@ bool Foam::cellCuts::addCut labelList truncVisited(visited); truncVisited.setSize(nVisited); - Pout<< "For cell " << cellI << " : trying to add duplicate cut " << cut; + Pout<< "For cell " << celli << " : trying to add duplicate cut " << cut; labelList cuts(1, cut); writeCuts(Pout, cuts, loopWeights(cuts)); @@ -687,9 +687,9 @@ bool Foam::cellCuts::addCut bool Foam::cellCuts::walkFace ( - const label cellI, + const label celli, const label startCut, - const label faceI, + const label facei, const label cut, label& lastCut, @@ -698,7 +698,7 @@ bool Foam::cellCuts::walkFace labelList& visited ) const { - const labelList& fCuts = faceCuts()[faceI]; + const labelList& fCuts = faceCuts()[facei]; if (fCuts.size() < 2) { @@ -710,7 +710,7 @@ bool Foam::cellCuts::walkFace { if (fCuts[0] == cut) { - if (!addCut(cellI, cut, nVisited, visited)) + if (!addCut(celli, cut, nVisited, visited)) { return false; } @@ -722,7 +722,7 @@ bool Foam::cellCuts::walkFace } else { - if (!addCut(cellI, cut, nVisited, visited)) + if (!addCut(celli, cut, nVisited, visited)) { return false; } @@ -741,7 +741,7 @@ bool Foam::cellCuts::walkFace // Walk forward for (label i = 0; i < fCuts.size()-1; i++) { - if (!addCut(cellI, fCuts[i], nVisited, visited)) + if (!addCut(celli, fCuts[i], nVisited, visited)) { return false; } @@ -753,7 +753,7 @@ bool Foam::cellCuts::walkFace { for (label i = fCuts.size()-1; i >= 1; --i) { - if (!addCut(cellI, fCuts[i], nVisited, visited)) + if (!addCut(celli, fCuts[i], nVisited, visited)) { return false; } @@ -764,7 +764,7 @@ bool Foam::cellCuts::walkFace else { WarningInFunction - << "In middle of cut. cell:" << cellI << " face:" << faceI + << "In middle of cut. cell:" << celli << " face:" << facei << " cuts:" << fCuts << " current cut:" << cut << endl; return false; @@ -777,9 +777,9 @@ bool Foam::cellCuts::walkFace bool Foam::cellCuts::walkCell ( - const label cellI, + const label celli, const label startCut, - const label faceI, + const label facei, const label cut, label& nVisited, @@ -793,7 +793,7 @@ bool Foam::cellCuts::walkCell if (debug & 2) { - Pout<< "For cell:" << cellI << " walked across face " << faceI + Pout<< "For cell:" << celli << " walked across face " << facei << " from cut "; labelList cuts(1, cut); writeCuts(Pout, cuts, loopWeights(cuts)); @@ -802,9 +802,9 @@ bool Foam::cellCuts::walkCell bool validWalk = walkFace ( - cellI, + celli, startCut, - faceI, + facei, cut, lastCut, @@ -837,7 +837,7 @@ bool Foam::cellCuts::walkCell labelList truncVisited(visited); truncVisited.setSize(nVisited); - Pout<< "For cell " << cellI << " : found closed path:"; + Pout<< "For cell " << celli << " : found closed path:"; writeCuts(Pout, truncVisited, loopWeights(truncVisited)); Pout<< " closed by " << lastCut << endl; } @@ -873,12 +873,12 @@ bool Foam::cellCuts::walkCell { // beforeLastCut=edge, lastCut=edge. - // Cross lastCut (=edge) into face not faceI + // Cross lastCut (=edge) into face not facei return crossEdge ( - cellI, + celli, startCut, - faceI, + facei, lastCut, nVisited, visited @@ -888,12 +888,12 @@ bool Foam::cellCuts::walkCell { // beforeLastCut=edge, lastCut=vertex. - // Go from lastCut to all connected faces (except faceI) + // Go from lastCut to all connected faces (except facei) return walkPoint ( - cellI, + celli, startCut, - faceI, // exclude0: don't cross back on current face + facei, // exclude0: don't cross back on current face -1, // exclude1 lastCut, nVisited, @@ -908,9 +908,9 @@ bool Foam::cellCuts::walkCell // beforeLastCut=vertex, lastCut=edge. return crossEdge ( - cellI, + celli, startCut, - faceI, + facei, lastCut, nVisited, visited @@ -923,7 +923,7 @@ bool Foam::cellCuts::walkCell label edgeI = findEdge ( - faceI, + facei, getVertex(beforeLastCut), getVertex(lastCut) ); @@ -935,11 +935,11 @@ bool Foam::cellCuts::walkCell // sure we dont fold back on to those. label f0, f1; - meshTools::getEdgeFaces(mesh(), cellI, edgeI, f0, f1); + meshTools::getEdgeFaces(mesh(), celli, edgeI, f0, f1); return walkPoint ( - cellI, + celli, startCut, f0, f1, @@ -954,9 +954,9 @@ bool Foam::cellCuts::walkCell // Cross cut across face. return walkPoint ( - cellI, + celli, startCut, - faceI, // face to exclude + facei, // face to exclude -1, // face to exclude lastCut, nVisited, @@ -983,28 +983,28 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells) // rejection to see if cell can be cut. labelList nCutFaces(mesh().nCells(), 0); - forAll(allFaceCuts, faceI) + forAll(allFaceCuts, facei) { - const labelList& fCuts = allFaceCuts[faceI]; + const labelList& fCuts = allFaceCuts[facei]; - if (fCuts.size() == mesh().faces()[faceI].size()) + if (fCuts.size() == mesh().faces()[facei].size()) { // Too many cuts on face. WalkCell would get very upset so disable. - nCutFaces[mesh().faceOwner()[faceI]] = labelMin; + nCutFaces[mesh().faceOwner()[facei]] = labelMin; - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { - nCutFaces[mesh().faceNeighbour()[faceI]] = labelMin; + nCutFaces[mesh().faceNeighbour()[facei]] = labelMin; } } else if (fCuts.size() >= 2) { // Could be valid cut. Update count for owner and neighbour. - nCutFaces[mesh().faceOwner()[faceI]]++; + nCutFaces[mesh().faceOwner()[facei]]++; - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { - nCutFaces[mesh().faceNeighbour()[faceI]]++; + nCutFaces[mesh().faceNeighbour()[facei]]++; } } } @@ -1016,24 +1016,24 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells) forAll(cutCells, i) { - label cellI = cutCells[i]; + label celli = cutCells[i]; bool validLoop = false; // Quick rejection: has enough faces that are cut? - if (nCutFaces[cellI] >= 3) + if (nCutFaces[celli] >= 3) { - const labelList& cFaces = mesh().cells()[cellI]; + const labelList& cFaces = mesh().cells()[celli]; if (debug & 2) { - Pout<< "cell:" << cellI << " cut faces:" << endl; + Pout<< "cell:" << celli << " cut faces:" << endl; forAll(cFaces, i) { - label faceI = cFaces[i]; - const labelList& fCuts = allFaceCuts[faceI]; + label facei = cFaces[i]; + const labelList& fCuts = allFaceCuts[facei]; - Pout<< " face:" << faceI << " cuts:"; + Pout<< " face:" << facei << " cuts:"; writeCuts(Pout, fCuts, loopWeights(fCuts)); Pout<< endl; } @@ -1044,9 +1044,9 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells) // Determine the first cut face to start walking from. forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - const labelList& fCuts = allFaceCuts[faceI]; + const labelList& fCuts = allFaceCuts[facei]; // Take first or last cut of multiple on face. // Note that in calcFaceCuts @@ -1059,8 +1059,8 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells) if (debug & 2) { - Pout<< "cell:" << cellI - << " start walk at face:" << faceI + Pout<< "cell:" << celli + << " start walk at face:" << facei << " cut:"; labelList cuts(1, fCuts[0]); writeCuts(Pout, cuts, loopWeights(cuts)); @@ -1070,9 +1070,9 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells) validLoop = walkCell ( - cellI, + celli, fCuts[0], - faceI, + facei, fCuts[0], nVisited, @@ -1094,7 +1094,7 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells) // Copy nVisited elements out of visited (since visited is // never truncated for efficiency reasons) - labelList& loop = cellLoops_[cellI]; + labelList& loop = cellLoops_[celli]; loop.setSize(nVisited); @@ -1105,22 +1105,22 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells) } else { - // Invalid loop. Leave cellLoops_[cellI] zero size which + // Invalid loop. Leave cellLoops_[celli] zero size which // flags this. Pout<< "calcCellLoops(const labelList&) : did not find valid" - << " loop for cell " << cellI << endl; + << " loop for cell " << celli << endl; // Dump cell and cuts on cell. - writeUncutOBJ(".", cellI); + writeUncutOBJ(".", celli); - cellLoops_[cellI].setSize(0); + cellLoops_[celli].setSize(0); } } else { //Pout<< "calcCellLoops(const labelList&) : did not find valid" - // << " loop for cell " << cellI << " since not enough cut faces" + // << " loop for cell " << celli << " since not enough cut faces" // << endl; - cellLoops_[cellI].setSize(0); + cellLoops_[celli].setSize(0); } } } @@ -1128,7 +1128,7 @@ void Foam::cellCuts::calcCellLoops(const labelList& cutCells) void Foam::cellCuts::walkEdges ( - const label cellI, + const label celli, const label pointI, const label status, @@ -1148,7 +1148,7 @@ void Foam::cellCuts::walkEdges if ( - meshTools::edgeOnCell(mesh(), cellI, edgeI) + meshTools::edgeOnCell(mesh(), celli, edgeI) && edgeStatus.insert(edgeI, status) ) { @@ -1156,7 +1156,7 @@ void Foam::cellCuts::walkEdges label v2 = mesh().edges()[edgeI].otherVertex(pointI); - walkEdges(cellI, v2, status, edgeStatus, pointStatus); + walkEdges(celli, v2, status, edgeStatus, pointStatus); } } } @@ -1195,7 +1195,7 @@ Foam::labelList Foam::cellCuts::nonAnchorPoints bool Foam::cellCuts::loopAnchorConsistent ( - const label cellI, + const label celli, const pointField& loopPts, const labelList& anchorPoints ) const @@ -1230,7 +1230,7 @@ bool Foam::cellCuts::loopAnchorConsistent bool Foam::cellCuts::calcAnchors ( - const label cellI, + const label celli, const labelList& loop, const pointField& loopPts, @@ -1239,9 +1239,9 @@ bool Foam::cellCuts::calcAnchors { const edgeList& edges = mesh().edges(); - const labelList& cPoints = mesh().cellPoints()[cellI]; - const labelList& cEdges = mesh().cellEdges()[cellI]; - const cell& cFaces = mesh().cells()[cellI]; + const labelList& cPoints = mesh().cellPoints()[celli]; + const labelList& cEdges = mesh().cellEdges()[celli]; + const cell& cFaces = mesh().cells()[celli]; // Points on loop @@ -1286,17 +1286,17 @@ bool Foam::cellCuts::calcAnchors if (uncutIndex == -1) { WarningInFunction - << "Invalid loop " << loop << " for cell " << cellI << endl + << "Invalid loop " << loop << " for cell " << celli << endl << "Can not find point on cell which is not cut by loop." << endl; - writeOBJ(".", cellI, loopPts, labelList(0)); + writeOBJ(".", celli, loopPts, labelList(0)); return false; } // Walk unset vertices and edges and mark with 1 in pointStatus, edgeStatus - walkEdges(cellI, cPoints[uncutIndex], 1, edgeStatus, pointStatus); + walkEdges(celli, cPoints[uncutIndex], 1, edgeStatus, pointStatus); // Find new uncut starting vertex uncutIndex = firstUnique(cPoints, pointStatus); @@ -1306,18 +1306,18 @@ bool Foam::cellCuts::calcAnchors // All vertices either in loop or in anchor. So split is along single // face. WarningInFunction - << "Invalid loop " << loop << " for cell " << cellI << endl + << "Invalid loop " << loop << " for cell " << celli << endl << "All vertices of cell are either in loop or in anchor set" << endl; - writeOBJ(".", cellI, loopPts, labelList(0)); + writeOBJ(".", celli, loopPts, labelList(0)); return false; } // Walk unset vertices and edges and mark with 2. These are the // pointset 2. - walkEdges(cellI, cPoints[uncutIndex], 2, edgeStatus, pointStatus); + walkEdges(celli, cPoints[uncutIndex], 2, edgeStatus, pointStatus); // Collect both sets in lists. DynamicList<label> connectedPoints(cPoints.size()); @@ -1343,10 +1343,10 @@ bool Foam::cellCuts::calcAnchors if (uncutIndex != -1) { WarningInFunction - << "Invalid loop " << loop << " for cell " << cellI + << "Invalid loop " << loop << " for cell " << celli << " since it splits the cell into more than two cells" << endl; - writeOBJ(".", cellI, loopPts, connectedPoints); + writeOBJ(".", celli, loopPts, connectedPoints); return false; } @@ -1366,7 +1366,7 @@ bool Foam::cellCuts::calcAnchors { forAll(pFaces, pFaceI) { - if (meshTools::faceOnCell(mesh(), cellI, pFaces[pFaceI])) + if (meshTools::faceOnCell(mesh(), celli, pFaces[pFaceI])) { connectedFaces.insert(pFaces[pFaceI]); } @@ -1376,7 +1376,7 @@ bool Foam::cellCuts::calcAnchors { forAll(pFaces, pFaceI) { - if (meshTools::faceOnCell(mesh(), cellI, pFaces[pFaceI])) + if (meshTools::faceOnCell(mesh(), celli, pFaces[pFaceI])) { otherFaces.insert(pFaces[pFaceI]); } @@ -1387,11 +1387,11 @@ bool Foam::cellCuts::calcAnchors if (connectedFaces.size() < 3) { WarningInFunction - << "Invalid loop " << loop << " for cell " << cellI + << "Invalid loop " << loop << " for cell " << celli << " since would have too few faces on one side." << nl << "All faces:" << cFaces << endl; - writeOBJ(".", cellI, loopPts, connectedPoints); + writeOBJ(".", celli, loopPts, connectedPoints); return false; } @@ -1399,11 +1399,11 @@ bool Foam::cellCuts::calcAnchors if (otherFaces.size() < 3) { WarningInFunction - << "Invalid loop " << loop << " for cell " << cellI + << "Invalid loop " << loop << " for cell " << celli << " since would have too few faces on one side." << nl << "All faces:" << cFaces << endl; - writeOBJ(".", cellI, loopPts, otherPoints); + writeOBJ(".", celli, loopPts, otherPoints); return false; } @@ -1416,9 +1416,9 @@ bool Foam::cellCuts::calcAnchors { forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - const face& f = mesh().faces()[faceI]; + const face& f = mesh().faces()[facei]; bool hasSet1 = false; bool hasSet2 = false; @@ -1443,11 +1443,11 @@ bool Foam::cellCuts::calcAnchors { // Second occurence of set1. WarningInFunction - << "Invalid loop " << loop << " for cell " << cellI + << "Invalid loop " << loop << " for cell " << celli << " since face " << f << " would be split into" << " more than two faces" << endl; - writeOBJ(".", cellI, loopPts, otherPoints); + writeOBJ(".", celli, loopPts, otherPoints); return false; } @@ -1460,11 +1460,11 @@ bool Foam::cellCuts::calcAnchors { // Second occurence of set1. WarningInFunction - << "Invalid loop " << loop << " for cell " << cellI + << "Invalid loop " << loop << " for cell " << celli << " since face " << f << " would be split into" << " more than two faces" << endl; - writeOBJ(".", cellI, loopPts, otherPoints); + writeOBJ(".", celli, loopPts, otherPoints); return false; } @@ -1481,7 +1481,7 @@ bool Foam::cellCuts::calcAnchors label v1 = f.nextLabel(fp); - label edgeI = findEdge(faceI, v0, v1); + label edgeI = findEdge(facei, v0, v1); label eStat = edgeStatus[edgeI]; @@ -1498,11 +1498,11 @@ bool Foam::cellCuts::calcAnchors { // Second occurence of set1. WarningInFunction - << "Invalid loop " << loop << " for cell " << cellI + << "Invalid loop " << loop << " for cell " << celli << " since face " << f << " would be split into" << " more than two faces" << endl; - writeOBJ(".", cellI, loopPts, otherPoints); + writeOBJ(".", celli, loopPts, otherPoints); return false; } @@ -1515,11 +1515,11 @@ bool Foam::cellCuts::calcAnchors { // Second occurence of set1. WarningInFunction - << "Invalid loop " << loop << " for cell " << cellI + << "Invalid loop " << loop << " for cell " << celli << " since face " << f << " would be split into" << " more than two faces" << endl; - writeOBJ(".", cellI, loopPts, otherPoints); + writeOBJ(".", celli, loopPts, otherPoints); return false; } @@ -1535,12 +1535,12 @@ bool Foam::cellCuts::calcAnchors // Check which one of point sets to use. - bool loopOk = loopAnchorConsistent(cellI, loopPts, connectedPoints); + bool loopOk = loopAnchorConsistent(celli, loopPts, connectedPoints); //if (debug) { // Additional check: are non-anchor points on other side? - bool otherLoopOk = loopAnchorConsistent(cellI, loopPts, otherPoints); + bool otherLoopOk = loopAnchorConsistent(celli, loopPts, otherPoints); if (loopOk == otherLoopOk) { @@ -1548,7 +1548,7 @@ bool Foam::cellCuts::calcAnchors // loop normal. Oops. WarningInFunction - << " For cell:" << cellI + << " For cell:" << celli << " achorpoints and nonanchorpoints are geometrically" << " on same side!" << endl << "cellPoints:" << cPoints << endl @@ -1556,7 +1556,7 @@ bool Foam::cellCuts::calcAnchors << "anchors:" << connectedPoints << endl << "otherPoints:" << otherPoints << endl; - writeOBJ(".", cellI, loopPts, connectedPoints); + writeOBJ(".", celli, loopPts, connectedPoints); } } @@ -1651,7 +1651,7 @@ bool Foam::cellCuts::validEdgeLoop Foam::label Foam::cellCuts::countFaceCuts ( - const label faceI, + const label facei, const labelList& loop ) const { @@ -1662,7 +1662,7 @@ Foam::label Foam::cellCuts::countFaceCuts label nCuts = 0; // Count cut vertices - const face& f = mesh().faces()[faceI]; + const face& f = mesh().faces()[facei]; forAll(f, fp) { @@ -1680,7 +1680,7 @@ Foam::label Foam::cellCuts::countFaceCuts } // Count cut edges. - const labelList& fEdges = mesh().faceEdges()[faceI]; + const labelList& fEdges = mesh().faceEdges()[facei]; forAll(fEdges, fEdgeI) { @@ -1703,7 +1703,7 @@ Foam::label Foam::cellCuts::countFaceCuts bool Foam::cellCuts::conservativeValidLoop ( - const label cellI, + const label celli, const labelList& loop ) const { @@ -1794,7 +1794,7 @@ bool Foam::cellCuts::conservativeValidLoop bool Foam::cellCuts::validLoop ( - const label cellI, + const label celli, const labelList& loop, const scalarField& loopWeights, @@ -1816,7 +1816,7 @@ bool Foam::cellCuts::validLoop { // Allow as fallback the 'old' loop checking where only a single // cut per face is allowed. - if (!conservativeValidLoop(cellI, loop)) + if (!conservativeValidLoop(celli, loop)) { Info << "Invalid conservative loop: " << loop << endl; return false; @@ -1843,7 +1843,7 @@ 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) { @@ -1861,7 +1861,7 @@ 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) { @@ -1886,7 +1886,7 @@ 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) { @@ -1902,7 +1902,7 @@ 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) { @@ -1937,15 +1937,15 @@ bool Foam::cellCuts::validLoop } // Is there a face on which all cuts are? - label faceContainingLoop = loopFace(cellI, loop); + label faceContainingLoop = loopFace(celli, loop); if (faceContainingLoop != -1) { WarningInFunction - << "Found loop on cell " << cellI << " with all points" + << "Found loop on cell " << celli << " with all points" << " on face " << faceContainingLoop << endl; - //writeOBJ(".", cellI, loopPoints(loop, loopWeights), labelList(0)); + //writeOBJ(".", celli, loopPoints(loop, loopWeights), labelList(0)); return false; } @@ -1954,7 +1954,7 @@ bool Foam::cellCuts::validLoop // Final success is determined by whether anchor points can be determined. return calcAnchors ( - cellI, + celli, loop, loopPoints(loop, loopWeights), anchorPoints @@ -1971,9 +1971,9 @@ void Foam::cellCuts::setFromCellLoops() faceSplitCut_.clear(); - forAll(cellLoops_, cellI) + forAll(cellLoops_, celli) { - const labelList& loop = cellLoops_[cellI]; + const labelList& loop = cellLoops_[celli]; if (loop.size()) { @@ -1986,7 +1986,7 @@ void Foam::cellCuts::setFromCellLoops() ( !validLoop ( - cellI, + celli, loop, loopWeights(loop), faceSplitCuts, @@ -1994,21 +1994,21 @@ void Foam::cellCuts::setFromCellLoops() ) ) { - //writeOBJ(".", cellI, loopPoints(cellI), anchorPoints); + //writeOBJ(".", celli, loopPoints(celli), anchorPoints); WarningInFunction << "Illegal loop " << loop << " when recreating cut-addressing" - << " from existing cellLoops for cell " << cellI + << " from existing cellLoops for cell " << celli << endl; - cellLoops_[cellI].setSize(0); - cellAnchorPoints_[cellI].setSize(0); + cellLoops_[celli].setSize(0); + cellAnchorPoints_[celli].setSize(0); } else { // Copy anchor points. - cellAnchorPoints_[cellI].transfer(anchorPoints); + cellAnchorPoints_[celli].transfer(anchorPoints); // Copy faceSplitCuts into overall faceSplit info. forAllConstIter(Map<edge>, faceSplitCuts, iter) @@ -2048,7 +2048,7 @@ void Foam::cellCuts::setFromCellLoops() bool Foam::cellCuts::setFromCellLoop ( - const label cellI, + const label celli, const labelList& loop, const scalarField& loopWeights ) @@ -2061,7 +2061,7 @@ bool Foam::cellCuts::setFromCellLoop { OFstream str("last_cell.obj"); - str<< "# edges of cell " << cellI << nl; + str<< "# edges of cell " << celli << nl; meshTools::writeOBJ ( @@ -2069,13 +2069,13 @@ bool Foam::cellCuts::setFromCellLoop mesh().cells(), mesh().faces(), mesh().points(), - labelList(1, cellI) + labelList(1, celli) ); OFstream loopStr("last_loop.obj"); - loopStr<< "# looppoints for cell " << cellI << nl; + loopStr<< "# looppoints for cell " << celli << nl; pointField pointsOfLoop = loopPoints(loop, loopWeights); @@ -2103,13 +2103,13 @@ bool Foam::cellCuts::setFromCellLoop labelList anchorPoints; okLoop = - validLoop(cellI, loop, loopWeights, faceSplitCuts, anchorPoints); + validLoop(celli, loop, loopWeights, faceSplitCuts, anchorPoints); if (okLoop) { // Valid loop. Copy cellLoops and anchorPoints - cellLoops_[cellI] = loop; - cellAnchorPoints_[cellI].transfer(anchorPoints); + cellLoops_[celli] = loop; + cellAnchorPoints_[celli].transfer(anchorPoints); // Copy split cuts forAllConstIter(Map<edge>, faceSplitCuts, iter) @@ -2159,7 +2159,7 @@ void Foam::cellCuts::setFromCellLoops forAll(cellLabels, cellLabelI) { - label cellI = cellLabels[cellLabelI]; + label celli = cellLabels[cellLabelI]; const labelList& loop = cellLoops[cellLabelI]; @@ -2167,14 +2167,14 @@ void Foam::cellCuts::setFromCellLoops { const scalarField& loopWeights = cellLoopWeights[cellLabelI]; - if (setFromCellLoop(cellI, loop, loopWeights)) + if (setFromCellLoop(celli, loop, loopWeights)) { // Valid loop. Call above will have upated all already. } else { // Clear cellLoops - cellLoops_[cellI].setSize(0); + cellLoops_[celli].setSize(0); } } } @@ -2206,7 +2206,7 @@ void Foam::cellCuts::setFromCellCutter { const refineCell& refCell = refCells[refCellI]; - label cellI = refCell.cellNo(); + label celli = refCell.cellNo(); const vector& refDir = refCell.direction(); @@ -2216,7 +2216,7 @@ void Foam::cellCuts::setFromCellCutter cellCutter.cut ( refDir, - cellI, + celli, pointIsCut_, edgeIsCut_, @@ -2230,16 +2230,16 @@ void Foam::cellCuts::setFromCellCutter // current pattern. if (goodCut) { - if (setFromCellLoop(cellI, cellLoop, cellLoopWeights)) + if (setFromCellLoop(celli, cellLoop, cellLoopWeights)) { // Valid loop. Will have updated all info already. } else { - cellLoops_[cellI].setSize(0); + cellLoops_[celli].setSize(0); WarningInFunction - << "Found loop on cell " << cellI + << "Found loop on cell " << celli << " that resulted in an unexpected bad cut." << nl << " Suggestions:" << nl << " - Turn on the debug switch for 'cellCuts' to get" @@ -2252,7 +2252,7 @@ void Foam::cellCuts::setFromCellCutter // Discarded by validLoop if (debug) { - invalidCutCells.append(cellI); + invalidCutCells.append(celli); invalidCutLoops.append(cellLoop); invalidCutLoopWeights.append(cellLoopWeights); } @@ -2261,7 +2261,7 @@ void Foam::cellCuts::setFromCellCutter else { // Clear cellLoops - cellLoops_[cellI].setSize(0); + cellLoops_[celli].setSize(0); } } @@ -2331,14 +2331,14 @@ void Foam::cellCuts::setFromCellCutter forAll(cellLabels, i) { - label cellI = cellLabels[i]; + label celli = cellLabels[i]; // Cut cell. Determines cellLoop and cellLoopWeights bool goodCut = cellCutter.cut ( cellCutPlanes[i], - cellI, + celli, pointIsCut_, edgeIsCut_, @@ -2352,18 +2352,18 @@ void Foam::cellCuts::setFromCellCutter // current pattern. if (goodCut) { - if (setFromCellLoop(cellI, cellLoop, cellLoopWeights)) + if (setFromCellLoop(celli, cellLoop, cellLoopWeights)) { // Valid loop. Will have updated all info already. } else { - cellLoops_[cellI].setSize(0); + cellLoops_[celli].setSize(0); // Discarded by validLoop if (debug) { - invalidCutCells.append(cellI); + invalidCutCells.append(celli); invalidCutLoops.append(cellLoop); invalidCutLoopWeights.append(cellLoopWeights); } @@ -2372,7 +2372,7 @@ void Foam::cellCuts::setFromCellCutter else { // Clear cellLoops - cellLoops_[cellI].setSize(0); + cellLoops_[celli].setSize(0); } } @@ -2421,19 +2421,19 @@ void Foam::cellCuts::setFromCellCutter void Foam::cellCuts::orientPlanesAndLoops() { // Determine anchorPoints if not yet done by validLoop. - forAll(cellLoops_, cellI) + forAll(cellLoops_, celli) { - const labelList& loop = cellLoops_[cellI]; + const labelList& loop = cellLoops_[celli]; - if (loop.size() && cellAnchorPoints_[cellI].empty()) + if (loop.size() && cellAnchorPoints_[celli].empty()) { // Leave anchor points empty if illegal loop. calcAnchors ( - cellI, + celli, loop, - loopPoints(cellI), - cellAnchorPoints_[cellI] + loopPoints(celli), + cellAnchorPoints_[celli] ); } } @@ -2442,21 +2442,21 @@ void Foam::cellCuts::orientPlanesAndLoops() { Pout<< "cellAnchorPoints:" << endl; } - forAll(cellAnchorPoints_, cellI) + forAll(cellAnchorPoints_, celli) { - if (cellLoops_[cellI].size()) + if (cellLoops_[celli].size()) { - if (cellAnchorPoints_[cellI].empty()) + if (cellAnchorPoints_[celli].empty()) { FatalErrorInFunction - << "No anchor points for cut cell " << cellI << endl - << "cellLoop:" << cellLoops_[cellI] << abort(FatalError); + << "No anchor points for cut cell " << celli << endl + << "cellLoop:" << cellLoops_[celli] << abort(FatalError); } if (debug & 2) { - Pout<< " cell:" << cellI << " anchored at " - << cellAnchorPoints_[cellI] << endl; + Pout<< " cell:" << celli << " anchored at " + << cellAnchorPoints_[celli] << endl; } } } @@ -2464,9 +2464,9 @@ void Foam::cellCuts::orientPlanesAndLoops() // Calculate number of valid cellLoops nLoops_ = 0; - forAll(cellLoops_, cellI) + forAll(cellLoops_, celli) { - if (cellLoops_[cellI].size()) + if (cellLoops_[celli].size()) { nLoops_++; } @@ -2505,13 +2505,13 @@ void Foam::cellCuts::calcLoopsAndAddressing(const labelList& cutCells) if (debug & 2) { Pout<< "-- cellLoops --" << endl; - forAll(cellLoops_, cellI) + forAll(cellLoops_, celli) { - const labelList& loop = cellLoops_[cellI]; + const labelList& loop = cellLoops_[celli]; if (loop.size()) { - Pout<< "cell:" << cellI << " "; + Pout<< "cell:" << celli << " "; writeCuts(Pout, loop, loopWeights(loop)); Pout<< endl; } @@ -2561,9 +2561,9 @@ void Foam::cellCuts::check() const } // Check that all elements of cellloop are registered - forAll(cellLoops_, cellI) + forAll(cellLoops_, celli) { - const labelList& loop = cellLoops_[cellI]; + const labelList& loop = cellLoops_[celli]; forAll(loop, i) { @@ -2579,7 +2579,7 @@ void Foam::cellCuts::check() const writeCuts(Pout, cuts, loopWeights(cuts)); FatalErrorInFunction - << "cell:" << cellI << " loop:" + << "cell:" << celli << " loop:" << loop << " cut:" << cut << " is not marked as cut" << abort(FatalError); @@ -2588,16 +2588,16 @@ void Foam::cellCuts::check() const } // Check that no elements of cell loop are anchor point. - forAll(cellLoops_, cellI) + forAll(cellLoops_, celli) { - const labelList& anchors = cellAnchorPoints_[cellI]; + const labelList& anchors = cellAnchorPoints_[celli]; - const labelList& loop = cellLoops_[cellI]; + const labelList& loop = cellLoops_[celli]; if (loop.size() && anchors.empty()) { FatalErrorInFunction - << "cell:" << cellI << " loop:" << loop + << "cell:" << celli << " loop:" << loop << " has no anchor points" << abort(FatalError); } @@ -2614,7 +2614,7 @@ void Foam::cellCuts::check() const ) { FatalErrorInFunction - << "cell:" << cellI << " loop:" << loop + << "cell:" << celli << " loop:" << loop << " anchor points:" << anchors << " anchor:" << getVertex(cut) << " is part of loop" << abort(FatalError); @@ -2626,17 +2626,17 @@ void Foam::cellCuts::check() const // Check that cut faces have a neighbour that is cut. forAllConstIter(Map<edge>, faceSplitCut_, iter) { - label faceI = iter.key(); + label facei = iter.key(); - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { - label own = mesh().faceOwner()[faceI]; - label nei = mesh().faceNeighbour()[faceI]; + label own = mesh().faceOwner()[facei]; + label nei = mesh().faceNeighbour()[facei]; if (cellLoops_[own].empty() && cellLoops_[nei].empty()) { FatalErrorInFunction - << "Internal face:" << faceI << " cut by " << iter() + << "Internal face:" << facei << " cut by " << iter() << " has owner:" << own << " and neighbour:" << nei << " that are both uncut" @@ -2645,12 +2645,12 @@ void Foam::cellCuts::check() const } else { - label own = mesh().faceOwner()[faceI]; + label own = mesh().faceOwner()[facei]; if (cellLoops_[own].empty()) { FatalErrorInFunction - << "Boundary face:" << faceI << " cut by " << iter() + << "Boundary face:" << facei << " cut by " << iter() << " has owner:" << own << " that is uncut" << abort(FatalError); @@ -2930,9 +2930,9 @@ void Foam::cellCuts::clearOut() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::pointField Foam::cellCuts::loopPoints(const label cellI) const +Foam::pointField Foam::cellCuts::loopPoints(const label celli) const { - const labelList& loop = cellLoops_[cellI]; + const labelList& loop = cellLoops_[celli]; pointField loopPts(loop.size()); @@ -2955,26 +2955,26 @@ Foam::pointField Foam::cellCuts::loopPoints(const label cellI) const } -void Foam::cellCuts::flip(const label cellI) +void Foam::cellCuts::flip(const label celli) { - labelList& loop = cellLoops_[cellI]; + labelList& loop = cellLoops_[celli]; reverse(loop); // Reverse anchor point set. - cellAnchorPoints_[cellI] = + cellAnchorPoints_[celli] = nonAnchorPoints ( - mesh().cellPoints()[cellI], - cellAnchorPoints_[cellI], + mesh().cellPoints()[celli], + cellAnchorPoints_[celli], loop ); } -void Foam::cellCuts::flipLoopOnly(const label cellI) +void Foam::cellCuts::flipLoopOnly(const label celli) { - labelList& loop = cellLoops_[cellI]; + labelList& loop = cellLoops_[celli]; reverse(loop); } @@ -3011,18 +3011,18 @@ void Foam::cellCuts::writeOBJ(Ostream& os) const { label vertI = 0; - forAll(cellLoops_, cellI) + forAll(cellLoops_, celli) { - writeOBJ(os, loopPoints(cellI), vertI); + writeOBJ(os, loopPoints(celli), vertI); } } -void Foam::cellCuts::writeCellOBJ(const fileName& dir, const label cellI) const +void Foam::cellCuts::writeCellOBJ(const fileName& dir, const label celli) const { - const labelList& anchors = cellAnchorPoints_[cellI]; + const labelList& anchors = cellAnchorPoints_[celli]; - writeOBJ(dir, cellI, loopPoints(cellI), anchors); + writeOBJ(dir, celli, loopPoints(celli), anchors); } diff --git a/src/dynamicMesh/meshCut/cellCuts/cellCuts.H b/src/dynamicMesh/meshCut/cellCuts/cellCuts.H index 30b1528b22a081e8d4f2ea41f612f4c6c5de911f..d08669176bab916c76e69bc59788c44cfffffa73 100644 --- a/src/dynamicMesh/meshCut/cellCuts/cellCuts.H +++ b/src/dynamicMesh/meshCut/cellCuts/cellCuts.H @@ -182,13 +182,13 @@ class cellCuts //- Debugging: write cell's edges and any cut vertices and edges // (so no cell loop determined yet) - void writeUncutOBJ(const fileName&, const label cellI) const; + void writeUncutOBJ(const fileName&, const label celli) const; //- Debugging: write cell's edges, loop and anchors to directory. void writeOBJ ( const fileName& dir, - const label cellI, + const label celli, const pointField& loopPoints, const labelList& anchors ) const; @@ -196,7 +196,7 @@ class cellCuts //- Find face on cell using the two edges. label edgeEdgeToFace ( - const label cellI, + const label celli, const label edgeA, const label edgeB ) const; @@ -205,7 +205,7 @@ class cellCuts //- Find face on cell using an edge and a vertex. label edgeVertexToFace ( - const label cellI, + const label celli, const label edgeI, const label vertI ) const; @@ -213,7 +213,7 @@ class cellCuts //- Find face using two vertices (guaranteed not to be along edge) label vertexVertexToFace ( - const label cellI, + const label celli, const label vertA, const label vertB ) const; @@ -227,21 +227,21 @@ class cellCuts // Loop (cuts on cell circumference) calculation - //- Find edge (or -1) on faceI using vertices v0,v1 + //- Find edge (or -1) on facei using vertices v0,v1 label findEdge ( - const label faceI, + const label facei, const label v0, const label v1 ) const; //- Find face on which all cuts are (very rare) or -1. - label loopFace(const label cellI, const labelList& loop) const; + label loopFace(const label celli, const labelList& loop) const; //- Cross otherCut into next faces (not exclude0, exclude1) bool walkPoint ( - const label cellI, + const label celli, const label startCut, const label exclude0, @@ -253,12 +253,12 @@ class cellCuts labelList& visited ) const; - //- Cross cut (which is edge on faceI) onto next face + //- Cross cut (which is edge on facei) onto next face bool crossEdge ( - const label cellI, + const label celli, const label startCut, - const label faceI, + const label facei, const label otherCut, label& nVisited, @@ -269,20 +269,20 @@ class cellCuts // cuts. bool addCut ( - const label cellI, + const label celli, const label cut, label& nVisited, labelList& visited ) const; - //- Walk across faceI following cuts, starting at cut. Stores cuts + //- Walk across facei following cuts, starting at cut. Stores cuts // visited // Returns true if valid walk. bool walkFace ( - const label cellI, + const label celli, const label startCut, - const label faceI, + const label facei, const label cut, label& lastCut, @@ -296,9 +296,9 @@ class cellCuts // vertices found. bool walkCell ( - const label cellI, + const label celli, const label startCut, // overall starting cut - const label faceI, + const label facei, const label prevCut, // current cut label& nVisited, labelList& visited @@ -310,10 +310,10 @@ class cellCuts // Cell anchoring - //- Are there enough faces on anchor side of cellI? + //- Are there enough faces on anchor side of celli? bool checkFaces ( - const label cellI, + const label celli, const labelList& anchorPoints ) const; @@ -321,7 +321,7 @@ class cellCuts // marks visited edges and vertices with status. void walkEdges ( - const label cellI, + const label celli, const label pointI, const label status, @@ -332,7 +332,7 @@ class cellCuts //- Check anchor points on 'outside' of loop bool loopAnchorConsistent ( - const label cellI, + const label celli, const pointField& loopPts, const labelList& anchorPoints ) const; @@ -342,7 +342,7 @@ class cellCuts // points determined, false otherwise. bool calcAnchors ( - const label cellI, + const label celli, const labelList& loop, const pointField& loopPts, @@ -371,7 +371,7 @@ class cellCuts //- Counts number of cuts on face. label countFaceCuts ( - const label faceI, + const label facei, const labelList& loop ) const; @@ -379,7 +379,7 @@ class cellCuts // Does not use cut-addressing (faceCuts_, cutCuts_) bool conservativeValidLoop ( - const label cellI, + const label celli, const labelList& loop ) const; @@ -389,7 +389,7 @@ class cellCuts // points on one side of the loop. bool validLoop ( - const label cellI, + const label celli, const labelList& loop, const scalarField& loopWeights, Map<edge>& newFaceSplitCut, @@ -404,7 +404,7 @@ class cellCuts //- Update basic cut information for single cell from cellLoop. bool setFromCellLoop ( - const label cellI, + const label celli, const labelList& loop, const scalarField& loopWeights ); @@ -593,7 +593,7 @@ public: //- Returns coordinates of points on loop for given cell. // Uses cellLoops_ and edgeWeight_ - pointField loopPoints(const label cellI) const; + pointField loopPoints(const label celli) const; //- Invert anchor point selection. labelList nonAnchorPoints @@ -603,12 +603,12 @@ public: const labelList& loop ) const; - //- Flip loop for cellI. Updates anchor points as well. - void flip(const label cellI); + //- Flip loop for celli. Updates anchor points as well. + void flip(const label celli); - //- Flip loop for cellI. Does not update anchors. Use with care + //- Flip loop for celli. Does not update anchors. Use with care // (only if you're sure loop orientation is wrong) - void flipLoopOnly(const label cellI); + void flipLoopOnly(const label celli); // Write @@ -625,7 +625,7 @@ public: void writeOBJ(Ostream& os) const; //- debugging:Write edges of cell and loop - void writeCellOBJ(const fileName& dir, const label cellI) const; + void writeCellOBJ(const fileName& dir, const label celli) const; }; diff --git a/src/dynamicMesh/meshCut/cellLooper/cellLooper.C b/src/dynamicMesh/meshCut/cellLooper/cellLooper.C index 12dac20c0c6e7bb9498eb557a81734e9c82d2743..c7a61901cc4c8f62b5b3e91ab4cfbc37d03732f9 100644 --- a/src/dynamicMesh/meshCut/cellLooper/cellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/cellLooper.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 @@ -67,14 +67,14 @@ Foam::autoPtr<Foam::cellLooper> Foam::cellLooper::New // Get faces (on cell) connected to vertI which are not using edgeI Foam::labelList Foam::cellLooper::getVertFacesNonEdge ( - const label cellI, + const label celli, const label edgeI, const label vertI ) const { // Get faces connected to startEdge label face0, face1; - meshTools::getEdgeFaces(mesh(), cellI, edgeI, face0, face1); + meshTools::getEdgeFaces(mesh(), celli, edgeI, face0, face1); const labelList& pFaces = mesh().pointFaces()[vertI]; @@ -83,16 +83,16 @@ Foam::labelList Foam::cellLooper::getVertFacesNonEdge forAll(pFaces, pFaceI) { - label faceI = pFaces[pFaceI]; + label facei = pFaces[pFaceI]; if ( - (faceI != face0) - && (faceI != face1) - && (meshTools::faceOnCell(mesh(), cellI, faceI)) + (facei != face0) + && (facei != face1) + && (meshTools::faceOnCell(mesh(), celli, facei)) ) { - vertFaces[vertFaceI++] = faceI; + vertFaces[vertFaceI++] = facei; } } vertFaces.setSize(vertFaceI); @@ -101,14 +101,14 @@ Foam::labelList Foam::cellLooper::getVertFacesNonEdge } -// Get first edge connected to vertI and on faceI +// Get first edge connected to vertI and on facei Foam::label Foam::cellLooper::getFirstVertEdge ( - const label faceI, + const label facei, const label vertI ) const { - const labelList& fEdges = mesh().faceEdges()[faceI]; + const labelList& fEdges = mesh().faceEdges()[facei]; forAll(fEdges, fEdgeI) { @@ -123,7 +123,7 @@ Foam::label Foam::cellLooper::getFirstVertEdge } FatalErrorInFunction - << "Can not find edge on face " << faceI + << "Can not find edge on face " << facei << " using vertex " << vertI << abort(FatalError); @@ -131,15 +131,15 @@ Foam::label Foam::cellLooper::getFirstVertEdge } -// Get edges (on cell) connected to vertI which are not on faceI +// Get edges (on cell) connected to vertI which are not on facei Foam::labelList Foam::cellLooper::getVertEdgesNonFace ( - const label cellI, - const label faceI, + const label celli, + const label facei, const label vertI ) const { - const labelList& exclEdges = mesh().faceEdges()[faceI]; + const labelList& exclEdges = mesh().faceEdges()[facei]; const labelList& pEdges = mesh().pointEdges()[vertI]; @@ -153,7 +153,7 @@ Foam::labelList Foam::cellLooper::getVertEdgesNonFace if ( (findIndex(exclEdges, edgeI) == -1) - && meshTools::edgeOnCell(mesh(), cellI, edgeI) + && meshTools::edgeOnCell(mesh(), celli, edgeI) ) { vertEdges[vertEdgeI++] = edgeI; @@ -171,10 +171,10 @@ Foam::labelList Foam::cellLooper::getVertEdgesNonFace Foam::label Foam::cellLooper::getMisAlignedEdge ( const vector& refDir, - const label cellI + const label celli ) const { - const labelList& cEdges = mesh().cellEdges()[cellI]; + const labelList& cEdges = mesh().cellEdges()[celli]; label cutEdgeI = -1; scalar maxCos = -GREAT; diff --git a/src/dynamicMesh/meshCut/cellLooper/cellLooper.H b/src/dynamicMesh/meshCut/cellLooper/cellLooper.H index 9feae62ca81c47c9e637f819ec4b3938386a83b9..1f7d579c9a16ca3460a0e667f7ccae6543dd3800 100644 --- a/src/dynamicMesh/meshCut/cellLooper/cellLooper.H +++ b/src/dynamicMesh/meshCut/cellLooper/cellLooper.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 @@ -81,29 +81,29 @@ protected: //- Get faces (on cell) connected to vertI which are not using edgeI labelList getVertFacesNonEdge ( - const label cellI, + const label celli, const label edgeI, const label vertI ) const; - //- Get first edge connected to vertI and on faceI + //- Get first edge connected to vertI and on facei label getFirstVertEdge ( - const label faceI, + const label facei, const label vertI ) const; - //- Get edges (on cell) connected to vertI which are not on faceI + //- Get edges (on cell) connected to vertI which are not on facei labelList getVertEdgesNonFace ( - const label cellI, - const label faceI, + const label celli, + const label facei, const label vertI ) const; //- Return edge from cellEdges that is most perpendicular // to refinement direction. - label getMisAlignedEdge(const vector& refDir, const label cellI) const; + label getMisAlignedEdge(const vector& refDir, const label celli) const; private: @@ -166,7 +166,7 @@ public: // Member Functions - //- Create cut along circumference of cellI. Gets current mesh cuts + //- Create cut along circumference of celli. Gets current mesh cuts // vertIsCut, edgeIsCut, edgeWeight). // Cut along circumference is expressed as cellVertCut, // cellEdgeToWeight. Returns true if succesfull. Still might not @@ -175,7 +175,7 @@ public: virtual bool cut ( const vector& refDir, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, @@ -189,7 +189,7 @@ public: virtual bool cut ( const plane& cutPlane, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, diff --git a/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C b/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C index 230948a42bae2463c6f8037e8338e61e133c53cb..6e0a010cdafe1425a55bf68dc68883286bf17c3f 100644 --- a/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.C @@ -228,7 +228,7 @@ Foam::geomCellLooper::~geomCellLooper() bool Foam::geomCellLooper::cut ( const vector& refDir, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, @@ -240,8 +240,8 @@ bool Foam::geomCellLooper::cut // Cut through cell centre normal to refDir. return cut ( - plane(mesh().cellCentres()[cellI], refDir), - cellI, + plane(mesh().cellCentres()[celli], refDir), + celli, vertIsCut, edgeIsCut, edgeWeight, @@ -254,7 +254,7 @@ bool Foam::geomCellLooper::cut bool Foam::geomCellLooper::cut ( const plane& cutPlane, - const label cellI, + const label celli, const boolList&, const boolList&, const scalarField&, @@ -277,7 +277,7 @@ bool Foam::geomCellLooper::cut // might not be snapped. // Size overly big. - label nEstCuts = 2*mesh().cells()[cellI].size(); + label nEstCuts = 2*mesh().cells()[celli].size(); DynamicList<label> localLoop(nEstCuts); DynamicList<scalar> localLoopWeights(nEstCuts); @@ -286,7 +286,7 @@ bool Foam::geomCellLooper::cut // at the same time. labelHashSet checkedPoints(nEstCuts); - const labelList& cellEdges = mesh().cellEdges()[cellI]; + const labelList& cellEdges = mesh().cellEdges()[celli]; forAll(cellEdges, i) { @@ -472,7 +472,7 @@ bool Foam::geomCellLooper::cut if (debug&2) { - Pout<< "cell:" << cellI << endl; + Pout<< "cell:" << celli << endl; forAll(loop, i) { Pout<< "At angle:" << sortedAngles[i] << endl diff --git a/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.H b/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.H index bf5b7f1d651d831973d2fd9b41a82f33d8724311..022d82aec76488f8b0ce80b89911b0257806bdc1 100644 --- a/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.H +++ b/src/dynamicMesh/meshCut/cellLooper/geomCellLooper.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 @@ -154,14 +154,14 @@ public: - //- Create cut along circumference of cellI. Gets current mesh cuts. + //- Create cut along circumference of celli. Gets current mesh cuts. // Cut along circumference is expressed as loop of cuts plus weights // for cuts along edges (only valid for edge cuts). // Return true if successful cut. virtual bool cut ( const vector& refDir, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, @@ -175,7 +175,7 @@ public: virtual bool cut ( const plane& cutPlane, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, diff --git a/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.C b/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.C index e228515e7e26c823668dea2300ab99e546271ee7..382048ea024205b5d47cad27d69a2454e52cf0ff 100644 --- a/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.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 @@ -48,7 +48,7 @@ addToRunTimeSelectionTable(cellLooper, hexCellLooper, word); // Starting from cut edge start walking. bool Foam::hexCellLooper::walkHex ( - const label cellI, + const label celli, const label startFaceI, const label startEdgeI, @@ -56,7 +56,7 @@ bool Foam::hexCellLooper::walkHex scalarField& loopWeights ) const { - label faceI = startFaceI; + label facei = startFaceI; label edgeI = startEdgeI; @@ -75,12 +75,12 @@ bool Foam::hexCellLooper::walkHex loopWeights[cutI] = 0.5; cutI++; - faceI = meshTools::otherFace(mesh(), cellI, faceI, edgeI); + facei = meshTools::otherFace(mesh(), celli, facei, edgeI); const edge& e = mesh().edges()[edgeI]; // Walk two edges further - edgeI = meshTools::walkFace(mesh(), faceI, edgeI, e.end(), 2); + edgeI = meshTools::walkFace(mesh(), facei, edgeI, e.end(), 2); if (edgeI == startEdgeI) { @@ -92,7 +92,7 @@ bool Foam::hexCellLooper::walkHex // Checks. if (cutI > 4) { - Pout<< "hexCellLooper::walkHex" << "Problem : cell:" << cellI + Pout<< "hexCellLooper::walkHex" << "Problem : cell:" << celli << " collected loop:"; writeCuts(Pout, loop, loopWeights); Pout<< "loopWeights:" << loopWeights << endl; @@ -168,7 +168,7 @@ Foam::hexCellLooper::~hexCellLooper() bool Foam::hexCellLooper::cut ( const vector& refDir, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, @@ -179,29 +179,29 @@ bool Foam::hexCellLooper::cut { bool success = false; - if (mesh().cellShapes()[cellI].model() == hex_) + if (mesh().cellShapes()[celli].model() == hex_) { // Get starting edge. Note: should be compatible with way refDir is // determined. - label edgeI = meshTools::cutDirToEdge(mesh(), cellI, refDir); + label edgeI = meshTools::cutDirToEdge(mesh(), celli, refDir); // Get any face using edge label face0; label face1; - meshTools::getEdgeFaces(mesh(), cellI, edgeI, face0, face1); + meshTools::getEdgeFaces(mesh(), celli, edgeI, face0, face1); // Walk circumference of hex, cutting edges only loop.setSize(4); loopWeights.setSize(4); - success = walkHex(cellI, face0, edgeI, loop, loopWeights); + success = walkHex(celli, face0, edgeI, loop, loopWeights); } else { success = geomCellLooper::cut ( refDir, - cellI, + celli, vertIsCut, edgeIsCut, edgeWeight, @@ -216,9 +216,9 @@ bool Foam::hexCellLooper::cut if (loop.empty()) { WarningInFunction - << "could not cut cell " << cellI << endl; + << "could not cut cell " << celli << endl; - fileName cutsFile("hexCellLooper_" + name(cellI) + ".obj"); + fileName cutsFile("hexCellLooper_" + name(celli) + ".obj"); Pout<< "hexCellLooper : writing cell to " << cutsFile << endl; @@ -230,7 +230,7 @@ bool Foam::hexCellLooper::cut mesh().cells(), mesh().faces(), mesh().points(), - labelList(1, cellI) + labelList(1, celli) ); return false; @@ -273,7 +273,7 @@ bool Foam::hexCellLooper::cut bool Foam::hexCellLooper::cut ( const plane& cutPlane, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, @@ -286,7 +286,7 @@ bool Foam::hexCellLooper::cut geomCellLooper::cut ( cutPlane, - cellI, + celli, vertIsCut, edgeIsCut, edgeWeight, diff --git a/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.H b/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.H index f00a0254c2474c10609e1727647053129e8d87a6..913593561066ec8153c25ade1053307b3fd4404a 100644 --- a/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.H +++ b/src/dynamicMesh/meshCut/cellLooper/hexCellLooper.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 @@ -78,7 +78,7 @@ private: // Return true if successful walk. (should be always!) bool walkHex ( - const label cellI, + const label celli, const label startFaceI, const label startEdgeI, @@ -122,14 +122,14 @@ public: // Member Functions - //- Create cut along circumference of cellI. Gets current mesh cuts. + //- Create cut along circumference of celli. Gets current mesh cuts. // Cut along circumference is expressed as loop of cuts plus weights // for cuts along edges (only valid for edge cuts). // Return true if successful cut. virtual bool cut ( const vector& refDir, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, @@ -144,7 +144,7 @@ public: virtual bool cut ( const plane& cutPlane, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, diff --git a/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C b/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C index d93c5a2a1f878ec207e3a2aa4e58093ca086178b..b733a995eafefa7a24b406d68811fa0daa6bbde0 100644 --- a/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.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 @@ -132,7 +132,7 @@ void Foam::topoCellLooper::subsetList void Foam::topoCellLooper::walkFace ( const cellFeatures& features, - const label faceI, + const label facei, const label startEdgeI, const label startVertI, const label nFeaturePts, @@ -141,7 +141,7 @@ void Foam::topoCellLooper::walkFace label& vertI ) const { - const labelList& fEdges = mesh().faceEdges()[faceI]; + const labelList& fEdges = mesh().faceEdges()[facei]; edgeI = startEdgeI; @@ -155,17 +155,17 @@ void Foam::topoCellLooper::walkFace // Started on edge. Go to one of its endpoints. vertI = mesh().edges()[edgeI].start(); - if (features.isFeatureVertex(faceI, vertI)) + if (features.isFeatureVertex(facei, vertI)) { nVisited++; } } - if ((edgeI == -1) || !meshTools::edgeOnFace(mesh(), faceI, edgeI)) + if ((edgeI == -1) || !meshTools::edgeOnFace(mesh(), facei, edgeI)) { // Either edge is not set or not on current face. Just take one of // the edges on this face as starting edge. - edgeI = getFirstVertEdge(faceI, vertI); + edgeI = getFirstVertEdge(facei, vertI); } // Now we should have starting edge on face and a vertex on that edge. @@ -182,7 +182,7 @@ void Foam::topoCellLooper::walkFace vertI = mesh().edges()[edgeI].otherVertex(vertI); - if (features.isFeatureVertex(faceI, vertI)) + if (features.isFeatureVertex(facei, vertI)) { nVisited++; } @@ -197,12 +197,12 @@ void Foam::topoCellLooper::walkFace Foam::labelList Foam::topoCellLooper::getSuperEdge ( const cellFeatures& features, - const label faceI, + const label facei, const label startEdgeI, const label startVertI ) const { - const labelList& fEdges = mesh().faceEdges()[faceI]; + const labelList& fEdges = mesh().faceEdges()[facei]; labelList superVerts(fEdges.size()); label superVertI = 0; @@ -239,13 +239,13 @@ Foam::labelList Foam::topoCellLooper::getSuperEdge Foam::label Foam::topoCellLooper::getAlignedNonFeatureEdge ( const vector& refDir, - const label cellI, + const label celli, const cellFeatures& features ) const { - const labelList& cEdges = mesh().cellEdges()[cellI]; + const labelList& cEdges = mesh().cellEdges()[celli]; - const point& ctr = mesh().cellCentres()[cellI]; + const point& ctr = mesh().cellCentres()[celli]; label cutEdgeI = -1; scalar maxCos = -GREAT; @@ -286,7 +286,7 @@ Foam::label Foam::topoCellLooper::getAlignedNonFeatureEdge void Foam::topoCellLooper::walkAcrossFace ( const cellFeatures& features, - const label faceI, + const label facei, const label startEdgeI, const label startVertI, const label nFeats, @@ -302,7 +302,7 @@ void Foam::topoCellLooper::walkAcrossFace walkFace ( features, - faceI, + facei, startEdgeI, startVertI, nFeats, @@ -317,7 +317,7 @@ void Foam::topoCellLooper::walkAcrossFace getSuperEdge ( features, - faceI, + facei, oppositeEdgeI, oppositeVertI ); @@ -359,19 +359,19 @@ void Foam::topoCellLooper::walkAcrossFace // // Position on face is given by: // -// vertI == -1, faceI != -1, edgeI != -1 +// vertI == -1, facei != -1, edgeI != -1 // on edge of face. Cross edge to neighbouring face. // -// vertI != -1, edgeI != -1, faceI == -1 +// vertI != -1, edgeI != -1, facei == -1 // coming from edge onto vertex vertI. Need to step to one // of the faces not using edgeI. // -// vertI != -1, edgeI == -1, faceI != -1 +// vertI != -1, edgeI == -1, facei != -1 // coming from vertex on side of face. Step to one of the faces -// using vertI but not faceI +// using vertI but not facei void Foam::topoCellLooper::walkSplitHex ( - const label cellI, + const label celli, const cellFeatures& features, const label fromFaceI, const label fromEdgeI, @@ -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; @@ -390,10 +390,10 @@ void Foam::topoCellLooper::walkSplitHex { if (debug) { - Pout<< "Entering walk with : cell:" << cellI << " face:" << faceI; - if (faceI != -1) + Pout<< "Entering walk with : cell:" << celli << " face:" << facei; + if (facei != -1) { - Pout<< " verts:" << mesh().faces()[faceI]; + Pout<< " verts:" << mesh().faces()[facei]; } Pout<< " edge:" << edgeI; if (edgeI != -1) @@ -466,13 +466,13 @@ void Foam::topoCellLooper::walkSplitHex loopWeights.append(0.5); // Cross edge to next face - faceI = meshTools::otherFace(mesh(), cellI, faceI, edgeI); + facei = meshTools::otherFace(mesh(), celli, facei, edgeI); if (debug) { Pout<< " stepped across edge " << mesh().edges()[edgeI] - << " to face " << faceI << " verts:" - << mesh().faces()[faceI] << endl; + << " to face " << facei << " verts:" + << mesh().faces()[facei] << endl; } label nextEdgeI = -1; @@ -482,7 +482,7 @@ void Foam::topoCellLooper::walkSplitHex walkAcrossFace ( features, - faceI, + facei, edgeI, vertI, 2, @@ -504,11 +504,11 @@ void Foam::topoCellLooper::walkSplitHex if (edgeI == -1) { // Normal vertex on edge of face. Get edges connected to it - // which are not on faceI. + // which are not on facei. labelList nextEdges = getVertEdgesNonFace ( - cellI, - faceI, + celli, + facei, vertI ); @@ -523,11 +523,11 @@ void Foam::topoCellLooper::walkSplitHex if ( - (thisFaceI != faceI) - && meshTools::faceOnCell(mesh(), cellI, thisFaceI) + (thisFaceI != facei) + && meshTools::faceOnCell(mesh(), celli, thisFaceI) ) { - faceI = thisFaceI; + facei = thisFaceI; break; } } @@ -535,8 +535,8 @@ void Foam::topoCellLooper::walkSplitHex if (debug) { Pout<< " stepped from non-edge vertex " << vertI - << " to face " << faceI << " verts:" - << mesh().faces()[faceI] + << " to face " << facei << " verts:" + << mesh().faces()[facei] << " since candidate edges:" << nextEdges << endl; } @@ -546,7 +546,7 @@ void Foam::topoCellLooper::walkSplitHex walkAcrossFace ( features, - faceI, + facei, edgeI, vertI, 2, // 2 vertices to cross @@ -574,7 +574,7 @@ void Foam::topoCellLooper::walkSplitHex vertI = mesh().edges()[edgeI].otherVertex(vertI); - faceI = -1; + facei = -1; } else { @@ -595,7 +595,7 @@ void Foam::topoCellLooper::walkSplitHex vertI = mesh().edges()[edgeI].otherVertex(vertI); - faceI = -1; + facei = -1; } } else @@ -604,7 +604,7 @@ void Foam::topoCellLooper::walkSplitHex labelList nextFaces = getVertFacesNonEdge ( - cellI, + celli, edgeI, vertI ); @@ -612,7 +612,7 @@ void Foam::topoCellLooper::walkSplitHex if (nextFaces.size() == 1) { // Only one face to cross. - faceI = nextFaces[0]; + facei = nextFaces[0]; label nextEdgeI = -1; label nextVertI = -1; @@ -620,7 +620,7 @@ void Foam::topoCellLooper::walkSplitHex walkAcrossFace ( features, - faceI, + facei, edgeI, vertI, 2, // 2 vertices to cross @@ -635,7 +635,7 @@ void Foam::topoCellLooper::walkSplitHex else if (nextFaces.size() == 2) { // Split face. Get edge inbetween. - faceI = -1; + facei = -1; edgeI = meshTools::getSharedEdge @@ -653,17 +653,17 @@ void Foam::topoCellLooper::walkSplitHex << "Choosing from more than " << "two candidates:" << nextFaces << " when coming from vertex " << vertI << " on cell " - << cellI << abort(FatalError); + << celli << abort(FatalError); } } } if (debug) { - Pout<< "Walked to : face:" << faceI; - if (faceI != -1) + Pout<< "Walked to : face:" << facei; + if (facei != -1) { - Pout<< " verts:" << mesh().faces()[faceI]; + Pout<< " verts:" << mesh().faces()[facei]; } Pout<< " edge:" << edgeI; if (edgeI != -1) @@ -697,7 +697,7 @@ Foam::topoCellLooper::~topoCellLooper() bool Foam::topoCellLooper::cut ( const vector& refDir, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, @@ -706,14 +706,14 @@ bool Foam::topoCellLooper::cut scalarField& loopWeights ) const { - if (mesh().cellShapes()[cellI].model() == hex_) + if (mesh().cellShapes()[celli].model() == hex_) { // Let parent handle hex case. return hexCellLooper::cut ( refDir, - cellI, + celli, vertIsCut, edgeIsCut, edgeWeight, @@ -723,7 +723,7 @@ bool Foam::topoCellLooper::cut } else { - cellFeatures superCell(mesh(), featureCos, cellI); + cellFeatures superCell(mesh(), featureCos, celli); if (hexMatcher().isA(superCell.faces())) { @@ -731,13 +731,13 @@ bool Foam::topoCellLooper::cut getAlignedNonFeatureEdge ( refDir, - cellI, + celli, superCell ); label vertI = -1; - label faceI = -1; + label facei = -1; if (edgeI != -1) { @@ -748,26 +748,26 @@ bool Foam::topoCellLooper::cut { // No 'matching' non-feature edge found on cell. Get starting // normal i.e. feature edge. - edgeI = getMisAlignedEdge(refDir, cellI); + edgeI = getMisAlignedEdge(refDir, celli); // Get any face using edge label face0; label face1; - meshTools::getEdgeFaces(mesh(), cellI, edgeI, face0, face1); + meshTools::getEdgeFaces(mesh(), celli, edgeI, face0, face1); - faceI = face0; + facei = face0; } - label nEstCuts = 2*mesh().cells()[cellI].size(); + label nEstCuts = 2*mesh().cells()[celli].size(); DynamicList<label> localLoop(nEstCuts); DynamicList<scalar> localLoopWeights(nEstCuts); walkSplitHex ( - cellI, + celli, superCell, - faceI, + facei, edgeI, vertI, @@ -793,7 +793,7 @@ bool Foam::topoCellLooper::cut return hexCellLooper::cut ( refDir, - cellI, + celli, vertIsCut, edgeIsCut, edgeWeight, @@ -808,7 +808,7 @@ bool Foam::topoCellLooper::cut bool Foam::topoCellLooper::cut ( const plane& cutPlane, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, @@ -822,7 +822,7 @@ bool Foam::topoCellLooper::cut hexCellLooper::cut ( cutPlane, - cellI, + celli, vertIsCut, edgeIsCut, edgeWeight, diff --git a/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.H b/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.H index 3d983568953d00261cd40d4f87ff14072396ea1e..b053d7f690ba15ed71b8a02cdd08743ed8b76736 100644 --- a/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.H +++ b/src/dynamicMesh/meshCut/cellLooper/topoCellLooper.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 @@ -84,7 +84,7 @@ class topoCellLooper void walkFace ( const cellFeatures& features, - const label faceI, + const label facei, const label startEdgeI, const label startVertI, const label nFeaturePts, @@ -99,7 +99,7 @@ class topoCellLooper labelList getSuperEdge ( const cellFeatures& features, - const label faceI, + const label facei, const label startEdgeI, const label startVertI ) const; @@ -109,7 +109,7 @@ class topoCellLooper label getAlignedNonFeatureEdge ( const vector& refDir, - const label cellI, + const label celli, const cellFeatures& features ) const; @@ -120,7 +120,7 @@ class topoCellLooper void walkAcrossFace ( const cellFeatures& features, - const label faceI, + const label facei, const label startEdgeI, const label startVertI, const label nFeats, @@ -133,7 +133,7 @@ class topoCellLooper // outside of cell. void walkSplitHex ( - const label cellI, + const label celli, const cellFeatures& features, const label fromFaceI, const label fromEdgeI, @@ -174,14 +174,14 @@ public: // Member Functions - //- Create cut along circumference of cellI. Gets current mesh cuts. + //- Create cut along circumference of celli. Gets current mesh cuts. // Cut along circumference is expressed as loop of cuts plus weights // for cuts along edges (only valid for edge cuts). // Return true if successful cut. virtual bool cut ( const vector& refDir, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, @@ -195,7 +195,7 @@ public: virtual bool cut ( const plane& cutPlane, - const label cellI, + const label celli, const boolList& vertIsCut, const boolList& edgeIsCut, const scalarField& edgeWeight, diff --git a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.C b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.C index c1028dbfe540fe256bbd70bffb9c57880239ec7c..912132391a6b1343bf7bb2c4ada37ce6d3692a93 100644 --- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.C +++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.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 @@ -92,8 +92,8 @@ Foam::label Foam::directionInfo::lowest Foam::label Foam::directionInfo::edgeToFaceIndex ( const primitiveMesh& mesh, - const label cellI, - const label faceI, + const label celli, + const label facei, const label edgeI ) { @@ -101,19 +101,19 @@ Foam::label Foam::directionInfo::edgeToFaceIndex { FatalErrorInFunction << "Illegal edge label:" << edgeI - << " when projecting cut edge from cell " << cellI - << " to face " << faceI + << " when projecting cut edge from cell " << celli + << " to face " << facei << abort(FatalError); } const edge& e = mesh.edges()[edgeI]; - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; // edgeI is either - // - in faceI. Convert into index in face. + // - in facei. Convert into index in face. // - connected (but not in) to face. Return -1. - // - in face opposite faceI. Convert into index in face. + // - in face opposite facei. Convert into index in face. label fpA = findIndex(f, e.start()); label fpB = findIndex(f, e.end()); @@ -144,17 +144,17 @@ Foam::label Foam::directionInfo::edgeToFaceIndex // - determine two faces using edge (one is the opposite face, // one is 'side' face // - walk on both these faces to opposite edge - // - check if this opposite edge is on faceI + // - check if this opposite edge is on facei label f0I, f1I; - meshTools::getEdgeFaces(mesh, cellI, edgeI, f0I, f1I); + meshTools::getEdgeFaces(mesh, celli, edgeI, f0I, f1I); // Walk to opposite edge on face f0 label edge0I = meshTools::walkFace(mesh, f0I, edgeI, e.start(), 2); - // Check if edge on faceI. + // Check if edge on facei. const edge& e0 = mesh.edges()[edge0I]; @@ -166,14 +166,14 @@ Foam::label Foam::directionInfo::edgeToFaceIndex return lowest(f.size(), fpA, fpB); } - // Face0 is doesn't have an edge on faceI (so must be the opposite + // Face0 is doesn't have an edge on facei (so must be the opposite // face) so try face1. // Walk to opposite edge on face f1 label edge1I = meshTools::walkFace(mesh, f1I, edgeI, e.start(), 2); - // Check if edge on faceI. + // Check if edge on facei. const edge& e1 = mesh.edges()[edge1I]; fpA = findIndex(f, e1.start()); @@ -187,7 +187,7 @@ Foam::label Foam::directionInfo::edgeToFaceIndex FatalErrorInFunction << "Found connected faces " << mesh.faces()[f0I] << " and " << mesh.faces()[f1I] << " sharing edge " << edgeI << endl - << "But none seems to be connected to face " << faceI + << "But none seems to be connected to face " << facei << " vertices:" << f << abort(FatalError); diff --git a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H index 88d2493302da230b66b2a176edf16bbd46b165a0..891f5d1ea389c3ca8b986b95b5f4b3e0106c17f1 100644 --- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.H +++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfo.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 @@ -113,8 +113,8 @@ public: static label edgeToFaceIndex ( const primitiveMesh& mesh, - const label cellI, - const label faceI, + const label celli, + const label facei, const label edgeI ); diff --git a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H index d1c51df3f15fc6d66f394ab2e17320b163e9ea44..976718967054615471f71aa569c4b85386f43d2f 100644 --- a/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H +++ b/src/dynamicMesh/meshCut/directions/directionInfo/directionInfoI.H @@ -166,7 +166,7 @@ inline bool Foam::directionInfo::updateCell const edge& e = mesh.edges()[edgeI]; // Find face connected to face through edgeI and on same cell. - label faceI = + label facei = meshTools::otherFace ( mesh, @@ -175,12 +175,12 @@ inline bool Foam::directionInfo::updateCell edgeI ); - // Find edge on faceI which is connected to e.start() but not edgeI. + // Find edge on facei which is connected to e.start() but not edgeI. index_ = meshTools::otherEdge ( mesh, - mesh.faceEdges()[faceI], + mesh.faceEdges()[facei], edgeI, e.start() ); diff --git a/src/dynamicMesh/meshCut/directions/directions.C b/src/dynamicMesh/meshCut/directions/directions.C index c217f30042f54ab4d2cffea0f753f7b26833bf18..900a0deb792a5bb80f44fe089ff7f35906b5d30d 100644 --- a/src/dynamicMesh/meshCut/directions/directions.C +++ b/src/dynamicMesh/meshCut/directions/directions.C @@ -94,14 +94,14 @@ void Foam::directions::writeOBJ label vertI = 0; - forAll(dirs, cellI) + forAll(dirs, celli) { - const point& ctr = mesh.cellCentres()[cellI]; + const point& ctr = mesh.cellCentres()[celli]; // Calculate local length scale scalar minDist = GREAT; - const labelList& nbrs = mesh.cellCells()[cellI]; + const labelList& nbrs = mesh.cellCells()[celli]; forAll(nbrs, nbrI) { @@ -110,7 +110,7 @@ void Foam::directions::writeOBJ scalar scale = 0.5*minDist; - writeOBJ(xDirStream, ctr, ctr + scale*dirs[cellI], vertI); + writeOBJ(xDirStream, ctr, ctr + scale*dirs[celli], vertI); } } @@ -154,12 +154,12 @@ Foam::vectorField Foam::directions::propagateDirection { label meshFaceI = pp.start() + patchFaceI; - label cellI = mesh.faceOwner()[meshFaceI]; + label celli = mesh.faceOwner()[meshFaceI]; - if (!hexMatcher().isA(mesh, cellI)) + if (!hexMatcher().isA(mesh, celli)) { FatalErrorInFunction - << "useHexTopology specified but cell " << cellI + << "useHexTopology specified but cell " << celli << " on face " << patchFaceI << " of patch " << pp.name() << " is not a hex" << exit(FatalError); } @@ -167,14 +167,14 @@ Foam::vectorField Foam::directions::propagateDirection const vector& cutDir = ppField[patchFaceI]; // Get edge(bundle) on cell most in direction of cutdir - label edgeI = meshTools::cutDirToEdge(mesh, cellI, cutDir); + label edgeI = meshTools::cutDirToEdge(mesh, celli, cutDir); // Convert edge into index on face label faceIndex = directionInfo::edgeToFaceIndex ( mesh, - cellI, + celli, meshFaceI, edgeI ); @@ -219,26 +219,26 @@ Foam::vectorField Foam::directions::propagateDirection label nGeom = 0; label nTopo = 0; - forAll(cellInfo, cellI) + forAll(cellInfo, celli) { - label index = cellInfo[cellI].index(); + label index = cellInfo[celli].index(); if (index == -3) { // Never visited WarningInFunction - << "Cell " << cellI << " never visited to determine " + << "Cell " << celli << " never visited to determine " << "local coordinate system" << endl << "Using direction " << defaultDir << " instead" << endl; - dirField[cellI] = defaultDir; + dirField[celli] = defaultDir; nUnset++; } else if (index == -2) { // Geometric direction - dirField[cellI] = cellInfo[cellI].n(); + dirField[celli] = cellInfo[celli].n(); nGeom++; } @@ -251,7 +251,7 @@ Foam::vectorField Foam::directions::propagateDirection else { // Topological edge cut. Convert into average cut direction. - dirField[cellI] = meshTools::edgeToCutDir(mesh, cellI, index); + dirField[celli] = meshTools::edgeToCutDir(mesh, celli, index); nTopo++; } @@ -347,9 +347,9 @@ Foam::directions::directions const word patchName(patchDict.lookup("patch")); - const label patchI = mesh.boundaryMesh().findPatchID(patchName); + const label patchi = mesh.boundaryMesh().findPatchID(patchName); - if (patchI == -1) + if (patchi == -1) { FatalErrorInFunction << "Cannot find patch " @@ -358,7 +358,7 @@ Foam::directions::directions } // Take zeroth face on patch - const polyPatch& pp = mesh.boundaryMesh()[patchI]; + const polyPatch& pp = mesh.boundaryMesh()[patchi]; vector tan1(patchDict.lookup("tan1")); diff --git a/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C b/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C index a844376723ed1bd2e2524de557d8cb8a25345d49..8f8da6070ff291811ea4817c3d96bc0de310e231 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C +++ b/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.C @@ -49,7 +49,7 @@ defineTypeNameAndDebug(boundaryCutter, 0); void Foam::boundaryCutter::getFaceInfo ( - const label faceI, + const label facei, label& patchID, label& zoneID, label& zoneFlip @@ -57,12 +57,12 @@ void Foam::boundaryCutter::getFaceInfo { patchID = -1; - if (!mesh_.isInternalFace(faceI)) + if (!mesh_.isInternalFace(facei)) { - patchID = mesh_.boundaryMesh().whichPatch(faceI); + patchID = mesh_.boundaryMesh().whichPatch(facei); } - zoneID = mesh_.faceZones().whichZone(faceI); + zoneID = mesh_.faceZones().whichZone(facei); zoneFlip = false; @@ -70,7 +70,7 @@ void Foam::boundaryCutter::getFaceInfo { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } } @@ -79,13 +79,13 @@ void Foam::boundaryCutter::getFaceInfo // are not split but still might use edge that has been cut. Foam::face Foam::boundaryCutter::addEdgeCutsToFace ( - const label faceI, + const label facei, const Map<labelList>& edgeToAddedPoints ) const { const edgeList& edges = mesh_.edges(); - const face& f = mesh_.faces()[faceI]; - const labelList& fEdges = mesh_.faceEdges()[faceI]; + const face& f = mesh_.faces()[facei]; + const labelList& fEdges = mesh_.faceEdges()[facei]; // Storage for face DynamicList<label> newFace(2 * f.size()); @@ -142,18 +142,18 @@ Foam::face Foam::boundaryCutter::addEdgeCutsToFace void Foam::boundaryCutter::addFace ( - const label faceI, + const label facei, const face& newFace, - bool& modifiedFace, // have we already 'used' faceI + bool& modifiedFace, // have we already 'used' facei polyTopoChange& meshMod ) const { // Information about old face label patchID, zoneID, zoneFlip; - getFaceInfo(faceI, patchID, zoneID, zoneFlip); - label own = mesh_.faceOwner()[faceI]; - label masterPoint = mesh_.faces()[faceI][0]; + getFaceInfo(facei, patchID, zoneID, zoneFlip); + label own = mesh_.faceOwner()[facei]; + label masterPoint = mesh_.faces()[facei][0]; if (!modifiedFace) { @@ -162,7 +162,7 @@ void Foam::boundaryCutter::addFace polyModifyFace ( newFace, // face - faceI, + facei, own, // owner -1, // neighbour false, // flux flip @@ -201,15 +201,15 @@ void Foam::boundaryCutter::addFace // Splits a face using the cut edges and modified points bool Foam::boundaryCutter::splitFace ( - const label faceI, + const label facei, const Map<point>& pointToPos, const Map<labelList>& edgeToAddedPoints, polyTopoChange& meshMod ) const { const edgeList& edges = mesh_.edges(); - const face& f = mesh_.faces()[faceI]; - const labelList& fEdges = mesh_.faceEdges()[faceI]; + const face& f = mesh_.faces()[facei]; + const labelList& fEdges = mesh_.faceEdges()[facei]; // Count number of split edges and total number of splits. label nSplitEdges = 0; @@ -240,7 +240,7 @@ bool Foam::boundaryCutter::splitFace if (debug) { - Pout<< "Face:" << faceI + Pout<< "Face:" << facei << " nModPoints:" << nModPoints << " nSplitEdges:" << nSplitEdges << " nTotalSplits:" << nTotalSplits << endl; @@ -258,7 +258,7 @@ bool Foam::boundaryCutter::splitFace { // single or multiple cuts on a single edge or single modified point // Dont cut and let caller handle this. - Warning << "Face " << faceI << " has only one edge cut " << endl; + Warning << "Face " << facei << " has only one edge cut " << endl; return false; } else @@ -270,10 +270,10 @@ bool Foam::boundaryCutter::splitFace // Information about old face label patchID, zoneID, zoneFlip; - getFaceInfo(faceI, patchID, zoneID, zoneFlip); + getFaceInfo(facei, patchID, zoneID, zoneFlip); // Get face with new points on cut edges for ease of looping - face extendedFace(addEdgeCutsToFace(faceI, edgeToAddedPoints)); + face extendedFace(addEdgeCutsToFace(facei, edgeToAddedPoints)); // Find first added point. This is the starting vertex for splitting. label startFp = -1; @@ -356,7 +356,7 @@ bool Foam::boundaryCutter::splitFace tmpFace.transfer(newFace); // Add face tmpFace - addFace(faceI, tmpFace, modifiedFace, meshMod); + addFace(facei, tmpFace, modifiedFace, meshMod); // Starting point is also the starting point for the new face newFace.append(extendedFace[startFp]); @@ -374,7 +374,7 @@ bool Foam::boundaryCutter::splitFace tmpFace.transfer(newFace); // Add face tmpFace - addFace(faceI, tmpFace, modifiedFace, meshMod); + addFace(facei, tmpFace, modifiedFace, meshMod); } // Split something @@ -502,23 +502,23 @@ void Foam::boundaryCutter::setRefinement forAllConstIter(Map<point>, faceToFeaturePoint, iter) { - label faceI = iter.key(); + label facei = iter.key(); - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; - if (faceToSplit.found(faceI)) + if (faceToSplit.found(facei)) { FatalErrorInFunction - << "Face " << faceI << " vertices " << f + << "Face " << facei << " vertices " << f << " is both marked for face-centre decomposition and" << " diagonal splitting." << abort(FatalError); } - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { FatalErrorInFunction - << "Face " << faceI << " vertices " << f + << "Face " << facei << " vertices " << f << " is not an external face. Cannot split it" << abort(FatalError); } @@ -534,13 +534,13 @@ void Foam::boundaryCutter::setRefinement true // supports a cell ) ); - faceAddedPoint_.insert(faceI, addedPointI); + faceAddedPoint_.insert(facei, addedPointI); if (debug) { Pout<< "Added point " << addedPointI << " for feature point " - << iter() << " on face " << faceI << " with centre " - << mesh_.faceCentres()[faceI] << endl; + << iter() << " on face " << facei << " with centre " + << mesh_.faceCentres()[facei] << endl; } } @@ -558,18 +558,18 @@ void Foam::boundaryCutter::setRefinement // Triangulate faces containing feature points forAllConstIter(Map<label>, faceAddedPoint_, iter) { - label faceI = iter.key(); + label facei = iter.key(); // Get face with new points on cut edges. - face newFace(addEdgeCutsToFace(faceI, edgeToAddedPoints)); + face newFace(addEdgeCutsToFace(facei, edgeToAddedPoints)); label addedPointI = iter(); // Information about old face label patchID, zoneID, zoneFlip; - getFaceInfo(faceI, patchID, zoneID, zoneFlip); - label own = mesh_.faceOwner()[faceI]; - label masterPoint = mesh_.faces()[faceI][0]; + getFaceInfo(facei, patchID, zoneID, zoneFlip); + label own = mesh_.faceOwner()[facei]; + label masterPoint = mesh_.faces()[facei][0]; // Triangulate face around mid point @@ -591,7 +591,7 @@ void Foam::boundaryCutter::setRefinement polyModifyFace ( tri, // face - faceI, + facei, own, // owner -1, // neighbour false, // flux flip @@ -624,21 +624,21 @@ void Foam::boundaryCutter::setRefinement } } - faceUptodate[faceI] = true; + faceUptodate[facei] = true; } // Diagonally split faces forAllConstIter(Map<labelPair>, faceToSplit, iter) { - label faceI = iter.key(); + label facei = iter.key(); - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; - if (faceAddedPoint_.found(faceI)) + if (faceAddedPoint_.found(facei)) { FatalErrorInFunction - << "Face " << faceI << " vertices " << f + << "Face " << facei << " vertices " << f << " is both marked for face-centre decomposition and" << " diagonal splitting." << abort(FatalError); @@ -646,13 +646,13 @@ void Foam::boundaryCutter::setRefinement // Get face with new points on cut edges. - face newFace(addEdgeCutsToFace(faceI, edgeToAddedPoints)); + face newFace(addEdgeCutsToFace(facei, edgeToAddedPoints)); // Information about old face label patchID, zoneID, zoneFlip; - getFaceInfo(faceI, patchID, zoneID, zoneFlip); - label own = mesh_.faceOwner()[faceI]; - label masterPoint = mesh_.faces()[faceI][0]; + getFaceInfo(facei, patchID, zoneID, zoneFlip); + label own = mesh_.faceOwner()[facei]; + label masterPoint = mesh_.faces()[facei][0]; // Split face from one side of diagonal to other. const labelPair& diag = iter(); @@ -663,7 +663,7 @@ void Foam::boundaryCutter::setRefinement if (fp0 == -1 || fp1 == -1 || fp0 == fp1) { FatalErrorInFunction - << "Problem : Face " << faceI << " vertices " << f + << "Problem : Face " << facei << " vertices " << f << " newFace:" << newFace << " diagonal:" << f[diag[0]] << ' ' << f[diag[1]] << abort(FatalError); @@ -694,7 +694,7 @@ void Foam::boundaryCutter::setRefinement polyModifyFace ( face(newVerts.shrink()), // face - faceI, + facei, own, // owner -1, // neighbour false, // flux flip @@ -738,7 +738,7 @@ void Foam::boundaryCutter::setRefinement ) ); - faceUptodate[faceI] = true; + faceUptodate[facei] = true; } @@ -752,15 +752,15 @@ void Foam::boundaryCutter::setRefinement forAll(eFaces, i) { - label faceI = eFaces[i]; + label facei = eFaces[i]; - if (!faceUptodate[faceI] && !mesh_.isInternalFace(faceI)) + if (!faceUptodate[facei] && !mesh_.isInternalFace(facei)) { // Is external face so split - if (splitFace(faceI, pointToPos, edgeToAddedPoints, meshMod)) + if (splitFace(facei, pointToPos, edgeToAddedPoints, meshMod)) { // Successfull split - faceUptodate[faceI] = true; + faceUptodate[facei] = true; } } } @@ -778,31 +778,31 @@ void Foam::boundaryCutter::setRefinement forAll(eFaces, i) { - label faceI = eFaces[i]; + label facei = eFaces[i]; - if (!faceUptodate[faceI]) + if (!faceUptodate[facei]) { // Renumber face to include split edges. - face newFace(addEdgeCutsToFace(faceI, edgeToAddedPoints)); + face newFace(addEdgeCutsToFace(facei, edgeToAddedPoints)); - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; label nei = -1; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - nei = mesh_.faceNeighbour()[faceI]; + nei = mesh_.faceNeighbour()[facei]; } label patchID, zoneID, zoneFlip; - getFaceInfo(faceI, patchID, zoneID, zoneFlip); + getFaceInfo(facei, patchID, zoneID, zoneFlip); meshMod.setAction ( polyModifyFace ( newFace, // modified face - faceI, // label of face being modified + facei, // label of face being modified own, // owner nei, // neighbour false, // face flip @@ -813,7 +813,7 @@ void Foam::boundaryCutter::setRefinement ) ); - faceUptodate[faceI] = true; + faceUptodate[facei] = true; } } } diff --git a/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.H b/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.H index 11891488232820b3e71d139249207b3a9f61ef11..9088b04cf927bd11f098ec8a10fe27cc2e63e0e2 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.H +++ b/src/dynamicMesh/meshCut/meshModifiers/boundaryCutter/boundaryCutter.H @@ -82,31 +82,31 @@ class boundaryCutter //- Get patch and zone info for face void getFaceInfo ( - const label faceI, + const label facei, label& patchID, label& zoneID, label& zoneFlip ) const; //- Add cuts of edges to face - face addEdgeCutsToFace(const label faceI, const Map<labelList>&) const; + face addEdgeCutsToFace(const label facei, const Map<labelList>&) const; //- Splits faces with multiple cut edges. Return true if anything split. bool splitFace ( - const label faceI, + const label facei, const Map<point>& pointToPos, const Map<labelList>& edgeToAddedPoints, polyTopoChange& meshMod ) const; - //- Add/modify faceI for new vertices. + //- Add/modify facei for new vertices. void addFace ( - const label faceI, + const label facei, const face& newFace, - bool& modifiedFace, // have we already 'used' faceI? + bool& modifiedFace, // have we already 'used' facei? polyTopoChange& meshMod ) const; diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C index 4aa9b2f99daa81928b20c340570a543c7a5fb832..5ad14f24ddd4f314c8ba603c06c1216246d716cc 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C +++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.C @@ -97,11 +97,11 @@ Foam::label Foam::meshCutAndRemove::findCutCell { forAll(cellLabels, labelI) { - label cellI = cellLabels[labelI]; + label celli = cellLabels[labelI]; - if (cuts.cellLoops()[cellI].size()) + if (cuts.cellLoops()[celli].size()) { - return cellI; + return celli; } } return -1; @@ -121,9 +121,9 @@ Foam::label Foam::meshCutAndRemove::findInternalFacePoint forAll(pFaces, pFaceI) { - label faceI = pFaces[pFaceI]; + label facei = pFaces[pFaceI]; - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { return pointI; } @@ -174,7 +174,7 @@ void Foam::meshCutAndRemove::faceCells ( const cellCuts& cuts, const label exposedPatchI, - const label faceI, + const label facei, label& own, label& nei, label& patchID @@ -183,9 +183,9 @@ void Foam::meshCutAndRemove::faceCells const labelListList& anchorPts = cuts.cellAnchorPoints(); const labelListList& cellLoops = cuts.cellLoops(); - const face& f = mesh().faces()[faceI]; + const face& f = mesh().faces()[facei]; - own = mesh().faceOwner()[faceI]; + own = mesh().faceOwner()[facei]; if (cellLoops[own].size() && firstCommon(f, anchorPts[own]) == -1) { @@ -195,9 +195,9 @@ void Foam::meshCutAndRemove::faceCells nei = -1; - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { - nei = mesh().faceNeighbour()[faceI]; + nei = mesh().faceNeighbour()[facei]; if (cellLoops[nei].size() && firstCommon(f, anchorPts[nei]) == -1) { @@ -205,7 +205,7 @@ void Foam::meshCutAndRemove::faceCells } } - patchID = mesh().boundaryMesh().whichPatch(faceI); + patchID = mesh().boundaryMesh().whichPatch(facei); if (patchID == -1 && (own == -1 || nei == -1)) { @@ -217,12 +217,12 @@ void Foam::meshCutAndRemove::faceCells void Foam::meshCutAndRemove::getZoneInfo ( - const label faceI, + const label facei, label& zoneID, bool& zoneFlip ) const { - zoneID = mesh().faceZones().whichZone(faceI); + zoneID = mesh().faceZones().whichZone(facei); zoneFlip = false; @@ -230,7 +230,7 @@ void Foam::meshCutAndRemove::getZoneInfo { const faceZone& fZone = mesh().faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } } @@ -238,7 +238,7 @@ void Foam::meshCutAndRemove::getZoneInfo void Foam::meshCutAndRemove::addFace ( polyTopoChange& meshMod, - const label faceI, + const label facei, const label masterPointI, const face& newFace, const label own, @@ -249,7 +249,7 @@ void Foam::meshCutAndRemove::addFace label zoneID; bool zoneFlip; - getZoneInfo(faceI, zoneID, zoneFlip); + getZoneInfo(facei, zoneID, zoneFlip); if ((nei == -1) || (own != -1 && own < nei)) { @@ -318,11 +318,11 @@ void Foam::meshCutAndRemove::addFace } -// Modifies existing faceI for either new owner/neighbour or new face points. +// Modifies existing facei for either new owner/neighbour or new face points. void Foam::meshCutAndRemove::modFace ( polyTopoChange& meshMod, - const label faceI, + const label facei, const face& newFace, const label own, const label nei, @@ -332,22 +332,22 @@ void Foam::meshCutAndRemove::modFace label zoneID; bool zoneFlip; - getZoneInfo(faceI, zoneID, zoneFlip); + getZoneInfo(facei, zoneID, zoneFlip); if ( - (own != mesh().faceOwner()[faceI]) + (own != mesh().faceOwner()[facei]) || ( - mesh().isInternalFace(faceI) - && (nei != mesh().faceNeighbour()[faceI]) + mesh().isInternalFace(facei) + && (nei != mesh().faceNeighbour()[facei]) ) - || (newFace != mesh().faces()[faceI]) + || (newFace != mesh().faces()[facei]) ) { if (debug & 2) { - Pout<< "Modifying face " << faceI - << " old vertices:" << mesh().faces()[faceI] + Pout<< "Modifying face " << facei + << " old vertices:" << mesh().faces()[facei] << " new vertices:" << newFace << " new owner:" << own << " new neighbour:" << nei @@ -364,7 +364,7 @@ void Foam::meshCutAndRemove::modFace polyModifyFace ( newFace, // modified face - faceI, // label of face being modified + facei, // label of face being modified own, // owner nei, // neighbour false, // face flip @@ -382,7 +382,7 @@ void Foam::meshCutAndRemove::modFace polyModifyFace ( newFace.reverseFace(), // modified face - faceI, // label of face being modified + facei, // label of face being modified nei, // owner own, // neighbour false, // face flip @@ -463,9 +463,9 @@ void Foam::meshCutAndRemove::splitFace } -Foam::face Foam::meshCutAndRemove::addEdgeCutsToFace(const label faceI) const +Foam::face Foam::meshCutAndRemove::addEdgeCutsToFace(const label facei) const { - const face& f = mesh().faces()[faceI]; + const face& f = mesh().faces()[facei]; face newFace(2 * f.size()); @@ -495,12 +495,12 @@ Foam::face Foam::meshCutAndRemove::addEdgeCutsToFace(const label faceI) const } -// Walk loop (loop of cuts) across circumference of cellI. Returns face in +// Walk loop (loop of cuts) across circumference of celli. Returns face in // new vertices. // Note: tricky bit is that it can use existing edges which have been split. Foam::face Foam::meshCutAndRemove::loopToFace ( - const label cellI, + const label celli, const labelList& loop ) const { @@ -664,9 +664,9 @@ void Foam::meshCutAndRemove::setRefinement { boolList usedPoint(mesh().nPoints(), false); - forAll(cellLoops, cellI) + forAll(cellLoops, celli) { - const labelList& loop = cellLoops[cellI]; + const labelList& loop = cellLoops[celli]; if (loop.size()) { @@ -681,7 +681,7 @@ void Foam::meshCutAndRemove::setRefinement } } - const labelList& anchors = anchorPts[cellI]; + const labelList& anchors = anchorPts[celli]; forAll(anchors, i) { @@ -691,7 +691,7 @@ void Foam::meshCutAndRemove::setRefinement else { // Cell is not cut so use all its points - const labelList& cPoints = mesh().cellPoints()[cellI]; + const labelList& cPoints = mesh().cellPoints()[celli]; forAll(cPoints, i) { @@ -767,17 +767,17 @@ void Foam::meshCutAndRemove::setRefinement // For all cut cells add an internal or external face // - forAll(cellLoops, cellI) + forAll(cellLoops, celli) { - const labelList& loop = cellLoops[cellI]; + const labelList& loop = cellLoops[celli]; if (loop.size()) { - if (cutPatch[cellI] < 0 || cutPatch[cellI] >= patches.size()) + if (cutPatch[celli] < 0 || cutPatch[celli] >= patches.size()) { FatalErrorInFunction - << "Illegal patch " << cutPatch[cellI] - << " provided for cut cell " << cellI + << "Illegal patch " << cutPatch[celli] + << " provided for cut cell " << celli << abort(FatalError); } @@ -785,7 +785,7 @@ void Foam::meshCutAndRemove::setRefinement // Convert loop (=list of cuts) into proper face. // cellCuts sets orientation is towards anchor side so reverse. // - face newFace(loopToFace(cellI, loop)); + face newFace(loopToFace(celli, loop)); reverse(newFace); @@ -798,26 +798,26 @@ void Foam::meshCutAndRemove::setRefinement polyAddFace ( newFace, // face - cellI, // owner + celli, // owner -1, // neighbour masterPointI, // master point -1, // master edge -1, // master face for addition false, // flux flip - cutPatch[cellI], // patch for face + cutPatch[celli], // patch for face -1, // zone for face false // face zone flip ) ); - addedFaces_.insert(cellI, addedFaceI); + addedFaces_.insert(celli, addedFaceI); if (debug & 2) { Pout<< "Added splitting face " << newFace << " index:" << addedFaceI << " from masterPoint:" << masterPointI - << " to owner " << cellI << " with anchors:" - << anchorPts[cellI] + << " to owner " << celli << " with anchors:" + << anchorPts[celli] << " from Loop:"; // Gets edgeweights of loop @@ -854,10 +854,10 @@ void Foam::meshCutAndRemove::setRefinement forAllConstIter(Map<edge>, faceSplitCuts, iter) { - label faceI = iter.key(); + label facei = iter.key(); // Renumber face to include split edges. - face newFace(addEdgeCutsToFace(faceI)); + face newFace(addEdgeCutsToFace(facei)); // Edge splitting the face. Convert edge to new vertex numbering. const edge& splitEdge = iter(); @@ -891,18 +891,18 @@ void Foam::meshCutAndRemove::setRefinement face f0, f1; splitFace(newFace, v0, v1, f0, f1); - label own = mesh().faceOwner()[faceI]; + label own = mesh().faceOwner()[facei]; label nei = -1; - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { - nei = mesh().faceNeighbour()[faceI]; + nei = mesh().faceNeighbour()[facei]; } if (debug & 2) { - Pout<< "Split face " << mesh().faces()[faceI] + Pout<< "Split face " << mesh().faces()[facei] << " own:" << own << " nei:" << nei << " into f0:" << f0 << " and f1:" << f1 << endl; @@ -919,7 +919,7 @@ void Foam::meshCutAndRemove::setRefinement // The face f gets split into two parts, f0 and f1. // Each of these can have a different owner and or neighbour. - const face& f = mesh().faces()[faceI]; + const face& f = mesh().faces()[facei]; label f0Own = -1; label f1Own = -1; @@ -1023,7 +1023,7 @@ void Foam::meshCutAndRemove::setRefinement // If faces were internal but now become external set a patch. // If they were external already keep the patch. - label patchID = patches.whichPatch(faceI); + label patchID = patches.whichPatch(facei); if (patchID == -1) { @@ -1031,8 +1031,8 @@ void Foam::meshCutAndRemove::setRefinement } - // Do as much as possible by modifying faceI. Delay any remove - // face. Keep track of whether faceI has been used. + // Do as much as possible by modifying facei. Delay any remove + // face. Keep track of whether facei has been used. bool modifiedFaceI = false; @@ -1041,7 +1041,7 @@ void Foam::meshCutAndRemove::setRefinement if (f0Nei != -1) { // f0 becomes external face (note:modFace will reverse face) - modFace(meshMod, faceI, f0, f0Own, f0Nei, patchID); + modFace(meshMod, facei, f0, f0Own, f0Nei, patchID); modifiedFaceI = true; } } @@ -1050,13 +1050,13 @@ void Foam::meshCutAndRemove::setRefinement if (f0Nei == -1) { // f0 becomes external face - modFace(meshMod, faceI, f0, f0Own, f0Nei, patchID); + modFace(meshMod, facei, f0, f0Own, f0Nei, patchID); modifiedFaceI = true; } else { // f0 stays internal face. - modFace(meshMod, faceI, f0, f0Own, f0Nei, -1); + modFace(meshMod, facei, f0, f0Own, f0Nei, -1); modifiedFaceI = true; } } @@ -1075,7 +1075,7 @@ void Foam::meshCutAndRemove::setRefinement // f1 becomes external face (note:modFace will reverse face) if (!modifiedFaceI) { - modFace(meshMod, faceI, f1, f1Own, f1Nei, patchID); + modFace(meshMod, facei, f1, f1Own, f1Nei, patchID); modifiedFaceI = true; } else @@ -1085,7 +1085,7 @@ void Foam::meshCutAndRemove::setRefinement addFace ( meshMod, - faceI, // face for zone info + facei, // face for zone info masterPointI, // inflation point f1, // vertices of face f1Own, @@ -1102,7 +1102,7 @@ void Foam::meshCutAndRemove::setRefinement // f1 becomes external face if (!modifiedFaceI) { - modFace(meshMod, faceI, f1, f1Own, f1Nei, patchID); + modFace(meshMod, facei, f1, f1Own, f1Nei, patchID); modifiedFaceI = true; } else @@ -1112,7 +1112,7 @@ void Foam::meshCutAndRemove::setRefinement addFace ( meshMod, - faceI, + facei, masterPointI, f1, f1Own, @@ -1126,29 +1126,29 @@ void Foam::meshCutAndRemove::setRefinement // f1 is internal face. if (!modifiedFaceI) { - modFace(meshMod, faceI, f1, f1Own, f1Nei, -1); + modFace(meshMod, facei, f1, f1Own, f1Nei, -1); modifiedFaceI = true; } else { label masterPointI = findPatchFacePoint(f1, -1); - addFace(meshMod, faceI, masterPointI, f1, f1Own, f1Nei, -1); + addFace(meshMod, facei, masterPointI, f1, f1Own, f1Nei, -1); } } } if (f0Own == -1 && f0Nei == -1 && !modifiedFaceI) { - meshMod.setAction(polyRemoveFace(faceI)); + meshMod.setAction(polyRemoveFace(facei)); if (debug & 2) { - Pout<< "Removed face " << faceI << endl; + Pout<< "Removed face " << facei << endl; } } - faceUptodate[faceI] = true; + faceUptodate[facei] = true; } @@ -1167,44 +1167,44 @@ void Foam::meshCutAndRemove::setRefinement forAll(eFaces, i) { - label faceI = eFaces[i]; + label facei = eFaces[i]; - if (!faceUptodate[faceI]) + if (!faceUptodate[facei]) { // So the face has not been split itself (i.e. its owner // or neighbour have not been split) so it only // borders by edge a cell which has been split. - // Get (new or original) owner and neighbour of faceI + // 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) { - meshMod.setAction(polyRemoveFace(faceI)); + meshMod.setAction(polyRemoveFace(facei)); if (debug & 2) { - Pout<< "Removed face " << faceI << endl; + Pout<< "Removed face " << facei << endl; } } else { // Renumber face to include split edges. - face newFace(addEdgeCutsToFace(faceI)); + face newFace(addEdgeCutsToFace(facei)); if (debug & 2) { - Pout<< "Added edge cuts to face " << faceI - << " f:" << mesh().faces()[faceI] + Pout<< "Added edge cuts to face " << facei + << " f:" << mesh().faces()[facei] << " newFace:" << newFace << endl; } modFace ( meshMod, - faceI, + facei, newFace, own, nei, @@ -1212,7 +1212,7 @@ void Foam::meshCutAndRemove::setRefinement ); } - faceUptodate[faceI] = true; + faceUptodate[facei] = true; } } } @@ -1227,29 +1227,29 @@ void Foam::meshCutAndRemove::setRefinement const faceList& faces = mesh().faces(); - forAll(faces, faceI) + forAll(faces, facei) { - if (!faceUptodate[faceI]) + if (!faceUptodate[facei]) { - // Get (new or original) owner and neighbour of faceI + // 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) { - meshMod.setAction(polyRemoveFace(faceI)); + meshMod.setAction(polyRemoveFace(facei)); if (debug & 2) { - Pout<< "Removed face " << faceI << endl; + Pout<< "Removed face " << facei << endl; } } else { - modFace(meshMod, faceI, faces[faceI], own, nei, patchID); + modFace(meshMod, facei, faces[facei], own, nei, patchID); } - faceUptodate[faceI] = true; + faceUptodate[facei] = true; } } @@ -1272,8 +1272,8 @@ void Foam::meshCutAndRemove::updateMesh(const mapPolyMesh& map) forAllConstIter(Map<label>, addedFaces_, iter) { - label cellI = iter.key(); - label newCellI = map.reverseCellMap()[cellI]; + label celli = iter.key(); + label newCellI = map.reverseCellMap()[celli]; label addedFaceI = iter(); @@ -1284,11 +1284,11 @@ void Foam::meshCutAndRemove::updateMesh(const mapPolyMesh& map) if ( (debug & 2) - && (newCellI != cellI || newAddedFaceI != addedFaceI) + && (newCellI != celli || newAddedFaceI != addedFaceI) ) { Pout<< "meshCutAndRemove::updateMesh :" - << " updating addedFace for cell " << cellI + << " updating addedFace for cell " << celli << " from " << addedFaceI << " to " << newAddedFaceI << endl; diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.H b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.H index 571349c17e59ad6c985c8076870aec1fa8004074..bf9e5c0105553ad19d9d731000444d3cd2ab29ec 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.H +++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutAndRemove/meshCutAndRemove.H @@ -102,7 +102,7 @@ class meshCutAndRemove ( const cellCuts& cuts, const label exposedPatchI, - const label faceI, + const label facei, label& own, label& nei, label& patchID @@ -111,7 +111,7 @@ class meshCutAndRemove //- Get zone information for face. void getZoneInfo ( - const label faceI, + const label facei, label& zoneID, bool& zoneFlip ) const; @@ -120,7 +120,7 @@ class meshCutAndRemove void addFace ( polyTopoChange& meshMod, - const label faceI, + const label facei, const label masterPointI, const face& newFace, const label owner, @@ -128,13 +128,13 @@ class meshCutAndRemove const label patchID ); - //- Modifies existing faceI for either new owner/neighbour or + //- Modifies existing facei for either new owner/neighbour or // new face points. Checks if anything changed and flips face // if owner>neighbour void modFace ( polyTopoChange& meshMod, - const label faceI, + const label facei, const face& newFace, const label owner, const label neighbour, @@ -164,12 +164,12 @@ class meshCutAndRemove ) const; //- Add cuts of edges to face - face addEdgeCutsToFace(const label faceI) const; + face addEdgeCutsToFace(const label facei) const; //- Convert loop of cuts into face. face loopToFace ( - const label cellI, + const label celli, const labelList& loop ) const; diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C index a57bfe72f5ec815c127c0e92b03829c9da3ef3aa..7636eeed96452e50c8e8288f5c44048a4da0ec26 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C +++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.C @@ -88,11 +88,11 @@ Foam::label Foam::meshCutter::findCutCell { forAll(cellLabels, labelI) { - label cellI = cellLabels[labelI]; + label celli = cellLabels[labelI]; - if (cuts.cellLoops()[cellI].size()) + if (cuts.cellLoops()[celli].size()) { - return cellI; + return celli; } } return -1; @@ -112,9 +112,9 @@ Foam::label Foam::meshCutter::findInternalFacePoint forAll(pFaces, pFaceI) { - label faceI = pFaces[pFaceI]; + label facei = pFaces[pFaceI]; - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { return pointI; } @@ -134,7 +134,7 @@ Foam::label Foam::meshCutter::findInternalFacePoint void Foam::meshCutter::faceCells ( const cellCuts& cuts, - const label faceI, + const label facei, label& own, label& nei ) const @@ -142,9 +142,9 @@ void Foam::meshCutter::faceCells const labelListList& anchorPts = cuts.cellAnchorPoints(); const labelListList& cellLoops = cuts.cellLoops(); - const face& f = mesh().faces()[faceI]; + const face& f = mesh().faces()[facei]; - own = mesh().faceOwner()[faceI]; + own = mesh().faceOwner()[facei]; if (cellLoops[own].size() && uses(f, anchorPts[own])) { @@ -153,9 +153,9 @@ void Foam::meshCutter::faceCells nei = -1; - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { - nei = mesh().faceNeighbour()[faceI]; + nei = mesh().faceNeighbour()[facei]; if (cellLoops[nei].size() && uses(f, anchorPts[nei])) { @@ -167,7 +167,7 @@ void Foam::meshCutter::faceCells void Foam::meshCutter::getFaceInfo ( - const label faceI, + const label facei, label& patchID, label& zoneID, label& zoneFlip @@ -175,12 +175,12 @@ void Foam::meshCutter::getFaceInfo { patchID = -1; - if (!mesh().isInternalFace(faceI)) + if (!mesh().isInternalFace(facei)) { - patchID = mesh().boundaryMesh().whichPatch(faceI); + patchID = mesh().boundaryMesh().whichPatch(facei); } - zoneID = mesh().faceZones().whichZone(faceI); + zoneID = mesh().faceZones().whichZone(facei); zoneFlip = false; @@ -188,7 +188,7 @@ void Foam::meshCutter::getFaceInfo { const faceZone& fZone = mesh().faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } } @@ -196,7 +196,7 @@ void Foam::meshCutter::getFaceInfo void Foam::meshCutter::addFace ( polyTopoChange& meshMod, - const label faceI, + const label facei, const face& newFace, const label own, const label nei @@ -204,7 +204,7 @@ void Foam::meshCutter::addFace { label patchID, zoneID, zoneFlip; - getFaceInfo(faceI, patchID, zoneID, zoneFlip); + getFaceInfo(facei, patchID, zoneID, zoneFlip); if ((nei == -1) || (own < nei)) { @@ -229,7 +229,7 @@ void Foam::meshCutter::addFace nei, // neighbour -1, // master point -1, // master edge - faceI, // master face for addition + facei, // master face for addition false, // flux flip patchID, // patch for face zoneID, // zone for face @@ -260,7 +260,7 @@ void Foam::meshCutter::addFace own, // neighbour -1, // master point -1, // master edge - faceI, // master face for addition + facei, // master face for addition false, // flux flip patchID, // patch for face zoneID, // zone for face @@ -274,7 +274,7 @@ void Foam::meshCutter::addFace void Foam::meshCutter::modFace ( polyTopoChange& meshMod, - const label faceI, + const label facei, const face& newFace, const label own, const label nei @@ -282,22 +282,22 @@ void Foam::meshCutter::modFace { label patchID, zoneID, zoneFlip; - getFaceInfo(faceI, patchID, zoneID, zoneFlip); + getFaceInfo(facei, patchID, zoneID, zoneFlip); if ( - (own != mesh().faceOwner()[faceI]) + (own != mesh().faceOwner()[facei]) || ( - mesh().isInternalFace(faceI) - && (nei != mesh().faceNeighbour()[faceI]) + mesh().isInternalFace(facei) + && (nei != mesh().faceNeighbour()[facei]) ) - || (newFace != mesh().faces()[faceI]) + || (newFace != mesh().faces()[facei]) ) { if (debug & 2) { - Pout<< "Modifying face " << faceI - << " old vertices:" << mesh().faces()[faceI] + Pout<< "Modifying face " << facei + << " old vertices:" << mesh().faces()[facei] << " new vertices:" << newFace << " new owner:" << own << " new neighbour:" << nei @@ -313,7 +313,7 @@ void Foam::meshCutter::modFace polyModifyFace ( newFace, // modified face - faceI, // label of face being modified + facei, // label of face being modified own, // owner nei, // neighbour false, // face flip @@ -331,7 +331,7 @@ void Foam::meshCutter::modFace polyModifyFace ( newFace.reverseFace(), // modified face - faceI, // label of face being modified + facei, // label of face being modified nei, // owner own, // neighbour false, // face flip @@ -408,9 +408,9 @@ void Foam::meshCutter::splitFace } -Foam::face Foam::meshCutter::addEdgeCutsToFace(const label faceI) const +Foam::face Foam::meshCutter::addEdgeCutsToFace(const label facei) const { - const face& f = mesh().faces()[faceI]; + const face& f = mesh().faces()[facei]; face newFace(2 * f.size()); @@ -442,7 +442,7 @@ Foam::face Foam::meshCutter::addEdgeCutsToFace(const label faceI) const Foam::face Foam::meshCutter::loopToFace ( - const label cellI, + const label celli, const labelList& loop ) const { @@ -602,9 +602,9 @@ void Foam::meshCutter::setRefinement // Add cells (on 'anchor' side of cell) // - forAll(cellLoops, cellI) + forAll(cellLoops, celli) { - if (cellLoops[cellI].size()) + if (cellLoops[celli].size()) { // Add a cell to the existing cell label addedCellI = @@ -615,17 +615,17 @@ void Foam::meshCutter::setRefinement -1, // master point -1, // master edge -1, // master face - cellI, // master cell - mesh().cellZones().whichZone(cellI) // zone for cell + celli, // master cell + mesh().cellZones().whichZone(celli) // zone for cell ) ); - addedCells_.insert(cellI, addedCellI); + addedCells_.insert(celli, addedCellI); if (debug & 2) { - Pout<< "Added cell " << addedCells_[cellI] << " to cell " - << cellI << endl; + Pout<< "Added cell " << addedCells_[celli] << " to cell " + << celli << endl; } } } @@ -635,19 +635,19 @@ void Foam::meshCutter::setRefinement // For all cut cells add an internal face // - forAll(cellLoops, cellI) + forAll(cellLoops, celli) { - const labelList& loop = cellLoops[cellI]; + const labelList& loop = cellLoops[celli]; if (loop.size()) { // Convert loop (=list of cuts) into proper face. // Orientation should already be ok. (done by cellCuts) // - face newFace(loopToFace(cellI, loop)); + face newFace(loopToFace(celli, loop)); // Pick any anchor point on cell - label masterPointI = findInternalFacePoint(anchorPts[cellI]); + label masterPointI = findInternalFacePoint(anchorPts[celli]); label addedFaceI = meshMod.setAction @@ -655,8 +655,8 @@ void Foam::meshCutter::setRefinement polyAddFace ( newFace, // face - cellI, // owner - addedCells_[cellI], // neighbour + celli, // owner + addedCells_[celli], // neighbour masterPointI, // master point -1, // master edge -1, // master face for addition @@ -667,7 +667,7 @@ void Foam::meshCutter::setRefinement ) ); - addedFaces_.insert(cellI, addedFaceI); + addedFaces_.insert(celli, addedFaceI); if (debug & 2) { @@ -687,8 +687,8 @@ void Foam::meshCutter::setRefinement Pout<< "Added splitting face " << newFace << " index:" << addedFaceI - << " to owner " << cellI - << " neighbour " << addedCells_[cellI] + << " to owner " << celli + << " neighbour " << addedCells_[celli] << " from Loop:"; writeCuts(Pout, loop, weights); Pout<< endl; @@ -710,10 +710,10 @@ void Foam::meshCutter::setRefinement forAllConstIter(Map<edge>, faceSplitCuts, iter) { - label faceI = iter.key(); + label facei = iter.key(); // Renumber face to include split edges. - face newFace(addEdgeCutsToFace(faceI)); + face newFace(addEdgeCutsToFace(facei)); // Edge splitting the face. Convert cuts to new vertex numbering. const edge& splitEdge = iter(); @@ -747,18 +747,18 @@ void Foam::meshCutter::setRefinement face f0, f1; splitFace(newFace, v0, v1, f0, f1); - label own = mesh().faceOwner()[faceI]; + label own = mesh().faceOwner()[facei]; label nei = -1; - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { - nei = mesh().faceNeighbour()[faceI]; + nei = mesh().faceNeighbour()[facei]; } if (debug & 2) { - Pout<< "Split face " << mesh().faces()[faceI] + Pout<< "Split face " << mesh().faces()[facei] << " own:" << own << " nei:" << nei << " into f0:" << f0 << " and f1:" << f1 << endl; @@ -772,7 +772,7 @@ void Foam::meshCutter::setRefinement // the one that cuts it (this face cut might not be the one splitting // the cell) - const face& f = mesh().faces()[faceI]; + const face& f = mesh().faces()[facei]; label f0Owner = -1; label f1Owner = -1; @@ -859,11 +859,11 @@ void Foam::meshCutter::setRefinement } // f0 is the added face, f1 the modified one - addFace(meshMod, faceI, f0, f0Owner, f0Neighbour); + addFace(meshMod, facei, f0, f0Owner, f0Neighbour); - modFace(meshMod, faceI, f1, f1Owner, f1Neighbour); + modFace(meshMod, facei, f1, f1Owner, f1Neighbour); - faceUptodate[faceI] = true; + faceUptodate[facei] = true; } @@ -882,27 +882,27 @@ void Foam::meshCutter::setRefinement forAll(eFaces, i) { - label faceI = eFaces[i]; + label facei = eFaces[i]; - if (!faceUptodate[faceI]) + if (!faceUptodate[facei]) { // Renumber face to include split edges. - face newFace(addEdgeCutsToFace(faceI)); + face newFace(addEdgeCutsToFace(facei)); if (debug & 2) { - Pout<< "Added edge cuts to face " << faceI - << " f:" << mesh().faces()[faceI] + Pout<< "Added edge cuts to face " << facei + << " f:" << mesh().faces()[facei] << " newFace:" << newFace << endl; } - // Get (new or original) owner and neighbour of faceI + // Get (new or original) owner and neighbour of facei label own, nei; - faceCells(cuts, faceI, own, nei); + faceCells(cuts, facei, own, nei); - modFace(meshMod, faceI, newFace, own, nei); + modFace(meshMod, facei, newFace, own, nei); - faceUptodate[faceI] = true; + faceUptodate[facei] = true; } } } @@ -913,46 +913,46 @@ void Foam::meshCutter::setRefinement // Correct any original faces on split cell for new neighbour/owner // - forAll(cellLoops, cellI) + forAll(cellLoops, celli) { - if (cellLoops[cellI].size()) + if (cellLoops[celli].size()) { - const labelList& cllFaces = mesh().cells()[cellI]; + const labelList& cllFaces = mesh().cells()[celli]; forAll(cllFaces, cllFaceI) { - label faceI = cllFaces[cllFaceI]; + label facei = cllFaces[cllFaceI]; - if (!faceUptodate[faceI]) + if (!faceUptodate[facei]) { // Update face with new owner/neighbour (if any) - const face& f = mesh().faces()[faceI]; + const face& f = mesh().faces()[facei]; - if (debug && (f != addEdgeCutsToFace(faceI))) + if (debug && (f != addEdgeCutsToFace(facei))) { FatalErrorInFunction << "Problem: edges added to face which does " << " not use a marked cut" << endl - << "faceI:" << faceI << endl + << "facei:" << facei << endl << "face:" << f << endl - << "newFace:" << addEdgeCutsToFace(faceI) + << "newFace:" << addEdgeCutsToFace(facei) << abort(FatalError); } - // Get (new or original) owner and neighbour of faceI + // Get (new or original) owner and neighbour of facei label own, nei; - faceCells(cuts, faceI, own, nei); + faceCells(cuts, facei, own, nei); modFace ( meshMod, - faceI, + facei, f, own, nei ); - faceUptodate[faceI] = true; + faceUptodate[facei] = true; } } } @@ -980,8 +980,8 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap) forAllConstIter(Map<label>, addedCells_, iter) { - label cellI = iter.key(); - label newCellI = morphMap.reverseCellMap()[cellI]; + label celli = iter.key(); + label newCellI = morphMap.reverseCellMap()[celli]; label addedCellI = iter(); @@ -992,11 +992,11 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap) if ( (debug & 2) - && (newCellI != cellI || newAddedCellI != addedCellI) + && (newCellI != celli || newAddedCellI != addedCellI) ) { Pout<< "meshCutter::updateMesh :" - << " updating addedCell for cell " << cellI + << " updating addedCell for cell " << celli << " from " << addedCellI << " to " << newAddedCellI << endl; } @@ -1013,8 +1013,8 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap) forAllConstIter(Map<label>, addedFaces_, iter) { - label cellI = iter.key(); - label newCellI = morphMap.reverseCellMap()[cellI]; + label celli = iter.key(); + label newCellI = morphMap.reverseCellMap()[celli]; label addedFaceI = iter(); @@ -1025,11 +1025,11 @@ void Foam::meshCutter::updateMesh(const mapPolyMesh& morphMap) if ( (debug & 2) - && (newCellI != cellI || newAddedFaceI != addedFaceI) + && (newCellI != celli || newAddedFaceI != addedFaceI) ) { Pout<< "meshCutter::updateMesh :" - << " updating addedFace for cell " << cellI + << " updating addedFace for cell " << celli << " from " << addedFaceI << " to " << newAddedFaceI << endl; diff --git a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.H b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.H index 2fc84062bada7178a543508b870d4cc0999b1c08..cec3b8d80a110a76f8ad37e12fe9346c930947e4 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.H +++ b/src/dynamicMesh/meshCut/meshModifiers/meshCutter/meshCutter.H @@ -175,7 +175,7 @@ class meshCutter void faceCells ( const cellCuts& cuts, - const label faceI, + const label facei, label& own, label& nei ) const; @@ -183,30 +183,30 @@ class meshCutter //- Get patch information for face. void getFaceInfo ( - const label faceI, + const label facei, label& patchID, label& zoneID, label& zoneFlip ) const; - //- Adds a face on top of existing faceI. Flips face + //- Adds a face on top of existing facei. Flips face // if owner>neighbour void addFace ( polyTopoChange& meshMod, - const label faceI, + const label facei, const face& newFace, const label owner, const label neighbour ); - //- Modifies existing faceI for either new owner/neighbour or + //- Modifies existing facei for either new owner/neighbour or // new face points. Checks if anything changed and flips face // if owner>neighbour void modFace ( polyTopoChange& meshMod, - const label faceI, + const label facei, const face& newFace, const label owner, const label neighbour @@ -236,12 +236,12 @@ class meshCutter ) const; //- Add cuts of edges to face - face addEdgeCutsToFace(const label faceI) const; + face addEdgeCutsToFace(const label facei) const; //- Convert loop of cuts into face. face loopToFace ( - const label cellI, + const label celli, const labelList& loop ) const; @@ -249,7 +249,7 @@ class meshCutter //- Get elements of cell. void getFacesEdgesPoints ( - const label cellI, + const label celli, labelHashSet& faces, labelHashSet& edges, labelHashSet& points diff --git a/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C b/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C index b79f0faed25183fa7bbe06e4490a1566144e9b29..29dd36f3fdd9911351cd08e117c7893d0748e6b4 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.C +++ b/src/dynamicMesh/meshCut/meshModifiers/multiDirRefinement/multiDirRefinement.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 @@ -126,9 +126,9 @@ void Foam::multiDirRefinement::addCells // Construct inverse addressing: from new to original cell. labelList origCell(mesh.nCells(), -1); - forAll(addedCells_, cellI) + forAll(addedCells_, celli) { - const labelList& added = addedCells_[cellI]; + const labelList& added = addedCells_[celli]; forAll(added, i) { @@ -136,13 +136,13 @@ void Foam::multiDirRefinement::addCells if (origCell[slave] == -1) { - origCell[slave] = cellI; + origCell[slave] = celli; } - else if (origCell[slave] != cellI) + else if (origCell[slave] != celli) { FatalErrorInFunction << "Added cell " << slave << " has two different masters:" - << origCell[slave] << " , " << cellI + << origCell[slave] << " , " << celli << abort(FatalError); } } @@ -203,15 +203,15 @@ Foam::labelList Foam::multiDirRefinement::splitOffHex(const primitiveMesh& mesh) forAll(cellLabels_, i) { - label cellI = cellLabels_[i]; + label celli = cellLabels_[i]; - if (cellShapes[cellI].model() == hex) + if (cellShapes[celli].model() == hex) { - hexLabels[hexI++] = cellI; + hexLabels[hexI++] = celli; } else { - nonHexLabels[nonHexI++] = cellI; + nonHexLabels[nonHexI++] = celli; } } @@ -283,15 +283,15 @@ void Foam::multiDirRefinement::refineHex8 // Increment count forAll(consistentCells, i) { - const label cellI = consistentCells[i]; + const label celli = consistentCells[i]; - Map<label>::iterator iter = hexCellSet.find(cellI); + Map<label>::iterator iter = hexCellSet.find(celli); if (iter == hexCellSet.end()) { FatalErrorInFunction << "Resulting mesh would not satisfy 2:1 ratio" - << " when refining cell " << cellI << abort(FatalError); + << " when refining cell " << celli << abort(FatalError); } else { @@ -348,13 +348,13 @@ void Foam::multiDirRefinement::refineHex8 const labelList& cellMap = morphMap.cellMap(); - forAll(cellMap, cellI) + forAll(cellMap, celli) { - const label oldCellI = cellMap[cellI]; + const label oldCellI = cellMap[celli]; if (addedCells_[oldCellI].size()) { - addedCells_[oldCellI][nAddedCells[oldCellI]++] = cellI; + addedCells_[oldCellI][nAddedCells[oldCellI]++] = celli; } } } @@ -399,9 +399,9 @@ void Foam::multiDirRefinement::refineAllDirs forAll(refCells, refI) { - label cellI = cellLabels_[refI]; + label celli = cellLabels_[refI]; - refCells[refI] = refineCell(cellI, dirField[0]); + refCells[refI] = refineCell(celli, dirField[0]); } } else @@ -409,9 +409,9 @@ void Foam::multiDirRefinement::refineAllDirs // Non uniform directions. forAll(refCells, refI) { - const label cellI = cellLabels_[refI]; + const label celli = cellLabels_[refI]; - refCells[refI] = refineCell(cellI, dirField[cellI]); + refCells[refI] = refineCell(celli, dirField[celli]); } } diff --git a/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C b/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C index 1bc371a44ff7be13ec3f663d82ef76e7e4d70606..aaba8d724de86f19106d53a10d76b368bccb9490 100644 --- a/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.C +++ b/src/dynamicMesh/meshCut/meshModifiers/undoableMeshCutter/undoableMeshCutter.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 @@ void Foam::undoableMeshCutter::updateLabels << abort(FatalError); } - label cellI = splitPtr->cellLabel(); + label celli = splitPtr->cellLabel(); - if (cellI != map[cellI]) + if (celli != map[celli]) { changed = true; @@ -143,20 +143,20 @@ void Foam::undoableMeshCutter::updateLabels { splitCell* splitPtr = iter(); - label cellI = splitPtr->cellLabel(); + 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 + << " Updating live (split)cell from " << celli << " to " << newCellI << endl; } if (newCellI >= 0) { - // Update splitCell. Can do inplace since only one cellI will + // Update splitCell. Can do inplace since only one celli will // refer to this structure. splitPtr->cellLabel() = newCellI; @@ -239,16 +239,16 @@ void Foam::undoableMeshCutter::setRefinement // Use cells cut in this iteration to update splitCell tree. forAllConstIter(Map<label>, addedCells(), iter) { - label cellI = iter.key(); + label celli = iter.key(); label addedCellI = iter(); - // Newly created split cell. (cellI -> cellI + addedCellI) + // Newly created split cell. (celli -> celli + addedCellI) - // Check if cellI already part of split. + // Check if celli already part of split. Map<splitCell*>::iterator findCell = - liveSplitCells_.find(cellI); + liveSplitCells_.find(celli); if (findCell == liveSplitCells_.end()) { @@ -257,9 +257,9 @@ void Foam::undoableMeshCutter::setRefinement // place. // Create 0th level. Null parent to denote this. - splitCell* parentPtr = new splitCell(cellI, NULL); + splitCell* parentPtr = new splitCell(celli, NULL); - splitCell* masterPtr = new splitCell(cellI, parentPtr); + splitCell* masterPtr = new splitCell(celli, parentPtr); splitCell* slavePtr = new splitCell(addedCellI, parentPtr); @@ -277,7 +277,7 @@ void Foam::undoableMeshCutter::setRefinement << abort(FatalError); } - liveSplitCells_.insert(cellI, masterPtr); + liveSplitCells_.insert(celli, masterPtr); liveSplitCells_.insert(addedCellI, slavePtr); } else @@ -288,7 +288,7 @@ void Foam::undoableMeshCutter::setRefinement // It is no longer live liveSplitCells_.erase(findCell); - splitCell* masterPtr = new splitCell(cellI, parentPtr); + splitCell* masterPtr = new splitCell(celli, parentPtr); splitCell* slavePtr = new splitCell(addedCellI, parentPtr); @@ -306,7 +306,7 @@ void Foam::undoableMeshCutter::setRefinement << abort(FatalError); } - liveSplitCells_.insert(cellI, masterPtr); + liveSplitCells_.insert(celli, masterPtr); liveSplitCells_.insert(addedCellI, slavePtr); } } @@ -377,7 +377,7 @@ Foam::labelList Foam::undoableMeshCutter::getSplitFaces() const // Both master and slave are live and are not refined. // Find common face. - label cellI = splitPtr->cellLabel(); + label celli = splitPtr->cellLabel(); label slaveCellI = slavePtr->cellLabel(); @@ -385,7 +385,7 @@ Foam::labelList Foam::undoableMeshCutter::getSplitFaces() const meshTools::getSharedFace ( mesh(), - cellI, + celli, slaveCellI ); @@ -487,18 +487,18 @@ Foam::labelList Foam::undoableMeshCutter::removeSplitFaces // into owner. forAll(facesToRemove, facesToRemoveI) { - label faceI = facesToRemove[facesToRemoveI]; + label facei = facesToRemove[facesToRemoveI]; - if (!mesh().isInternalFace(faceI)) + if (!mesh().isInternalFace(facei)) { FatalErrorInFunction << "Trying to remove face that is not internal" << abort(FatalError); } - label own = mesh().faceOwner()[faceI]; + label own = mesh().faceOwner()[facei]; - label nbr = mesh().faceNeighbour()[faceI]; + label nbr = mesh().faceNeighbour()[facei]; Map<splitCell*>::iterator ownFind = liveSplitCells_.find(own); @@ -527,7 +527,7 @@ Foam::labelList Foam::undoableMeshCutter::removeSplitFaces if (debug) { - Pout<< "Updating for removed splitFace " << faceI + Pout<< "Updating for removed splitFace " << facei << " own:" << own << " nbr:" << nbr << " ownPtr:" << ownPtr->cellLabel() << " nbrPtr:" << nbrPtr->cellLabel() @@ -551,7 +551,7 @@ Foam::labelList Foam::undoableMeshCutter::removeSplitFaces { FatalErrorInFunction << "Owner and neighbour liveSplitCell entries do not have" - << " same parent. faceI:" << faceI << " owner:" << own + << " same parent. facei:" << facei << " owner:" << own << " ownparent:" << parentPtr->cellLabel() << " neighbour:" << nbr << " nbrparent:" << nbrPtr->parent()->cellLabel() diff --git a/src/dynamicMesh/meshCut/refineCell/refineCell.C b/src/dynamicMesh/meshCut/refineCell/refineCell.C index bcc88ca8e13761c8013c7a1a66f2757e1f774f13..f5e4f585e5a17f881daee2048103d3eb5f2b27d9 100644 --- a/src/dynamicMesh/meshCut/refineCell/refineCell.C +++ b/src/dynamicMesh/meshCut/refineCell/refineCell.C @@ -35,9 +35,9 @@ Foam::refineCell::refineCell() {} -Foam::refineCell::refineCell(const label cellI, const vector& direction) +Foam::refineCell::refineCell(const label celli, const vector& direction) : - cellNo_(cellI), + cellNo_(celli), direction_(direction) { scalar magDir = mag(direction_); diff --git a/src/dynamicMesh/meshCut/splitCell/splitCell.C b/src/dynamicMesh/meshCut/splitCell/splitCell.C index c4e79700620125e78d95b656cc784915b9499a03..db036d918e287062f60fb562ac1e916d4212d98f 100644 --- a/src/dynamicMesh/meshCut/splitCell/splitCell.C +++ b/src/dynamicMesh/meshCut/splitCell/splitCell.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 @@ -29,9 +29,9 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // Construct from cell number and parent -Foam::splitCell::splitCell(const label cellI, splitCell* parent) +Foam::splitCell::splitCell(const label celli, splitCell* parent) : - cellI_(cellI), + celli_(celli), parent_(parent), master_(NULL), slave_(NULL) diff --git a/src/dynamicMesh/meshCut/splitCell/splitCell.H b/src/dynamicMesh/meshCut/splitCell/splitCell.H index 2cfff4cc12072f040369ac1b92b683c9bde6b998..717e1700ffcf2a76df015a83ed12b7abd4ce494f 100644 --- a/src/dynamicMesh/meshCut/splitCell/splitCell.H +++ b/src/dynamicMesh/meshCut/splitCell/splitCell.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 @@ -55,7 +55,7 @@ class splitCell //- Unsplit cell label. Only uptodate if this cell is 'live' // (i.e. no master or slave) - label cellI_; + label celli_; //- Parent splitCell or null splitCell* parent_; @@ -80,7 +80,7 @@ public: // Constructors //- Construct from cell number and parent - splitCell(const label cellI, splitCell* parent); + splitCell(const label celli, splitCell* parent); //- Destructor @@ -93,12 +93,12 @@ public: label cellLabel() const { - return cellI_; + return celli_; } label& cellLabel() { - return cellI_; + return celli_; } splitCell* parent() const diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C b/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C index a883cd438bb65716e5654d78701b800e25f446fe..050b8ea220674c916790bdf413d3eb41c9790266 100644 --- a/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C +++ b/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.C @@ -39,17 +39,17 @@ namespace Foam // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -bool Foam::wallLayerCells::usesCoupledPatch(const label cellI) const +bool Foam::wallLayerCells::usesCoupledPatch(const label celli) const { const polyBoundaryMesh& patches = mesh().boundaryMesh(); - const cell& cFaces = mesh().cells()[cellI]; + const cell& cFaces = mesh().cells()[celli]; forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - label patchID = patches.whichPatch(faceI); + label patchID = patches.whichPatch(facei); if ((patchID >= 0) && (patches[patchID].coupled())) { @@ -78,9 +78,9 @@ Foam::wallLayerCells::wallLayerCells // Make map from name to local patch ID HashTable<label> patchNameToIndex(patches.size()); - forAll(patches, patchI) + forAll(patches, patchi) { - patchNameToIndex.insert(patches[patchI].name(), patchI); + patchNameToIndex.insert(patches[patchi].name(), patchi); } @@ -93,9 +93,9 @@ Foam::wallLayerCells::wallLayerCells if (patchNameToIndex.found(name)) { - label patchI = patchNameToIndex[name]; + label patchi = patchNameToIndex[name]; - nWalls += patches[patchI].size(); + nWalls += patches[patchi].size(); } } @@ -112,9 +112,9 @@ Foam::wallLayerCells::wallLayerCells if (patchNameToIndex.found(name)) { - label patchI = patchNameToIndex[name]; + label patchi = patchNameToIndex[name]; - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; forAll(pp, patchFaceI) { @@ -162,13 +162,13 @@ Foam::wallLayerCells::wallLayerCells label vertI = 0; - forAll(faceInfo, faceI) + forAll(faceInfo, facei) { - const wallNormalInfo& info = faceInfo[faceI]; + const wallNormalInfo& info = faceInfo[facei]; if (info.valid(regionCalc.data())) { - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; point mid(0.0, 0.0, 0.0); @@ -206,13 +206,13 @@ Foam::wallLayerCells::wallLayerCells const List<wallNormalInfo>& cellInfo = regionCalc.allCellInfo(); - forAll(cellInfo, cellI) + forAll(cellInfo, celli) { - const wallNormalInfo& info = cellInfo[cellI]; + const wallNormalInfo& info = cellInfo[celli]; - if (info.valid(regionCalc.data()) && !usesCoupledPatch(cellI)) + if (info.valid(regionCalc.data()) && !usesCoupledPatch(celli)) { - refineCells.append(refineCell(cellI, info.normal())); + refineCells.append(refineCell(celli, info.normal())); } } diff --git a/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.H b/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.H index 8a5dffa785ab8e961bad5da08c7a2e5e60fe32aa..7a30fd44e04fcc2063aed179bbc17c278d8e7608 100644 --- a/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.H +++ b/src/dynamicMesh/meshCut/wallLayerCells/wallLayerCells.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 @@ -57,8 +57,8 @@ class wallLayerCells { // Private Member Functions - //- Check if any of the faces of cellI is on processorPatch - bool usesCoupledPatch(const label cellI) const; + //- Check if any of the faces of celli is on processorPatch + bool usesCoupledPatch(const label celli) const; public: diff --git a/src/dynamicMesh/motionSmoother/badQualityToCell/badQualityToCell.C b/src/dynamicMesh/motionSmoother/badQualityToCell/badQualityToCell.C index 80f15127affd9468fa794dfd5a4e68b5b2965929..c31e2606b9bebd8411e5b12731e332873c1edcf3 100644 --- a/src/dynamicMesh/motionSmoother/badQualityToCell/badQualityToCell.C +++ b/src/dynamicMesh/motionSmoother/badQualityToCell/badQualityToCell.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,11 +61,11 @@ void Foam::badQualityToCell::combine(topoSet& set, const bool add) const forAllConstIter(faceSet, faces, iter) { - label faceI = iter.key(); - addOrDelete(set, mesh_.faceOwner()[faceI], add); - if (mesh_.isInternalFace(faceI)) + label facei = iter.key(); + addOrDelete(set, mesh_.faceOwner()[facei], add); + if (mesh_.isInternalFace(facei)) { - addOrDelete(set, mesh_.faceNeighbour()[faceI], add); + addOrDelete(set, mesh_.faceNeighbour()[facei], add); } } } diff --git a/src/dynamicMesh/motionSmoother/badQualityToFace/badQualityToFace.C b/src/dynamicMesh/motionSmoother/badQualityToFace/badQualityToFace.C index a692c61569eeceb5d7e0c19872e63cf866496e3e..dd76d0b0c808d26b2f6ea16c909c6b7496bfa47c 100644 --- a/src/dynamicMesh/motionSmoother/badQualityToFace/badQualityToFace.C +++ b/src/dynamicMesh/motionSmoother/badQualityToFace/badQualityToFace.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,8 +61,8 @@ void Foam::badQualityToFace::combine(topoSet& set, const bool add) const forAllConstIter(faceSet, faces, iter) { - label faceI = iter.key(); - addOrDelete(set, faceI, add); + label facei = iter.key(); + addOrDelete(set, facei, add); } } diff --git a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C index 8738f58979e2d1130564dfd3d40e74334ad6d353..242616c6bb345eb9793bb7c4f2e8ce7611fefbac 100644 --- a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C +++ b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.C @@ -117,71 +117,71 @@ void Foam::polyMeshGeometry::updateCellCentresAndVols forAll(changedFaces, i) { - label faceI = changedFaces[i]; - cEst[own[faceI]] += faceCentres_[faceI]; - nCellFaces[own[faceI]] += 1; + label facei = changedFaces[i]; + cEst[own[facei]] += faceCentres_[facei]; + nCellFaces[own[facei]] += 1; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - cEst[nei[faceI]] += faceCentres_[faceI]; - nCellFaces[nei[faceI]] += 1; + cEst[nei[facei]] += faceCentres_[facei]; + nCellFaces[nei[facei]] += 1; } } forAll(changedCells, i) { - label cellI = changedCells[i]; - cEst[cellI] /= nCellFaces[cellI]; + label celli = changedCells[i]; + cEst[celli] /= nCellFaces[celli]; } forAll(changedFaces, i) { - label faceI = changedFaces[i]; + label facei = changedFaces[i]; // Calculate 3*face-pyramid volume scalar pyr3Vol = max ( - faceAreas_[faceI] & (faceCentres_[faceI] - cEst[own[faceI]]), + faceAreas_[facei] & (faceCentres_[facei] - cEst[own[facei]]), VSMALL ); // Calculate face-pyramid centre - vector pc = (3.0/4.0)*faceCentres_[faceI] + (1.0/4.0)*cEst[own[faceI]]; + vector pc = (3.0/4.0)*faceCentres_[facei] + (1.0/4.0)*cEst[own[facei]]; // Accumulate volume-weighted face-pyramid centre - cellCentres_[own[faceI]] += pyr3Vol*pc; + cellCentres_[own[facei]] += pyr3Vol*pc; // Accumulate face-pyramid volume - cellVolumes_[own[faceI]] += pyr3Vol; + cellVolumes_[own[facei]] += pyr3Vol; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { // Calculate 3*face-pyramid volume scalar pyr3Vol = max ( - faceAreas_[faceI] & (cEst[nei[faceI]] - faceCentres_[faceI]), + faceAreas_[facei] & (cEst[nei[facei]] - faceCentres_[facei]), VSMALL ); // Calculate face-pyramid centre vector pc = - (3.0/4.0)*faceCentres_[faceI] - + (1.0/4.0)*cEst[nei[faceI]]; + (3.0/4.0)*faceCentres_[facei] + + (1.0/4.0)*cEst[nei[facei]]; // Accumulate volume-weighted face-pyramid centre - cellCentres_[nei[faceI]] += pyr3Vol*pc; + cellCentres_[nei[facei]] += pyr3Vol*pc; // Accumulate face-pyramid volume - cellVolumes_[nei[faceI]] += pyr3Vol; + cellVolumes_[nei[facei]] += pyr3Vol; } } forAll(changedCells, i) { - label cellI = changedCells[i]; + label celli = changedCells[i]; - cellCentres_[cellI] /= cellVolumes_[cellI] + VSMALL; - cellVolumes_[cellI] *= (1.0/3.0); + cellCentres_[celli] /= cellVolumes_[celli] + VSMALL; + cellVolumes_[celli] *= (1.0/3.0); } } @@ -199,13 +199,13 @@ Foam::labelList Foam::polyMeshGeometry::affectedCells forAll(changedFaces, i) { - label faceI = changedFaces[i]; + label facei = changedFaces[i]; - affectedCells.insert(own[faceI]); + affectedCells.insert(own[facei]); - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - affectedCells.insert(nei[faceI]); + affectedCells.insert(nei[facei]); } } return affectedCells.toc(); @@ -217,7 +217,7 @@ Foam::scalar Foam::polyMeshGeometry::checkNonOrtho const polyMesh& mesh, const bool report, const scalar severeNonorthogonalityThreshold, - const label faceI, + const label facei, const vector& s, // face area vector const vector& d, // cc-cc vector @@ -232,9 +232,9 @@ Foam::scalar Foam::polyMeshGeometry::checkNonOrtho { label nei = -1; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - nei = mesh.faceNeighbour()[faceI]; + nei = mesh.faceNeighbour()[facei]; } if (dDotS > SMALL) @@ -242,8 +242,8 @@ Foam::scalar Foam::polyMeshGeometry::checkNonOrtho if (report) { // Severe non-orthogonality but mesh still OK - Pout<< "Severe non-orthogonality for face " << faceI - << " between cells " << mesh.faceOwner()[faceI] + Pout<< "Severe non-orthogonality for face " << facei + << " between cells " << mesh.faceOwner()[facei] << " and " << nei << ": Angle = " << radToDeg(::acos(dDotS)) @@ -259,8 +259,8 @@ Foam::scalar Foam::polyMeshGeometry::checkNonOrtho { WarningInFunction << "Severe non-orthogonality detected for face " - << faceI - << " between cells " << mesh.faceOwner()[faceI] + << facei + << " between cells " << mesh.faceOwner()[facei] << " and " << nei << ": Angle = " << radToDeg(::acos(dDotS)) @@ -272,7 +272,7 @@ Foam::scalar Foam::polyMeshGeometry::checkNonOrtho if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } } return dDotS; @@ -286,14 +286,14 @@ bool Foam::polyMeshGeometry::checkFaceTet const bool report, const scalar minTetQuality, const pointField& p, - const label faceI, + const label facei, const point& fc, // face centre const point& cc, // cell centre labelHashSet* setPtr ) { - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, fp) { @@ -313,17 +313,17 @@ bool Foam::polyMeshGeometry::checkFaceTet << "const bool, const scalar, const pointField&" << ", const pointField&" << ", const labelList&, labelHashSet*) : " - << "face " << faceI + << "face " << facei << " has a triangle that points the wrong way." << endl << "Tet quality: " << tetQual - << " Face " << faceI + << " Face " << facei << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } return true; } @@ -392,9 +392,9 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct // Calculate coupled cell centre pointField neiCc(mesh.nFaces() - mesh.nInternalFaces()); - for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++) + for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++) { - neiCc[faceI-mesh.nInternalFaces()] = cellCentres[own[faceI]]; + neiCc[facei-mesh.nInternalFaces()] = cellCentres[own[facei]]; } syncTools::swapBoundaryFacePositions(mesh, neiCc); @@ -410,20 +410,20 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - const point& ownCc = cellCentres[own[faceI]]; + const point& ownCc = cellCentres[own[facei]]; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { scalar dDotS = checkNonOrtho ( mesh, report, severeNonorthogonalityThreshold, - faceI, - faceAreas[faceI], - cellCentres[nei[faceI]] - ownCc, + facei, + faceAreas[facei], + cellCentres[nei[facei]] - ownCc, severeNonOrth, errorNonOrth, @@ -440,18 +440,18 @@ bool Foam::polyMeshGeometry::checkFaceDotProduct } else { - label patchI = patches.whichPatch(faceI); + label patchi = patches.whichPatch(facei); - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { scalar dDotS = checkNonOrtho ( mesh, report, severeNonorthogonalityThreshold, - faceI, - faceAreas[faceI], - neiCc[faceI-mesh.nInternalFaces()] - ownCc, + facei, + faceAreas[facei], + neiCc[facei-mesh.nInternalFaces()] - ownCc, severeNonOrth, errorNonOrth, @@ -571,13 +571,13 @@ bool Foam::polyMeshGeometry::checkFacePyramids forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; // Create the owner pyramid - it will have negative volume scalar pyrVol = pyramidPointFaceRef ( - f[faceI], - cellCentres[own[faceI]] + f[facei], + cellCentres[own[facei]] ).mag(p); if (pyrVol > -minPyrVol) @@ -587,29 +587,29 @@ bool Foam::polyMeshGeometry::checkFacePyramids Pout<< "bool polyMeshGeometry::checkFacePyramids(" << "const bool, const scalar, const pointField&" << ", const labelList&, labelHashSet*): " - << "face " << faceI << " points the wrong way. " << endl + << "face " << facei << " points the wrong way. " << endl << "Pyramid volume: " << -pyrVol - << " Face " << f[faceI] << " area: " << f[faceI].mag(p) - << " Owner cell: " << own[faceI] << endl + << " Face " << f[facei] << " area: " << f[facei].mag(p) + << " Owner cell: " << own[facei] << endl << "Owner cell vertex labels: " - << mesh.cells()[own[faceI]].labels(f) + << mesh.cells()[own[facei]].labels(f) << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorPyrs++; } - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { // Create the neighbour pyramid - it will have positive volume scalar pyrVol = - pyramidPointFaceRef(f[faceI], cellCentres[nei[faceI]]).mag(p); + pyramidPointFaceRef(f[facei], cellCentres[nei[facei]]).mag(p); if (pyrVol < minPyrVol) { @@ -618,18 +618,18 @@ bool Foam::polyMeshGeometry::checkFacePyramids Pout<< "bool polyMeshGeometry::checkFacePyramids(" << "const bool, const scalar, const pointField&" << ", const labelList&, labelHashSet*): " - << "face " << faceI << " points the wrong way. " << endl + << "face " << facei << " points the wrong way. " << endl << "Pyramid volume: " << -pyrVol - << " Face " << f[faceI] << " area: " << f[faceI].mag(p) - << " Neighbour cell: " << nei[faceI] << endl + << " Face " << f[facei] << " area: " << f[facei].mag(p) + << " Neighbour cell: " << nei[facei] << endl << "Neighbour cell vertex labels: " - << mesh.cells()[nei[faceI]].labels(f) + << mesh.cells()[nei[facei]].labels(f) << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorPyrs++; @@ -752,9 +752,9 @@ bool Foam::polyMeshGeometry::checkFaceTets // Calculate coupled cell centre pointField neiCc(mesh.nFaces() - mesh.nInternalFaces()); - for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++) + for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++) { - neiCc[faceI - mesh.nInternalFaces()] = cellCentres[own[faceI]]; + neiCc[facei - mesh.nInternalFaces()] = cellCentres[own[facei]]; } syncTools::swapBoundaryFacePositions(mesh, neiCc); @@ -763,7 +763,7 @@ bool Foam::polyMeshGeometry::checkFaceTets forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; // Create the owner pyramid - note: exchange cell and face centre // to get positive volume. @@ -773,9 +773,9 @@ bool Foam::polyMeshGeometry::checkFaceTets report, minTetQuality, p, - faceI, - cellCentres[own[faceI]], // face centre - faceCentres[faceI], // cell centre + facei, + cellCentres[own[facei]], // face centre + faceCentres[facei], // cell centre setPtr ); @@ -784,7 +784,7 @@ bool Foam::polyMeshGeometry::checkFaceTets nErrorTets++; } - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { // Create the neighbour tets - they will have positive volume bool tetError = checkFaceTet @@ -793,9 +793,9 @@ bool Foam::polyMeshGeometry::checkFaceTets report, minTetQuality, p, - faceI, - faceCentres[faceI], // face centre - cellCentres[nei[faceI]], // cell centre + facei, + faceCentres[facei], // face centre + cellCentres[nei[facei]], // cell centre setPtr ); @@ -809,7 +809,7 @@ bool Foam::polyMeshGeometry::checkFaceTets polyMeshTetDecomposition::findSharedBasePoint ( mesh, - faceI, + facei, minTetQuality, report ) == -1 @@ -817,7 +817,7 @@ bool Foam::polyMeshGeometry::checkFaceTets { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorTets++; @@ -825,17 +825,17 @@ bool Foam::polyMeshGeometry::checkFaceTets } else { - label patchI = patches.whichPatch(faceI); + label patchi = patches.whichPatch(facei); - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { if ( polyMeshTetDecomposition::findSharedBasePoint ( mesh, - faceI, - neiCc[faceI - mesh.nInternalFaces()], + facei, + neiCc[facei - mesh.nInternalFaces()], minTetQuality, report ) == -1 @@ -843,7 +843,7 @@ bool Foam::polyMeshGeometry::checkFaceTets { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorTets++; @@ -856,7 +856,7 @@ bool Foam::polyMeshGeometry::checkFaceTets polyMeshTetDecomposition::findBasePoint ( mesh, - faceI, + facei, minTetQuality, report ) == -1 @@ -864,7 +864,7 @@ bool Foam::polyMeshGeometry::checkFaceTets { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorTets++; @@ -991,9 +991,9 @@ bool Foam::polyMeshGeometry::checkFaceSkewness forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { scalar skewness = primitiveMeshTools::faceSkewness ( @@ -1002,9 +1002,9 @@ bool Foam::polyMeshGeometry::checkFaceSkewness faceCentres, faceAreas, - faceI, - cellCentres[own[faceI]], - cellCentres[nei[faceI]] + facei, + cellCentres[own[facei]], + cellCentres[nei[facei]] ); // Check if the skewness vector is greater than the PN vector. @@ -1014,13 +1014,13 @@ bool Foam::polyMeshGeometry::checkFaceSkewness { if (report) { - Pout<< "Severe skewness for face " << faceI + Pout<< "Severe skewness for face " << facei << " skewness = " << skewness << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nWarnSkew++; @@ -1028,7 +1028,7 @@ bool Foam::polyMeshGeometry::checkFaceSkewness maxSkew = max(maxSkew, skewness); } - else if (patches[patches.whichPatch(faceI)].coupled()) + else if (patches[patches.whichPatch(facei)].coupled()) { scalar skewness = primitiveMeshTools::faceSkewness ( @@ -1037,9 +1037,9 @@ bool Foam::polyMeshGeometry::checkFaceSkewness faceCentres, faceAreas, - faceI, - cellCentres[own[faceI]], - neiCc[faceI-mesh.nInternalFaces()] + facei, + cellCentres[own[facei]], + neiCc[facei-mesh.nInternalFaces()] ); // Check if the skewness vector is greater than the PN vector. @@ -1049,13 +1049,13 @@ bool Foam::polyMeshGeometry::checkFaceSkewness { if (report) { - Pout<< "Severe skewness for coupled face " << faceI + Pout<< "Severe skewness for coupled face " << facei << " skewness = " << skewness << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nWarnSkew++; @@ -1072,8 +1072,8 @@ bool Foam::polyMeshGeometry::checkFaceSkewness faceCentres, faceAreas, - faceI, - cellCentres[own[faceI]] + facei, + cellCentres[own[facei]] ); @@ -1084,13 +1084,13 @@ bool Foam::polyMeshGeometry::checkFaceSkewness { if (report) { - Pout<< "Severe skewness for boundary face " << faceI + Pout<< "Severe skewness for boundary face " << facei << " skewness = " << skewness << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nWarnSkew++; @@ -1194,9 +1194,9 @@ bool Foam::polyMeshGeometry::checkFaceWeights // Calculate coupled cell centre pointField neiCc(mesh.nFaces()-mesh.nInternalFaces()); - for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++) + for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++) { - neiCc[faceI-mesh.nInternalFaces()] = cellCentres[own[faceI]]; + neiCc[facei-mesh.nInternalFaces()] = cellCentres[own[facei]]; } syncTools::swapBoundaryFacePositions(mesh, neiCc); @@ -1207,29 +1207,29 @@ bool Foam::polyMeshGeometry::checkFaceWeights forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - const point& fc = faceCentres[faceI]; - const vector& fa = faceAreas[faceI]; + const point& fc = faceCentres[facei]; + const vector& fa = faceAreas[facei]; - scalar dOwn = mag(fa & (fc-cellCentres[own[faceI]])); + scalar dOwn = mag(fa & (fc-cellCentres[own[facei]])); - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - scalar dNei = mag(fa & (cellCentres[nei[faceI]]-fc)); + scalar dNei = mag(fa & (cellCentres[nei[facei]]-fc)); scalar weight = min(dNei,dOwn)/(dNei+dOwn+VSMALL); if (weight < warnWeight) { if (report) { - Pout<< "Small weighting factor for face " << faceI + Pout<< "Small weighting factor for face " << facei << " weight = " << weight << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nWarnWeight++; @@ -1239,24 +1239,24 @@ bool Foam::polyMeshGeometry::checkFaceWeights } else { - label patchI = patches.whichPatch(faceI); + label patchi = patches.whichPatch(facei); - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { - scalar dNei = mag(fa & (neiCc[faceI-mesh.nInternalFaces()]-fc)); + scalar dNei = mag(fa & (neiCc[facei-mesh.nInternalFaces()]-fc)); scalar weight = min(dNei,dOwn)/(dNei+dOwn+VSMALL); if (weight < warnWeight) { if (report) { - Pout<< "Small weighting factor for face " << faceI + Pout<< "Small weighting factor for face " << facei << " weight = " << weight << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nWarnWeight++; @@ -1347,9 +1347,9 @@ bool Foam::polyMeshGeometry::checkVolRatio // Calculate coupled cell vol scalarField neiVols(mesh.nFaces()-mesh.nInternalFaces()); - for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++) + for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++) { - neiVols[faceI-mesh.nInternalFaces()] = cellVolumes[own[faceI]]; + neiVols[facei-mesh.nInternalFaces()] = cellVolumes[own[facei]]; } syncTools::swapBoundaryFaceList(mesh, neiVols); @@ -1360,23 +1360,23 @@ bool Foam::polyMeshGeometry::checkVolRatio forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - scalar ownVol = mag(cellVolumes[own[faceI]]); + scalar ownVol = mag(cellVolumes[own[facei]]); scalar neiVol = -GREAT; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - neiVol = mag(cellVolumes[nei[faceI]]); + neiVol = mag(cellVolumes[nei[facei]]); } else { - label patchI = patches.whichPatch(faceI); + label patchi = patches.whichPatch(facei); - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { - neiVol = mag(neiVols[faceI-mesh.nInternalFaces()]); + neiVol = mag(neiVols[facei-mesh.nInternalFaces()]); } } @@ -1388,13 +1388,13 @@ bool Foam::polyMeshGeometry::checkVolRatio { if (report) { - Pout<< "Small ratio for face " << faceI + Pout<< "Small ratio for face " << facei << " ratio = " << ratio << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nWarnRatio++; @@ -1499,11 +1499,11 @@ bool Foam::polyMeshGeometry::checkFaceAngles forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - const face& f = fcs[faceI]; + const face& f = fcs[facei]; - vector faceNormal = faceAreas[faceI]; + vector faceNormal = faceAreas[facei]; faceNormal /= mag(faceNormal) + VSMALL; // Get edge from f[0] to f[size-1]; @@ -1537,16 +1537,16 @@ 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++; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } maxEdgeSin = max(maxEdgeSin, magEdgeNormal); @@ -1630,17 +1630,17 @@ bool Foam::polyMeshGeometry::checkFaceTwist // forAll(checkFaces, i) // { -// label faceI = checkFaces[i]; +// label facei = checkFaces[i]; // -// const face& f = fcs[faceI]; +// const face& f = fcs[facei]; // -// scalar magArea = mag(faceAreas[faceI]); +// scalar magArea = mag(faceAreas[facei]); // // if (f.size() > 3 && magArea > VSMALL) // { -// const vector nf = faceAreas[faceI] / magArea; +// const vector nf = faceAreas[facei] / magArea; // -// const point& fc = faceCentres[faceI]; +// const point& fc = faceCentres[facei]; // // forAll(f, fpI) // { @@ -1662,7 +1662,7 @@ bool Foam::polyMeshGeometry::checkFaceTwist // // if (setPtr) // { -// setPtr->insert(faceI); +// setPtr->insert(facei); // } // // break; @@ -1679,43 +1679,43 @@ bool Foam::polyMeshGeometry::checkFaceTwist // Calculate coupled cell centre pointField neiCc(mesh.nFaces()-mesh.nInternalFaces()); - for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++) + for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++) { - neiCc[faceI-mesh.nInternalFaces()] = cellCentres[own[faceI]]; + neiCc[facei-mesh.nInternalFaces()] = cellCentres[own[facei]]; } syncTools::swapBoundaryFacePositions(mesh, neiCc); forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - const face& f = fcs[faceI]; + const face& f = fcs[facei]; if (f.size() > 3) { vector nf(Zero); - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - nf = cellCentres[nei[faceI]] - cellCentres[own[faceI]]; + nf = cellCentres[nei[facei]] - cellCentres[own[facei]]; nf /= mag(nf) + VSMALL; } - else if (patches[patches.whichPatch(faceI)].coupled()) + else if (patches[patches.whichPatch(facei)].coupled()) { nf = - neiCc[faceI-mesh.nInternalFaces()] - - cellCentres[own[faceI]]; + neiCc[facei-mesh.nInternalFaces()] + - cellCentres[own[facei]]; nf /= mag(nf) + VSMALL; } else { - nf = faceCentres[faceI] - cellCentres[own[faceI]]; + nf = faceCentres[facei] - cellCentres[own[facei]]; nf /= mag(nf) + VSMALL; } if (nf != vector::zero) { - const point& fc = faceCentres[faceI]; + const point& fc = faceCentres[facei]; forAll(f, fpI) { @@ -1737,7 +1737,7 @@ bool Foam::polyMeshGeometry::checkFaceTwist if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } break; @@ -1812,13 +1812,13 @@ bool Foam::polyMeshGeometry::checkTriangleTwist forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - const face& f = fcs[faceI]; + const face& f = fcs[facei]; if (f.size() > 3) { - const point& fc = faceCentres[faceI]; + const point& fc = faceCentres[facei]; // Find starting triangle (at startFp) with non-zero area label startFp = -1; @@ -1872,7 +1872,7 @@ bool Foam::polyMeshGeometry::checkTriangleTwist if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } break; @@ -1886,7 +1886,7 @@ bool Foam::polyMeshGeometry::checkTriangleTwist if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } break; @@ -1962,13 +1962,13 @@ bool Foam::polyMeshGeometry::checkFaceFlatness forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - const face& f = fcs[faceI]; + const face& f = fcs[facei]; if (f.size() > 3) { - const point& fc = faceCentres[faceI]; + const point& fc = faceCentres[facei]; // Sum triangle areas scalar sumArea = 0.0; @@ -1983,13 +1983,13 @@ bool Foam::polyMeshGeometry::checkFaceFlatness ).mag(); } - if (sumArea/mag(faceAreas[faceI]) < minFlatness) + if (sumArea/mag(faceAreas[facei]) < minFlatness) { nWarped++; if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } } } @@ -2049,13 +2049,13 @@ bool Foam::polyMeshGeometry::checkFaceArea forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - if (mag(faceAreas[faceI]) < minArea) + if (mag(faceAreas[facei]) < minArea) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nZeroArea++; } @@ -2123,12 +2123,12 @@ bool Foam::polyMeshGeometry::checkCellDeterminant forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - scalar magArea = mag(faceAreas[faceI]); + scalar magArea = mag(faceAreas[facei]); magAreaSum += magArea; - areaSum += faceAreas[faceI]*(faceAreas[faceI]/(magArea+VSMALL)); + areaSum += faceAreas[facei]*(faceAreas[facei]/(magArea+VSMALL)); } scalar scaledDet = det(areaSum/(magAreaSum+VSMALL))/0.037037037037037; @@ -2144,8 +2144,8 @@ bool Foam::polyMeshGeometry::checkCellDeterminant // Insert all faces of the cell. forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; - setPtr->insert(faceI); + label facei = cFaces[cFaceI]; + setPtr->insert(facei); } } nWarnDet++; diff --git a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.H b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.H index 405564a175273efd8d273725ef121558bc816f60..017ee052a3e7a270cfd3981454c43aef8f50d370 100644 --- a/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.H +++ b/src/dynamicMesh/motionSmoother/polyMeshGeometry/polyMeshGeometry.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 @@ -91,7 +91,7 @@ class polyMeshGeometry const polyMesh& mesh, const bool report, const scalar severeNonorthogonalityThreshold, - const label faceI, + const label facei, const vector& s, // face area vector const vector& d, // cc-cc vector @@ -115,7 +115,7 @@ class polyMeshGeometry const bool report, const scalar minTetQuality, const pointField& p, - const label faceI, + const label facei, const point& fc, // face centre const point& cc, // cell centre labelHashSet* setPtr diff --git a/src/dynamicMesh/perfectInterface/perfectInterface.C b/src/dynamicMesh/perfectInterface/perfectInterface.C index 3cc0179b338e7b123909b7e3673fedef4d78bbd8..cac409901c6be0a32b31a635698c6752a32f77d3 100644 --- a/src/dynamicMesh/perfectInterface/perfectInterface.C +++ b/src/dynamicMesh/perfectInterface/perfectInterface.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 @@ -280,13 +280,13 @@ void Foam::perfectInterface::setRefinement // never be sure what the user is doing. forAll(pp0, i) { - label faceI = pp0.addressing()[i]; + label facei = pp0.addressing()[i]; - if (affectedFaces.erase(faceI)) + if (affectedFaces.erase(facei)) { WarningInFunction - << "Found face " << faceI << " vertices " - << mesh.faces()[faceI] << " whose points are" + << "Found face " << facei << " vertices " + << mesh.faces()[facei] << " whose points are" << " used both by master patch and slave patch" << endl; } } @@ -295,8 +295,8 @@ void Foam::perfectInterface::setRefinement // 2. Renumber (non patch0/1) faces. forAllConstIter(labelHashSet, affectedFaces, iter) { - const label faceI = iter.key(); - const face& f = mesh.faces()[faceI]; + const label facei = iter.key(); + const face& f = mesh.faces()[facei]; face newFace(f.size()); @@ -309,16 +309,16 @@ void Foam::perfectInterface::setRefinement label patchI = -1; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - nbr = mesh.faceNeighbour()[faceI]; + nbr = mesh.faceNeighbour()[facei]; } else { - patchI = patches.whichPatch(faceI); + patchI = patches.whichPatch(facei); } - label zoneID = mesh.faceZones().whichZone(faceI); + label zoneID = mesh.faceZones().whichZone(facei); bool zoneFlip = false; @@ -326,7 +326,7 @@ void Foam::perfectInterface::setRefinement { const faceZone& fZone = mesh.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } ref.setAction @@ -334,8 +334,8 @@ void Foam::perfectInterface::setRefinement polyModifyFace ( newFace, // modified face - faceI, // label of face being modified - mesh.faceOwner()[faceI], // owner + facei, // label of face being modified + mesh.faceOwner()[facei], // owner nbr, // neighbour false, // face flip patchI, // patch for face @@ -362,8 +362,8 @@ void Foam::perfectInterface::setRefinement // 4. Remove patch1 faces forAll(pp1, i) { - label faceI = pp1.addressing()[i]; - ref.setAction(polyRemoveFace(faceI)); + label facei = pp1.addressing()[i]; + ref.setAction(polyRemoveFace(facei)); } @@ -375,9 +375,9 @@ void Foam::perfectInterface::setRefinement forAll(pp0, i) { - label faceI = pp0.addressing()[i]; + label facei = pp0.addressing()[i]; - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; face newFace(f.size()); @@ -386,7 +386,7 @@ void Foam::perfectInterface::setRefinement newFace[fp] = renumberPoints[f[fp]]; } - label own = mesh.faceOwner()[faceI]; + label own = mesh.faceOwner()[facei]; label pp1FaceI = pp1.addressing()[from0To1Faces[i]]; @@ -399,7 +399,7 @@ void Foam::perfectInterface::setRefinement polyModifyFace ( newFace, // modified face - faceI, // label of face being modified + facei, // label of face being modified own, // owner nbr, // neighbour false, // face flip @@ -417,7 +417,7 @@ void Foam::perfectInterface::setRefinement polyModifyFace ( newFace.reverseFace(), // modified face - faceI, // label of face being modified + facei, // label of face being modified nbr, // owner own, // neighbour true, // face flip diff --git a/src/dynamicMesh/pointPatchDist/pointPatchDist.C b/src/dynamicMesh/pointPatchDist/pointPatchDist.C index 7f2b0e54cc6ef5db56e3043dc720134bcb9bdba1..6e830691d4ab2ca7ec8ba65473c725748d81033f 100644 --- a/src/dynamicMesh/pointPatchDist/pointPatchDist.C +++ b/src/dynamicMesh/pointPatchDist/pointPatchDist.C @@ -72,8 +72,8 @@ void Foam::pointPatchDist::correct() forAllConstIter(labelHashSet, patchIDs_, iter) { - label patchI = iter.key(); - nPoints += pbm[patchI].meshPoints().size(); + label patchi = iter.key(); + nPoints += pbm[patchi].meshPoints().size(); } externalPointEdgePoint::trackingData td(points_); @@ -85,10 +85,10 @@ void Foam::pointPatchDist::correct() forAllConstIter(labelHashSet, patchIDs_, iter) { - label patchI = iter.key(); + label patchi = iter.key(); // Retrieve the patch now we have its index in patches. - const labelList& mp = pbm[patchI].meshPoints(); + const labelList& mp = pbm[patchi].meshPoints(); forAll(mp, ppI) { diff --git a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C index 8be41984af67df75495fdb3d84355516603c8a67..ce6453a8aa77d15473f5d3e6aecb9fba1f6870a1 100644 --- a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C +++ b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C @@ -348,9 +348,9 @@ bool Foam::faceCoupleInfo::regionEdge forAll(eFaces, i) { - label faceI = eFaces[i]; + label facei = eFaces[i]; - label meshFaceI = slavePatch().addressing()[faceI]; + label meshFaceI = slavePatch().addressing()[facei]; label patchI = slaveMesh.boundaryMesh().whichPatch(meshFaceI); @@ -1109,15 +1109,15 @@ Foam::label Foam::faceCoupleInfo::growCutFaces forAll(eFaces, j) { - const label faceI = eFaces[j]; + const label facei = eFaces[j]; - if (cutToMasterFaces_[faceI] == -1) + if (cutToMasterFaces_[facei] == -1) { - cutToMasterFaces_[faceI] = masterFaceI; - candidates.erase(faceI); + cutToMasterFaces_[facei] = masterFaceI; + candidates.erase(facei); nChanged++; } - else if (cutToMasterFaces_[faceI] != masterFaceI) + else if (cutToMasterFaces_[facei] != masterFaceI) { const pointField& cutPoints = cutFaces().points(); @@ -1126,14 +1126,14 @@ Foam::label Foam::faceCoupleInfo::growCutFaces const edge& e = cutFaces().edges()[cutEdgeI]; - label myMaster = cutToMasterFaces_[faceI]; + label myMaster = cutToMasterFaces_[facei]; const face& myF = masterPatch()[myMaster]; const face& nbrF = masterPatch()[masterFaceI]; FatalErrorInFunction << "Cut face " - << cutFaces()[faceI].points(cutPoints) + << cutFaces()[facei].points(cutPoints) << " has master " << myMaster << " but also connects to nbr face " @@ -2051,11 +2051,11 @@ Foam::labelList Foam::faceCoupleInfo::faceLabels(const polyPatch& pp) { labelList faces(pp.size()); - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - faces[i] = faceI++; + faces[i] = facei++; } return faces; } diff --git a/src/dynamicMesh/polyMeshAdder/faceCoupleInfoTemplates.C b/src/dynamicMesh/polyMeshAdder/faceCoupleInfoTemplates.C index 8e896efaf794d3ce0a69f48fe446d72f92368cc7..3b25a6da516c998785d32663adfb510980df71a8 100644 --- a/src/dynamicMesh/polyMeshAdder/faceCoupleInfoTemplates.C +++ b/src/dynamicMesh/polyMeshAdder/faceCoupleInfoTemplates.C @@ -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 @@ -39,11 +39,11 @@ Foam::pointField Foam::faceCoupleInfo::calcFaceCentres { pointField fc(size); - label faceI = start; + label facei = start; forAll(fc, i) { - fc[i] = faces[faceI++].centre(points); + fc[i] = faces[facei++].centre(points); } return fc; } diff --git a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C index d9fe330794c1c23e003ca554917519dca32a7cc9..7cdb7242e5fe69a2468992761b3f8f04aad7dcb3 100644 --- a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C +++ b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C @@ -51,9 +51,9 @@ Foam::label Foam::polyMeshAdder::patchIndex const word& pType = p.type(); const word& pName = p.name(); - label patchI = findIndex(allPatchNames, pName); + label patchi = findIndex(allPatchNames, pName); - if (patchI == -1) + if (patchi == -1) { // Patch not found. Append to the list allPatchNames.append(pName); @@ -61,10 +61,10 @@ Foam::label Foam::polyMeshAdder::patchIndex return allPatchNames.size() - 1; } - else if (allPatchTypes[patchI] == pType) + else if (allPatchTypes[patchi] == pType) { // Found name and types match - return patchI; + return patchi; } else { @@ -138,11 +138,11 @@ void Foam::polyMeshAdder::mergePatchNames // Add mesh1 patches and build map both ways. from1ToAllPatches.setSize(patches1.size()); - forAll(patches1, patchI) + forAll(patches1, patchi) { - from1ToAllPatches[patchI] = patchIndex + from1ToAllPatches[patchi] = patchIndex ( - patches1[patchI], + patches1[patchi], allPatchNames, allPatchTypes ); @@ -167,9 +167,9 @@ Foam::labelList Foam::polyMeshAdder::getPatchStarts ) { labelList patchStarts(patches.size()); - forAll(patches, patchI) + forAll(patches, patchi) { - patchStarts[patchI] = patches[patchI].start(); + patchStarts[patchi] = patches[patchi].start(); } return patchStarts; } @@ -181,9 +181,9 @@ Foam::labelList Foam::polyMeshAdder::getPatchSizes ) { labelList patchSizes(patches.size()); - forAll(patches, patchI) + forAll(patches, patchi) { - patchSizes[patchI] = patches[patchI].size(); + patchSizes[patchi] = patches[patchi].size(); } return patchSizes; } @@ -220,16 +220,16 @@ Foam::List<Foam::polyPatch*> Foam::polyMeshAdder::combinePatches // Copy patches0 with new sizes. First patches always come from // mesh0 and will always be present. - forAll(patches0, patchI) + forAll(patches0, patchi) { // Originates from mesh0. Clone with new size & filter out empty // patch. label filteredPatchI; - if (nFaces[patchI] == 0 && isA<processorPolyPatch>(patches0[patchI])) + if (nFaces[patchi] == 0 && isA<processorPolyPatch>(patches0[patchi])) { //Pout<< "Removing zero sized mesh0 patch " - // << patches0[patchI].name() << endl; + // << patches0[patchi].name() << endl; filteredPatchI = -1; } else @@ -238,31 +238,31 @@ Foam::List<Foam::polyPatch*> Foam::polyMeshAdder::combinePatches allPatches.append ( - patches0[patchI].clone + patches0[patchi].clone ( allBoundaryMesh, filteredPatchI, - nFaces[patchI], + nFaces[patchi], 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) + if (fromAllTo1Patches[patchi] != -1) { - from1ToAllPatches[fromAllTo1Patches[patchI]] = filteredPatchI; + from1ToAllPatches[fromAllTo1Patches[patchi]] = filteredPatchI; } } // Copy unique patches of mesh1. - forAll(from1ToAllPatches, patchI) + forAll(from1ToAllPatches, patchi) { - label allPatchI = from1ToAllPatches[patchI]; + label allPatchI = from1ToAllPatches[patchi]; if (allPatchI >= patches0.size()) { @@ -273,11 +273,11 @@ Foam::List<Foam::polyPatch*> Foam::polyMeshAdder::combinePatches if ( nFaces[allPatchI] == 0 - && isA<processorPolyPatch>(patches1[patchI]) + && isA<processorPolyPatch>(patches1[patchi]) ) { //Pout<< "Removing zero sized mesh1 patch " - // << patches1[patchI].name() << endl; + // << patches1[patchi].name() << endl; filteredPatchI = -1; } else @@ -286,7 +286,7 @@ Foam::List<Foam::polyPatch*> Foam::polyMeshAdder::combinePatches allPatches.append ( - patches1[patchI].clone + patches1[patchi].clone ( allBoundaryMesh, filteredPatchI, @@ -297,7 +297,7 @@ Foam::List<Foam::polyPatch*> Foam::polyMeshAdder::combinePatches startFaceI += nFaces[allPatchI]; } - from1ToAllPatches[patchI] = filteredPatchI; + from1ToAllPatches[patchi] = filteredPatchI; } } @@ -318,35 +318,35 @@ Foam::labelList Foam::polyMeshAdder::getFaceOrder labelList oldToNew(owner.size(), -1); // Leave boundary faces in order - for (label faceI = nInternalFaces; faceI < owner.size(); ++faceI) + for (label facei = nInternalFaces; facei < owner.size(); ++facei) { - oldToNew[faceI] = faceI; + oldToNew[facei] = facei; } // First unassigned face label newFaceI = 0; - forAll(cells, cellI) + forAll(cells, celli) { - const labelList& cFaces = cells[cellI]; + const labelList& cFaces = cells[celli]; SortableList<label> nbr(cFaces.size()); forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - label nbrCellI = neighbour[faceI]; + label nbrCellI = neighbour[facei]; 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; @@ -377,13 +377,13 @@ Foam::labelList Foam::polyMeshAdder::getFaceOrder // Check done all faces. - forAll(oldToNew, faceI) + forAll(oldToNew, facei) { - if (oldToNew[faceI] == -1) + if (oldToNew[facei] == -1) { FatalErrorInFunction << "Did not determine new position" - << " for face " << faceI + << " for face " << facei << abort(FatalError); } } @@ -622,12 +622,12 @@ void Foam::polyMeshAdder::mergePrimitives from1ToAllFaces = -1; // Copy mesh0 internal faces (always uncoupled) - for (label faceI = 0; faceI < mesh0.nInternalFaces(); faceI++) + 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 @@ -673,12 +673,12 @@ void Foam::polyMeshAdder::mergePrimitives } // Copy mesh1 internal faces (always uncoupled) - for (label faceI = 0; faceI < mesh1.nInternalFaces(); faceI++) + 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; @@ -693,24 +693,24 @@ void Foam::polyMeshAdder::mergePrimitives nFacesPerPatch[allPatchI] += pp.size(); - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - if (from0ToAllFaces[faceI] == -1) + if (from0ToAllFaces[facei] == -1) { // Is uncoupled face since has not yet been dealt with allFaces[allFaceI] = renumber ( from0ToAllPoints, - mesh0.faces()[faceI] + mesh0.faces()[facei] ); - allOwner[allFaceI] = mesh0.faceOwner()[faceI]; + allOwner[allFaceI] = mesh0.faceOwner()[facei]; allNeighbour[allFaceI] = -1; - from0ToAllFaces[faceI] = allFaceI++; + from0ToAllFaces[facei] = allFaceI++; } - faceI++; + facei++; } } if (fromAllTo1Patches[allPatchI] != -1) @@ -720,26 +720,26 @@ void Foam::polyMeshAdder::mergePrimitives nFacesPerPatch[allPatchI] += pp.size(); - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - if (from1ToAllFaces[faceI] == -1) + if (from1ToAllFaces[facei] == -1) { // Is uncoupled face allFaces[allFaceI] = renumber ( from1ToAllPoints, - mesh1.faces()[faceI] + mesh1.faces()[facei] ); allOwner[allFaceI] = - mesh1.faceOwner()[faceI] + mesh1.faceOwner()[facei] + mesh0.nCells(); allNeighbour[allFaceI] = -1; - from1ToAllFaces[faceI] = allFaceI++; + from1ToAllFaces[facei] = allFaceI++; } - faceI++; + facei++; } } } @@ -2233,9 +2233,9 @@ void Foam::polyMeshAdder::mergePoints // avoid addressing calculation. const faceList& faces = mesh.faces(); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; bool hasMerged = false; @@ -2271,15 +2271,15 @@ void Foam::polyMeshAdder::mergePoints } } - label patchID = mesh.boundaryMesh().whichPatch(faceI); - label nei = (patchID == -1 ? mesh.faceNeighbour()[faceI] : -1); - label zoneID = mesh.faceZones().whichZone(faceI); + label patchID = mesh.boundaryMesh().whichPatch(facei); + label nei = (patchID == -1 ? mesh.faceNeighbour()[facei] : -1); + label zoneID = mesh.faceZones().whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = mesh.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } meshMod.setAction @@ -2287,8 +2287,8 @@ void Foam::polyMeshAdder::mergePoints polyModifyFace ( newF, // modified face - faceI, // label of face - mesh.faceOwner()[faceI], // owner + facei, // label of face + mesh.faceOwner()[facei], // owner nei, // neighbour false, // face flip patchID, // patch for face diff --git a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C index ced6d24aeb2a1c1f5e1970c0ea3f10e17a3708bf..468d6715d1285df0a62cb1ee6ca1882e9b90dc21 100644 --- a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C +++ b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C @@ -630,9 +630,9 @@ void Foam::polyMeshFilter::checkMeshFacesAndRelaxEdges { const faceList& faces = mesh_.faces(); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; forAll(f, fpI) { @@ -640,12 +640,12 @@ void Foam::polyMeshFilter::checkMeshFacesAndRelaxEdges if (pointErrorCount[f[fpI]] >= maxPointErrorCount()) { - faceFilterFactor_[faceI] = -1; + faceFilterFactor_[facei] = -1; } if (isErrorPoint[ptIndex]) { - faceFilterFactor_[faceI] *= faceReductionFactor(); + faceFilterFactor_[facei] *= faceReductionFactor(); break; } @@ -657,9 +657,9 @@ void Foam::polyMeshFilter::checkMeshFacesAndRelaxEdges for (label smoothIter = 0; smoothIter < maxSmoothIters(); ++smoothIter) { // Smooth faceFilterFactor - forAll(faces, faceI) + forAll(faces, facei) { - const labelList& fEdges = mesh_.faceEdges()[faceI]; + const labelList& fEdges = mesh_.faceEdges()[facei]; scalar sumFaceFilterFactors = 0; label nFaces = 0; @@ -689,7 +689,7 @@ void Foam::polyMeshFilter::checkMeshFacesAndRelaxEdges } } - if (eFace != faceI) + if (eFace != facei) { sumFaceFilterFactors += faceFilterFactor_[eFace]; nFaces++; @@ -702,9 +702,9 @@ void Foam::polyMeshFilter::checkMeshFacesAndRelaxEdges continue; } - faceFilterFactor_[faceI] = min + faceFilterFactor_[facei] = min ( - faceFilterFactor_[faceI], + faceFilterFactor_[facei], sumFaceFilterFactors/nFaces ); } diff --git a/src/dynamicMesh/polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C b/src/dynamicMesh/polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C index 6805daf9590be51fafb56ac8cf864820d8fa1f08..c8f70ced08102cc98945d5eb70ac0175456336a8 100644 --- a/src/dynamicMesh/polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C +++ b/src/dynamicMesh/polyTopoChange/attachPolyTopoChanger/attachPolyTopoChanger.C @@ -81,16 +81,16 @@ void Foam::attachPolyTopoChanger::attach(const bool removeEmptyPatches) List<polyPatch*> newPatches(oldPatches.size()); label nNewPatches = 0; - forAll(oldPatches, patchI) + forAll(oldPatches, patchi) { - if (oldPatches[patchI].size()) + if (oldPatches[patchi].size()) { - newPatches[nNewPatches] = oldPatches[patchI].clone + newPatches[nNewPatches] = oldPatches[patchi].clone ( mesh_.boundaryMesh(), nNewPatches, - oldPatches[patchI].size(), - oldPatches[patchI].start() + oldPatches[patchi].size(), + oldPatches[patchi].start() ).ptr(); nNewPatches++; @@ -99,8 +99,8 @@ void Foam::attachPolyTopoChanger::attach(const bool removeEmptyPatches) { if (debug) { - Pout<< "Removing zero-sized patch " << patchI - << " named " << oldPatches[patchI].name() << endl; + Pout<< "Removing zero-sized patch " << patchi + << " named " << oldPatches[patchi].name() << endl; } } } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C index 920585c6eb2309f44e1811ca2e9f5369f8315d1f..2d9f87b1c1a4c12c4a0cababee2a5f7e655f89cc 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.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 @@ -49,14 +49,14 @@ Foam::label Foam::addPatchCellLayer::nbrFace ( const labelListList& edgeFaces, const label edgeI, - const label faceI + const label facei ) { const labelList& eFaces = edgeFaces[edgeI]; if (eFaces.size() == 2) { - return (eFaces[0] != faceI ? eFaces[0] : eFaces[1]); + return (eFaces[0] != facei ? eFaces[0] : eFaces[1]); } else { @@ -278,22 +278,22 @@ Foam::label Foam::addPatchCellLayer::addSideFace forAll(meshFaces, k) { - label faceI = meshFaces[k]; + label facei = meshFaces[k]; if ( - (faceI != meshFaceI) - && (patches.whichPatch(faceI) == newPatchID) + (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); + zoneI = mesh_.faceZones().whichZone(facei); if (zoneI != -1) { - label index = mesh_.faceZones()[zoneI].whichFace(faceI); + label index = mesh_.faceZones()[zoneI].whichFace(facei); flip = mesh_.faceZones()[zoneI].flipMap()[index]; } break; @@ -432,15 +432,15 @@ Foam::label Foam::addPatchCellLayer::findProcPatch forAll(mesh.globalData().processorPatches(), i) { - label patchI = mesh.globalData().processorPatches()[i]; + label patchi = mesh.globalData().processorPatches()[i]; if ( - refCast<const processorPolyPatch>(patches[patchI]).neighbProcNo() + refCast<const processorPolyPatch>(patches[patchi]).neighbProcNo() == nbrProcID ) { - return patchI; + return patchi; } } return -1; @@ -450,18 +450,18 @@ Foam::label Foam::addPatchCellLayer::findProcPatch void Foam::addPatchCellLayer::setFaceProps ( const polyMesh& mesh, - const label faceI, + const label facei, - label& patchI, + label& patchi, label& zoneI, bool& zoneFlip ) { - patchI = mesh.boundaryMesh().whichPatch(faceI); - zoneI = mesh.faceZones().whichZone(faceI); + patchi = mesh.boundaryMesh().whichPatch(facei); + zoneI = mesh.faceZones().whichZone(facei); if (zoneI != -1) { - label index = mesh.faceZones()[zoneI].whichFace(faceI); + label index = mesh.faceZones()[zoneI].whichFace(facei); zoneFlip = mesh.faceZones()[zoneI].flipMap()[index]; } } @@ -673,20 +673,20 @@ void Foam::addPatchCellLayer::calcSidePatch forAll(meshFaces, k) { - label faceI = meshFaces[k]; + label facei = meshFaces[k]; - if (faceI != myFaceI && !mesh.isInternalFace(faceI)) + if (facei != myFaceI && !mesh.isInternalFace(facei)) { setFaceProps ( mesh, - faceI, + facei, sidePatchID[edgeI], sideZoneID[edgeI], sideFlip[edgeI] ); - inflateFaceI[edgeI] = faceI; + inflateFaceI[edgeI] = facei; inflateEdgeI[edgeI] = -1; break; @@ -741,28 +741,28 @@ void Foam::addPatchCellLayer::calcSidePatch forAll(meshFaces, k) { - label faceI = meshFaces[k]; + label facei = meshFaces[k]; - if (faceI != myFaceI) + if (facei != myFaceI) { - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { inflateEdgeI[edgeI] = meshEdgeI; } else { - if (patches.whichPatch(faceI) == sidePatchID[edgeI]) + if (patches.whichPatch(facei) == sidePatchID[edgeI]) { setFaceProps ( mesh, - faceI, + facei, sidePatchID[edgeI], sideZoneID[edgeI], sideFlip[edgeI] ); - inflateFaceI[edgeI] = faceI; + inflateFaceI[edgeI] = facei; inflateEdgeI[edgeI] = -1; break; @@ -1003,15 +1003,15 @@ void Foam::addPatchCellLayer::setRefinement forAll(meshFaces, i) { - label faceI = meshFaces[i]; + label facei = meshFaces[i]; - if (faceI != myFaceI) + if (facei != myFaceI) { - if (!mesh_.isInternalFace(faceI)) + if (!mesh_.isInternalFace(facei)) { if (bFaceI == -1) { - bFaceI = faceI; + bFaceI = facei; } else { @@ -1024,9 +1024,9 @@ void Foam::addPatchCellLayer::setRefinement << bFaceI << " fc:" << mesh_.faceCentres()[bFaceI] << " patch:" << patches.whichPatch(bFaceI) - << " and " << faceI << " fc:" - << mesh_.faceCentres()[faceI] - << " patch:" << patches.whichPatch(faceI) + << " and " << facei << " fc:" + << mesh_.faceCentres()[facei] + << " patch:" << patches.whichPatch(facei) << abort(FatalError); } } @@ -1230,7 +1230,7 @@ void Foam::addPatchCellLayer::setRefinement // Get new neighbour label nei; - label patchI; + label patchi; label zoneI = -1; bool flip = false; @@ -1239,7 +1239,7 @@ void Foam::addPatchCellLayer::setRefinement { // Top layer so is patch face. nei = -1; - patchI = patchID[patchFaceI]; + patchi = patchID[patchFaceI]; zoneI = mesh_.faceZones().whichZone(meshFaceI); if (zoneI != -1) { @@ -1251,7 +1251,7 @@ void Foam::addPatchCellLayer::setRefinement { // Internal face between layer i and i+1 nei = addedCells[patchFaceI][i+1]; - patchI = -1; + patchi = -1; } @@ -1266,7 +1266,7 @@ void Foam::addPatchCellLayer::setRefinement -1, // master edge (addToMesh_ ? meshFaceI : -1), // master face false, // flux flip - patchI, // patch for face + patchi, // patch for face zoneI, // zone for face flip // face zone flip ) diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.H index 158af5e1d8ec77574720b2b300dddc0175f0cfb0..4fc54130b042feb3e9ac070eaa5ec94f00a1269d 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.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 @@ -186,7 +186,7 @@ class addPatchCellLayer ( const labelListList& edgeFaces, const label edgeI, - const label faceI + const label facei ); //- Add vertex to face if unique. diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C index da9251c9d98e53dc8ca8b0267c6cf1c2c31ddff9..e760425bed7f6a4b2984cda0f5610ae372bc67d8 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.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 @@ -128,7 +128,7 @@ bool Foam::combineFaces::validFace void Foam::combineFaces::regioniseFaces ( const scalar minCos, - const label cellI, + const label celli, const labelList& cEdges, Map<label>& faceRegion ) const @@ -140,7 +140,7 @@ void Foam::combineFaces::regioniseFaces label edgeI = cEdges[i]; label f0, f1; - meshTools::getEdgeFaces(mesh_, cellI, edgeI, f0, f1); + meshTools::getEdgeFaces(mesh_, celli, edgeI, f0, f1); label p0 = patches.whichPatch(f0); label p1 = patches.whichPatch(f1); @@ -215,7 +215,7 @@ void Foam::combineFaces::regioniseFaces bool Foam::combineFaces::faceNeighboursValid ( - const label cellI, + const label celli, const Map<label>& faceRegion ) const { @@ -224,20 +224,20 @@ bool Foam::combineFaces::faceNeighboursValid return true; } - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; DynamicList<label> storage; // Test for face collapsing to edge since too many neighbours merged. forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - if (!faceRegion.found(faceI)) + if (!faceRegion.found(facei)) { - const labelList& fEdges = mesh_.faceEdges(faceI, storage); + const labelList& fEdges = mesh_.faceEdges(facei, storage); - // Count number of remaining faces neighbouring faceI. This has + // Count number of remaining faces neighbouring facei. This has // to be 3 or more. // Unregioned neighbouring faces @@ -248,7 +248,7 @@ bool Foam::combineFaces::faceNeighboursValid forAll(fEdges, i) { label edgeI = fEdges[i]; - label nbrI = meshTools::otherFace(mesh_, cellI, faceI, edgeI); + label nbrI = meshTools::otherFace(mesh_, celli, facei, edgeI); Map<label>::const_iterator iter = faceRegion.find(nbrI); @@ -310,15 +310,15 @@ Foam::labelListList Foam::combineFaces::getMergeSets // On all cells regionise the faces forAllConstIter(labelHashSet, boundaryCells, iter) { - label cellI = iter.key(); + label celli = iter.key(); - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; - const labelList& cEdges = mesh_.cellEdges(cellI, storage); + const labelList& cEdges = mesh_.cellEdges(celli, storage); // Region per face Map<label> faceRegion(cFaces.size()); - regioniseFaces(featureCos, cellI, cEdges, faceRegion); + regioniseFaces(featureCos, celli, cEdges, faceRegion); // Now we have in faceRegion for every face the region with planar // face sharing the same region. We now check whether the resulting @@ -326,14 +326,14 @@ Foam::labelListList Foam::combineFaces::getMergeSets // - to become a set of edges since too many faces are merged. // - to become convex - if (faceNeighboursValid(cellI, faceRegion)) + if (faceNeighboursValid(celli, faceRegion)) { // Create region-to-faces addressing Map<labelList> regionToFaces(faceRegion.size()); forAllConstIter(Map<label>, faceRegion, iter) { - label faceI = iter.key(); + label facei = iter.key(); label region = iter(); Map<labelList>::iterator regionFnd = regionToFaces.find(region); @@ -343,11 +343,11 @@ Foam::labelListList Foam::combineFaces::getMergeSets labelList& setFaces = regionFnd(); label sz = setFaces.size(); setFaces.setSize(sz+1); - setFaces[sz] = faceI; + setFaces[sz] = facei; } else { - regionToFaces.insert(region, labelList(1, faceI)); + regionToFaces.insert(region, labelList(1, facei)); } } @@ -390,9 +390,9 @@ Foam::labelListList Foam::combineFaces::getMergeSets // Pick up all cells on boundary labelHashSet boundaryCells(mesh_.nFaces()-mesh_.nInternalFaces()); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& patch = patches[patchI]; + const polyPatch& patch = patches[patchi]; if (!patch.coupled()) { @@ -582,9 +582,9 @@ void Foam::combineFaces::setRefinement { forAll(setFaces, i) { - label patchI = patches.whichPatch(setFaces[i]); + label patchi = patches.whichPatch(setFaces[i]); - if (patchI == -1 || patches[patchI].coupled()) + if (patchi == -1 || patches[patchi].coupled()) { FatalErrorInFunction << "Can only merge non-coupled boundary faces" @@ -639,7 +639,7 @@ void Foam::combineFaces::setRefinement zoneFlip = fZone.flipMap()[fZone.whichFace(masterFaceI)]; } - label patchI = mesh_.boundaryMesh().whichPatch(masterFaceI); + label patchi = mesh_.boundaryMesh().whichPatch(masterFaceI); meshMod.setAction ( @@ -650,7 +650,7 @@ void Foam::combineFaces::setRefinement mesh_.faceOwner()[masterFaceI], // owner -1, // neighbour false, // face flip - patchI, // patch for face + patchi, // patch for face false, // remove from zone zoneID, // zone for face zoneFlip // face flip in zone @@ -922,13 +922,13 @@ void Foam::combineFaces::setUnrefinement const faceZone& fZone = mesh_.faceZones()[zoneID]; zoneFlip = fZone.flipMap()[fZone.whichFace(masterFaceI)]; } - label patchI = mesh_.boundaryMesh().whichPatch(masterFaceI); + label patchi = mesh_.boundaryMesh().whichPatch(masterFaceI); - if (mesh_.boundaryMesh()[patchI].coupled()) + if (mesh_.boundaryMesh()[patchi].coupled()) { FatalErrorInFunction << "Master face " << masterFaceI << " is on coupled patch " - << mesh_.boundaryMesh()[patchI].name() + << mesh_.boundaryMesh()[patchi].name() << abort(FatalError); } @@ -945,7 +945,7 @@ void Foam::combineFaces::setUnrefinement own, // owner -1, // neighbour false, // face flip - patchI, // patch for face + patchi, // patch for face false, // remove from zone zoneID, // zone for face zoneFlip // face flip in zone @@ -959,7 +959,7 @@ void Foam::combineFaces::setUnrefinement //Pout<< "Restoring removed face with vertices " << faces[i] // << endl; - label faceI = meshMod.setAction + label facei = meshMod.setAction ( polyAddFace ( @@ -970,12 +970,12 @@ void Foam::combineFaces::setUnrefinement -1, // masterEdgeID, masterFaceI, // masterFaceID, false, // flipFaceFlux, - patchI, // patchID, + 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/combineFaces.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.H index f3c35879402d380bd84ee0901e29e6d05495fede..c02b26a3366ff1e3b054f7c0ffcc27e9c029771a 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/combineFaces.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 @@ -101,7 +101,7 @@ class combineFaces void regioniseFaces ( const scalar minCos, - const label cellI, + const label celli, const labelList& cEdges, Map<label>& faceRegion ) const; @@ -109,7 +109,7 @@ class combineFaces //- Does merging faces invalidate (unmerged) neighbouring faces? bool faceNeighboursValid ( - const label cellI, + const label celli, const Map<label>& faceRegion ) const; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/duplicatePoints.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/duplicatePoints.C index 928f792f2e33de6a628e7cd5ce08e8242816467d..b314b61ec65eb5f794f61877f1e201e0af2558bc 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/duplicatePoints.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/duplicatePoints.C @@ -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 @@ -111,12 +111,12 @@ void Foam::duplicatePoints::setRefinement forAllConstIter(Map<label>, meshFaceMap, iter) { - label faceI = iter.key(); + label facei = iter.key(); label localI = iter(); // Replace points with duplicated ones. const face& fRegion = faceRegions[localI]; - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; newFace.setSize(f.size()); forAll(f, fp) @@ -146,23 +146,23 @@ void Foam::duplicatePoints::setRefinement } // Get current zone info - label zoneID = mesh_.faceZones().whichZone(faceI); + label zoneID = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { meshMod.modifyFace ( newFace, // modified face - faceI, // label of face being modified - mesh_.faceOwner()[faceI], // owner - mesh_.faceNeighbour()[faceI], // neighbour + facei, // label of face being modified + mesh_.faceOwner()[facei], // owner + mesh_.faceNeighbour()[facei], // neighbour false, // face flip -1, // patch for face zoneID, // zone for face @@ -174,11 +174,11 @@ void Foam::duplicatePoints::setRefinement meshMod.modifyFace ( newFace, // modified face - faceI, // label of face being modified - mesh_.faceOwner()[faceI], // owner + facei, // label of face being modified + mesh_.faceOwner()[facei], // owner -1, // neighbour false, // face flip - patches.whichPatch(faceI), // patch for face + patches.whichPatch(facei), // patch for face zoneID, // zone for face zoneFlip // face flip in zone ); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C index 5136f38376253a5ec674b83a1f4403b330a63bf7..691b4b6a29ff40a2f3e64cd007f74fb2c5c4e5d5 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C @@ -119,13 +119,13 @@ Foam::label Foam::edgeCollapser::checkMeshQuality Foam::labelList Foam::edgeCollapser::edgesFromPoints ( - const label& faceI, + const label& facei, const labelList& pointLabels ) const { labelList edgeLabels(pointLabels.size() - 1, -1); - const labelList& faceEdges = mesh_.faceEdges()[faceI]; + const labelList& faceEdges = mesh_.faceEdges()[facei]; const edgeList& edges = mesh_.edges(); label count = 0; @@ -168,7 +168,7 @@ Foam::labelList Foam::edgeCollapser::edgesFromPoints void Foam::edgeCollapser::collapseToEdge ( - const label faceI, + const label facei, const pointField& pts, const labelList& pointPriority, const vector& collapseAxis, @@ -223,7 +223,7 @@ void Foam::edgeCollapser::collapseToEdge maxPriority = labelMin; maxPriorityPts.clear(); - labelList faceEdgesNeg = edgesFromPoints(faceI, facePtsNeg); + labelList faceEdgesNeg = edgesFromPoints(facei, facePtsNeg); forAll(faceEdgesNeg, edgeI) { @@ -270,7 +270,7 @@ void Foam::edgeCollapser::collapseToEdge // collapseToPtB = pts[maxPriorityPts.first()]; } - labelList faceEdgesPos = edgesFromPoints(faceI, facePtsPos); + labelList faceEdgesPos = edgesFromPoints(facei, facePtsPos); forAll(faceEdgesPos, edgeI) { @@ -286,7 +286,7 @@ void Foam::edgeCollapser::collapseToEdge void Foam::edgeCollapser::collapseToPoint ( - const label& faceI, + const label& facei, const pointField& pts, const labelList& pointPriority, const point& fC, @@ -295,7 +295,7 @@ void Foam::edgeCollapser::collapseToPoint Map<point>& collapsePointToLocation ) const { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; Foam::point collapseToPt = fC; @@ -371,7 +371,7 @@ void Foam::edgeCollapser::collapseToPoint // } // } - const labelList& faceEdges = mesh_.faceEdges()[faceI]; + const labelList& faceEdges = mesh_.faceEdges()[facei]; forAll(faceEdges, eI) { @@ -498,9 +498,9 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const scalarField neiCellVolumes(nBoundaryFaces, -1); // Now do boundary faces - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& patch = patches[patchI]; + const polyPatch& patch = patches[patchi]; label bFaceI = patch.start() - mesh_.nInternalFaces(); @@ -531,9 +531,9 @@ Foam::scalarField Foam::edgeCollapser::calcTargetFaceSizes() const syncTools::swapBoundaryFaceList(mesh_, neiCellVolumes); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& patch = patches[patchI]; + const polyPatch& patch = patches[patchi]; label bFaceI = patch.start() - mesh_.nInternalFaces(); @@ -563,14 +563,14 @@ Foam::edgeCollapser::collapseType Foam::edgeCollapser::collapseFace ( const labelList& pointPriority, const face& f, - const label faceI, + const label facei, const scalar targetFaceSize, PackedBoolList& collapseEdge, Map<point>& collapsePointToLocation, const scalarField& faceFilterFactor ) const { - const scalar collapseSizeLimitCoeff = faceFilterFactor[faceI]; + const scalar collapseSizeLimitCoeff = faceFilterFactor[facei]; const pointField& pts = mesh_.points(); @@ -714,7 +714,7 @@ Foam::edgeCollapser::collapseType Foam::edgeCollapser::collapseFace { collapseToPoint ( - faceI, + facei, pts, pointPriority, fC, @@ -727,7 +727,7 @@ Foam::edgeCollapser::collapseType Foam::edgeCollapser::collapseFace { collapseToEdge ( - faceI, + facei, pts, pointPriority, collapseAxis, @@ -1426,33 +1426,33 @@ bool Foam::edgeCollapser::setRefinement do { - forAll(newFaces, faceI) + forAll(newFaces, facei) { - filterFace(collapseStrings, allPointInfo, newFaces[faceI]); + filterFace(collapseStrings, allPointInfo, newFaces[facei]); } // Check if faces to be collapsed cause cells to become collapsed. label nCellCollapsed = 0; - forAll(cells, cellI) + forAll(cells, celli) { - if (!cellRemoved[cellI]) + if (!cellRemoved[celli]) { - const cell& cFaces = cells[cellI]; + const cell& cFaces = cells[celli]; label nFaces = cFaces.size(); forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (newFaces[faceI].size() < 3) + if (newFaces[facei].size() < 3) { --nFaces; if (nFaces < 4) { - Pout<< "Cell:" << cellI + Pout<< "Cell:" << celli << " uses faces:" << cFaces << " of which too many are marked for removal:" << endl @@ -1468,10 +1468,10 @@ bool Foam::edgeCollapser::setRefinement } Pout<< endl; - cellRemoved[cellI] = true; + cellRemoved[celli] = true; // Collapse all edges of cell to nothing -// collapseEdges(cellEdges[cellI]); +// collapseEdges(cellEdges[celli]); nCellCollapsed++; @@ -1500,26 +1500,26 @@ bool Foam::edgeCollapser::setRefinement // Mark points used. boolList usedPoint(mesh_.nPoints(), false); - forAll(cellRemoved, cellI) + forAll(cellRemoved, celli) { - if (cellRemoved[cellI]) + if (cellRemoved[celli]) { - meshMod.removeCell(cellI, -1); + meshMod.removeCell(celli, -1); } } // Remove faces - forAll(newFaces, faceI) + forAll(newFaces, facei) { - const face& f = newFaces[faceI]; + const face& f = newFaces[facei]; if (f.size() < 3) { - meshMod.removeFace(faceI, -1); + meshMod.removeFace(facei, -1); meshChanged = true; // Mark face as been done. - doneFace[faceI] = true; + doneFace[facei] = true; } else { @@ -1579,14 +1579,14 @@ bool Foam::edgeCollapser::setRefinement forAll(changedFaces, changedFaceI) { - label faceI = changedFaces[changedFaceI]; + label facei = changedFaces[changedFaceI]; - if (!doneFace[faceI]) + if (!doneFace[facei]) { - doneFace[faceI] = true; + doneFace[facei] = true; // Get current zone info - label zoneID = faceZones.whichZone(faceI); + label zoneID = faceZones.whichZone(facei); bool zoneFlip = false; @@ -1594,27 +1594,27 @@ bool Foam::edgeCollapser::setRefinement { const faceZone& fZone = faceZones[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } // Get current connectivity - label own = faceOwner[faceI]; + label own = faceOwner[facei]; label nei = -1; label patchID = -1; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - nei = faceNeighbour[faceI]; + nei = faceNeighbour[facei]; } else { - patchID = boundaryMesh.whichPatch(faceI); + patchID = boundaryMesh.whichPatch(facei); } meshMod.modifyFace ( - newFaces[faceI], // face - faceI, // faceI to change + newFaces[facei], // face + facei, // facei to change own, // owner nei, // neighbour false, // flipFaceFlux @@ -1683,13 +1683,13 @@ void Foam::edgeCollapser::consistentCollapse PackedBoolList isCollapsedFace(mesh_.nFaces()); PackedBoolList markedPoints(mesh_.nPoints()); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; - isCollapsedFace[faceI] = isFaceCollapsed(f, allPointInfo); + isCollapsedFace[facei] = isFaceCollapsed(f, allPointInfo); - if (isCollapsedFace[faceI] < 1) + if (isCollapsedFace[facei] < 1) { determineDuplicatePointsOnFace ( @@ -1741,17 +1741,17 @@ void Foam::edgeCollapser::consistentCollapse if (!allowCellCollapse) { // Check collapsed cells - forAll(cells, cellI) + forAll(cells, celli) { - const cell& cFaces = cells[cellI]; + const cell& cFaces = cells[celli]; label nFaces = cFaces.size(); forAll(cFaces, fI) { - label faceI = cFaces[fI]; + label facei = cFaces[fI]; - if (isCollapsedFace[faceI]) + if (isCollapsedFace[facei]) { nFaces--; } @@ -1761,9 +1761,9 @@ void Foam::edgeCollapser::consistentCollapse { forAll(cFaces, fI) { - label faceI = cFaces[fI]; + label facei = cFaces[fI]; - const labelList& fEdges = faceEdges[faceI]; + const labelList& fEdges = faceEdges[facei]; // Unmark this face for collapse forAll(fEdges, fEdgeI) @@ -1780,7 +1780,7 @@ void Foam::edgeCollapser::consistentCollapse } // Uncollapsed this face. - isCollapsedFace[faceI] = false; + isCollapsedFace[facei] = false; nFaces++; } } @@ -1788,7 +1788,7 @@ void Foam::edgeCollapser::consistentCollapse if (nFaces < 4) { FatalErrorInFunction - << "Cell " << cellI << " " << cFaces << nl + << "Cell " << celli << " " << cFaces << nl << "is " << nFaces << ", " << "but cell collapse has been disabled." << abort(FatalError); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.H index 8a13628f2f73fa147249b8c48f21d2da9b8fd83e..98861ca6ef32c0f7c52ec66217366ac704724f7c 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.H @@ -101,11 +101,11 @@ private: // Private Member Functions - //- Create an edgeList of edges in faceI which have both their points + //- Create an edgeList of edges in facei which have both their points // in pointLabels labelList edgesFromPoints ( - const label& faceI, + const label& facei, const labelList& pointLabels ) const; @@ -113,7 +113,7 @@ private: // locations for points that will move as a result of the collapse void collapseToEdge ( - const label faceI, + const label facei, const pointField& pts, const labelList& pointPriority, const vector& collapseAxis, @@ -131,7 +131,7 @@ private: // locations for points that will move as a result of the collapse void collapseToPoint ( - const label& faceI, + const label& facei, const pointField& pts, const labelList& pointPriority, const point& fC, @@ -159,7 +159,7 @@ private: ( const labelList& pointPriority, const face& f, - const label faceI, + const label facei, const scalar targetFaceSize, PackedBoolList& collapseEdge, Map<point>& collapsePointToLocation, diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/faceCollapser.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/faceCollapser.C index 0f61fbb5d1d16ba387c7853f81a08d7a34696872..14a710b3e38b362d93e80e88370d638335057641 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/faceCollapser.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/faceCollapser.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 @@ -93,12 +93,12 @@ Foam::label Foam::faceCollapser::findEdge void Foam::faceCollapser::filterFace ( const Map<labelList>& splitEdges, - const label faceI, + const label facei, polyTopoChange& meshMod ) const { - const face& f = mesh_.faces()[faceI]; - const labelList& fEdges = mesh_.faceEdges()[faceI]; + const face& f = mesh_.faces()[facei]; + const labelList& fEdges = mesh_.faceEdges()[facei]; // Space for replaced vertices and split edges. DynamicList<label> newFace(10 * f.size()); @@ -146,7 +146,7 @@ void Foam::faceCollapser::filterFace } face newF(newFace.shrink()); - //Pout<< "Modifying face:" << faceI << " from " << f << " to " << newFace + //Pout<< "Modifying face:" << facei << " from " << f << " to " << newFace // << endl; if (newF != f) @@ -155,17 +155,17 @@ void Foam::faceCollapser::filterFace label patchI = -1; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - nei = mesh_.faceNeighbour()[faceI]; + nei = mesh_.faceNeighbour()[facei]; } else { - patchI = mesh_.boundaryMesh().whichPatch(faceI); + patchI = mesh_.boundaryMesh().whichPatch(facei); } // Get current zone info - label zoneID = mesh_.faceZones().whichZone(faceI); + label zoneID = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; @@ -173,7 +173,7 @@ void Foam::faceCollapser::filterFace { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } meshMod.setAction @@ -181,8 +181,8 @@ void Foam::faceCollapser::filterFace polyModifyFace ( newF, // modified face - faceI, // label of face being modified - mesh_.faceOwner()[faceI], // owner + facei, // label of face being modified + mesh_.faceOwner()[facei], // owner nei, // neighbour false, // face flip patchI, // patch for face @@ -235,9 +235,9 @@ void Foam::faceCollapser::setRefinement forAll(faceLabels, i) { - const label faceI = faceLabels[i]; + const label facei = faceLabels[i]; - const face& f = faces[faceI]; + const face& f = faces[facei]; const label fpA = fpStart[i]; const label fpB = fpEnd[i]; @@ -375,7 +375,7 @@ void Foam::faceCollapser::setRefinement meshTools::writeOBJ(str, faceList(1, f), points); FatalErrorInFunction - << "Trying to collapse face:" << faceI << " vertices:" << f + << "Trying to collapse face:" << facei << " vertices:" << f << " to edges between vertices " << f[fpA] << " and " << f[fpB] << " but " << f[fpB] << " does not seem to be the" << " vertex furthest away from " << f[fpA] << endl @@ -397,7 +397,7 @@ void Foam::faceCollapser::setRefinement sortedFp[fp] = i; } - const labelList& fEdges = mesh_.faceEdges()[faceI]; + const labelList& fEdges = mesh_.faceEdges()[facei]; // Now look up all edges in the face and see if they get extra // vertices inserted and build an edge-to-intersected-points table. @@ -457,7 +457,7 @@ void Foam::faceCollapser::setRefinement } // Mark all faces affected - insert(edgeFaces[edgeI], faceI, affectedFaces); + insert(edgeFaces[edgeI], facei, affectedFaces); } } } @@ -482,12 +482,12 @@ void Foam::faceCollapser::setRefinement forAll(faceLabels, i) { - const label faceI = faceLabels[i]; + const label facei = faceLabels[i]; - meshMod.setAction(polyRemoveFace(faceI)); + meshMod.setAction(polyRemoveFace(facei)); // Update list of faces we still have to modify - affectedFaces.erase(faceI); + affectedFaces.erase(facei); } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/faceCollapser.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/faceCollapser.H index 9fafff8f61c1a2818ff232b9fc064a42a9ed6bb9..4e610928c81498bc6d24f199b4cca64b25bcb3ae 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/faceCollapser.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/faceCollapser.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 @@ -107,7 +107,7 @@ class faceCollapser void filterFace ( const Map<labelList>& splitEdges, - const label faceI, + const label facei, polyTopoChange& meshMod ) const; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C index 36747fefa957b4502196bc203ade2205675daf8b..b030377f354e5ffa3e94056473e6e2060bd045fd 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C @@ -96,7 +96,7 @@ void Foam::hexRef8::reorder void Foam::hexRef8::getFaceInfo ( - const label faceI, + const label facei, label& patchID, label& zoneID, label& zoneFlip @@ -104,12 +104,12 @@ void Foam::hexRef8::getFaceInfo { patchID = -1; - if (!mesh_.isInternalFace(faceI)) + if (!mesh_.isInternalFace(facei)) { - patchID = mesh_.boundaryMesh().whichPatch(faceI); + patchID = mesh_.boundaryMesh().whichPatch(facei); } - zoneID = mesh_.faceZones().whichZone(faceI); + zoneID = mesh_.faceZones().whichZone(facei); zoneFlip = false; @@ -117,16 +117,16 @@ void Foam::hexRef8::getFaceInfo { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } } -// Adds a face on top of existing faceI. +// Adds a face on top of existing facei. Foam::label Foam::hexRef8::addFace ( polyTopoChange& meshMod, - const label faceI, + const label facei, const face& newFace, const label own, const label nei @@ -134,7 +134,7 @@ Foam::label Foam::hexRef8::addFace { label patchID, zoneID, zoneFlip; - getFaceInfo(faceI, patchID, zoneID, zoneFlip); + getFaceInfo(facei, patchID, zoneID, zoneFlip); label newFaceI = -1; @@ -150,7 +150,7 @@ Foam::label Foam::hexRef8::addFace nei, // neighbour -1, // master point -1, // master edge - faceI, // master face for addition + facei, // master face for addition false, // flux flip patchID, // patch for face zoneID, // zone for face @@ -170,7 +170,7 @@ Foam::label Foam::hexRef8::addFace own, // neighbour -1, // master point -1, // master edge - faceI, // master face for addition + facei, // master face for addition false, // flux flip patchID, // patch for face zoneID, // zone for face @@ -283,11 +283,11 @@ Foam::label Foam::hexRef8::addInternalFace } -// Modifies existing faceI for either new owner/neighbour or new face points. +// Modifies existing facei for either new owner/neighbour or new face points. void Foam::hexRef8::modFace ( polyTopoChange& meshMod, - const label faceI, + const label facei, const face& newFace, const label own, const label nei @@ -295,16 +295,16 @@ void Foam::hexRef8::modFace { label patchID, zoneID, zoneFlip; - getFaceInfo(faceI, patchID, zoneID, zoneFlip); + getFaceInfo(facei, patchID, zoneID, zoneFlip); if ( - (own != mesh_.faceOwner()[faceI]) + (own != mesh_.faceOwner()[facei]) || ( - mesh_.isInternalFace(faceI) - && (nei != mesh_.faceNeighbour()[faceI]) + mesh_.isInternalFace(facei) + && (nei != mesh_.faceNeighbour()[facei]) ) - || (newFace != mesh_.faces()[faceI]) + || (newFace != mesh_.faces()[facei]) ) { if ((nei == -1) || (own < nei)) @@ -314,7 +314,7 @@ void Foam::hexRef8::modFace polyModifyFace ( newFace, // modified face - faceI, // label of face being modified + facei, // label of face being modified own, // owner nei, // neighbour false, // face flip @@ -332,7 +332,7 @@ void Foam::hexRef8::modFace polyModifyFace ( newFace.reverseFace(), // modified face - faceI, // label of face being modified + facei, // label of face being modified nei, // owner own, // neighbour false, // face flip @@ -378,11 +378,11 @@ Foam::scalar Foam::hexRef8::getLevel0EdgeLength() const // labelMax if different levels, otherwise levels of connected cells. labelList edgeLevel(mesh_.nEdges(), -1); - forAll(cellLevel_, cellI) + forAll(cellLevel_, celli) { - const label cLevel = cellLevel_[cellI]; + const label cLevel = cellLevel_[celli]; - const labelList& cEdges = mesh_.cellEdges(cellI); + const labelList& cEdges = mesh_.cellEdges(celli); forAll(cEdges, i) { @@ -452,11 +452,11 @@ Foam::scalar Foam::hexRef8::getLevel0EdgeLength() const scalarField maxEdgeLenSqr(nLevels, -GREAT2); - forAll(cellLevel_, cellI) + forAll(cellLevel_, celli) { - const label cLevel = cellLevel_[cellI]; + const label cLevel = cellLevel_[celli]; - const labelList& cEdges = mesh_.cellEdges(cellI); + const labelList& cEdges = mesh_.cellEdges(celli); forAll(cEdges, i) { @@ -530,50 +530,50 @@ Foam::scalar Foam::hexRef8::getLevel0EdgeLength() const } -// Check whether pointI is an anchor on cellI. +// Check whether pointI is an anchor on celli. // If it is not check whether any other point on the face is an anchor cell. Foam::label Foam::hexRef8::getAnchorCell ( const labelListList& cellAnchorPoints, const labelListList& cellAddedCells, - const label cellI, - const label faceI, + const label celli, + const label facei, const label pointI ) const { - if (cellAnchorPoints[cellI].size()) + if (cellAnchorPoints[celli].size()) { - label index = findIndex(cellAnchorPoints[cellI], pointI); + label index = findIndex(cellAnchorPoints[celli], pointI); if (index != -1) { - return cellAddedCells[cellI][index]; + return cellAddedCells[celli][index]; } // pointI is not an anchor cell. // Maybe we are already a refined face so check all the face // vertices. - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; forAll(f, fp) { - label index = findIndex(cellAnchorPoints[cellI], f[fp]); + label index = findIndex(cellAnchorPoints[celli], f[fp]); if (index != -1) { - return cellAddedCells[cellI][index]; + return cellAddedCells[celli][index]; } } // Problem. - dumpCell(cellI); - Perr<< "cell:" << cellI << " anchorPoints:" << cellAnchorPoints[cellI] + dumpCell(celli); + Perr<< "cell:" << celli << " anchorPoints:" << cellAnchorPoints[celli] << endl; FatalErrorInFunction << "Could not find point " << pointI - << " in the anchorPoints for cell " << cellI << endl + << " in the anchorPoints for cell " << celli << endl << "Does your original mesh obey the 2:1 constraint and" << " did you use consistentRefinement to make your cells to refine" << " obey this constraint as well?" @@ -583,7 +583,7 @@ Foam::label Foam::hexRef8::getAnchorCell } else { - return cellI; + return celli; } } @@ -593,7 +593,7 @@ void Foam::hexRef8::getFaceNeighbours ( const labelListList& cellAnchorPoints, const labelListList& cellAddedCells, - const label faceI, + const label facei, const label pointI, label& own, @@ -605,19 +605,19 @@ void Foam::hexRef8::getFaceNeighbours ( cellAnchorPoints, cellAddedCells, - mesh_.faceOwner()[faceI], - faceI, + mesh_.faceOwner()[facei], + facei, pointI ); - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { nei = getAnchorCell ( cellAnchorPoints, cellAddedCells, - mesh_.faceNeighbour()[faceI], - faceI, + mesh_.faceNeighbour()[facei], + facei, pointI ); } @@ -689,12 +689,12 @@ Foam::label Foam::hexRef8::countAnchors } -void Foam::hexRef8::dumpCell(const label cellI) const +void Foam::hexRef8::dumpCell(const label celli) const { - OFstream str(mesh_.time().path()/"cell_" + Foam::name(cellI) + ".obj"); + OFstream str(mesh_.time().path()/"cell_" + Foam::name(celli) + ".obj"); Pout<< "hexRef8 : Dumping cell as obj to " << str.name() << endl; - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; Map<label> pointToObjVert; label objVertI = 0; @@ -732,7 +732,7 @@ void Foam::hexRef8::dumpCell(const label cellI) const // Find point with certain pointLevel. Skip any higher levels. Foam::label Foam::hexRef8::findLevel ( - const label faceI, + const label facei, const face& f, const label startFp, const bool searchForward, @@ -747,10 +747,10 @@ Foam::label Foam::hexRef8::findLevel if (pointLevel_[pointI] < wantedLevel) { - dumpCell(mesh_.faceOwner()[faceI]); - if (mesh_.isInternalFace(faceI)) + dumpCell(mesh_.faceOwner()[facei]); + if (mesh_.isInternalFace(facei)) { - dumpCell(mesh_.faceNeighbour()[faceI]); + dumpCell(mesh_.faceNeighbour()[facei]); } FatalErrorInFunction @@ -775,10 +775,10 @@ Foam::label Foam::hexRef8::findLevel } } - dumpCell(mesh_.faceOwner()[faceI]); - if (mesh_.isInternalFace(faceI)) + dumpCell(mesh_.faceOwner()[facei]); + if (mesh_.isInternalFace(facei)) { - dumpCell(mesh_.faceNeighbour()[faceI]); + dumpCell(mesh_.faceNeighbour()[facei]); } FatalErrorInFunction @@ -793,9 +793,9 @@ Foam::label Foam::hexRef8::findLevel // Gets cell level such that the face has four points <= level. -Foam::label Foam::hexRef8::getAnchorLevel(const label faceI) const +Foam::label Foam::hexRef8::getAnchorLevel(const label facei) const { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; if (f.size() <= 4) { @@ -803,7 +803,7 @@ Foam::label Foam::hexRef8::getAnchorLevel(const label faceI) const } else { - label ownLevel = cellLevel_[mesh_.faceOwner()[faceI]]; + label ownLevel = cellLevel_[mesh_.faceOwner()[facei]]; if (countAnchors(f, ownLevel) == 4) { @@ -824,8 +824,8 @@ Foam::label Foam::hexRef8::getAnchorLevel(const label faceI) const void Foam::hexRef8::checkInternalOrientation ( polyTopoChange& meshMod, - const label cellI, - const label faceI, + const label celli, + const label facei, const point& ownPt, const point& neiPt, const face& newFace @@ -841,7 +841,7 @@ void Foam::hexRef8::checkInternalOrientation if ((dir & n) < 0) { FatalErrorInFunction - << "cell:" << cellI << " old face:" << faceI + << "cell:" << celli << " old face:" << facei << " newFace:" << newFace << endl << " coords:" << compactPoints << " ownPt:" << ownPt @@ -856,7 +856,7 @@ void Foam::hexRef8::checkInternalOrientation if (s < 0.1 || s > 0.9) { FatalErrorInFunction - << "cell:" << cellI << " old face:" << faceI + << "cell:" << celli << " old face:" << facei << " newFace:" << newFace << endl << " coords:" << compactPoints << " ownPt:" << ownPt @@ -870,8 +870,8 @@ void Foam::hexRef8::checkInternalOrientation void Foam::hexRef8::checkBoundaryOrientation ( polyTopoChange& meshMod, - const label cellI, - const label faceI, + const label celli, + const label facei, const point& ownPt, const point& boundaryPt, const face& newFace @@ -887,7 +887,7 @@ void Foam::hexRef8::checkBoundaryOrientation if ((dir & n) < 0) { FatalErrorInFunction - << "cell:" << cellI << " old face:" << faceI + << "cell:" << celli << " old face:" << facei << " newFace:" << newFace << " coords:" << compactPoints << " ownPt:" << ownPt @@ -902,7 +902,7 @@ void Foam::hexRef8::checkBoundaryOrientation if (s < 0.7 || s > 1.3) { WarningInFunction - << "cell:" << cellI << " old face:" << faceI + << "cell:" << celli << " old face:" << facei << " newFace:" << newFace << " coords:" << compactPoints << " ownPt:" << ownPt @@ -950,8 +950,8 @@ Foam::label Foam::hexRef8::storeMidPointInfo const labelListList& cellAddedCells, const labelList& cellMidPoint, const labelList& edgeMidPoint, - const label cellI, - const label faceI, + const label celli, + const label facei, const bool faceOrder, const label edgeMidPointI, const label anchorPointI, @@ -1035,7 +1035,7 @@ Foam::label Foam::hexRef8::storeMidPointInfo // be between cellMid and face mids. DynamicList<label> newFaceVerts(4); - if (faceOrder == (mesh_.faceOwner()[faceI] == cellI)) + if (faceOrder == (mesh_.faceOwner()[facei] == celli)) { newFaceVerts.append(faceMidPointI); @@ -1059,7 +1059,7 @@ Foam::label Foam::hexRef8::storeMidPointInfo ); newFaceVerts.append(otherFaceMidPointI); - newFaceVerts.append(cellMidPoint[cellI]); + newFaceVerts.append(cellMidPoint[celli]); } else { @@ -1084,7 +1084,7 @@ Foam::label Foam::hexRef8::storeMidPointInfo ); newFaceVerts.append(faceMidPointI); - newFaceVerts.append(cellMidPoint[cellI]); + newFaceVerts.append(cellMidPoint[celli]); } face newFace; @@ -1094,16 +1094,16 @@ Foam::label Foam::hexRef8::storeMidPointInfo ( cellAnchorPoints, cellAddedCells, - cellI, - faceI, + celli, + facei, anchorPointI ); label anchorCell1 = getAnchorCell ( cellAnchorPoints, cellAddedCells, - cellI, - faceI, + celli, + facei, anchors.otherVertex(anchorPointI) ); @@ -1148,8 +1148,8 @@ Foam::label Foam::hexRef8::storeMidPointInfo checkInternalOrientation ( meshMod, - cellI, - faceI, + celli, + facei, ownPt, neiPt, newFace @@ -1159,7 +1159,7 @@ Foam::label Foam::hexRef8::storeMidPointInfo return addInternalFace ( meshMod, - faceI, + facei, anchorPointI, newFace, own, @@ -1173,7 +1173,7 @@ Foam::label Foam::hexRef8::storeMidPointInfo } -// Creates all the 12 internal faces for cellI. +// Creates all the 12 internal faces for celli. void Foam::hexRef8::createInternalFaces ( const labelListList& cellAnchorPoints, @@ -1182,7 +1182,7 @@ void Foam::hexRef8::createInternalFaces const labelList& faceMidPoint, const labelList& faceAnchorLevel, const labelList& edgeMidPoint, - const label cellI, + const label celli, polyTopoChange& meshMod ) const @@ -1190,8 +1190,8 @@ void Foam::hexRef8::createInternalFaces // Find in every face the cellLevel+1 points (from edge subdivision) // and the anchor points. - const cell& cFaces = mesh_.cells()[cellI]; - const label cLevel = cellLevel_[cellI]; + const cell& cFaces = mesh_.cells()[celli]; + const label cLevel = cellLevel_[celli]; // From edge mid to anchor points Map<edge> midPointToAnchors(24); @@ -1207,12 +1207,12 @@ void Foam::hexRef8::createInternalFaces forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - const face& f = mesh_.faces()[faceI]; - const labelList& fEdges = mesh_.faceEdges(faceI, storage); + const face& f = mesh_.faces()[facei]; + const labelList& fEdges = mesh_.faceEdges(facei, storage); - // We are on the cellI side of face f. The face will have 1 or 4 + // We are on the celli side of face f. The face will have 1 or 4 // cLevel points and lots of higher numbered ones. label faceMidPointI = -1; @@ -1239,7 +1239,7 @@ void Foam::hexRef8::createInternalFaces // Now the face mid point is the second cLevel+1 point label edgeMid = findLevel ( - faceI, + facei, f, f.fcIndex(anchorFp), true, @@ -1247,7 +1247,7 @@ void Foam::hexRef8::createInternalFaces ); label faceMid = findLevel ( - faceI, + facei, f, f.fcIndex(edgeMid), true, @@ -1261,19 +1261,19 @@ void Foam::hexRef8::createInternalFaces // There is no face middle yet but the face will be marked for // splitting. - faceMidPointI = faceMidPoint[faceI]; + faceMidPointI = faceMidPoint[facei]; } else { - dumpCell(mesh_.faceOwner()[faceI]); - if (mesh_.isInternalFace(faceI)) + dumpCell(mesh_.faceOwner()[facei]); + if (mesh_.isInternalFace(facei)) { - dumpCell(mesh_.faceNeighbour()[faceI]); + dumpCell(mesh_.faceNeighbour()[facei]); } FatalErrorInFunction << "nAnchors:" << nAnchors - << " faceI:" << faceI + << " facei:" << facei << abort(FatalError); } @@ -1309,21 +1309,21 @@ void Foam::hexRef8::createInternalFaces if (edgeMidPointI == -1) { - dumpCell(cellI); + dumpCell(celli); - const labelList& cPoints = mesh_.cellPoints(cellI); + const labelList& cPoints = mesh_.cellPoints(celli); FatalErrorInFunction - << "cell:" << cellI << " cLevel:" << cLevel + << "cell:" << celli << " cLevel:" << cLevel << " cell points:" << cPoints << " pointLevel:" << UIndirectList<label>(pointLevel_, cPoints)() - << " face:" << faceI + << " face:" << facei << " f:" << f << " pointLevel:" << UIndirectList<label>(pointLevel_, f)() - << " faceAnchorLevel:" << faceAnchorLevel[faceI] - << " faceMidPoint:" << faceMidPoint[faceI] + << " faceAnchorLevel:" << faceAnchorLevel[facei] + << " faceMidPoint:" << faceMidPoint[facei] << " faceMidPointI:" << faceMidPointI << " fp:" << fp0 << abort(FatalError); @@ -1332,7 +1332,7 @@ void Foam::hexRef8::createInternalFaces else { // Search forward in face to clevel+1 - label edgeMid = findLevel(faceI, f, fp1, true, cLevel+1); + label edgeMid = findLevel(facei, f, fp1, true, cLevel+1); edgeMidPointI = f[edgeMid]; } @@ -1344,8 +1344,8 @@ void Foam::hexRef8::createInternalFaces cellMidPoint, edgeMidPoint, - cellI, - faceI, + celli, + facei, true, // mid point after anchor edgeMidPointI, // edgemid point0, // anchor @@ -1382,21 +1382,21 @@ void Foam::hexRef8::createInternalFaces if (edgeMidPointI == -1) { - dumpCell(cellI); + dumpCell(celli); - const labelList& cPoints = mesh_.cellPoints(cellI); + const labelList& cPoints = mesh_.cellPoints(celli); FatalErrorInFunction - << "cell:" << cellI << " cLevel:" << cLevel + << "cell:" << celli << " cLevel:" << cLevel << " cell points:" << cPoints << " pointLevel:" << UIndirectList<label>(pointLevel_, cPoints)() - << " face:" << faceI + << " face:" << facei << " f:" << f << " pointLevel:" << UIndirectList<label>(pointLevel_, f)() - << " faceAnchorLevel:" << faceAnchorLevel[faceI] - << " faceMidPoint:" << faceMidPoint[faceI] + << " faceAnchorLevel:" << faceAnchorLevel[facei] + << " faceMidPoint:" << faceMidPoint[facei] << " faceMidPointI:" << faceMidPointI << " fp:" << fp0 << abort(FatalError); @@ -1407,7 +1407,7 @@ void Foam::hexRef8::createInternalFaces // Search back to clevel+1 label edgeMid = findLevel ( - faceI, + facei, f, fpMin1, false, @@ -1424,8 +1424,8 @@ void Foam::hexRef8::createInternalFaces cellMidPoint, edgeMidPoint, - cellI, - faceI, + celli, + facei, false, // mid point before anchor edgeMidPointI, // edgemid point0, // anchor @@ -1460,13 +1460,13 @@ void Foam::hexRef8::walkFaceToMid ( const labelList& edgeMidPoint, const label cLevel, - const label faceI, + const label facei, const label startFp, DynamicList<label>& faceVerts ) const { - const face& f = mesh_.faces()[faceI]; - const labelList& fEdges = mesh_.faceEdges(faceI); + const face& f = mesh_.faces()[facei]; + const labelList& fEdges = mesh_.faceEdges(facei); label fp = startFp; @@ -1509,13 +1509,13 @@ void Foam::hexRef8::walkFaceFromMid ( const labelList& edgeMidPoint, const label cLevel, - const label faceI, + const label facei, const label startFp, DynamicList<label>& faceVerts ) const { - const face& f = mesh_.faces()[faceI]; - const labelList& fEdges = mesh_.faceEdges(faceI); + const face& f = mesh_.faces()[facei]; + const labelList& fEdges = mesh_.faceEdges(facei); label fp = f.rcIndex(startFp); @@ -1569,12 +1569,12 @@ Foam::label Foam::hexRef8::faceConsistentRefinement label nChanged = 0; // Internal faces. - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; label ownLevel = cellLevel_[own] + refineCell.get(own); - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; label neiLevel = cellLevel_[nei] + refineCell.get(nei); if (ownLevel > (neiLevel+1)) @@ -1658,12 +1658,12 @@ void Foam::hexRef8::checkWantedRefinementLevels refineCell.set(cellsToRefine[i]); } - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; label ownLevel = cellLevel_[own] + refineCell.get(own); - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; label neiLevel = cellLevel_[nei] + refineCell.get(nei); if (mag(ownLevel-neiLevel) > 1) @@ -1701,22 +1701,22 @@ void Foam::hexRef8::checkWantedRefinementLevels // Now we have neighbour value see which cells need refinement forAll(neiLevel, i) { - label faceI = i + mesh_.nInternalFaces(); + label facei = i + mesh_.nInternalFaces(); - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; label ownLevel = cellLevel_[own] + refineCell.get(own); if (mag(ownLevel - neiLevel[i]) > 1) { - label patchI = mesh_.boundaryMesh().whichPatch(faceI); + label patchi = mesh_.boundaryMesh().whichPatch(facei); dumpCell(own); FatalErrorInFunction << "Celllevel does not satisfy 2:1 constraint." << " On coupled face " - << faceI - << " on patch " << patchI << " " - << mesh_.boundaryMesh()[patchI].name() + << facei + << " on patch " << patchi << " " + << mesh_.boundaryMesh()[patchi].name() << " owner cell " << own << " current level:" << cellLevel_[own] << " level after refinement:" << ownLevel @@ -1784,12 +1784,12 @@ void Foam::hexRef8::collectLevelPoints // Return true if we've found 6 quads. faces guaranteed to be outwards pointing. bool Foam::hexRef8::matchHexShape ( - const label cellI, + const label celli, const label cellLevel, DynamicList<face>& quads ) const { - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; // Work arrays DynamicList<label> verts(4); @@ -1800,14 +1800,14 @@ bool Foam::hexRef8::matchHexShape forAll(cFaces, i) { - label faceI = cFaces[i]; - const face& f = mesh_.faces()[faceI]; + label facei = cFaces[i]; + const face& f = mesh_.faces()[facei]; verts.clear(); collectLevelPoints(f, cellLevel, verts); if (verts.size() == 4) { - if (mesh_.faceOwner()[faceI] != cellI) + if (mesh_.faceOwner()[facei] != celli) { reverse(verts); } @@ -1824,8 +1824,8 @@ bool Foam::hexRef8::matchHexShape forAll(cFaces, i) { - label faceI = cFaces[i]; - const face& f = mesh_.faces()[faceI]; + label facei = cFaces[i]; + const face& f = mesh_.faces()[facei]; // Pick up any faces with only one level point. // See if there are four of these where the commont point @@ -1848,9 +1848,9 @@ bool Foam::hexRef8::matchHexShape if (iter != pointFaces.end()) { labelList& pFaces = iter(); - if (findIndex(pFaces, faceI) == -1) + if (findIndex(pFaces, facei) == -1) { - pFaces.append(faceI); + pFaces.append(facei); } } else @@ -1858,7 +1858,7 @@ bool Foam::hexRef8::matchHexShape pointFaces.insert ( pointI, - labelList(1, faceI) + labelList(1, facei) ); } } @@ -1877,9 +1877,9 @@ bool Foam::hexRef8::matchHexShape faceList fourFaces(pFaces.size()); forAll(pFaces, pFaceI) { - label faceI = pFaces[pFaceI]; - const face& f = mesh_.faces()[faceI]; - if (mesh_.faceOwner()[faceI] == cellI) + label facei = pFaces[pFaceI]; + const face& f = mesh_.faces()[facei]; + if (mesh_.faceOwner()[facei] == celli) { fourFaces[pFaceI] = f; } @@ -2294,9 +2294,9 @@ Foam::labelList Foam::hexRef8::consistentRefinement // Convert back to labelList. label nRefined = 0; - forAll(refineCell, cellI) + forAll(refineCell, celli) { - if (refineCell.get(cellI)) + if (refineCell.get(celli)) { nRefined++; } @@ -2305,11 +2305,11 @@ Foam::labelList Foam::hexRef8::consistentRefinement labelList newCellsToRefine(nRefined); nRefined = 0; - forAll(refineCell, cellI) + forAll(refineCell, celli) { - if (refineCell.get(cellI)) + if (refineCell.get(celli)) { - newCellsToRefine[nRefined++] = cellI; + newCellsToRefine[nRefined++] = celli; } } @@ -2363,23 +2363,23 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement // Initial information about (distance to) cellLevel on all faces List<refinementData> allFaceInfo(mesh_.nFaces()); - forAll(allCellInfo, cellI) + forAll(allCellInfo, celli) { // maxFaceDiff since refinementData counts both // faces and cells. - allCellInfo[cellI] = refinementData + allCellInfo[celli] = refinementData ( - maxFaceDiff*(cellLevel_[cellI]+1),// when cell is to be refined - maxFaceDiff*cellLevel_[cellI] // current level + maxFaceDiff*(cellLevel_[celli]+1),// when cell is to be refined + maxFaceDiff*cellLevel_[celli] // current level ); } // Cells to be refined will have cellLevel+1 forAll(cellsToRefine, i) { - label cellI = cellsToRefine[i]; + label celli = cellsToRefine[i]; - allCellInfo[cellI].count() = allCellInfo[cellI].refinementCount(); + allCellInfo[celli].count() = allCellInfo[celli].refinementCount(); } @@ -2397,28 +2397,28 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement // off thus marked faces so they're skipped in the next loop. forAll(facesToCheck, i) { - label faceI = facesToCheck[i]; + label facei = facesToCheck[i]; - if (allFaceInfo[faceI].valid(dummyTrackData)) + if (allFaceInfo[facei].valid(dummyTrackData)) { // Can only occur if face has already gone through loop below. FatalErrorInFunction << "Argument facesToCheck seems to have duplicate entries!" << endl - << "face:" << faceI << " occurs at positions " - << findIndices(facesToCheck, faceI) + << "face:" << facei << " occurs at positions " + << findIndices(facesToCheck, facei) << abort(FatalError); } - const refinementData& ownData = allCellInfo[faceOwner[faceI]]; + const refinementData& ownData = allCellInfo[faceOwner[facei]]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { // Seed face if neighbouring cell (after possible refinement) // will be refined one more than the current owner or neighbour. - const refinementData& neiData = allCellInfo[faceNeighbour[faceI]]; + const refinementData& neiData = allCellInfo[faceNeighbour[facei]]; label faceCount; label faceRefineCount; @@ -2433,7 +2433,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement faceRefineCount = faceCount + maxFaceDiff; } - seedFaces.append(faceI); + seedFaces.append(facei); seedFacesInfo.append ( refinementData @@ -2442,14 +2442,14 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement faceCount ) ); - allFaceInfo[faceI] = seedFacesInfo.last(); + allFaceInfo[facei] = seedFacesInfo.last(); } else { label faceCount = ownData.count() + maxFaceDiff; label faceRefineCount = faceCount + maxFaceDiff; - seedFaces.append(faceI); + seedFaces.append(facei); seedFacesInfo.append ( refinementData @@ -2458,7 +2458,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement faceCount ) ); - allFaceInfo[faceI] = seedFacesInfo.last(); + allFaceInfo[facei] = seedFacesInfo.last(); } } @@ -2466,43 +2466,43 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement // Just seed with all faces inbetween different refinement levels for now // (alternatively only seed faces on cellsToRefine but that gives problems // if no cells to refine) - forAll(faceNeighbour, faceI) + forAll(faceNeighbour, facei) { // Check if face already handled in loop above - if (!allFaceInfo[faceI].valid(dummyTrackData)) + if (!allFaceInfo[facei].valid(dummyTrackData)) { - label own = faceOwner[faceI]; - label nei = faceNeighbour[faceI]; + label own = faceOwner[facei]; + label nei = faceNeighbour[facei]; // Seed face with transported data from highest cell. if (allCellInfo[own].count() > allCellInfo[nei].count()) { - allFaceInfo[faceI].updateFace + allFaceInfo[facei].updateFace ( mesh_, - faceI, + facei, own, allCellInfo[own], FaceCellWave<refinementData, int>::propagationTol(), dummyTrackData ); - seedFaces.append(faceI); - seedFacesInfo.append(allFaceInfo[faceI]); + seedFaces.append(facei); + seedFacesInfo.append(allFaceInfo[facei]); } else if (allCellInfo[own].count() < allCellInfo[nei].count()) { - allFaceInfo[faceI].updateFace + allFaceInfo[facei].updateFace ( mesh_, - faceI, + facei, nei, allCellInfo[nei], FaceCellWave<refinementData, int>::propagationTol(), dummyTrackData ); - seedFaces.append(faceI); - seedFacesInfo.append(allFaceInfo[faceI]); + seedFaces.append(facei); + seedFacesInfo.append(allFaceInfo[facei]); } } } @@ -2510,25 +2510,25 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement // Seed all boundary faces with owner value. This is to make sure that // they are visited (probably only important for coupled faces since // these need to be visited from both sides) - for (label faceI = mesh_.nInternalFaces(); faceI < mesh_.nFaces(); faceI++) + for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++) { // Check if face already handled in loop above - if (!allFaceInfo[faceI].valid(dummyTrackData)) + if (!allFaceInfo[facei].valid(dummyTrackData)) { - label own = faceOwner[faceI]; + label own = faceOwner[facei]; // Seed face with transported data from owner. refinementData faceData; faceData.updateFace ( mesh_, - faceI, + facei, own, allCellInfo[own], FaceCellWave<refinementData, int>::propagationTol(), dummyTrackData ); - seedFaces.append(faceI); + seedFaces.append(facei); seedFacesInfo.append(faceData); } } @@ -2614,9 +2614,9 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement forAll(pCells, pCellI) { - label cellI = pCells[pCellI]; + label celli = pCells[pCellI]; - refinementData& cellInfo = allCellInfo[cellI]; + refinementData& cellInfo = allCellInfo[celli]; if ( @@ -2631,26 +2631,26 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement cellInfo.count() = cellInfo.refinementCount(); // Insert faces of cell as seed faces. - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; refinementData faceData; faceData.updateFace ( mesh_, - faceI, - cellI, + facei, + celli, cellInfo, FaceCellWave<refinementData, int>::propagationTol(), dummyTrackData ); - if (faceData.count() > allFaceInfo[faceI].count()) + if (faceData.count() > allFaceInfo[facei].count()) { - changedFacesInfo.insert(faceI, faceData); + changedFacesInfo.insert(facei, faceData); } } } @@ -2680,14 +2680,14 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement if (debug) { - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; label ownLevel = cellLevel_[own] + (allCellInfo[own].isRefined() ? 1 : 0); - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; label neiLevel = cellLevel_[nei] + (allCellInfo[nei].isRefined() ? 1 : 0); @@ -2708,7 +2708,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement << " level after refinement:" << neiLevel << nl << "which does not satisfy 2:1 constraints anymore." << nl - << "face:" << faceI << " faceRefData:" << allFaceInfo[faceI] + << "face:" << facei << " faceRefData:" << allFaceInfo[facei] << abort(FatalError); } } @@ -2737,9 +2737,9 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement // Now we have neighbour value see which cells need refinement forAll(neiLevel, i) { - label faceI = i+mesh_.nInternalFaces(); + label facei = i+mesh_.nInternalFaces(); - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; label ownLevel = cellLevel_[own] + (allCellInfo[own].isRefined() ? 1 : 0); @@ -2751,15 +2751,15 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement if (mag(ownLevel - nbrLevel) > 1) { dumpCell(own); - label patchI = mesh_.boundaryMesh().whichPatch(faceI); + label patchi = mesh_.boundaryMesh().whichPatch(facei); FatalErrorInFunction << "Celllevel does not satisfy 2:1 constraint." << " On coupled face " - << faceI - << " refData:" << allFaceInfo[faceI] - << " on patch " << patchI << " " - << mesh_.boundaryMesh()[patchI].name() << nl + << facei + << " refData:" << allFaceInfo[facei] + << " on patch " << patchi << " " + << mesh_.boundaryMesh()[patchi].name() << nl << "owner cell " << own << " current level:" << cellLevel_[own] << " current count:" << allCellInfo[own].count() @@ -2781,9 +2781,9 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement label nRefined = 0; - forAll(allCellInfo, cellI) + forAll(allCellInfo, celli) { - if (allCellInfo[cellI].isRefined()) + if (allCellInfo[celli].isRefined()) { nRefined++; } @@ -2793,11 +2793,11 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement labelList newCellsToRefine(nRefined); nRefined = 0; - forAll(allCellInfo, cellI) + forAll(allCellInfo, celli) { - if (allCellInfo[cellI].isRefined()) + if (allCellInfo[celli].isRefined()) { - newCellsToRefine[nRefined++] = cellI; + newCellsToRefine[nRefined++] = celli; } } @@ -2850,25 +2850,25 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 // Mark cells with wanted refinement level forAll(cellsToRefine, i) { - label cellI = cellsToRefine[i]; + label celli = cellsToRefine[i]; - allCellInfo[cellI] = refinementDistanceData + allCellInfo[celli] = refinementDistanceData ( level0Size, - mesh_.cellCentres()[cellI], - cellLevel_[cellI]+1 // wanted refinement + mesh_.cellCentres()[celli], + cellLevel_[celli]+1 // wanted refinement ); } // Mark all others with existing refinement level - forAll(allCellInfo, cellI) + forAll(allCellInfo, celli) { - if (!allCellInfo[cellI].valid(dummyTrackData)) + if (!allCellInfo[celli].valid(dummyTrackData)) { - allCellInfo[cellI] = refinementDistanceData + allCellInfo[celli] = refinementDistanceData ( level0Size, - mesh_.cellCentres()[cellI], - cellLevel_[cellI] // wanted refinement + mesh_.cellCentres()[celli], + cellLevel_[celli] // wanted refinement ); } } @@ -2883,20 +2883,20 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 forAll(facesToCheck, i) { - label faceI = facesToCheck[i]; + label facei = facesToCheck[i]; - if (allFaceInfo[faceI].valid(dummyTrackData)) + if (allFaceInfo[facei].valid(dummyTrackData)) { // Can only occur if face has already gone through loop below. FatalErrorInFunction << "Argument facesToCheck seems to have duplicate entries!" << endl - << "face:" << faceI << " occurs at positions " - << findIndices(facesToCheck, faceI) + << "face:" << facei << " occurs at positions " + << findIndices(facesToCheck, facei) << abort(FatalError); } - label own = faceOwner[faceI]; + label own = faceOwner[facei]; label ownLevel = ( @@ -2905,11 +2905,11 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 : cellLevel_[own] ); - if (!mesh_.isInternalFace(faceI)) + if (!mesh_.isInternalFace(facei)) { // Do as if boundary face would have neighbour with one higher // refinement level. - const point& fc = mesh_.faceCentres()[faceI]; + const point& fc = mesh_.faceCentres()[facei]; refinementDistanceData neiData ( @@ -2918,10 +2918,10 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 ownLevel+1 ); - allFaceInfo[faceI].updateFace + allFaceInfo[facei].updateFace ( mesh_, - faceI, + facei, own, // not used (should be nei) neiData, FaceCellWave<refinementDistanceData, int>::propagationTol(), @@ -2930,7 +2930,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 } else { - label nei = faceNeighbour[faceI]; + label nei = faceNeighbour[facei]; label neiLevel = ( @@ -2942,19 +2942,19 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 if (ownLevel == neiLevel) { // Fake as if nei>own or own>nei (whichever one 'wins') - allFaceInfo[faceI].updateFace + allFaceInfo[facei].updateFace ( mesh_, - faceI, + facei, nei, refinementDistanceData(level0Size, cc[nei], neiLevel+1), FaceCellWave<refinementDistanceData, int>::propagationTol(), dummyTrackData ); - allFaceInfo[faceI].updateFace + allFaceInfo[facei].updateFace ( mesh_, - faceI, + facei, own, refinementDistanceData(level0Size, cc[own], ownLevel+1), FaceCellWave<refinementDistanceData, int>::propagationTol(), @@ -2964,19 +2964,19 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 else { // Difference in level anyway. - allFaceInfo[faceI].updateFace + allFaceInfo[facei].updateFace ( mesh_, - faceI, + facei, nei, refinementDistanceData(level0Size, cc[nei], neiLevel), FaceCellWave<refinementDistanceData, int>::propagationTol(), dummyTrackData ); - allFaceInfo[faceI].updateFace + allFaceInfo[facei].updateFace ( mesh_, - faceI, + facei, own, refinementDistanceData(level0Size, cc[own], ownLevel), FaceCellWave<refinementDistanceData, int>::propagationTol(), @@ -2984,20 +2984,20 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 ); } } - seedFaces.append(faceI); - seedFacesInfo.append(allFaceInfo[faceI]); + seedFaces.append(facei); + seedFacesInfo.append(allFaceInfo[facei]); } // Create some initial seeds to start walking from. This is only if there // are no facesToCheck. // Just seed with all faces inbetween different refinement levels for now - forAll(faceNeighbour, faceI) + forAll(faceNeighbour, facei) { // Check if face already handled in loop above - if (!allFaceInfo[faceI].valid(dummyTrackData)) + if (!allFaceInfo[facei].valid(dummyTrackData)) { - label own = faceOwner[faceI]; + label own = faceOwner[facei]; label ownLevel = ( @@ -3006,7 +3006,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 : cellLevel_[own] ); - label nei = faceNeighbour[faceI]; + label nei = faceNeighbour[facei]; label neiLevel = ( @@ -3018,31 +3018,31 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 if (ownLevel > neiLevel) { // Set face to owner data. (since face not yet would be copy) - seedFaces.append(faceI); - allFaceInfo[faceI].updateFace + seedFaces.append(facei); + allFaceInfo[facei].updateFace ( mesh_, - faceI, + facei, own, refinementDistanceData(level0Size, cc[own], ownLevel), FaceCellWave<refinementDistanceData, int>::propagationTol(), dummyTrackData ); - seedFacesInfo.append(allFaceInfo[faceI]); + seedFacesInfo.append(allFaceInfo[facei]); } else if (neiLevel > ownLevel) { - seedFaces.append(faceI); - allFaceInfo[faceI].updateFace + seedFaces.append(facei); + allFaceInfo[facei].updateFace ( mesh_, - faceI, + facei, nei, refinementDistanceData(level0Size, cc[nei], neiLevel), FaceCellWave<refinementDistanceData, int>::propagationTol(), dummyTrackData ); - seedFacesInfo.append(allFaceInfo[faceI]); + seedFacesInfo.append(allFaceInfo[facei]); } } } @@ -3081,9 +3081,9 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 // dimensionedScalar("zero", dimless, 0) // ); // - // forAll(wantedLevel, cellI) + // forAll(wantedLevel, celli) // { - // wantedLevel[cellI] = allCellInfo[cellI].wantedLevel(cc[cellI]); + // wantedLevel[celli] = allCellInfo[celli].wantedLevel(cc[celli]); // } // // Pout<< "Writing " << wantedLevel.objectPath() << endl; @@ -3099,23 +3099,23 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 // of 1<< shift inside refinementDistanceData::wantedLevel) forAll(cellsToRefine, i) { - label cellI = cellsToRefine[i]; + label celli = cellsToRefine[i]; - allCellInfo[cellI].originLevel() = sizeof(label)*8-2; - allCellInfo[cellI].origin() = cc[cellI]; + allCellInfo[celli].originLevel() = sizeof(label)*8-2; + allCellInfo[celli].origin() = cc[celli]; } // 2. Extend to 2:1. I don't understand yet why this is not done // 2. Extend to 2:1. For non-cube cells the scalar distance does not work // so make sure it at least provides 2:1. PackedBoolList refineCell(mesh_.nCells()); - forAll(allCellInfo, cellI) + forAll(allCellInfo, celli) { - label wanted = allCellInfo[cellI].wantedLevel(cc[cellI]); + label wanted = allCellInfo[celli].wantedLevel(cc[celli]); - if (wanted > cellLevel_[cellI]+1) + if (wanted > cellLevel_[celli]+1) { - refineCell.set(cellI); + refineCell.set(celli); } } faceConsistentRefinement(true, refineCell); @@ -3142,10 +3142,10 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 // 3. Convert back to labelList. label nRefined = 0; - forAll(refineCell, cellI) + forAll(refineCell, celli) { -// if (refineCell.get(cellI)) - if (refineCell[cellI]) +// if (refineCell.get(celli)) + if (refineCell[celli]) { nRefined++; } @@ -3154,12 +3154,12 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 labelList newCellsToRefine(nRefined); nRefined = 0; - forAll(refineCell, cellI) + forAll(refineCell, celli) { -// if (refineCell.get(cellI)) - if (refineCell[cellI]) +// if (refineCell.get(celli)) + if (refineCell[celli]) { - newCellsToRefine[nRefined++] = cellI; + newCellsToRefine[nRefined++] = celli; } } @@ -3201,11 +3201,11 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 ( mesh_, "cellsToRefineOut2", newCellsToRefine.size() ); - forAll(refineCell, cellI) + forAll(refineCell, celli) { - if (refineCell.get(cellI)) + if (refineCell.get(celli)) { - cellsOut2.insert(cellI); + cellsOut2.insert(celli); } } Pout<< "hexRef8::consistentSlowRefinement2 : writing " @@ -3216,14 +3216,14 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement2 if (nChanged > 0) { - forAll(refineCell, cellI) + forAll(refineCell, celli) { - if (refineCell.get(cellI) && !savedRefineCell.get(cellI)) + if (refineCell.get(celli) && !savedRefineCell.get(celli)) { - dumpCell(cellI); + dumpCell(celli); FatalErrorInFunction - << "Cell:" << cellI << " cc:" - << mesh_.cellCentres()[cellI] + << "Cell:" << celli << " cc:" + << mesh_.cellCentres()[celli] << " was not marked for refinement but does not obey" << " 2:1 constraints." << abort(FatalError); @@ -3261,9 +3261,9 @@ Foam::labelListList Foam::hexRef8::setRefinement // New point/cell level. Copy of pointLevel for existing points. DynamicList<label> newCellLevel(cellLevel_.size()); - forAll(cellLevel_, cellI) + forAll(cellLevel_, celli) { - newCellLevel.append(cellLevel_[cellI]); + newCellLevel.append(cellLevel_[celli]); } DynamicList<label> newPointLevel(pointLevel_.size()); forAll(pointLevel_, pointI) @@ -3287,22 +3287,22 @@ Foam::labelListList Foam::hexRef8::setRefinement forAll(cellLabels, i) { - label cellI = cellLabels[i]; + label celli = cellLabels[i]; - label anchorPointI = mesh_.faces()[mesh_.cells()[cellI][0]][0]; + label anchorPointI = mesh_.faces()[mesh_.cells()[celli][0]][0]; - cellMidPoint[cellI] = meshMod.setAction + cellMidPoint[celli] = meshMod.setAction ( polyAddPoint ( - mesh_.cellCentres()[cellI], // point + mesh_.cellCentres()[celli], // point anchorPointI, // master point -1, // zone for point true // supports a cell ) ); - newPointLevel(cellMidPoint[cellI]) = cellLevel_[cellI]+1; + newPointLevel(cellMidPoint[celli]) = cellLevel_[celli]+1; } @@ -3310,11 +3310,11 @@ Foam::labelListList Foam::hexRef8::setRefinement { cellSet splitCells(mesh_, "splitCells", cellLabels.size()); - forAll(cellMidPoint, cellI) + forAll(cellMidPoint, celli) { - if (cellMidPoint[cellI] >= 0) + if (cellMidPoint[celli] >= 0) { - splitCells.insert(cellI); + splitCells.insert(celli); } } @@ -3345,11 +3345,11 @@ Foam::labelListList Foam::hexRef8::setRefinement labelList edgeMidPoint(mesh_.nEdges(), -1); // Note: Loop over cells to be refined or edges? - forAll(cellMidPoint, cellI) + forAll(cellMidPoint, celli) { - if (cellMidPoint[cellI] >= 0) + if (cellMidPoint[celli] >= 0) { - const labelList& cEdges = mesh_.cellEdges(cellI); + const labelList& cEdges = mesh_.cellEdges(celli); forAll(cEdges, i) { @@ -3359,8 +3359,8 @@ Foam::labelListList Foam::hexRef8::setRefinement if ( - pointLevel_[e[0]] <= cellLevel_[cellI] - && pointLevel_[e[1]] <= cellLevel_[cellI] + pointLevel_[e[0]] <= cellLevel_[celli] + && pointLevel_[e[1]] <= cellLevel_[celli] ) { edgeMidPoint[edgeI] = 12345; // mark need for splitting @@ -3473,9 +3473,9 @@ Foam::labelListList Foam::hexRef8::setRefinement // <= anchorLevel. These are the corner points. labelList faceAnchorLevel(mesh_.nFaces()); - for (label faceI = 0; faceI < mesh_.nFaces(); faceI++) + for (label facei = 0; facei < mesh_.nFaces(); facei++) { - faceAnchorLevel[faceI] = getAnchorLevel(faceI); + faceAnchorLevel[facei] = getAnchorLevel(facei); } // -1 : no need to split face @@ -3485,25 +3485,25 @@ Foam::labelListList Foam::hexRef8::setRefinement // Internal faces: look at cells on both sides. Uniquely determined since // face itself guaranteed to be same level as most refined neighbour. - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - if (faceAnchorLevel[faceI] >= 0) + if (faceAnchorLevel[facei] >= 0) { - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; label ownLevel = cellLevel_[own]; label newOwnLevel = ownLevel + (cellMidPoint[own] >= 0 ? 1 : 0); - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; label neiLevel = cellLevel_[nei]; label newNeiLevel = neiLevel + (cellMidPoint[nei] >= 0 ? 1 : 0); if ( - newOwnLevel > faceAnchorLevel[faceI] - || newNeiLevel > faceAnchorLevel[faceI] + newOwnLevel > faceAnchorLevel[facei] + || newNeiLevel > faceAnchorLevel[facei] ) { - faceMidPoint[faceI] = 12345; // mark to be split + faceMidPoint[facei] = 12345; // mark to be split } } } @@ -3534,21 +3534,21 @@ Foam::labelListList Foam::hexRef8::setRefinement forAll(newNeiLevel, i) { - label faceI = i+mesh_.nInternalFaces(); + label facei = i+mesh_.nInternalFaces(); - if (faceAnchorLevel[faceI] >= 0) + if (faceAnchorLevel[facei] >= 0) { - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; label ownLevel = cellLevel_[own]; label newOwnLevel = ownLevel + (cellMidPoint[own] >= 0 ? 1 : 0); if ( - newOwnLevel > faceAnchorLevel[faceI] - || newNeiLevel[i] > faceAnchorLevel[faceI] + newOwnLevel > faceAnchorLevel[facei] + || newNeiLevel[i] > faceAnchorLevel[facei] ) { - faceMidPoint[faceI] = 12345; // mark to be split + faceMidPoint[facei] = 12345; // mark to be split } } } @@ -3579,11 +3579,11 @@ Foam::labelListList Foam::hexRef8::setRefinement forAll(bFaceMids, i) { - label faceI = i+mesh_.nInternalFaces(); + label facei = i+mesh_.nInternalFaces(); - if (faceMidPoint[faceI] >= 0) + if (faceMidPoint[facei] >= 0) { - bFaceMids[i] = mesh_.faceCentres()[faceI]; + bFaceMids[i] = mesh_.faceCentres()[facei]; } } syncTools::syncBoundaryFacePositions @@ -3593,23 +3593,23 @@ Foam::labelListList Foam::hexRef8::setRefinement maxEqOp<vector>() ); - forAll(faceMidPoint, faceI) + forAll(faceMidPoint, facei) { - if (faceMidPoint[faceI] >= 0) + if (faceMidPoint[facei] >= 0) { // Face marked to be split. Replace faceMidPoint with actual // point label. - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; - faceMidPoint[faceI] = meshMod.setAction + faceMidPoint[facei] = meshMod.setAction ( polyAddPoint ( ( - faceI < mesh_.nInternalFaces() - ? mesh_.faceCentres()[faceI] - : bFaceMids[faceI-mesh_.nInternalFaces()] + facei < mesh_.nInternalFaces() + ? mesh_.faceCentres()[facei] + : bFaceMids[facei-mesh_.nInternalFaces()] ), // point f[0], // master point -1, // zone for point @@ -3619,7 +3619,7 @@ Foam::labelListList Foam::hexRef8::setRefinement // Determine the level of the corner points and midpoint will // be one higher. - newPointLevel(faceMidPoint[faceI]) = faceAnchorLevel[faceI]+1; + newPointLevel(faceMidPoint[facei]) = faceAnchorLevel[facei]+1; } } } @@ -3628,11 +3628,11 @@ Foam::labelListList Foam::hexRef8::setRefinement { faceSet splitFaces(mesh_, "splitFaces", cellLabels.size()); - forAll(faceMidPoint, faceI) + forAll(faceMidPoint, facei) { - if (faceMidPoint[faceI] >= 0) + if (faceMidPoint[facei] >= 0) { - splitFaces.insert(faceI); + splitFaces.insert(facei); } } @@ -3672,11 +3672,11 @@ Foam::labelListList Foam::hexRef8::setRefinement { labelList nAnchorPoints(mesh_.nCells(), 0); - forAll(cellMidPoint, cellI) + forAll(cellMidPoint, celli) { - if (cellMidPoint[cellI] >= 0) + if (cellMidPoint[celli] >= 0) { - cellAnchorPoints[cellI].setSize(8); + cellAnchorPoints[celli].setSize(8); } } @@ -3686,44 +3686,44 @@ Foam::labelListList Foam::hexRef8::setRefinement forAll(pCells, pCellI) { - label cellI = pCells[pCellI]; + label celli = pCells[pCellI]; if ( - cellMidPoint[cellI] >= 0 - && pointLevel_[pointI] <= cellLevel_[cellI] + cellMidPoint[celli] >= 0 + && pointLevel_[pointI] <= cellLevel_[celli] ) { - if (nAnchorPoints[cellI] == 8) + if (nAnchorPoints[celli] == 8) { - dumpCell(cellI); + dumpCell(celli); FatalErrorInFunction - << "cell " << cellI - << " of level " << cellLevel_[cellI] + << "cell " << celli + << " of level " << cellLevel_[celli] << " uses more than 8 points of equal or" << " lower level" << nl - << "Points so far:" << cellAnchorPoints[cellI] + << "Points so far:" << cellAnchorPoints[celli] << abort(FatalError); } - cellAnchorPoints[cellI][nAnchorPoints[cellI]++] = pointI; + cellAnchorPoints[celli][nAnchorPoints[celli]++] = pointI; } } } - forAll(cellMidPoint, cellI) + forAll(cellMidPoint, celli) { - if (cellMidPoint[cellI] >= 0) + if (cellMidPoint[celli] >= 0) { - if (nAnchorPoints[cellI] != 8) + if (nAnchorPoints[celli] != 8) { - dumpCell(cellI); + dumpCell(celli); - const labelList& cPoints = mesh_.cellPoints(cellI); + const labelList& cPoints = mesh_.cellPoints(celli); FatalErrorInFunction - << "cell " << cellI - << " of level " << cellLevel_[cellI] + << "cell " << celli + << " of level " << cellLevel_[celli] << " does not seem to have 8 points of equal or" << " lower level" << endl << "cellPoints:" << cPoints << endl @@ -3749,20 +3749,20 @@ Foam::labelListList Foam::hexRef8::setRefinement // Per cell the 7 added cells (+ original cell) labelListList cellAddedCells(mesh_.nCells()); - forAll(cellAnchorPoints, cellI) + forAll(cellAnchorPoints, celli) { - const labelList& cAnchors = cellAnchorPoints[cellI]; + const labelList& cAnchors = cellAnchorPoints[celli]; if (cAnchors.size() == 8) { - labelList& cAdded = cellAddedCells[cellI]; + labelList& cAdded = cellAddedCells[celli]; cAdded.setSize(8); // Original cell at 0 - cAdded[0] = cellI; + cAdded[0] = celli; // Update cell level - newCellLevel[cellI] = cellLevel_[cellI]+1; + newCellLevel[celli] = cellLevel_[celli]+1; for (label i = 1; i < 8; i++) @@ -3774,12 +3774,12 @@ Foam::labelListList Foam::hexRef8::setRefinement -1, // master point -1, // master edge -1, // master face - cellI, // master cell - mesh_.cellZones().whichZone(cellI) // zone for cell + celli, // master cell + mesh_.cellZones().whichZone(celli) // zone for cell ) ); - newCellLevel(cAdded[i]) = cellLevel_[cellI]+1; + newCellLevel(cAdded[i]) = cellLevel_[celli]+1; } } } @@ -3803,11 +3803,11 @@ Foam::labelListList Foam::hexRef8::setRefinement PackedBoolList affectedFace(mesh_.nFaces()); { - forAll(cellMidPoint, cellI) + forAll(cellMidPoint, celli) { - if (cellMidPoint[cellI] >= 0) + if (cellMidPoint[celli] >= 0) { - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; forAll(cFaces, i) { @@ -3816,11 +3816,11 @@ Foam::labelListList Foam::hexRef8::setRefinement } } - forAll(faceMidPoint, faceI) + forAll(faceMidPoint, facei) { - if (faceMidPoint[faceI] >= 0) + if (faceMidPoint[facei] >= 0) { - affectedFace.set(faceI); + affectedFace.set(facei); } } @@ -3847,21 +3847,21 @@ Foam::labelListList Foam::hexRef8::setRefinement Pout<< "hexRef8::setRefinement : Splitting faces" << endl; } - forAll(faceMidPoint, faceI) + forAll(faceMidPoint, facei) { - if (faceMidPoint[faceI] >= 0 && affectedFace.get(faceI)) + if (faceMidPoint[facei] >= 0 && affectedFace.get(facei)) { // Face needs to be split and hasn't yet been done in some way // (affectedFace - is impossible since this is first change but // just for completeness) - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; - // Has original faceI been used (three faces added, original gets + // Has original facei been used (three faces added, original gets // modified) bool modifiedFace = false; - label anchorLevel = faceAnchorLevel[faceI]; + label anchorLevel = faceAnchorLevel[facei]; face newFace(4); @@ -3886,18 +3886,18 @@ Foam::labelListList Foam::hexRef8::setRefinement ( edgeMidPoint, anchorLevel, - faceI, + facei, fp, faceVerts ); - faceVerts.append(faceMidPoint[faceI]); + faceVerts.append(faceMidPoint[facei]); walkFaceFromMid ( edgeMidPoint, anchorLevel, - faceI, + facei, fp, faceVerts ); @@ -3905,7 +3905,7 @@ Foam::labelListList Foam::hexRef8::setRefinement // Convert dynamiclist to face. newFace.transfer(faceVerts); - //Pout<< "Split face:" << faceI << " verts:" << f + //Pout<< "Split face:" << facei << " verts:" << f // << " into quad:" << newFace << endl; // Get new owner/neighbour @@ -3914,7 +3914,7 @@ Foam::labelListList Foam::hexRef8::setRefinement ( cellAnchorPoints, cellAddedCells, - faceI, + facei, pointI, // Anchor point own, @@ -3924,16 +3924,16 @@ Foam::labelListList Foam::hexRef8::setRefinement if (debug) { - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label oldOwn = mesh_.faceOwner()[faceI]; - label oldNei = mesh_.faceNeighbour()[faceI]; + label oldOwn = mesh_.faceOwner()[facei]; + label oldNei = mesh_.faceNeighbour()[facei]; checkInternalOrientation ( meshMod, oldOwn, - faceI, + facei, mesh_.cellCentres()[oldOwn], mesh_.cellCentres()[oldNei], newFace @@ -3941,15 +3941,15 @@ Foam::labelListList Foam::hexRef8::setRefinement } else { - label oldOwn = mesh_.faceOwner()[faceI]; + label oldOwn = mesh_.faceOwner()[facei]; checkBoundaryOrientation ( meshMod, oldOwn, - faceI, + facei, mesh_.cellCentres()[oldOwn], - mesh_.faceCentres()[faceI], + mesh_.faceCentres()[facei], newFace ); } @@ -3960,17 +3960,17 @@ Foam::labelListList Foam::hexRef8::setRefinement { modifiedFace = true; - modFace(meshMod, faceI, newFace, own, nei); + modFace(meshMod, facei, newFace, own, nei); } else { - addFace(meshMod, faceI, newFace, own, nei); + addFace(meshMod, facei, newFace, own, nei); } } } // Mark face as having been handled - affectedFace.unset(faceI); + affectedFace.unset(facei); } } @@ -3998,16 +3998,16 @@ Foam::labelListList Foam::hexRef8::setRefinement forAll(eFaces, i) { - label faceI = eFaces[i]; + label facei = eFaces[i]; - if (faceMidPoint[faceI] < 0 && affectedFace.get(faceI)) + if (faceMidPoint[facei] < 0 && affectedFace.get(facei)) { // Unsplit face. Add edge splits to face. - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; const labelList& fEdges = mesh_.faceEdges ( - faceI, + facei, fEdgesStorage ); @@ -4037,7 +4037,7 @@ Foam::labelListList Foam::hexRef8::setRefinement ( cellAnchorPoints, cellAddedCells, - faceI, + facei, f[anchorFp], // Anchor point own, @@ -4047,16 +4047,16 @@ Foam::labelListList Foam::hexRef8::setRefinement if (debug) { - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label oldOwn = mesh_.faceOwner()[faceI]; - label oldNei = mesh_.faceNeighbour()[faceI]; + label oldOwn = mesh_.faceOwner()[facei]; + label oldNei = mesh_.faceNeighbour()[facei]; checkInternalOrientation ( meshMod, oldOwn, - faceI, + facei, mesh_.cellCentres()[oldOwn], mesh_.cellCentres()[oldNei], newFace @@ -4064,24 +4064,24 @@ Foam::labelListList Foam::hexRef8::setRefinement } else { - label oldOwn = mesh_.faceOwner()[faceI]; + label oldOwn = mesh_.faceOwner()[facei]; checkBoundaryOrientation ( meshMod, oldOwn, - faceI, + facei, mesh_.cellCentres()[oldOwn], - mesh_.faceCentres()[faceI], + mesh_.faceCentres()[facei], newFace ); } } - modFace(meshMod, faceI, newFace, own, nei); + modFace(meshMod, facei, newFace, own, nei); // Mark face as having been handled - affectedFace.unset(faceI); + affectedFace.unset(facei); } } } @@ -4098,11 +4098,11 @@ Foam::labelListList Foam::hexRef8::setRefinement << endl; } - forAll(affectedFace, faceI) + forAll(affectedFace, facei) { - if (affectedFace.get(faceI)) + if (affectedFace.get(facei)) { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; // The point with the lowest level should be an anchor // point of the neighbouring cells. @@ -4113,17 +4113,17 @@ Foam::labelListList Foam::hexRef8::setRefinement ( cellAnchorPoints, cellAddedCells, - faceI, + facei, f[anchorFp], // Anchor point own, nei ); - modFace(meshMod, faceI, f, own, nei); + modFace(meshMod, facei, f, own, nei); // Mark face as having been handled - affectedFace.unset(faceI); + affectedFace.unset(facei); } } @@ -4143,9 +4143,9 @@ Foam::labelListList Foam::hexRef8::setRefinement << endl; } - forAll(cellMidPoint, cellI) + forAll(cellMidPoint, celli) { - if (cellMidPoint[cellI] >= 0) + if (cellMidPoint[celli] >= 0) { createInternalFaces ( @@ -4155,7 +4155,7 @@ Foam::labelListList Foam::hexRef8::setRefinement faceMidPoint, faceAnchorLevel, edgeMidPoint, - cellI, + celli, meshMod ); } @@ -4170,20 +4170,20 @@ Foam::labelListList Foam::hexRef8::setRefinement label minPointI = labelMax; label maxPointI = labelMin; - forAll(cellMidPoint, cellI) + forAll(cellMidPoint, celli) { - if (cellMidPoint[cellI] >= 0) + if (cellMidPoint[celli] >= 0) { - minPointI = min(minPointI, cellMidPoint[cellI]); - maxPointI = max(maxPointI, cellMidPoint[cellI]); + minPointI = min(minPointI, cellMidPoint[celli]); + maxPointI = max(maxPointI, cellMidPoint[celli]); } } - forAll(faceMidPoint, faceI) + forAll(faceMidPoint, facei) { - if (faceMidPoint[faceI] >= 0) + if (faceMidPoint[facei] >= 0) { - minPointI = min(minPointI, faceMidPoint[faceI]); - maxPointI = max(maxPointI, faceMidPoint[faceI]); + minPointI = min(minPointI, faceMidPoint[facei]); + maxPointI = max(maxPointI, faceMidPoint[facei]); } } forAll(edgeMidPoint, edgeI) @@ -4230,14 +4230,14 @@ Foam::labelListList Foam::hexRef8::setRefinement // Extend refinement history for new cells history_.resize(cellLevel_.size()); - forAll(cellAddedCells, cellI) + forAll(cellAddedCells, celli) { - const labelList& addedCells = cellAddedCells[cellI]; + const labelList& addedCells = cellAddedCells[celli]; if (addedCells.size()) { // Cell was split. - history_.storeSplit(cellI, addedCells); + history_.storeSplit(celli, addedCells); } } } @@ -4248,9 +4248,9 @@ Foam::labelListList Foam::hexRef8::setRefinement forAll(cellLabels, i) { - label cellI = cellLabels[i]; + label celli = cellLabels[i]; - refinedCells[i].transfer(cellAddedCells[cellI]); + refinedCells[i].transfer(cellAddedCells[celli]); } return refinedCells; @@ -4274,8 +4274,8 @@ void Foam::hexRef8::storeData savedCellLevel_.resize(2*cellsToStore.size()); forAll(cellsToStore, i) { - label cellI = cellsToStore[i]; - savedCellLevel_.insert(cellI, cellLevel_[cellI]); + label celli = cellsToStore[i]; + savedCellLevel_.insert(celli, cellLevel_[celli]); } } @@ -4624,9 +4624,9 @@ void Foam::hexRef8::checkMesh() const const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { @@ -4635,30 +4635,30 @@ void Foam::hexRef8::checkMesh() const HashTable<label, labelPair, labelPair::Hash<>> cellToFace(2*pp.size()); - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - label own = mesh_.faceOwner()[faceI]; - label bFaceI = faceI-mesh_.nInternalFaces(); + label own = mesh_.faceOwner()[facei]; + label bFaceI = facei-mesh_.nInternalFaces(); - if (!cellToFace.insert(labelPair(own, nei[bFaceI]), faceI)) + if (!cellToFace.insert(labelPair(own, nei[bFaceI]), facei)) { dumpCell(own); FatalErrorInFunction << "Faces do not seem to be correct across coupled" << " boundaries" << endl - << "Coupled face " << faceI + << "Coupled face " << facei << " between owner " << own << " on patch " << pp.name() << " and coupled neighbour " << nei[bFaceI] << " has two faces connected to it:" - << faceI << " and " + << facei << " and " << cellToFace[labelPair(own, nei[bFaceI])] << abort(FatalError); } - faceI++; + facei++; } } } @@ -4679,23 +4679,23 @@ void Foam::hexRef8::checkMesh() const forAll(neiFaceAreas, i) { - label faceI = i+mesh_.nInternalFaces(); + label facei = i+mesh_.nInternalFaces(); - const scalar magArea = mag(mesh_.faceAreas()[faceI]); + const scalar magArea = mag(mesh_.faceAreas()[facei]); if (mag(magArea - neiFaceAreas[i]) > smallDim) { - const face& f = mesh_.faces()[faceI]; - label patchI = mesh_.boundaryMesh().whichPatch(faceI); + const face& f = mesh_.faces()[facei]; + label patchi = mesh_.boundaryMesh().whichPatch(facei); - dumpCell(mesh_.faceOwner()[faceI]); + dumpCell(mesh_.faceOwner()[facei]); FatalErrorInFunction << "Faces do not seem to be correct across coupled" << " boundaries" << endl - << "Coupled face " << faceI - << " on patch " << patchI - << " " << mesh_.boundaryMesh()[patchI].name() + << "Coupled face " << facei + << " on patch " << patchi + << " " << mesh_.boundaryMesh()[patchi].name() << " coords:" << UIndirectList<point>(mesh_.points(), f)() << " has face area:" << magArea << " (coupled) neighbour face area differs:" @@ -4722,22 +4722,22 @@ void Foam::hexRef8::checkMesh() const forAll(nVerts, i) { - label faceI = i+mesh_.nInternalFaces(); + label facei = i+mesh_.nInternalFaces(); - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; if (f.size() != nVerts[i]) { - dumpCell(mesh_.faceOwner()[faceI]); + dumpCell(mesh_.faceOwner()[facei]); - label patchI = mesh_.boundaryMesh().whichPatch(faceI); + label patchi = mesh_.boundaryMesh().whichPatch(facei); FatalErrorInFunction << "Faces do not seem to be correct across coupled" << " boundaries" << endl - << "Coupled face " << faceI - << " on patch " << patchI - << " " << mesh_.boundaryMesh()[patchI].name() + << "Coupled face " << facei + << " on patch " << patchi + << " " << mesh_.boundaryMesh()[patchi].name() << " coords:" << UIndirectList<point>(mesh_.points(), f)() << " has size:" << f.size() << " (coupled) neighbour face has size:" @@ -4756,9 +4756,9 @@ void Foam::hexRef8::checkMesh() const forAll(anchorPoints, i) { - label faceI = i+mesh_.nInternalFaces(); - const point& fc = mesh_.faceCentres()[faceI]; - const face& f = mesh_.faces()[faceI]; + label facei = i+mesh_.nInternalFaces(); + const point& fc = mesh_.faceCentres()[facei]; + const face& f = mesh_.faces()[facei]; const vector anchorVec(mesh_.points()[f[0]] - fc); anchorPoints[i] = anchorVec; @@ -4771,23 +4771,23 @@ void Foam::hexRef8::checkMesh() const forAll(anchorPoints, i) { - label faceI = i+mesh_.nInternalFaces(); - const point& fc = mesh_.faceCentres()[faceI]; - const face& f = mesh_.faces()[faceI]; + label facei = i+mesh_.nInternalFaces(); + const point& fc = mesh_.faceCentres()[facei]; + const face& f = mesh_.faces()[facei]; const vector anchorVec(mesh_.points()[f[0]] - fc); if (mag(anchorVec - anchorPoints[i]) > smallDim) { - dumpCell(mesh_.faceOwner()[faceI]); + dumpCell(mesh_.faceOwner()[facei]); - label patchI = mesh_.boundaryMesh().whichPatch(faceI); + label patchi = mesh_.boundaryMesh().whichPatch(facei); FatalErrorInFunction << "Faces do not seem to be correct across coupled" << " boundaries" << endl - << "Coupled face " << faceI - << " on patch " << patchI - << " " << mesh_.boundaryMesh()[patchI].name() + << "Coupled face " << facei + << " on patch " << patchi + << " " << mesh_.boundaryMesh()[patchi].name() << " coords:" << UIndirectList<point>(mesh_.points(), f)() << " has anchor vector:" << anchorVec << " (coupled) neighbour face anchor vector differs:" @@ -4839,10 +4839,10 @@ void Foam::hexRef8::checkRefinementLevels { // Internal faces. - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label own = mesh_.faceOwner()[faceI]; - label nei = mesh_.faceNeighbour()[faceI]; + label own = mesh_.faceOwner()[facei]; + label nei = mesh_.faceNeighbour()[facei]; if (mag(cellLevel_[own] - cellLevel_[nei]) > 1) { @@ -4851,7 +4851,7 @@ void Foam::hexRef8::checkRefinementLevels FatalErrorInFunction << "Celllevel does not satisfy 2:1 constraint." << nl - << "On face " << faceI << " owner cell " << own + << "On face " << facei << " owner cell " << own << " has refinement " << cellLevel_[own] << " neighbour cell " << nei << " has refinement " << cellLevel_[nei] @@ -4874,21 +4874,21 @@ void Foam::hexRef8::checkRefinementLevels forAll(neiLevel, i) { - label faceI = i+mesh_.nInternalFaces(); + label facei = i+mesh_.nInternalFaces(); - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; if (mag(cellLevel_[own] - neiLevel[i]) > 1) { dumpCell(own); - label patchI = mesh_.boundaryMesh().whichPatch(faceI); + label patchi = mesh_.boundaryMesh().whichPatch(facei); FatalErrorInFunction << "Celllevel does not satisfy 2:1 constraint." - << " On coupled face " << faceI - << " on patch " << patchI << " " - << mesh_.boundaryMesh()[patchI].name() + << " On coupled face " << facei + << " on patch " << patchi << " " + << mesh_.boundaryMesh()[patchi].name() << " owner cell " << own << " has refinement " << cellLevel_[own] << " (coupled) neighbour cell has refinement " @@ -4967,21 +4967,21 @@ void Foam::hexRef8::checkRefinementLevels forAll(pCells, i) { - label cellI = pCells[i]; + label celli = pCells[i]; if ( - mag(cellLevel_[cellI]-maxPointLevel[pointI]) + mag(cellLevel_[celli]-maxPointLevel[pointI]) > maxPointDiff ) { - dumpCell(cellI); + dumpCell(celli); FatalErrorInFunction << "Too big a difference between" << " point-connected cells." << nl - << "cell:" << cellI - << " cellLevel:" << cellLevel_[cellI] + << "cell:" << celli + << " cellLevel:" << cellLevel_[celli] << " uses point:" << pointI << " coord:" << mesh_.points()[pointI] << " which is also used by a cell with level:" @@ -5002,9 +5002,9 @@ void Foam::hexRef8::checkRefinementLevels // // const polyBoundaryMesh& patches = mesh_.boundaryMesh(); // - // forAll(patches, patchI) + // forAll(patches, patchi) // { - // const polyPatch& pp = patches[patchI]; + // const polyPatch& pp = patches[patchi]; // // const labelList& meshPoints = pp.meshPoints(); // @@ -5076,17 +5076,17 @@ const Foam::cellShapeList& Foam::hexRef8::cellShapes() const label nSplitHex = 0; label nUnrecognised = 0; - forAll(cellLevel_, cellI) + forAll(cellLevel_, celli) { - if (meshShapes[cellI].model().index() == 0) + if (meshShapes[celli].model().index() == 0) { - label level = cellLevel_[cellI]; + label level = cellLevel_[celli]; // Return true if we've found 6 quads DynamicList<face> quads; bool haveQuads = matchHexShape ( - cellI, + celli, level, quads ); @@ -5094,7 +5094,7 @@ const Foam::cellShapeList& Foam::hexRef8::cellShapes() const if (haveQuads) { faceList faces(quads.xfer()); - cellShapesPtr_()[cellI] = degenerateMatcher::match(faces); + cellShapesPtr_()[celli] = degenerateMatcher::match(faces); nSplitHex++; } else @@ -5162,13 +5162,13 @@ Foam::labelList Foam::hexRef8::getSplitPoints() const // Unmark all with different master cells const labelList& visibleCells = history_.visibleCells(); - forAll(visibleCells, cellI) + forAll(visibleCells, celli) { - const labelList& cPoints = mesh_.cellPoints(cellI); + const labelList& cPoints = mesh_.cellPoints(celli); - if (visibleCells[cellI] != -1 && history_.parentIndex(cellI) >= 0) + if (visibleCells[celli] != -1 && history_.parentIndex(celli) >= 0) { - label parentIndex = history_.parentIndex(cellI); + label parentIndex = history_.parentIndex(celli); // Check same master. forAll(cPoints, i) @@ -5180,12 +5180,12 @@ Foam::labelList Foam::hexRef8::getSplitPoints() const if (masterCellI == -1) { // First time visit of point. Store parent cell and - // level of the parent cell (with respect to cellI). This + // level of the parent cell (with respect to celli). This // is additional guarantee that we're referring to the // same master at the same refinement level. splitMaster[pointI] = parentIndex; - splitMasterLevel[pointI] = cellLevel_[cellI] - 1; + splitMasterLevel[pointI] = cellLevel_[celli] - 1; } else if (masterCellI == -2) { @@ -5194,7 +5194,7 @@ Foam::labelList Foam::hexRef8::getSplitPoints() const else if ( (masterCellI != parentIndex) - || (splitMasterLevel[pointI] != cellLevel_[cellI] - 1) + || (splitMasterLevel[pointI] != cellLevel_[celli] - 1) ) { // Different masters so point is on two refinement @@ -5218,12 +5218,12 @@ Foam::labelList Foam::hexRef8::getSplitPoints() const // Unmark boundary faces for ( - label faceI = mesh_.nInternalFaces(); - faceI < mesh_.nFaces(); - faceI++ + label facei = mesh_.nInternalFaces(); + facei < mesh_.nFaces(); + facei++ ) { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; forAll(f, fp) { @@ -5307,13 +5307,13 @@ Foam::labelList Foam::hexRef8::getSplitPoints() const // // labelList indexLevel(splitCells.size(), -1); // -// forAll(visibleCells, cellI) +// forAll(visibleCells, celli) // { -// label index = visibleCells[cellI]; +// label index = visibleCells[celli]; // // if (index >= 0) // { -// markIndex(maxLevel, 0, index, cellI, indexLevel); +// markIndex(maxLevel, 0, index, celli, indexLevel); // } // } // @@ -5384,12 +5384,12 @@ Foam::labelList Foam::hexRef8::consistentUnrefinement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Internal faces. - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; label ownLevel = cellLevel_[own] - unrefineCell.get(own); - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; label neiLevel = cellLevel_[nei] - unrefineCell.get(nei); if (ownLevel < (neiLevel-1)) @@ -5456,8 +5456,8 @@ Foam::labelList Foam::hexRef8::consistentUnrefinement forAll(neiLevel, i) { - label faceI = i+mesh_.nInternalFaces(); - label own = mesh_.faceOwner()[faceI]; + label facei = i+mesh_.nInternalFaces(); + label own = mesh_.faceOwner()[facei]; label ownLevel = cellLevel_[own] - unrefineCell.get(own); if (ownLevel < (neiLevel[i]-1)) @@ -5575,13 +5575,13 @@ void Foam::hexRef8::setUnrefinement checkMesh(); - forAll(cellLevel_, cellI) + forAll(cellLevel_, celli) { - if (cellLevel_[cellI] < 0) + if (cellLevel_[celli] < 0) { FatalErrorInFunction - << "Illegal cell level " << cellLevel_[cellI] - << " for cell " << cellI + << "Illegal cell level " << cellLevel_[celli] + << " for cell " << celli << abort(FatalError); } } @@ -5679,9 +5679,9 @@ void Foam::hexRef8::setUnrefinement forAll(pCells, j) { - label cellI = pCells[j]; + label celli = pCells[j]; - label region = cellRegion[cellI]; + label region = cellRegion[celli]; if (region == -1) { @@ -5689,7 +5689,7 @@ void Foam::hexRef8::setUnrefinement << "Ininitial set of split points to unrefine does not" << " seem to be consistent or not mid points" << " of refined cells" << nl - << "cell:" << cellI << " on splitPoint " << pointI + << "cell:" << celli << " on splitPoint " << pointI << " has no region to be merged into" << abort(FatalError); } @@ -5697,7 +5697,7 @@ void Foam::hexRef8::setUnrefinement if (masterCellI != cellRegionMaster[region]) { FatalErrorInFunction - << "cell:" << cellI << " on splitPoint:" << pointI + << "cell:" << celli << " on splitPoint:" << pointI << " in region " << region << " has master:" << cellRegionMaster[region] << " which is not the lowest numbered cell" diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H index 58dfc8559bdf4314f228557ecbaec0c3bf5773ef..021c8626f8df1dc3bc9494d471361ac90c871802 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.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 @@ -108,17 +108,17 @@ class hexRef8 //- Get patch and zone info void getFaceInfo ( - const label faceI, + const label facei, label& patchID, label& zoneID, label& zoneFlip ) const; - //- Adds a face on top of existing faceI. Reverses if necessary. + //- Adds a face on top of existing facei. Reverses if necessary. label addFace ( polyTopoChange& meshMod, - const label faceI, + const label facei, const face& newFace, const label own, const label nei @@ -135,12 +135,12 @@ class hexRef8 const label nei ) const; - //- Modifies existing faceI for either new owner/neighbour or new face + //- Modifies existing facei for either new owner/neighbour or new face // points. Reverses if necessary. void modFace ( polyTopoChange& meshMod, - const label faceI, + const label facei, const face& newFace, const label own, const label nei @@ -148,23 +148,23 @@ class hexRef8 scalar getLevel0EdgeLength() const; - //- Get cell added to point of cellI (if any) + //- Get cell added to point of celli (if any) label getAnchorCell ( const labelListList& cellAnchorPoints, const labelListList& cellAddedCells, - const label cellI, - const label faceI, + const label celli, + const label facei, const label pointI ) const; //- Get new owner and neighbour (in unspecified order) of pointI - // on faceI. + // on facei. void getFaceNeighbours ( const labelListList& cellAnchorPoints, const labelListList& cellAddedCells, - const label faceI, + const label facei, const label pointI, label& own, @@ -179,11 +179,11 @@ class hexRef8 //- Count number of vertices <= anchorLevel label countAnchors(const labelList&, const label) const; //- Debugging: dump cell as .obj file - void dumpCell(const label cellI) const; + void dumpCell(const label celli) const; //- Find index of point with wantedLevel, starting from fp. label findLevel ( - const label faceI, + const label facei, const face& f, const label startFp, const bool searchForward, @@ -197,8 +197,8 @@ class hexRef8 static void checkInternalOrientation ( polyTopoChange& meshMod, - const label cellI, - const label faceI, + const label celli, + const label facei, const point& ownPt, const point& neiPt, const face& newFace @@ -208,8 +208,8 @@ class hexRef8 static void checkBoundaryOrientation ( polyTopoChange& meshMod, - const label cellI, - const label faceI, + const label celli, + const label facei, const point& ownPt, const point& boundaryPt, const face& newFace @@ -232,8 +232,8 @@ class hexRef8 const labelListList& cellAddedCells, const labelList& cellMidPoint, const labelList& edgeMidPoint, - const label cellI, - const label faceI, + const label celli, + const label facei, const bool faceOrder, const label midPointI, const label anchorPointI, @@ -252,8 +252,8 @@ class hexRef8 const labelList& cellMidPoint, const labelList& faceMidPoint, const labelList& edgeMidPoint, - const label cellI, - const label faceI, + const label celli, + const label facei, Map<edge>& midPointToAnchors, Map<edge>& midPointToFaceMids, @@ -261,7 +261,7 @@ class hexRef8 label& nFacesAdded ) const; - //- Create all internal faces to split cellI into 8. + //- Create all internal faces to split celli into 8. void createInternalFaces ( const labelListList& cellAnchorPoints, @@ -270,7 +270,7 @@ class hexRef8 const labelList& faceMidPoint, const labelList& faceAnchorLevel, const labelList& edgeMidPoint, - const label cellI, + const label celli, polyTopoChange& meshMod ) const; @@ -280,7 +280,7 @@ class hexRef8 ( const labelList& edgeMidPoint, const label cLevel, - const label faceI, + const label facei, const label startFp, DynamicList<label>& faceVerts ) const; @@ -290,7 +290,7 @@ class hexRef8 ( const labelList& edgeMidPoint, const label cLevel, - const label faceI, + const label facei, const label startFp, DynamicList<label>& faceVerts ) const; @@ -330,7 +330,7 @@ class hexRef8 // hex was matched (6 faces of each four corner points) bool matchHexShape ( - const label cellI, + const label celli, const label cellLevel, DynamicList<face>& quads ) const; @@ -411,7 +411,7 @@ public: // Refinement //- Gets level such that the face has four points <= level. - label getAnchorLevel(const label faceI) const; + label getAnchorLevel(const label facei) const; //- Given valid mesh and current cell level and proposed // cells to refine calculate any clashes (due to 2:1) and return diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C index d25e88975e9708bcd1639b35391cab9a79e0fef7..98436d128b2e1629355eda6c51b7970e38441aa7 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.C @@ -207,10 +207,10 @@ void Foam::polyTopoChange::writeMeshStats(const polyMesh& mesh, Ostream& os) labelList patchSizes(patches.size()); labelList patchStarts(patches.size()); - forAll(patches, patchI) + forAll(patches, patchi) { - patchSizes[patchI] = patches[patchI].size(); - patchStarts[patchI] = patches[patchI].start(); + patchSizes[patchi] = patches[patchi].size(); + patchStarts[patchi] = patches[patchi].start(); } os << " Points : " << mesh.nPoints() << nl @@ -249,11 +249,11 @@ void Foam::polyTopoChange::getMergeSets label nSets = 0; - forAll(nMerged, cellI) + forAll(nMerged, celli) { - if (nMerged[cellI] > 1) + if (nMerged[celli] > 1) { - cellToMergeSet[cellI] = nSets++; + cellToMergeSet[celli] = nSets++; } } @@ -335,10 +335,10 @@ Foam::pointField Foam::polyTopoChange::facePoints(const face& f) const void Foam::polyTopoChange::checkFace ( const face& f, - const label faceI, + const label facei, const label own, const label nei, - const label patchI, + const label patchi, const label zoneI ) const { @@ -348,15 +348,15 @@ void Foam::polyTopoChange::checkFace { // retired face } - else if (patchI == -1 || patchI >= nPatches_) + else if (patchi == -1 || patchi >= nPatches_) { FatalErrorInFunction << "Face has no neighbour (so external) but does not have" << " a valid patch" << nl << "f:" << f - << " faceI(-1 if added face):" << faceI + << " facei(-1 if added face):" << facei << " own:" << own << " nei:" << nei - << " patchI:" << patchI << nl; + << " patchi:" << patchi << nl; if (hasValidPoints(f)) { FatalError @@ -368,14 +368,14 @@ void Foam::polyTopoChange::checkFace } else { - if (patchI != -1) + if (patchi != -1) { FatalErrorInFunction - << "Cannot both have valid patchI and neighbour" << nl + << "Cannot both have valid patchi and neighbour" << nl << "f:" << f - << " faceI(-1 if added face):" << faceI + << " facei(-1 if added face):" << facei << " own:" << own << " nei:" << nei - << " patchI:" << patchI << nl; + << " patchi:" << patchi << nl; if (hasValidPoints(f)) { FatalError @@ -391,9 +391,9 @@ void Foam::polyTopoChange::checkFace << "Owner cell label should be less than neighbour cell label" << nl << "f:" << f - << " faceI(-1 if added face):" << faceI + << " facei(-1 if added face):" << facei << " own:" << own << " nei:" << nei - << " patchI:" << patchI << nl; + << " patchi:" << patchi << nl; if (hasValidPoints(f)) { FatalError @@ -410,9 +410,9 @@ void Foam::polyTopoChange::checkFace << "Illegal vertices in face" << nl << "f:" << f - << " faceI(-1 if added face):" << faceI + << " facei(-1 if added face):" << facei << " own:" << own << " nei:" << nei - << " patchI:" << patchI << nl; + << " patchi:" << patchi << nl; if (hasValidPoints(f)) { FatalError @@ -421,15 +421,15 @@ void Foam::polyTopoChange::checkFace } FatalError << abort(FatalError); } - if (faceI >= 0 && faceI < faces_.size() && faceRemoved(faceI)) + if (facei >= 0 && facei < faces_.size() && faceRemoved(facei)) { FatalErrorInFunction << "Face already marked for removal" << nl << "f:" << f - << " faceI(-1 if added face):" << faceI + << " facei(-1 if added face):" << facei << " own:" << own << " nei:" << nei - << " patchI:" << patchI << nl; + << " patchi:" << patchi << nl; if (hasValidPoints(f)) { FatalError @@ -446,9 +446,9 @@ void Foam::polyTopoChange::checkFace << "Face uses removed vertices" << nl << "f:" << f - << " faceI(-1 if added face):" << faceI + << " facei(-1 if added face):" << facei << " own:" << own << " nei:" << nei - << " patchI:" << patchI << nl; + << " patchi:" << patchi << nl; if (hasValidPoints(f)) { FatalError @@ -476,32 +476,32 @@ void Foam::polyTopoChange::makeCells // 1. Count faces per cell - for (label faceI = 0; faceI < nActiveFaces; faceI++) + for (label facei = 0; facei < nActiveFaces; facei++) { - if (faceOwner_[faceI] < 0) + if (faceOwner_[facei] < 0) { FatalErrorInFunction - << "Face " << faceI << " is active but its owner has" + << "Face " << facei << " is active but its owner has" << " been deleted. This is usually due to deleting cells" << " without modifying exposed faces to be boundary faces." << exit(FatalError); } - nNbrs[faceOwner_[faceI]]++; + nNbrs[faceOwner_[facei]]++; } - for (label faceI = 0; faceI < nActiveFaces; faceI++) + for (label facei = 0; facei < nActiveFaces; facei++) { - if (faceNeighbour_[faceI] >= 0) + if (faceNeighbour_[facei] >= 0) { - nNbrs[faceNeighbour_[faceI]]++; + nNbrs[faceNeighbour_[facei]]++; } } // 2. Calculate offsets cellFaceOffsets[0] = 0; - forAll(nNbrs, cellI) + forAll(nNbrs, celli) { - cellFaceOffsets[cellI+1] = cellFaceOffsets[cellI] + nNbrs[cellI]; + cellFaceOffsets[celli+1] = cellFaceOffsets[celli] + nNbrs[celli]; } // 3. Fill faces per cell @@ -509,20 +509,20 @@ void Foam::polyTopoChange::makeCells // reset the whole list to use as counter nNbrs = 0; - for (label faceI = 0; faceI < nActiveFaces; faceI++) + for (label facei = 0; facei < nActiveFaces; facei++) { - label cellI = faceOwner_[faceI]; + label celli = faceOwner_[facei]; - cellFaces[cellFaceOffsets[cellI] + nNbrs[cellI]++] = faceI; + cellFaces[cellFaceOffsets[celli] + nNbrs[celli]++] = facei; } - for (label faceI = 0; faceI < nActiveFaces; faceI++) + for (label facei = 0; facei < nActiveFaces; facei++) { - label cellI = faceNeighbour_[faceI]; + label celli = faceNeighbour_[facei]; - if (cellI >= 0) + if (celli >= 0) { - cellFaces[cellFaceOffsets[cellI] + nNbrs[cellI]++] = faceI; + cellFaces[cellFaceOffsets[celli] + nNbrs[celli]++] = facei; } } @@ -544,12 +544,12 @@ void Foam::polyTopoChange::makeCellCells // 1. Count neighbours (through internal faces) per cell - for (label faceI = 0; faceI < nActiveFaces; faceI++) + for (label facei = 0; facei < nActiveFaces; facei++) { - if (faceNeighbour_[faceI] >= 0) + if (faceNeighbour_[facei] >= 0) { - nNbrs[faceOwner_[faceI]]++; - nNbrs[faceNeighbour_[faceI]]++; + nNbrs[faceOwner_[facei]]++; + nNbrs[faceNeighbour_[facei]]++; } } @@ -562,13 +562,13 @@ void Foam::polyTopoChange::makeCellCells // reset the whole list to use as counter nNbrs = 0; - for (label faceI = 0; faceI < nActiveFaces; faceI++) + for (label facei = 0; facei < nActiveFaces; facei++) { - label nei = faceNeighbour_[faceI]; + label nei = faceNeighbour_[facei]; if (nei >= 0) { - label own = faceOwner_[faceI]; + label own = faceOwner_[facei]; cellCells.m()[cellCells.index(own, nNbrs[own]++)] = nei; cellCells.m()[cellCells.index(nei, nNbrs[nei]++)] = own; } @@ -612,15 +612,15 @@ Foam::label Foam::polyTopoChange::getCellOrder label currentCell = -1; label minWeight = labelMax; - forAll(visited, cellI) + forAll(visited, celli) { // find the lowest connected cell that has not been visited yet - if (!cellRemoved(cellI) && !visited[cellI]) + if (!cellRemoved(celli) && !visited[celli]) { - if (cellCellAddressing[cellI].size() < minWeight) + if (cellCellAddressing[celli].size() < minWeight) { - minWeight = cellCellAddressing[cellI].size(); - currentCell = cellI; + minWeight = cellCellAddressing[celli].size(); + currentCell = celli; } } } @@ -718,10 +718,10 @@ void Foam::polyTopoChange::getFaceOrder labelList nbr; labelList order; - forAll(cellMap_, cellI) + forAll(cellMap_, celli) { - label startOfCell = cellFaceOffsets[cellI]; - label nFaces = cellFaceOffsets[cellI+1] - startOfCell; + label startOfCell = cellFaceOffsets[celli]; + label nFaces = cellFaceOffsets[celli+1] - startOfCell; // Neighbouring cells //SortableList<label> nbr(nFaces); @@ -729,11 +729,11 @@ void Foam::polyTopoChange::getFaceOrder for (label i = 0; i < nFaces; i++) { - label faceI = cellFaces[startOfCell + i]; + label facei = cellFaces[startOfCell + i]; - label nbrCellI = faceNeighbour_[faceI]; + label nbrCellI = faceNeighbour_[facei]; - if (faceI >= nActiveFaces) + if (facei >= nActiveFaces) { // Retired face. nbr[i] = -1; @@ -741,12 +741,12 @@ void Foam::polyTopoChange::getFaceOrder 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; @@ -797,20 +797,20 @@ void Foam::polyTopoChange::getFaceOrder { patchStarts[0] = newFaceI; - for (label faceI = 0; faceI < nActiveFaces; faceI++) + for (label facei = 0; facei < nActiveFaces; facei++) { - if (region_[faceI] >= 0) + if (region_[facei] >= 0) { - patchSizes[region_[faceI]]++; + patchSizes[region_[facei]]++; } } - label faceI = patchStarts[0]; + label facei = patchStarts[0]; - forAll(patchStarts, patchI) + forAll(patchStarts, patchi) { - patchStarts[patchI] = faceI; - faceI += patchSizes[patchI]; + patchStarts[patchi] = facei; + facei += patchSizes[patchi]; } } @@ -822,40 +822,40 @@ void Foam::polyTopoChange::getFaceOrder labelList workPatchStarts(patchStarts); - for (label faceI = 0; faceI < nActiveFaces; faceI++) + for (label facei = 0; facei < nActiveFaces; facei++) { - if (region_[faceI] >= 0) + if (region_[facei] >= 0) { - oldToNew[faceI] = workPatchStarts[region_[faceI]]++; + oldToNew[facei] = workPatchStarts[region_[facei]]++; } } // Retired faces. - for (label faceI = nActiveFaces; faceI < oldToNew.size(); faceI++) + for (label facei = nActiveFaces; facei < oldToNew.size(); facei++) { - oldToNew[faceI] = faceI; + oldToNew[facei] = facei; } // Check done all faces. - forAll(oldToNew, faceI) + forAll(oldToNew, facei) { - if (oldToNew[faceI] == -1) + if (oldToNew[facei] == -1) { FatalErrorInFunction << "Did not determine new position" - << " for face " << faceI - << " owner " << faceOwner_[faceI] - << " neighbour " << faceNeighbour_[faceI] - << " region " << region_[faceI] << endl + << " for face " << facei + << " owner " << faceOwner_[facei] + << " neighbour " << faceNeighbour_[facei] + << " region " << region_[facei] << endl << "This is usually caused by not specifying a patch for" << " a boundary face." << nl << "Switch on the polyTopoChange::debug flag to catch" << " this error earlier." << nl; - if (hasValidPoints(faces_[faceI])) + if (hasValidPoints(faces_[facei])) { FatalError << "points (removed points marked with " - << vector::max << ") " << facePoints(faces_[faceI]); + << vector::max << ") " << facePoints(faces_[facei]); } FatalError << abort(FatalError); } @@ -957,17 +957,17 @@ void Foam::polyTopoChange::compact } // Mark boundary points - forAll(faceOwner_, faceI) + forAll(faceOwner_, facei) { if ( - !faceRemoved(faceI) - && faceOwner_[faceI] >= 0 - && faceNeighbour_[faceI] < 0 + !faceRemoved(facei) + && faceOwner_[facei] >= 0 + && faceNeighbour_[facei] < 0 ) { // Valid boundary face - const face& f = faces_[faceI]; + const face& f = faces_[facei]; forAll(f, fp) { @@ -984,7 +984,7 @@ void Foam::polyTopoChange::compact FatalErrorInFunction << "Removed or retired point " << pointI << " in face " << f - << " at position " << faceI << endl + << " at position " << facei << endl << "Probably face has not been adapted for" << " removed points." << abort(FatalError); } @@ -1009,17 +1009,17 @@ void Foam::polyTopoChange::compact newPointI = 0; // Mark internal points - forAll(faceOwner_, faceI) + forAll(faceOwner_, facei) { if ( - !faceRemoved(faceI) - && faceOwner_[faceI] >= 0 - && faceNeighbour_[faceI] >= 0 + !faceRemoved(facei) + && faceOwner_[facei] >= 0 + && faceNeighbour_[facei] >= 0 ) { // Valid internal face - const face& f = faces_[faceI]; + const face& f = faces_[facei]; forAll(f, fp) { @@ -1036,7 +1036,7 @@ void Foam::polyTopoChange::compact FatalErrorInFunction << "Removed or retired point " << pointI << " in face " << f - << " at position " << faceI << endl + << " at position " << facei << endl << "Probably face has not been adapted for" << " removed points." << abort(FatalError); } @@ -1078,19 +1078,19 @@ void Foam::polyTopoChange::compact renumber(localPointMap, retiredPoints_); // Use map to relabel face vertices - forAll(faces_, faceI) + forAll(faces_, facei) { - face& f = faces_[faceI]; + face& f = faces_[facei]; //labelList oldF(f); renumberCompact(localPointMap, f); - if (!faceRemoved(faceI) && f.size() < 3) + if (!faceRemoved(facei) && f.size() < 3) { FatalErrorInFunction << "Created illegal face " << f //<< " from face " << oldF - << " at position:" << faceI + << " at position:" << facei << " when filtering removed points" << abort(FatalError); } @@ -1103,21 +1103,21 @@ void Foam::polyTopoChange::compact labelList localFaceMap(faces_.size(), -1); label newFaceI = 0; - forAll(faces_, faceI) + forAll(faces_, facei) { - if (!faceRemoved(faceI) && faceOwner_[faceI] >= 0) + if (!faceRemoved(facei) && faceOwner_[facei] >= 0) { - localFaceMap[faceI] = newFaceI++; + localFaceMap[facei] = newFaceI++; } } nActiveFaces_ = newFaceI; - forAll(faces_, faceI) + forAll(faces_, facei) { - if (!faceRemoved(faceI) && faceOwner_[faceI] < 0) + if (!faceRemoved(facei) && faceOwner_[facei] < 0) { // Retired face - localFaceMap[faceI] = newFaceI++; + localFaceMap[facei] = newFaceI++; } } @@ -1152,11 +1152,11 @@ void Foam::polyTopoChange::compact localCellMap = -1; newCellI = 0; - forAll(cellMap_, cellI) + forAll(cellMap_, celli) { - if (!cellRemoved(cellI)) + if (!cellRemoved(celli)) { - localCellMap[cellI] = newCellI++; + localCellMap[celli] = newCellI++; } } } @@ -1183,39 +1183,39 @@ void Foam::polyTopoChange::compact // Renumber owner/neighbour. Take into account if neighbour suddenly // gets lower cell than owner. - forAll(faceOwner_, faceI) + forAll(faceOwner_, facei) { - label own = faceOwner_[faceI]; - label nei = faceNeighbour_[faceI]; + label own = faceOwner_[facei]; + label nei = faceNeighbour_[facei]; if (own >= 0) { // Update owner - faceOwner_[faceI] = localCellMap[own]; + faceOwner_[facei] = localCellMap[own]; if (nei >= 0) { // Update neighbour. - faceNeighbour_[faceI] = localCellMap[nei]; + faceNeighbour_[facei] = localCellMap[nei]; // Check if face needs reversing. if ( - faceNeighbour_[faceI] >= 0 - && faceNeighbour_[faceI] < faceOwner_[faceI] + faceNeighbour_[facei] >= 0 + && faceNeighbour_[facei] < faceOwner_[facei] ) { - faces_[faceI].flip(); - Swap(faceOwner_[faceI], faceNeighbour_[faceI]); - flipFaceFlux_[faceI] = + faces_[facei].flip(); + Swap(faceOwner_[facei], faceNeighbour_[facei]); + flipFaceFlux_[facei] = ( - flipFaceFlux_[faceI] + flipFaceFlux_[facei] ? 0 : 1 ); - faceZoneFlip_[faceI] = + faceZoneFlip_[facei] = ( - faceZoneFlip_[faceI] + faceZoneFlip_[facei] ? 0 : 1 ); @@ -1225,7 +1225,7 @@ void Foam::polyTopoChange::compact else if (nei >= 0) { // Update neighbour. - faceNeighbour_[faceI] = localCellMap[nei]; + faceNeighbour_[facei] = localCellMap[nei]; } } } @@ -1275,9 +1275,9 @@ Foam::labelList Foam::polyTopoChange::selectFaces forAll(faceLabels, i) { - label faceI = faceLabels[i]; + label facei = faceLabels[i]; - if (internalFacesOnly == mesh.isInternalFace(faceI)) + if (internalFacesOnly == mesh.isInternalFace(facei)) { nFaces++; } @@ -1299,11 +1299,11 @@ Foam::labelList Foam::polyTopoChange::selectFaces forAll(faceLabels, i) { - label faceI = faceLabels[i]; + label facei = faceLabels[i]; - if (internalFacesOnly == mesh.isInternalFace(faceI)) + if (internalFacesOnly == mesh.isInternalFace(facei)) { - collectedFaces[nFaces++] = faceI; + collectedFaces[nFaces++] = facei; } } } @@ -1323,13 +1323,13 @@ void Foam::polyTopoChange::calcPatchPointMap { patchPointMap.setSize(boundary.size()); - forAll(boundary, patchI) + forAll(boundary, patchi) { - const labelList& meshPoints = boundary[patchI].meshPoints(); + const labelList& meshPoints = boundary[patchi].meshPoints(); - const Map<label>& oldMeshPointMap = oldPatchMeshPointMaps[patchI]; + const Map<label>& oldMeshPointMap = oldPatchMeshPointMaps[patchi]; - labelList& curPatchPointRnb = patchPointMap[patchI]; + labelList& curPatchPointRnb = patchPointMap[patchi]; curPatchPointRnb.setSize(meshPoints.size()); @@ -1696,12 +1696,12 @@ void Foam::polyTopoChange::resetZones forAllConstIter(Map<label>, faceZone_, iter) { label zoneI = iter(); - label faceI = iter.key(); + label facei = iter.key(); label index = nFaces[zoneI]++; - addressing[zoneI][index] = faceI; - flipMode[zoneI][index] = faceZoneFlip_[faceI]; + addressing[zoneI][index] = facei; + flipMode[zoneI][index] = faceZoneFlip_[facei]; } // Sort the addressing forAll(addressing, zoneI) @@ -1782,15 +1782,15 @@ void Foam::polyTopoChange::resetZones labelList nCells(cellZones.size(), 0); - forAll(cellZone_, cellI) + forAll(cellZone_, celli) { - label zoneI = cellZone_[cellI]; + label zoneI = cellZone_[celli]; if (zoneI >= cellZones.size()) { FatalErrorInFunction << "Illegal zoneID " << zoneI << " for cell " - << cellI << abort(FatalError); + << celli << abort(FatalError); } if (zoneI >= 0) @@ -1806,13 +1806,13 @@ void Foam::polyTopoChange::resetZones } nCells = 0; - forAll(cellZone_, cellI) + forAll(cellZone_, celli) { - label zoneI = cellZone_[cellI]; + label zoneI = cellZone_[celli]; if (zoneI >= 0) { - addressing[zoneI][nCells[zoneI]++] = cellI; + addressing[zoneI][nCells[zoneI]++] = celli; } } // Sort the addressing @@ -1934,11 +1934,11 @@ void Foam::polyTopoChange::reorderCoupledFaces PstreamBuffers pBufs(Pstream::nonBlocking); // Send ordering - forAll(boundary, patchI) + forAll(boundary, patchi) { - if (syncParallel || !isA<processorPolyPatch>(boundary[patchI])) + if (syncParallel || !isA<processorPolyPatch>(boundary[patchi])) { - boundary[patchI].initOrder + boundary[patchi].initOrder ( pBufs, primitivePatch @@ -1946,8 +1946,8 @@ void Foam::polyTopoChange::reorderCoupledFaces SubList<face> ( faces_, - patchSizes[patchI], - patchStarts[patchI] + patchSizes[patchi], + patchStarts[patchi] ), points ) @@ -1964,14 +1964,14 @@ void Foam::polyTopoChange::reorderCoupledFaces bool anyChanged = false; - forAll(boundary, patchI) + forAll(boundary, patchi) { - if (syncParallel || !isA<processorPolyPatch>(boundary[patchI])) + if (syncParallel || !isA<processorPolyPatch>(boundary[patchi])) { - labelList patchFaceMap(patchSizes[patchI], -1); - labelList patchFaceRotation(patchSizes[patchI], 0); + labelList patchFaceMap(patchSizes[patchi], -1); + labelList patchFaceRotation(patchSizes[patchi], 0); - bool changed = boundary[patchI].order + bool changed = boundary[patchi].order ( pBufs, primitivePatch @@ -1979,8 +1979,8 @@ void Foam::polyTopoChange::reorderCoupledFaces SubList<face> ( faces_, - patchSizes[patchI], - patchStarts[patchI] + patchSizes[patchi], + patchStarts[patchi] ), points ), @@ -1991,7 +1991,7 @@ void Foam::polyTopoChange::reorderCoupledFaces if (changed) { // Merge patch face reordering into mesh face reordering table - label start = patchStarts[patchI]; + label start = patchStarts[patchi]; forAll(patchFaceMap, patchFaceI) { @@ -2021,11 +2021,11 @@ void Foam::polyTopoChange::reorderCoupledFaces reorderCompactFaces(oldToNew.size(), oldToNew); // Rotate faces (rotation is already in new face indices). - forAll(rotation, faceI) + forAll(rotation, facei) { - if (rotation[faceI] != 0) + if (rotation[facei] != 0) { - inplaceRotateList<List, label>(faces_[faceI], rotation[faceI]); + inplaceRotateList<List, label>(faces_[facei], rotation[facei]); } } } @@ -2141,12 +2141,12 @@ void Foam::polyTopoChange::compactAndReorder oldPatchNMeshPoints.setSize(boundary.size()); oldPatchStarts.setSize(boundary.size()); - forAll(boundary, patchI) + forAll(boundary, patchi) { // Copy old face zone mesh point maps - oldPatchMeshPointMaps[patchI] = boundary[patchI].meshPointMap(); - oldPatchNMeshPoints[patchI] = boundary[patchI].meshPoints().size(); - oldPatchStarts[patchI] = boundary[patchI].start(); + oldPatchMeshPointMaps[patchi] = boundary[patchi].meshPointMap(); + oldPatchNMeshPoints[patchi] = boundary[patchi].meshPoints().size(); + oldPatchStarts[patchi] = boundary[patchi].start(); } // Grab old face zone mesh point maps. @@ -2353,31 +2353,31 @@ void Foam::polyTopoChange::addMesh forAll(cellLabels, j) { - label cellI = cellLabels[j]; + label celli = cellLabels[j]; - if (newZoneID[cellI] != -1) + if (newZoneID[celli] != -1) { WarningInFunction - << "Cell:" << cellI - << " centre:" << mesh.cellCentres()[cellI] + << "Cell:" << celli + << " centre:" << mesh.cellCentres()[celli] << " is in two zones:" - << cellZones[newZoneID[cellI]].name() + << cellZones[newZoneID[celli]].name() << " and " << cellZones[zoneI].name() << endl << " This is not supported." << " Continuing with first zone only." << endl; } else { - newZoneID[cellI] = cellZoneMap[zoneI]; + newZoneID[celli] = cellZoneMap[zoneI]; } } } // Add cells in mesh order - for (label cellI = 0; cellI < nAllCells; cellI++) + for (label celli = 0; celli < nAllCells; celli++) { // Add cell from cell - addCell(-1, -1, -1, cellI, newZoneID[cellI]); + addCell(-1, -1, -1, celli, newZoneID[celli]); } } @@ -2424,27 +2424,27 @@ void Foam::polyTopoChange::addMesh // Add faces in mesh order // 1. Internal faces - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { addFace ( - faces[faceI], - faceOwner[faceI], - faceNeighbour[faceI], + faces[facei], + faceOwner[facei], + faceNeighbour[facei], -1, // masterPointID -1, // masterEdgeID - faceI, // masterFaceID + facei, // masterFaceID false, // flipFaceFlux -1, // patchID - newZoneID[faceI], // zoneID - zoneFlip[faceI] // zoneFlip + newZoneID[facei], // zoneID + zoneFlip[facei] // zoneFlip ); } // 2. Patch faces - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.start() != faces_.size()) { @@ -2458,20 +2458,20 @@ void Foam::polyTopoChange::addMesh } forAll(pp, patchFaceI) { - label faceI = pp.start() + patchFaceI; + label facei = pp.start() + patchFaceI; addFace ( - faces[faceI], - faceOwner[faceI], + faces[facei], + faceOwner[facei], -1, // neighbour -1, // masterPointID -1, // masterEdgeID - faceI, // masterFaceID + facei, // masterFaceID false, // flipFaceFlux - patchMap[patchI], // patchID - newZoneID[faceI], // zoneID - zoneFlip[faceI] // zoneFlip + patchMap[patchi], // patchID + newZoneID[facei], // zoneID + zoneFlip[facei] // zoneFlip ); } } @@ -2806,7 +2806,7 @@ Foam::label Foam::polyTopoChange::addFace checkFace(f, -1, own, nei, patchID, zoneID); } - label faceI = faces_.size(); + label facei = faces_.size(); faces_.append(f); region_.append(patchID); @@ -2816,12 +2816,12 @@ Foam::label Foam::polyTopoChange::addFace if (masterPointID >= 0) { faceMap_.append(-1); - faceFromPoint_.insert(faceI, masterPointID); + faceFromPoint_.insert(facei, masterPointID); } else if (masterEdgeID >= 0) { faceMap_.append(-1); - faceFromEdge_.insert(faceI, masterEdgeID); + faceFromEdge_.insert(facei, masterEdgeID); } else if (masterFaceID >= 0) { @@ -2836,24 +2836,24 @@ Foam::label Foam::polyTopoChange::addFace // << abort(FatalError); faceMap_.append(-1); } - reverseFaceMap_.append(faceI); + reverseFaceMap_.append(facei); - flipFaceFlux_[faceI] = (flipFaceFlux ? 1 : 0); + flipFaceFlux_[facei] = (flipFaceFlux ? 1 : 0); if (zoneID >= 0) { - faceZone_.insert(faceI, zoneID); + faceZone_.insert(facei, zoneID); } - faceZoneFlip_[faceI] = (zoneFlip ? 1 : 0); + faceZoneFlip_[facei] = (zoneFlip ? 1 : 0); - return faceI; + return facei; } void Foam::polyTopoChange::modifyFace ( const face& f, - const label faceI, + const label facei, const label own, const label nei, const bool flipFaceFlux, @@ -2865,17 +2865,17 @@ void Foam::polyTopoChange::modifyFace // Check validity if (debug) { - checkFace(f, faceI, own, nei, patchID, zoneID); + checkFace(f, facei, own, nei, patchID, zoneID); } - faces_[faceI] = f; - faceOwner_[faceI] = own; - faceNeighbour_[faceI] = nei; - region_[faceI] = patchID; + faces_[facei] = f; + faceOwner_[facei] = own; + faceNeighbour_[facei] = nei; + region_[facei] = patchID; - flipFaceFlux_[faceI] = (flipFaceFlux ? 1 : 0); + flipFaceFlux_[facei] = (flipFaceFlux ? 1 : 0); - Map<label>::iterator faceFnd = faceZone_.find(faceI); + Map<label>::iterator faceFnd = faceZone_.find(facei); if (faceFnd != faceZone_.end()) { @@ -2890,18 +2890,18 @@ void Foam::polyTopoChange::modifyFace } else if (zoneID >= 0) { - faceZone_.insert(faceI, zoneID); + faceZone_.insert(facei, zoneID); } - faceZoneFlip_[faceI] = (zoneFlip ? 1 : 0); + faceZoneFlip_[facei] = (zoneFlip ? 1 : 0); } -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()) + if (facei < 0 || facei >= faces_.size()) { FatalErrorInFunction - << "illegal face label " << faceI << endl + << "illegal face label " << facei << endl << "Valid face labels are 0 .. " << faces_.size()-1 << abort(FatalError); } @@ -2909,33 +2909,33 @@ void Foam::polyTopoChange::removeFace(const label faceI, const label mergeFaceI) if ( strict_ - && (faceRemoved(faceI) || faceMap_[faceI] == -1) + && (faceRemoved(facei) || faceMap_[facei] == -1) ) { FatalErrorInFunction - << "face " << faceI + << "face " << facei << " already marked for removal" << abort(FatalError); } - faces_[faceI].setSize(0); - region_[faceI] = -1; - faceOwner_[faceI] = -1; - faceNeighbour_[faceI] = -1; - faceMap_[faceI] = -1; + faces_[facei].setSize(0); + region_[facei] = -1; + faceOwner_[facei] = -1; + faceNeighbour_[facei] = -1; + faceMap_[facei] = -1; if (mergeFaceI >= 0) { - reverseFaceMap_[faceI] = -mergeFaceI-2; + reverseFaceMap_[facei] = -mergeFaceI-2; } else { - reverseFaceMap_[faceI] = -1; + reverseFaceMap_[facei] = -1; } - faceFromEdge_.erase(faceI); - faceFromPoint_.erase(faceI); - flipFaceFlux_[faceI] = 0; - faceZone_.erase(faceI); - faceZoneFlip_[faceI] = 0; + faceFromEdge_.erase(facei); + faceFromPoint_.erase(facei); + flipFaceFlux_[facei] = 0; + faceZone_.erase(facei); + faceZoneFlip_[facei] = 0; } @@ -2948,75 +2948,75 @@ Foam::label Foam::polyTopoChange::addCell const label zoneID ) { - label cellI = cellMap_.size(); + label celli = cellMap_.size(); if (masterPointID >= 0) { cellMap_.append(-1); - cellFromPoint_.insert(cellI, masterPointID); + cellFromPoint_.insert(celli, masterPointID); } else if (masterEdgeID >= 0) { cellMap_.append(-1); - cellFromEdge_.insert(cellI, masterEdgeID); + cellFromEdge_.insert(celli, masterEdgeID); } else if (masterFaceID >= 0) { cellMap_.append(-1); - cellFromFace_.insert(cellI, masterFaceID); + cellFromFace_.insert(celli, masterFaceID); } else { cellMap_.append(masterCellID); } - reverseCellMap_.append(cellI); + reverseCellMap_.append(celli); cellZone_.append(zoneID); - return cellI; + return celli; } void Foam::polyTopoChange::modifyCell ( - const label cellI, + const label celli, const label zoneID ) { - cellZone_[cellI] = zoneID; + cellZone_[celli] = zoneID; } -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()) + if (celli < 0 || celli >= cellMap_.size()) { FatalErrorInFunction - << "illegal cell label " << cellI << endl + << "illegal cell label " << celli << endl << "Valid cell labels are 0 .. " << cellMap_.size()-1 << abort(FatalError); } - if (strict_ && cellMap_[cellI] == -2) + if (strict_ && cellMap_[celli] == -2) { FatalErrorInFunction - << "cell " << cellI + << "cell " << celli << " already marked for removal" << abort(FatalError); } - cellMap_[cellI] = -2; + cellMap_[celli] = -2; if (mergeCellI >= 0) { - reverseCellMap_[cellI] = -mergeCellI-2; + reverseCellMap_[celli] = -mergeCellI-2; } else { - reverseCellMap_[cellI] = -1; + reverseCellMap_[celli] = -1; } - cellFromPoint_.erase(cellI); - cellFromEdge_.erase(cellI); - cellFromFace_.erase(cellI); - cellZone_[cellI] = -1; + cellFromPoint_.erase(celli); + cellFromEdge_.erase(celli); + cellFromFace_.erase(celli); + cellZone_[celli] = -1; } @@ -3426,14 +3426,14 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::makeMesh List<polyPatch*> newBoundary(oldPatches.size()); - forAll(oldPatches, patchI) + forAll(oldPatches, patchi) { - newBoundary[patchI] = oldPatches[patchI].clone + newBoundary[patchi] = oldPatches[patchi].clone ( newMesh.boundaryMesh(), - patchI, - patchSizes[patchI], - patchStarts[patchI] + patchi, + patchSizes[patchi], + patchStarts[patchi] ).ptr(); } newMesh.addFvPatches(newBoundary); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H index 97d82bdb521886bb4ee336d1b518b6221018b994..b61554e8d8881603fd85d156112b6fdb7664c55d 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChange.H @@ -249,7 +249,7 @@ class polyTopoChange void checkFace ( const face&, - const label faceI, + const label facei, const label own, const label nei, const label patchI, @@ -448,10 +448,10 @@ public: inline bool pointRemoved(const label pointI) const; //- Is face removed? - inline bool faceRemoved(const label faceI) const; + inline bool faceRemoved(const label facei) const; //- Is cell removed? - inline bool cellRemoved(const label cellI) const; + inline bool cellRemoved(const label celli) const; // Edit @@ -531,7 +531,7 @@ public: void modifyFace ( const face& f, - const label faceI, + const label facei, const label own, const label nei, const bool flipFaceFlux, diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeI.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeI.H index d0377b4386a8840931d18c6fce27bcef1ad959d5..fb531c93e3fedcefc5feaf16041d72a162deaa17 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeI.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/polyTopoChangeI.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 @@ -38,15 +38,15 @@ inline bool Foam::polyTopoChange::pointRemoved(const label pointI) const } -inline bool Foam::polyTopoChange::faceRemoved(const label faceI) const +inline bool Foam::polyTopoChange::faceRemoved(const label facei) const { - return faces_[faceI].empty(); + return faces_[facei].empty(); } -inline bool Foam::polyTopoChange::cellRemoved(const label cellI) const +inline bool Foam::polyTopoChange::cellRemoved(const label celli) const { - return cellMap_[cellI] == -2; + return cellMap_[celli] == -2; } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C index 66288cc0ce6e3562480f9cf874cc5061820bf05e..5035bba2ac5a6a98631e83fbc40c3d2c19eba4a1 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.C @@ -81,13 +81,13 @@ void Foam::refinementHistory::writeDebug string oldPrefix = Pout.prefix(); Pout.prefix() = ""; - forAll(visibleCells, cellI) + forAll(visibleCells, celli) { - label index = visibleCells[cellI]; + label index = visibleCells[celli]; if (index >= 0) { - Pout<< "Cell from refinement:" << cellI << " index:" << index + Pout<< "Cell from refinement:" << celli << " index:" << index << endl; string oldPrefix = Pout.prefix(); @@ -97,7 +97,7 @@ void Foam::refinementHistory::writeDebug } else { - Pout<< "Unrefined cell:" << cellI << " index:" << index << endl; + Pout<< "Unrefined cell:" << celli << " index:" << index << endl; } } Pout.prefix() = oldPrefix; @@ -436,9 +436,9 @@ Foam::refinementHistory::refinementHistory visibleCells_.setSize(nCells); splitCells_.setCapacity(nCells); - for (label cellI = 0; cellI < nCells; cellI++) + for (label celli = 0; celli < nCells; celli++) { - visibleCells_[cellI] = cellI; + visibleCells_[celli] = celli; splitCells_.append(splitCell8()); } } @@ -531,11 +531,11 @@ void Foam::refinementHistory::updateMesh(const mapPolyMesh& map) labelList newVisibleCells(map.cellMap().size(), -1); - forAll(visibleCells_, cellI) + forAll(visibleCells_, celli) { - if (visibleCells_[cellI] != -1) + if (visibleCells_[celli] != -1) { - label index = visibleCells_[cellI]; + label index = visibleCells_[celli]; // Check not already set if (splitCells_[index].addedCellsPtr_.valid()) @@ -544,7 +544,7 @@ void Foam::refinementHistory::updateMesh(const mapPolyMesh& map) << "Problem" << abort(FatalError); } - label newCellI = reverseCellMap[cellI]; + label newCellI = reverseCellMap[celli]; if (newCellI >= 0) { @@ -578,9 +578,9 @@ void Foam::refinementHistory::subset { labelList newVisibleCells(cellMap.size(), -1); - forAll(newVisibleCells, cellI) + forAll(newVisibleCells, celli) { - label oldCellI = cellMap[cellI]; + label oldCellI = cellMap[celli]; label index = visibleCells_[oldCellI]; @@ -591,7 +591,7 @@ void Foam::refinementHistory::subset << "Problem" << abort(FatalError); } - newVisibleCells[cellI] = index; + newVisibleCells[celli] = index; } if (debug) @@ -706,16 +706,16 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) // Per splitCell entry the number of live cells that move to that processor labelList splitCellNum(splitCells_.size(), 0); - forAll(visibleCells_, cellI) + forAll(visibleCells_, celli) { - label index = visibleCells_[cellI]; + label index = visibleCells_[celli]; if (index >= 0) { countProc ( splitCells_[index].parent_, - destination[cellI], + destination[celli], splitCellProc, splitCellNum ); @@ -765,15 +765,15 @@ void Foam::refinementHistory::distribute(const mapDistributePolyMesh& map) } // Add live cells that are subsetted. - forAll(visibleCells_, cellI) + forAll(visibleCells_, celli) { - label index = visibleCells_[cellI]; + 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 + //Pout<< "Adding refined cell " << celli // << " since moves to " // << procI << " old parent:" << parent << endl; @@ -938,16 +938,16 @@ void Foam::refinementHistory::compact() } // Check none of the visible cells are marked as free - forAll(visibleCells_, cellI) + forAll(visibleCells_, celli) { if ( - visibleCells_[cellI] >= 0 - && splitCells_[visibleCells_[cellI]].parent_ == -2 + visibleCells_[celli] >= 0 + && splitCells_[visibleCells_[celli]].parent_ == -2 ) { FatalErrorInFunction - << "Problem : visible cell:" << cellI + << "Problem : visible cell:" << celli << " is marked as being free." << abort(FatalError); } } @@ -962,9 +962,9 @@ void Foam::refinementHistory::compact() // or indexed from other splitCell entries. // Mark from visibleCells - forAll(visibleCells_, cellI) + forAll(visibleCells_, celli) { - label index = visibleCells_[cellI]; + label index = visibleCells_[celli]; if (index >= 0) { @@ -1053,14 +1053,14 @@ void Foam::refinementHistory::compact() // Adapt indices in visibleCells_ - forAll(visibleCells_, cellI) + forAll(visibleCells_, celli) { - label index = visibleCells_[cellI]; + label index = visibleCells_[celli]; if (index >= 0) { // Note that oldToNew can be -1 so it resets newVisibleCells. - visibleCells_[cellI] = oldToNew[index]; + visibleCells_[celli] = oldToNew[index]; } else { @@ -1078,22 +1078,22 @@ void Foam::refinementHistory::writeDebug() const void Foam::refinementHistory::storeSplit ( - const label cellI, + const label celli, const labelList& addedCells ) { label parentIndex = -1; - if (visibleCells_[cellI] != -1) + if (visibleCells_[celli] != -1) { // Was already live. The current live cell becomes the // parent of the cells split off from it. - parentIndex = visibleCells_[cellI]; + parentIndex = visibleCells_[celli]; - // It is no longer live (note that actually cellI gets alive + // It is no longer live (note that actually celli gets alive // again below since is addedCells[0]) - visibleCells_[cellI] = -1; + visibleCells_[celli] = -1; } else { @@ -1126,10 +1126,10 @@ void Foam::refinementHistory::combineCells // Remove the information for the combined cells forAll(combinedCells, i) { - label cellI = combinedCells[i]; + label celli = combinedCells[i]; - freeSplitCell(visibleCells_[cellI]); - visibleCells_[cellI] = -1; + freeSplitCell(visibleCells_[celli]); + visibleCells_[celli] = -1; } splitCell8& parentSplit = splitCells_[parentIndex]; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.H index 6b5ac660c6a36487bdadb1bb930af74320a2e0c7..1e8abb02afd1936bff89fb375af5f2606ba7ee4d 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/refinementHistory.H @@ -287,14 +287,14 @@ public: } //- Get parent of cell - label parentIndex(const label cellI) const + label parentIndex(const label celli) const { - label index = visibleCells_[cellI]; + label index = visibleCells_[celli]; if (index < 0) { FatalErrorInFunction - << "Cell " << cellI << " is not visible" + << "Cell " << celli << " is not visible" << abort(FatalError); } return splitCells_[index].parent_; @@ -303,7 +303,7 @@ public: //- Store splitting of cell into 8 void storeSplit ( - const label cellI, + const label celli, const labelList& addedCells ); diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C index b828601178a8994724886d1c917ff9e5930139b8..7b62dbf2690e823ecf43fcafc789acddced2e962 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeCells.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 @@ -90,28 +90,28 @@ Foam::labelList Foam::removeCells::getExposedFaces // Count cells using face. labelList nCellsUsingFace(mesh_.nFaces(), 0); - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label own = faceOwner[faceI]; - label nei = faceNeighbour[faceI]; + label own = faceOwner[facei]; + label nei = faceNeighbour[facei]; if (!removedCell[own]) { - nCellsUsingFace[faceI]++; + nCellsUsingFace[facei]++; } if (!removedCell[nei]) { - nCellsUsingFace[faceI]++; + nCellsUsingFace[facei]++; } } - for (label faceI = mesh_.nInternalFaces(); faceI < mesh_.nFaces(); faceI++) + for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++) { - label own = faceOwner[faceI]; + label own = faceOwner[facei]; if (!removedCell[own]) { - nCellsUsingFace[faceI]++; + nCellsUsingFace[facei]++; } } @@ -137,36 +137,36 @@ Foam::labelList Foam::removeCells::getExposedFaces DynamicList<label> exposedFaces(mesh_.nFaces()/10); - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - if (nCellsUsingFace[faceI] == 1) + if (nCellsUsingFace[facei] == 1) { - exposedFaces.append(faceI); + exposedFaces.append(facei); } } const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - label own = faceOwner[faceI]; + label own = faceOwner[facei]; - if (nCellsUsingFace[faceI] == 1 && !removedCell[own]) + if (nCellsUsingFace[facei] == 1 && !removedCell[own]) { // My owner not removed but other side is so has to become // normal, uncoupled, boundary face - exposedFaces.append(faceI); + exposedFaces.append(facei); } - faceI++; + facei++; } } } @@ -199,28 +199,28 @@ void Foam::removeCells::setRefinement forAll(exposedFaceLabels, i) { - label patchI = exposedPatchIDs[i]; + label patchi = exposedPatchIDs[i]; - if (patchI < 0 || patchI >= patches.size()) + if (patchi < 0 || patchi >= patches.size()) { FatalErrorInFunction - << "Invalid patch " << patchI + << "Invalid patch " << patchi << " for exposed face " << exposedFaceLabels[i] << endl << "Valid patches 0.." << patches.size()-1 << abort(FatalError); } - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { FatalErrorInFunction << "Trying to put exposed face " << exposedFaceLabels[i] - << " into a coupled patch : " << patches[patchI].name() + << " into a coupled patch : " << patches[patchi].name() << endl << "This is illegal." << abort(FatalError); } - newPatchID[exposedFaceLabels[i]] = patchI; + newPatchID[exposedFaceLabels[i]] = patchi; } @@ -231,14 +231,14 @@ void Foam::removeCells::setRefinement // cells mentioned. forAll(cellLabels, i) { - label cellI = cellLabels[i]; + label celli = cellLabels[i]; - removedCell[cellI] = true; + removedCell[celli] = true; - //Pout<< "Removing cell " << cellI - // << " cc:" << mesh_.cellCentres()[cellI] << endl; + //Pout<< "Removing cell " << celli + // << " cc:" << mesh_.cellCentres()[celli] << endl; - meshMod.setAction(polyRemoveCell(cellI)); + meshMod.setAction(polyRemoveCell(celli)); } @@ -254,9 +254,9 @@ void Foam::removeCells::setRefinement // removing a face. labelList nFacesUsingPoint(mesh_.nPoints(), 0); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; forAll(f, fp) { @@ -265,29 +265,29 @@ void Foam::removeCells::setRefinement } - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - const face& f = faces[faceI]; - label own = faceOwner[faceI]; - label nei = faceNeighbour[faceI]; + const face& f = faces[facei]; + label own = faceOwner[facei]; + label nei = faceNeighbour[facei]; if (removedCell[own]) { if (removedCell[nei]) { // Face no longer used - //Pout<< "Removing internal face " << faceI - // << " fc:" << mesh_.faceCentres()[faceI] << endl; + //Pout<< "Removing internal face " << facei + // << " fc:" << mesh_.faceCentres()[facei] << endl; - meshMod.setAction(polyRemoveFace(faceI)); + meshMod.setAction(polyRemoveFace(facei)); uncount(f, nFacesUsingPoint); } else { - if (newPatchID[faceI] == -1) + if (newPatchID[facei] == -1) { FatalErrorInFunction - << "No patchID provided for exposed face " << faceI + << "No patchID provided for exposed face " << facei << " on cell " << nei << nl << "Did you provide patch IDs for all exposed faces?" << abort(FatalError); @@ -295,7 +295,7 @@ void Foam::removeCells::setRefinement // nei is remaining cell. FaceI becomes external cell - label zoneID = faceZones.whichZone(faceI); + label zoneID = faceZones.whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) @@ -303,23 +303,23 @@ void Foam::removeCells::setRefinement const faceZone& fZone = faceZones[zoneID]; // Note: we reverse the owner/neighbour of the face // so should also select the other side of the zone - zoneFlip = !fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = !fZone.flipMap()[fZone.whichFace(facei)]; } - //Pout<< "Putting exposed internal face " << faceI - // << " fc:" << mesh_.faceCentres()[faceI] - // << " into patch " << newPatchID[faceI] << endl; + //Pout<< "Putting exposed internal face " << facei + // << " fc:" << mesh_.faceCentres()[facei] + // << " into patch " << newPatchID[facei] << endl; meshMod.setAction ( polyModifyFace ( f.reverseFace(), // modified face - faceI, // label of face being modified + facei, // label of face being modified nei, // owner -1, // neighbour true, // face flip - newPatchID[faceI], // patch for face + newPatchID[facei], // patch for face false, // remove from zone zoneID, // zone for face zoneFlip // face flip in zone @@ -329,27 +329,27 @@ void Foam::removeCells::setRefinement } else if (removedCell[nei]) { - if (newPatchID[faceI] == -1) + if (newPatchID[facei] == -1) { FatalErrorInFunction - << "No patchID provided for exposed face " << faceI + << "No patchID provided for exposed face " << facei << " on cell " << own << nl << "Did you provide patch IDs for all exposed faces?" << abort(FatalError); } - //Pout<< "Putting exposed internal face " << faceI - // << " fc:" << mesh_.faceCentres()[faceI] - // << " into patch " << newPatchID[faceI] << endl; + //Pout<< "Putting exposed internal face " << facei + // << " fc:" << mesh_.faceCentres()[facei] + // << " into patch " << newPatchID[facei] << endl; // own is remaining cell. FaceI becomes external cell. - label zoneID = faceZones.whichZone(faceI); + label zoneID = faceZones.whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = faceZones[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } meshMod.setAction @@ -357,11 +357,11 @@ void Foam::removeCells::setRefinement polyModifyFace ( f, // modified face - faceI, // label of face being modified + facei, // label of face being modified own, // owner -1, // neighbour false, // face flip - newPatchID[faceI], // patch for face + newPatchID[facei], // patch for face false, // remove from zone zoneID, // zone for face zoneFlip // face flip in zone @@ -370,87 +370,87 @@ void Foam::removeCells::setRefinement } } - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - if (newPatchID[faceI] != -1) + if (newPatchID[facei] != -1) { - //Pout<< "Putting uncoupled coupled face " << faceI - // << " fc:" << mesh_.faceCentres()[faceI] - // << " into patch " << newPatchID[faceI] << endl; + //Pout<< "Putting uncoupled coupled face " << facei + // << " fc:" << mesh_.faceCentres()[facei] + // << " into patch " << newPatchID[facei] << endl; - label zoneID = faceZones.whichZone(faceI); + label zoneID = faceZones.whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = faceZones[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } meshMod.setAction ( polyModifyFace ( - faces[faceI], // modified face - faceI, // label of face - faceOwner[faceI], // owner + faces[facei], // modified face + facei, // label of face + faceOwner[facei], // owner -1, // neighbour false, // face flip - newPatchID[faceI], // patch for face + newPatchID[facei], // patch for face false, // remove from zone zoneID, // zone for face zoneFlip // face flip in zone ) ); } - else if (removedCell[faceOwner[faceI]]) + else if (removedCell[faceOwner[facei]]) { // Face no longer used - //Pout<< "Removing boundary face " << faceI - // << " fc:" << mesh_.faceCentres()[faceI] + //Pout<< "Removing boundary face " << facei + // << " fc:" << mesh_.faceCentres()[facei] // << endl; - meshMod.setAction(polyRemoveFace(faceI)); - uncount(faces[faceI], nFacesUsingPoint); + meshMod.setAction(polyRemoveFace(facei)); + uncount(faces[facei], nFacesUsingPoint); } - faceI++; + facei++; } } else { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - if (newPatchID[faceI] != -1) + if (newPatchID[facei] != -1) { FatalErrorInFunction - << "new patchID provided for boundary face " << faceI + << "new patchID provided for boundary face " << facei << " even though it is not on a coupled face." << abort(FatalError); } - if (removedCell[faceOwner[faceI]]) + if (removedCell[faceOwner[facei]]) { // Face no longer used - //Pout<< "Removing boundary face " << faceI - // << " fc:" << mesh_.faceCentres()[faceI] + //Pout<< "Removing boundary face " << facei + // << " fc:" << mesh_.faceCentres()[facei] // << endl; - meshMod.setAction(polyRemoveFace(faceI)); - uncount(faces[faceI], nFacesUsingPoint); + meshMod.setAction(polyRemoveFace(facei)); + uncount(faces[facei], nFacesUsingPoint); } - faceI++; + facei++; } } } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C index 619c7fee5270ed2f16d53b4246752dd34a371de1..982886948bf191405696a26158f1cfaae6cfc9e9 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.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 @@ -52,19 +52,19 @@ defineTypeNameAndDebug(removeFaces, 0); // only small area of faces removed in one go. void Foam::removeFaces::changeCellRegion ( - const label cellI, + const label celli, const label oldRegion, const label newRegion, labelList& cellRegion ) const { - if (cellRegion[cellI] == oldRegion) + if (cellRegion[celli] == oldRegion) { - cellRegion[cellI] = newRegion; + cellRegion[celli] = newRegion; // Step to neighbouring cells - const labelList& cCells = mesh_.cellCells()[cellI]; + const labelList& cCells = mesh_.cellCells()[celli]; forAll(cCells, i) { @@ -80,7 +80,7 @@ Foam::label Foam::removeFaces::changeFaceRegion const labelList& cellRegion, const boolList& removedFace, const labelList& nFacesPerEdge, - const label faceI, + const label facei, const label newRegion, const labelList& fEdges, labelList& faceRegion @@ -88,9 +88,9 @@ Foam::label Foam::removeFaces::changeFaceRegion { label nChanged = 0; - if (faceRegion[faceI] == -1 && !removedFace[faceI]) + if (faceRegion[facei] == -1 && !removedFace[facei]) { - faceRegion[faceI] = newRegion; + faceRegion[facei] = newRegion; nChanged = 1; @@ -148,13 +148,13 @@ Foam::boolList Foam::removeFaces::getFacesAffected boolList affectedFace(mesh_.nFaces(), false); // Mark faces affected by removal of cells - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - label region = cellRegion[cellI]; + label region = cellRegion[celli]; - if (region != -1 && (cellI != cellRegionMaster[region])) + if (region != -1 && (celli != cellRegionMaster[region])) { - const labelList& cFaces = mesh_.cells()[cellI]; + const labelList& cFaces = mesh_.cells()[celli]; forAll(cFaces, cFaceI) { @@ -279,9 +279,9 @@ void Foam::removeFaces::mergeFaces // Find face among pFaces which uses edgeLoop[1] forAll(pFaces, i) { - label faceI = pFaces[i]; + label facei = pFaces[i]; - const face& f = fp.localFaces()[faceI]; + const face& f = fp.localFaces()[facei]; label index1 = findIndex(f, edgeLoop[1]); @@ -294,13 +294,13 @@ void Foam::removeFaces::mergeFaces { if (index1 == f.fcIndex(index0)) { - masterIndex = faceI; + masterIndex = facei; reverseLoop = false; break; } else if (index1 == f.rcIndex(index0)) { - masterIndex = faceI; + masterIndex = facei; reverseLoop = true; break; } @@ -320,9 +320,9 @@ void Foam::removeFaces::mergeFaces // ~~~~~~~~~~~~~~~~~~~~~~~ // Modify first face. - label faceI = faceLabels[masterIndex]; + label facei = faceLabels[masterIndex]; - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; if (cellRegion[own] != -1) { @@ -331,13 +331,13 @@ void Foam::removeFaces::mergeFaces label patchID, zoneID, zoneFlip; - getFaceInfo(faceI, patchID, zoneID, zoneFlip); + getFaceInfo(facei, patchID, zoneID, zoneFlip); label nei = -1; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - nei = mesh_.faceNeighbour()[faceI]; + nei = mesh_.faceNeighbour()[facei]; if (cellRegion[nei] != -1) { @@ -372,7 +372,7 @@ void Foam::removeFaces::mergeFaces } //{ - // Pout<< "Modifying masterface " << faceI + // Pout<< "Modifying masterface " << facei // << " from faces:" << faceLabels // << " old verts:" << UIndirectList<face>(mesh_.faces(), faceLabels) // << " for new verts:" @@ -385,7 +385,7 @@ void Foam::removeFaces::mergeFaces modFace ( mergedFace, // modified face - faceI, // label of face being modified + facei, // label of face being modified own, // owner nei, // neighbour false, // face flip @@ -405,16 +405,16 @@ void Foam::removeFaces::mergeFaces { //Pout<< "Removing face " << faceLabels[patchFaceI] << endl; - meshMod.setAction(polyRemoveFace(faceLabels[patchFaceI], faceI)); + meshMod.setAction(polyRemoveFace(faceLabels[patchFaceI], facei)); } } } -// Get patch, zone info for faceI +// Get patch, zone info for facei void Foam::removeFaces::getFaceInfo ( - const label faceI, + const label facei, label& patchID, label& zoneID, @@ -423,12 +423,12 @@ void Foam::removeFaces::getFaceInfo { patchID = -1; - if (!mesh_.isInternalFace(faceI)) + if (!mesh_.isInternalFace(facei)) { - patchID = mesh_.boundaryMesh().whichPatch(faceI); + patchID = mesh_.boundaryMesh().whichPatch(facei); } - zoneID = mesh_.faceZones().whichZone(faceI); + zoneID = mesh_.faceZones().whichZone(facei); zoneFlip = false; @@ -436,7 +436,7 @@ void Foam::removeFaces::getFaceInfo { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } } @@ -445,10 +445,10 @@ void Foam::removeFaces::getFaceInfo Foam::face Foam::removeFaces::filterFace ( const labelHashSet& pointsToRemove, - const label faceI + const label facei ) const { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; labelList newFace(f.size(), -1); @@ -491,7 +491,7 @@ void Foam::removeFaces::modFace // if (debug) // { // Pout<< "ModifyFace (unreversed) :" -// << " faceI:" << masterFaceID +// << " facei:" << masterFaceID // << " f:" << f // << " own:" << own // << " nei:" << nei @@ -524,7 +524,7 @@ void Foam::removeFaces::modFace // if (debug) // { // Pout<< "ModifyFace (!reversed) :" -// << " faceI:" << masterFaceID +// << " facei:" << masterFaceID // << " f:" << f.reverseFace() // << " own:" << nei // << " nei:" << own @@ -598,17 +598,17 @@ Foam::label Foam::removeFaces::compatibleRemoves forAll(facesToRemove, i) { - label faceI = facesToRemove[i]; + label facei = facesToRemove[i]; - if (!mesh_.isInternalFace(faceI)) + if (!mesh_.isInternalFace(facei)) { FatalErrorInFunction - << "Not internal face:" << faceI << abort(FatalError); + << "Not internal face:" << facei << abort(FatalError); } - label own = faceOwner[faceI]; - label nei = faceNeighbour[faceI]; + label own = faceOwner[facei]; + label nei = faceNeighbour[facei]; label region0 = cellRegion[own]; label region1 = cellRegion[nei]; @@ -693,18 +693,18 @@ Foam::label Foam::removeFaces::compatibleRemoves { labelList nCells(regionMaster.size(), 0); - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - label r = cellRegion[cellI]; + label r = cellRegion[celli]; if (r != -1) { nCells[r]++; - if (cellI < regionMaster[r]) + if (celli < regionMaster[r]) { FatalErrorInFunction - << "Not lowest numbered : cell:" << cellI + << "Not lowest numbered : cell:" << celli << " region:" << r << " regionmaster:" << regionMaster[r] << abort(FatalError); @@ -739,16 +739,16 @@ Foam::label Foam::removeFaces::compatibleRemoves // Recreate facesToRemove to be consistent with the cellRegions. DynamicList<label> allFacesToRemove(facesToRemove.size()); - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label own = faceOwner[faceI]; - label nei = faceNeighbour[faceI]; + label own = faceOwner[facei]; + label nei = faceNeighbour[facei]; if (cellRegion[own] != -1 && cellRegion[own] == cellRegion[nei]) { // Both will become the same cell so add face to list of faces // to be removed. - allFacesToRemove.append(faceI); + allFacesToRemove.append(facei); } } @@ -779,16 +779,16 @@ void Foam::removeFaces::setRefinement forAll(faceLabels, i) { - label faceI = faceLabels[i]; + label facei = faceLabels[i]; - if (!mesh_.isInternalFace(faceI)) + if (!mesh_.isInternalFace(facei)) { FatalErrorInFunction - << "Face to remove is not internal face:" << faceI + << "Face to remove is not internal face:" << facei << abort(FatalError); } - removedFace[faceI] = true; + removedFace[facei] = true; } @@ -821,9 +821,9 @@ void Foam::removeFaces::setRefinement // Count usage of edges by non-removed faces. forAll(faceLabels, i) { - label faceI = faceLabels[i]; + label facei = faceLabels[i]; - const labelList& fEdges = mesh_.faceEdges(faceI, fe); + const labelList& fEdges = mesh_.faceEdges(facei, fe); forAll(fEdges, i) { @@ -920,17 +920,17 @@ void Foam::removeFaces::setRefinement forAll(eFaces, i) { - label faceI = eFaces[i]; + label facei = eFaces[i]; - if (!removedFace[faceI] && !mesh_.isInternalFace(faceI)) + if (!removedFace[facei] && !mesh_.isInternalFace(facei)) { if (f0 == -1) { - f0 = faceI; + f0 = facei; } else { - f1 = faceI; + f1 = facei; break; } } @@ -1181,14 +1181,14 @@ void Foam::removeFaces::setRefinement for ( - label faceI = mesh_.nInternalFaces(); - faceI < mesh_.nFaces(); - faceI++ + label facei = mesh_.nInternalFaces(); + facei < mesh_.nFaces(); + facei++ ) { // Get the neighbouring region. - label nbrRegion = nbrFaceRegion[faceI]; - label myRegion = faceRegion[faceI]; + label nbrRegion = nbrFaceRegion[facei]; + label myRegion = faceRegion[facei]; if (myRegion <= -1 || nbrRegion <= -1) { @@ -1197,7 +1197,7 @@ void Foam::removeFaces::setRefinement FatalErrorInFunction << "Inconsistent face region across coupled patches." << endl - << "This side has for faceI:" << faceI + << "This side has for facei:" << facei << " region:" << myRegion << endl << "The other side has region:" << nbrRegion << endl @@ -1218,7 +1218,7 @@ void Foam::removeFaces::setRefinement FatalErrorInFunction << "Inconsistent face region across coupled patches." << endl - << "This side has for faceI:" << faceI + << "This side has for facei:" << facei << " region:" << myRegion << " with coupled neighbouring regions:" << toNbrRegion[myRegion] << " and " @@ -1360,15 +1360,15 @@ void Foam::removeFaces::setRefinement // Remove split faces. forAll(faceLabels, labelI) { - label faceI = faceLabels[labelI]; + label facei = faceLabels[labelI]; // Remove face if not yet uptodate (which is never; but want to be // consistent with rest of face removals/modifications) - if (affectedFace[faceI]) + if (affectedFace[facei]) { - affectedFace[faceI] = false; + affectedFace[facei] = false; - meshMod.setAction(polyRemoveFace(faceI, -1)); + meshMod.setAction(polyRemoveFace(facei, -1)); } } @@ -1383,13 +1383,13 @@ void Foam::removeFaces::setRefinement // Remove cells. - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - label region = cellRegion[cellI]; + label region = cellRegion[celli]; - if (region != -1 && (cellI != cellRegionMaster[region])) + if (region != -1 && (celli != cellRegionMaster[region])) { - meshMod.setAction(polyRemoveCell(cellI, cellRegionMaster[region])); + meshMod.setAction(polyRemoveCell(celli, cellRegionMaster[region])); } } @@ -1437,15 +1437,15 @@ void Foam::removeFaces::setRefinement // Check if any remaining faces have not been updated for new slave/master // or points removed. - forAll(affectedFace, faceI) + forAll(affectedFace, facei) { - if (affectedFace[faceI]) + if (affectedFace[facei]) { - affectedFace[faceI] = false; + affectedFace[facei] = false; - face f(filterFace(pointsToRemove, faceI)); + face f(filterFace(pointsToRemove, facei)); - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; if (cellRegion[own] != -1) { @@ -1454,13 +1454,13 @@ void Foam::removeFaces::setRefinement label patchID, zoneID, zoneFlip; - getFaceInfo(faceI, patchID, zoneID, zoneFlip); + getFaceInfo(facei, patchID, zoneID, zoneFlip); label nei = -1; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - nei = mesh_.faceNeighbour()[faceI]; + nei = mesh_.faceNeighbour()[facei]; if (cellRegion[nei] != -1) { @@ -1470,8 +1470,8 @@ void Foam::removeFaces::setRefinement // if (debug) // { -// Pout<< "Modifying " << faceI -// << " old verts:" << mesh_.faces()[faceI] +// Pout<< "Modifying " << facei +// << " old verts:" << mesh_.faces()[facei] // << " for new verts:" << f // << " or for new owner " << own << " or for new nei " // << nei @@ -1481,7 +1481,7 @@ void Foam::removeFaces::setRefinement modFace ( f, // modified face - faceI, // label of face being modified + facei, // label of face being modified own, // owner nei, // neighbour false, // face flip diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.H index 1bf535fbba04e033c02144d62b9e9a3aaa49e2dd..a4ccf9b15484e028b0b5165d48e4f454575b4620 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removeFaces.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 @@ -78,7 +78,7 @@ class removeFaces // Recurses to cell neighbours. void changeCellRegion ( - const label cellI, + const label celli, const label oldRegion, const label newRegion, labelList& cellRegion @@ -90,7 +90,7 @@ class removeFaces const labelList& cellRegion, const boolList& removedFace, const labelList& nFacesPerEdge, - const label faceI, + const label facei, const label newRegion, const labelList& fEdges, labelList& faceRegion @@ -126,10 +126,10 @@ class removeFaces polyTopoChange& meshMod ) const; - //- Get patch, zone info for faceI + //- Get patch, zone info for facei void getFaceInfo ( - const label faceI, + const label facei, label& patchID, label& zoneID, label& zoneFlip diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C index bce0dade15ec16d0ae4dbb4765b237e1049e97eb..336f64b4ff78697c170c1aa608d66e516d3923a3 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.C @@ -78,26 +78,26 @@ public: void Foam::removePoints::modifyFace ( - const label faceI, + const label facei, const face& newFace, polyTopoChange& meshMod ) const { // Get other face data. label patchI = -1; - label owner = mesh_.faceOwner()[faceI]; + label owner = mesh_.faceOwner()[facei]; label neighbour = -1; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - neighbour = mesh_.faceNeighbour()[faceI]; + neighbour = mesh_.faceNeighbour()[facei]; } else { - patchI = mesh_.boundaryMesh().whichPatch(faceI); + patchI = mesh_.boundaryMesh().whichPatch(facei); } - label zoneID = mesh_.faceZones().whichZone(faceI); + label zoneID = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; @@ -105,7 +105,7 @@ void Foam::removePoints::modifyFace { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } meshMod.setAction @@ -113,7 +113,7 @@ void Foam::removePoints::modifyFace polyModifyFace ( newFace, // modified face - faceI, // label of face being modified + facei, // label of face being modified owner, // owner neighbour, // neighbour false, // face flip @@ -238,9 +238,9 @@ Foam::label Foam::removePoints::countPointUsage // Protect any points on faces that would collapse down to nothing // No particular intelligence so might protect too many points - forAll(mesh_.faces(), faceI) + forAll(mesh_.faces(), facei) { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; label nCollapse = 0; forAll(f, fp) @@ -365,9 +365,9 @@ void Foam::removePoints::setRefinement forAllConstIter(labelHashSet, facesAffected, iter) { - label faceI = iter.key(); + label facei = iter.key(); - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; face newFace(f.size()); @@ -385,12 +385,12 @@ void Foam::removePoints::setRefinement newFace.setSize(newI); // Actually change the face to the new vertices - modifyFace(faceI, newFace, meshMod); + modifyFace(facei, newFace, meshMod); // Save the face. Negative indices are into savedPoints_ if (undoable_) { - savedFaceLabels_[nSaved] = faceI; + savedFaceLabels_[nSaved] = facei; face& savedFace = savedFaces_[nSaved++]; savedFace.setSize(f.size()); @@ -442,7 +442,7 @@ void Foam::removePoints::setRefinement if (meshPoints != keptPoints) { FatalErrorInFunction - << "faceI:" << savedFaceLabels_[saveI] << nl + << "facei:" << savedFaceLabels_[saveI] << nl << "meshPoints:" << meshPoints << nl << "keptPoints:" << keptPoints << nl << abort(FatalError); @@ -532,7 +532,7 @@ void Foam::removePoints::updateMesh(const mapPolyMesh& map) if (keptFace != f) { FatalErrorInFunction - << "faceI:" << savedFaceLabels_[saveI] << nl + << "facei:" << savedFaceLabels_[saveI] << nl << "face:" << f << nl << "keptFace:" << keptFace << nl << "saved points:" diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.H index 4a2bfcfc07924367a2fe57c371351eb527812088..25f4c7dad471ec4ac6117875fdff4e30c4faf0d0 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/removePoints.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 @@ -84,7 +84,7 @@ class removePoints // (patch, zone) the same. void modifyFace ( - const label faceI, + const label facei, const face&, polyTopoChange& ) const; diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.C index 0f65c7889e6a562187e3a37704e650894da62a1a..3300bef1ef37a6da91477a74a50f93cdb4fb6da2 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.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 @@ -54,7 +54,7 @@ void Foam::tetDecomposer::modifyFace ( polyTopoChange& meshMod, const face& f, - const label faceI, + const label facei, const label own, const label nei, const label patchI, @@ -68,7 +68,7 @@ void Foam::tetDecomposer::modifyFace meshMod.modifyFace ( f, // modified face - faceI, // label of face + facei, // label of face own, // owner nei, // neighbour false, // face flip @@ -82,7 +82,7 @@ void Foam::tetDecomposer::modifyFace meshMod.modifyFace ( f.reverseFace(), // modified face - faceI, // label of face + facei, // label of face nei, // owner own, // neighbour true, // face flip @@ -145,11 +145,11 @@ void Foam::tetDecomposer::addFace // Work out triangle index given the starting vertex in the face -Foam::label Foam::tetDecomposer::triIndex(const label faceI, const label fp) +Foam::label Foam::tetDecomposer::triIndex(const label facei, const label fp) const { - const face& f = mesh_.faces()[faceI]; - const label fp0 = mesh_.tetBasePtIs()[faceI]; + const face& f = mesh_.faces()[facei]; + const label fp0 = mesh_.tetBasePtIs()[facei]; // Work out triangle index on this face label thisTriI; @@ -186,14 +186,14 @@ void Foam::tetDecomposer::setRefinement ) { cellToPoint_.setSize(mesh_.nCells()); - forAll(mesh_.cellCentres(), cellI) + forAll(mesh_.cellCentres(), celli) { // Any point on the cell - label masterPointI = mesh_.faces()[mesh_.cells()[cellI][0]][0]; + label masterPointI = mesh_.faces()[mesh_.cells()[celli][0]][0]; - cellToPoint_[cellI] = meshMod.addPoint + cellToPoint_[celli] = meshMod.addPoint ( - mesh_.cellCentres()[cellI], + mesh_.cellCentres()[celli], masterPointI, -1, true @@ -205,14 +205,14 @@ void Foam::tetDecomposer::setRefinement if (decomposeType == FACE_CENTRE_TRIS) { faceToPoint_.setSize(mesh_.nFaces()); - forAll(mesh_.faceCentres(), faceI) + forAll(mesh_.faceCentres(), facei) { // Any point on the face - const label masterPointI = mesh_.faces()[faceI][0]; + const label masterPointI = mesh_.faces()[facei][0]; - faceToPoint_[faceI] = meshMod.addPoint + faceToPoint_[facei] = meshMod.addPoint ( - mesh_.faceCentres()[faceI], + mesh_.faceCentres()[facei], masterPointI, -1, true @@ -227,11 +227,11 @@ void Foam::tetDecomposer::setRefinement if (decomposeType == FACE_CENTRE_TRIS) { - forAll(faceOwnerCells_, faceI) + forAll(faceOwnerCells_, facei) { - const face& f = mesh_.faces()[faceI]; - faceOwnerCells_[faceI].setSize(f.size(), -1); - faceNeighbourCells_[faceI].setSize(f.size(), -1); + const face& f = mesh_.faces()[facei]; + faceOwnerCells_[facei].setSize(f.size(), -1); + faceNeighbourCells_[facei].setSize(f.size(), -1); } } else @@ -239,32 +239,32 @@ void Foam::tetDecomposer::setRefinement // Force construction of diagonal decomposition (void)mesh_.tetBasePtIs(); - forAll(faceOwnerCells_, faceI) + forAll(faceOwnerCells_, facei) { - const face& f = mesh_.faces()[faceI]; - faceOwnerCells_[faceI].setSize(f.size()-2, -1); - faceNeighbourCells_[faceI].setSize(f.size()-2, -1); + const face& f = mesh_.faces()[facei]; + faceOwnerCells_[facei].setSize(f.size()-2, -1); + faceNeighbourCells_[facei].setSize(f.size()-2, -1); } } - forAll(mesh_.cells(), cellI) + forAll(mesh_.cells(), celli) { - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; EdgeMap<label> edgeToFace(8*cFaces.size()); forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; - const face& f = mesh_.faces()[faceI]; + label facei = cFaces[cFaceI]; + const face& f = mesh_.faces()[facei]; // Get reference to either owner or neighbour labelList& added = ( - (mesh_.faceOwner()[faceI] == cellI) - ? faceOwnerCells_[faceI] - : faceNeighbourCells_[faceI] + (mesh_.faceOwner()[facei] == celli) + ? faceOwnerCells_[facei] + : faceNeighbourCells_[facei] ); if (decomposeType == FACE_CENTRE_TRIS) @@ -274,7 +274,7 @@ void Foam::tetDecomposer::setRefinement if (cFaceI == 0 && fp == 0) { // Reuse cell itself - added[fp] = cellI; + added[fp] = celli; } else { @@ -283,8 +283,8 @@ void Foam::tetDecomposer::setRefinement -1, // masterPoint -1, // masterEdge -1, // masterFace - cellI, // masterCell - mesh_.cellZones().whichZone(cellI) + celli, // masterCell + mesh_.cellZones().whichZone(celli) ); } } @@ -296,7 +296,7 @@ void Foam::tetDecomposer::setRefinement if (cFaceI == 0 && triI == 0) { // Reuse cell itself - added[triI] = cellI; + added[triI] = celli; } else { @@ -305,8 +305,8 @@ void Foam::tetDecomposer::setRefinement -1, // masterPoint -1, // masterEdge -1, // masterFace - cellI, // masterCell - mesh_.cellZones().whichZone(cellI) + celli, // masterCell + mesh_.cellZones().whichZone(celli) ); } } @@ -319,25 +319,25 @@ void Foam::tetDecomposer::setRefinement // Add triangle faces face triangle(3); - forAll(mesh_.faces(), faceI) + forAll(mesh_.faces(), facei) { - label own = mesh_.faceOwner()[faceI]; - const labelList& addedOwn = faceOwnerCells_[faceI]; - const labelList& addedNei = faceNeighbourCells_[faceI]; - const face& f = mesh_.faces()[faceI]; + label own = mesh_.faceOwner()[facei]; + const labelList& addedOwn = faceOwnerCells_[facei]; + const labelList& addedNei = faceNeighbourCells_[facei]; + const face& f = mesh_.faces()[facei]; label patchI = -1; - if (faceI >= mesh_.nInternalFaces()) + if (facei >= mesh_.nInternalFaces()) { - patchI = mesh_.boundaryMesh().whichPatch(faceI); + patchI = mesh_.boundaryMesh().whichPatch(facei); } - label zoneI = mesh_.faceZones().whichZone(faceI); + label zoneI = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; if (zoneI != -1) { const faceZone& fz = mesh_.faceZones()[zoneI]; - zoneFlip = fz.flipMap()[fz.whichFace(faceI)]; + zoneFlip = fz.flipMap()[fz.whichFace(facei)]; } @@ -350,7 +350,7 @@ void Foam::tetDecomposer::setRefinement { triangle[0] = f[fp]; triangle[1] = f[f.fcIndex(fp)]; - triangle[2] = faceToPoint_[faceI]; + triangle[2] = faceToPoint_[facei]; if (fp == 0) { @@ -358,7 +358,7 @@ void Foam::tetDecomposer::setRefinement ( meshMod, triangle, - faceI, + facei, addedOwn[fp], addedNei[fp], patchI, @@ -376,7 +376,7 @@ void Foam::tetDecomposer::setRefinement addedNei[fp], -1, //point -1, //edge - faceI, //face + facei, //face patchI, zoneI, zoneFlip @@ -392,7 +392,7 @@ void Foam::tetDecomposer::setRefinement triangle[0] = f[fp]; triangle[1] = cellToPoint_[own]; - triangle[2] = faceToPoint_[faceI]; + triangle[2] = faceToPoint_[facei]; addFace ( @@ -409,14 +409,14 @@ void Foam::tetDecomposer::setRefinement ); } // 2b. Within neighbour cell - to cell centre - if (faceI < mesh_.nInternalFaces()) + if (facei < mesh_.nInternalFaces()) { label newOwn = addedNei[f.rcIndex(fp)]; label newNei = addedNei[fp]; triangle[0] = f[fp]; - triangle[1] = faceToPoint_[faceI]; - triangle[2] = cellToPoint_[mesh_.faceNeighbour()[faceI]]; + triangle[1] = faceToPoint_[facei]; + triangle[2] = cellToPoint_[mesh_.faceNeighbour()[facei]]; addFace ( @@ -436,7 +436,7 @@ void Foam::tetDecomposer::setRefinement } else { - label fp0 = mesh_.tetBasePtIs()[faceI]; + label fp0 = mesh_.tetBasePtIs()[facei]; label fp = f.fcIndex(fp0); for (label triI = 0; triI < f.size()-2; triI++) @@ -465,7 +465,7 @@ void Foam::tetDecomposer::setRefinement ( meshMod, triangle, - faceI, + facei, addedOwn[triI], addedNei[triI], patchI, @@ -483,7 +483,7 @@ void Foam::tetDecomposer::setRefinement addedNei[triI], -1, //point -1, //edge - faceI, //face + facei, //face patchI, zoneI, zoneFlip @@ -517,7 +517,7 @@ void Foam::tetDecomposer::setRefinement ); // 2b. Within neighbour cell - to cell centre - if (faceI < mesh_.nInternalFaces()) + if (facei < mesh_.nInternalFaces()) { label newOwn = addedNei[triI]; label newNei = addedNei[nextTri]; @@ -525,7 +525,7 @@ void Foam::tetDecomposer::setRefinement triangle[0] = f[nextFp]; triangle[1] = f[fp0]; triangle[2] = - cellToPoint_[mesh_.faceNeighbour()[faceI]]; + cellToPoint_[mesh_.faceNeighbour()[facei]]; addFace ( @@ -554,26 +554,26 @@ void Foam::tetDecomposer::setRefinement // Add triangles for all edges. EdgeMap<label> edgeToFace; - forAll(mesh_.cells(), cellI) + forAll(mesh_.cells(), celli) { - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; edgeToFace.clear(); forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - label zoneI = mesh_.faceZones().whichZone(faceI); + label zoneI = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; if (zoneI != -1) { const faceZone& fz = mesh_.faceZones()[zoneI]; - zoneFlip = fz.flipMap()[fz.whichFace(faceI)]; + zoneFlip = fz.flipMap()[fz.whichFace(facei)]; } - const face& f = mesh_.faces()[faceI]; - //const labelList& fEdges = mesh_.faceEdges()[faceI]; + const face& f = mesh_.faces()[facei]; + //const labelList& fEdges = mesh_.faceEdges()[facei]; forAll(f, fp) { label p0 = f[fp]; @@ -583,7 +583,7 @@ void Foam::tetDecomposer::setRefinement EdgeMap<label>::const_iterator edgeFnd = edgeToFace.find(e); if (edgeFnd == edgeToFace.end()) { - edgeToFace.insert(e, faceI); + edgeToFace.insert(e, facei); } else { @@ -593,7 +593,7 @@ void Foam::tetDecomposer::setRefinement // 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) @@ -612,17 +612,17 @@ void Foam::tetDecomposer::setRefinement // Triangle from edge to cell centre - if (mesh_.faceOwner()[faceI] == cellI) + if (mesh_.faceOwner()[facei] == celli) { triangle[0] = p0; triangle[1] = p1; - triangle[2] = cellToPoint_[cellI]; + triangle[2] = cellToPoint_[celli]; } else { triangle[0] = p1; triangle[1] = p0; - triangle[2] = cellToPoint_[cellI]; + triangle[2] = cellToPoint_[celli]; } // Determine tets on either side @@ -630,16 +630,16 @@ void Foam::tetDecomposer::setRefinement if (decomposeType == FACE_CENTRE_TRIS) { - if (mesh_.faceOwner()[faceI] == cellI) + if (mesh_.faceOwner()[facei] == celli) { - thisTet = faceOwnerCells_[faceI][fp]; + thisTet = faceOwnerCells_[facei][fp]; } else { - thisTet = faceNeighbourCells_[faceI][fp]; + thisTet = faceNeighbourCells_[facei][fp]; } - if (mesh_.faceOwner()[otherFaceI] == cellI) + if (mesh_.faceOwner()[otherFaceI] == celli) { otherTet = faceOwnerCells_[otherFaceI][otherFp]; } @@ -651,18 +651,18 @@ void Foam::tetDecomposer::setRefinement } else { - label thisTriI = triIndex(faceI, fp); - if (mesh_.faceOwner()[faceI] == cellI) + label thisTriI = triIndex(facei, fp); + if (mesh_.faceOwner()[facei] == celli) { - thisTet = faceOwnerCells_[faceI][thisTriI]; + thisTet = faceOwnerCells_[facei][thisTriI]; } else { - thisTet = faceNeighbourCells_[faceI][thisTriI]; + thisTet = faceNeighbourCells_[facei][thisTriI]; } label otherTriI = triIndex(otherFaceI, otherFp); - if (mesh_.faceOwner()[otherFaceI] == cellI) + if (mesh_.faceOwner()[otherFaceI] == celli) { otherTet = faceOwnerCells_[otherFaceI][otherTriI]; } @@ -682,7 +682,7 @@ void Foam::tetDecomposer::setRefinement thisTet, -1, //masterPoint -1, //fEdges[fp], //masterEdge - faceI, //masterFace + facei, //masterFace -1, //patchI zoneI, zoneFlip @@ -699,13 +699,13 @@ void Foam::tetDecomposer::updateMesh(const mapPolyMesh& map) inplaceRenumber(map.reversePointMap(), cellToPoint_); inplaceRenumber(map.reversePointMap(), faceToPoint_); - forAll(faceOwnerCells_, faceI) + forAll(faceOwnerCells_, facei) { - inplaceRenumber(map.reverseCellMap(), faceOwnerCells_[faceI]); + inplaceRenumber(map.reverseCellMap(), faceOwnerCells_[facei]); } - forAll(faceNeighbourCells_, faceI) + forAll(faceNeighbourCells_, facei) { - inplaceRenumber(map.reverseCellMap(), faceNeighbourCells_[faceI]); + inplaceRenumber(map.reverseCellMap(), faceNeighbourCells_[facei]); } } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.H b/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.H index dbe76b61d88d54c0c644c75e06ebe9bf7dacb44e..07c8f4f2e8b9bfe8f9576a57162b44769a19ebbb 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.H +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/tetDecomposer.H @@ -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 @@ -100,7 +100,7 @@ private: ( polyTopoChange& meshMod, const face& f, - const label faceI, + const label facei, const label own, const label nei, const label patchI, @@ -124,7 +124,7 @@ private: ) const; //- Work out triangle index given the starting vertex in the face - label triIndex(const label faceI, const label fp) const; + label triIndex(const label facei, const label fp) const; //- Disallow default bitwise copy construct tetDecomposer(const tetDecomposer&); diff --git a/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C b/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C index 6cb0df6d4a8b4b89f497a9ab92bad70b3589b6de..6a3c9866a8237a81c9659119721be003ebdc72aa 100644 --- a/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C +++ b/src/dynamicMesh/slidingInterface/coupleSlidingInterface.C @@ -565,15 +565,15 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const // Pout<< "curFaces: " << curFaces << endl; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - // Pout<< "face: " << curFaces[faceI] << " " - // << masterPatch[curFaces[faceI]] + // Pout<< "face: " << curFaces[facei] << " " + // << masterPatch[curFaces[facei]] // << " local: " - // << masterPatch.localFaces()[curFaces[faceI]] + // << masterPatch.localFaces()[curFaces[facei]] // << endl; - const labelList& me = masterFaceEdges[curFaces[faceI]]; + const labelList& me = masterFaceEdges[curFaces[facei]]; forAll(me, meI) { @@ -847,13 +847,13 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const boolList orphanedMaster(masterPatch.size(), false); boolList orphanedSlave(slavePatch.size(), false); - forAll(cutFaces, faceI) + forAll(cutFaces, facei) { - const face& curCutFace = cutFaces[faceI]; - const label curMaster = cutFaceMaster[faceI]; - const label curSlave = cutFaceSlave[faceI]; + const face& curCutFace = cutFaces[facei]; + const label curMaster = cutFaceMaster[facei]; + const label curSlave = cutFaceSlave[facei]; -// Pout<< "Doing insertion of face " << faceI << ": "; +// Pout<< "Doing insertion of face " << facei << ": "; // Check if the face has changed topologically bool insertedFace = false; @@ -1040,7 +1040,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const else { FatalErrorInFunction - << "Face " << faceI << " in cut faces has neither a master " + << "Face " << facei << " in cut faces has neither a master " << "nor a slave. Error in the cutting algorithm on modify." << abort(FatalError); } @@ -1165,7 +1165,7 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const else { FatalErrorInFunction - << "Face " << faceI << " in cut faces has neither a master " + << "Face " << facei << " in cut faces has neither a master " << "nor a slave. Error in the cutting algorithm on add." << abort(FatalError); } @@ -1178,9 +1178,9 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const label nOrphanedMasters = 0; - forAll(orphanedMaster, faceI) + forAll(orphanedMaster, facei) { - if (orphanedMaster[faceI]) + if (orphanedMaster[facei]) { nOrphanedMasters++; @@ -1189,8 +1189,8 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const //( // polyModifyFace // ( - // masterPatch[faceI], // new face - // masterPatchAddr[faceI], // master face index + // masterPatch[facei], // new face + // masterPatchAddr[facei], // master face index // -1, // owner // -1, // neighbour // false, // flux flip @@ -1201,17 +1201,17 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const // ) //); - //Pout<< "**MJ:deleting master face " << masterPatchAddr[faceI] - // << " old verts:" << masterPatch[faceI] << endl; - ref.setAction(polyRemoveFace(masterPatchAddr[faceI])); + //Pout<< "**MJ:deleting master face " << masterPatchAddr[facei] + // << " old verts:" << masterPatch[facei] << endl; + ref.setAction(polyRemoveFace(masterPatchAddr[facei])); } } label nOrphanedSlaves = 0; - forAll(orphanedSlave, faceI) + forAll(orphanedSlave, facei) { - if (orphanedSlave[faceI]) + if (orphanedSlave[facei]) { nOrphanedSlaves++; @@ -1220,8 +1220,8 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const //( // polyModifyFace // ( - // slavePatch[faceI], // new face - // slavePatchAddr[faceI], // slave face index + // slavePatch[facei], // new face + // slavePatchAddr[facei], // slave face index // -1, // owner // -1, // neighbour // false, // flux flip @@ -1232,9 +1232,9 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const // ) //); - //Pout<< "**MJ:deleting slave face " << slavePatchAddr[faceI] - // << " old verts:" << slavePatch[faceI] << endl; - ref.setAction(polyRemoveFace(slavePatchAddr[faceI])); + //Pout<< "**MJ:deleting slave face " << slavePatchAddr[facei] + // << " old verts:" << slavePatch[facei] << endl; + ref.setAction(polyRemoveFace(slavePatchAddr[facei])); } } @@ -1268,11 +1268,11 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const // Pout<< "masterStickOuts: " << masterStickOuts << endl; // Re-create the master stick-out faces - forAll(masterStickOuts, faceI) + forAll(masterStickOuts, facei) { // Renumber the face and remove additional points - const label curFaceID = masterStickOuts[faceI]; + const label curFaceID = masterStickOuts[facei]; const face& oldRichFace = faces[curFaceID]; @@ -1540,10 +1540,10 @@ void Foam::slidingInterface::coupleInterface(polyTopoChange& ref) const // Re-create the slave stick-out faces - forAll(slaveStickOuts, faceI) + forAll(slaveStickOuts, facei) { // Renumber the face and remove additional points - const label curFaceID = slaveStickOuts[faceI]; + const label curFaceID = slaveStickOuts[facei]; const face& oldRichFace = faces[curFaceID]; diff --git a/src/dynamicMesh/slidingInterface/decoupleSlidingInterface.C b/src/dynamicMesh/slidingInterface/decoupleSlidingInterface.C index 43c3e5692ad498150d04104719327dcabc323e88..2e172e5587524588933d6c7e18ab82cc29aa5364 100644 --- a/src/dynamicMesh/slidingInterface/decoupleSlidingInterface.C +++ b/src/dynamicMesh/slidingInterface/decoupleSlidingInterface.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 @@ -82,12 +82,12 @@ void Foam::slidingInterface::decoupleInterface // Recover faces in master patch - forAll(masterPatchAddr, faceI) + forAll(masterPatchAddr, facei) { // Make a copy of the face and turn it if necessary - face newFace = faces[masterPatchAddr[faceI]]; + face newFace = faces[masterPatchAddr[facei]]; - if (masterPatchFlip[faceI]) + if (masterPatchFlip[facei]) { newFace.flip(); } @@ -97,8 +97,8 @@ void Foam::slidingInterface::decoupleInterface polyModifyFace ( newFace, // new face - masterPatchAddr[faceI], // master face index - masterFc[faceI], // owner + masterPatchAddr[facei], // master face index + masterFc[facei], // owner -1, // neighbour false, // flux flip masterPatchID_.index(), // patch ID @@ -109,10 +109,10 @@ void Foam::slidingInterface::decoupleInterface ); // Pout<< "Modifying master patch face no " - // << masterPatchAddr[faceI] - // << " face: " << faces[masterPatchAddr[faceI]] - // << " old owner: " << own[masterPatchAddr[faceI]] - // << " new owner: " << masterFc[faceI] + // << masterPatchAddr[facei] + // << " face: " << faces[masterPatchAddr[facei]] + // << " old owner: " << own[masterPatchAddr[facei]] + // << " new owner: " << masterFc[facei] // << endl; } @@ -134,12 +134,12 @@ void Foam::slidingInterface::decoupleInterface // Recover faces in slave patch - forAll(slavePatchAddr, faceI) + forAll(slavePatchAddr, facei) { // Make a copy of face and turn it if necessary - face newFace = faces[slavePatchAddr[faceI]]; + face newFace = faces[slavePatchAddr[facei]]; - if (slavePatchFlip[faceI]) + if (slavePatchFlip[facei]) { newFace.flip(); } @@ -164,8 +164,8 @@ void Foam::slidingInterface::decoupleInterface polyModifyFace ( newFace, // new face - slavePatchAddr[faceI], // master face index - slaveFc[faceI], // owner + slavePatchAddr[facei], // master face index + slaveFc[facei], // owner -1, // neighbour false, // flux flip slavePatchID_.index(), // patch ID @@ -181,11 +181,11 @@ void Foam::slidingInterface::decoupleInterface // Grab the list of faces in the layer const labelList& masterStickOuts = masterStickOutFaces(); - forAll(masterStickOuts, faceI) + forAll(masterStickOuts, facei) { // Renumber the face and remove additional points - const label curFaceID = masterStickOuts[faceI]; + const label curFaceID = masterStickOuts[facei]; const face& oldFace = faces[curFaceID]; @@ -265,23 +265,23 @@ void Foam::slidingInterface::decoupleInterface primitiveMesh::facesPerCell_*(masterPatch.size() + slavePatch.size()) ); - forAll(slaveFc, faceI) + forAll(slaveFc, facei) { - const labelList& curFaces = cells[slaveFc[faceI]]; + const labelList& curFaces = cells[slaveFc[facei]]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { // Check if the face belongs to the slave face zone; and // if it has been removed; if not add it if ( - mesh.faceZones().whichZone(curFaces[faceI]) + mesh.faceZones().whichZone(curFaces[facei]) != slaveFaceZoneID_.index() - && !ref.faceRemoved(curFaces[faceI]) + && !ref.faceRemoved(curFaces[facei]) ) { - slaveLayerCellFaceMap.insert(curFaces[faceI]); + slaveLayerCellFaceMap.insert(curFaces[facei]); } } } @@ -292,11 +292,11 @@ void Foam::slidingInterface::decoupleInterface // Grab master point mapping const Map<label>& masterPm = masterPatch.meshPointMap(); - forAll(slaveStickOuts, faceI) + forAll(slaveStickOuts, facei) { // Renumber the face and remove additional points - const label curFaceID = slaveStickOuts[faceI]; + const label curFaceID = slaveStickOuts[facei]; const face& oldFace = faces[curFaceID]; diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.C b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.C index 7afcb62ae7ef28c32a8886a5f7e76def7d512458..a1cc04a3c596ed9b44e0fbe4e55cabe12ac1fcd7 100644 --- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.C +++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatch.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 @@ -78,11 +78,11 @@ void Foam::enrichedPatch::calcLocalFaces() const localFacesPtr_ = new faceList(faces.size()); faceList& lf = *localFacesPtr_; - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; - face& curlf = lf[faceI]; + face& curlf = lf[facei]; curlf.setSize(f.size()); @@ -225,16 +225,16 @@ bool Foam::enrichedPatch::checkSupport() const bool error = false; - forAll(faces, faceI) + forAll(faces, facei) { - const face& curFace = faces[faceI]; + const face& curFace = faces[facei]; forAll(curFace, pointI) { if (!pointMap().found(curFace[pointI])) { WarningInFunction - << "Point " << pointI << " of face " << faceI + << "Point " << pointI << " of face " << facei << " global point index: " << curFace[pointI] << " not supported in point map. This is not allowed." << endl; @@ -261,9 +261,9 @@ void Foam::enrichedPatch::writeOBJ(const fileName& fName) const const faceList& faces = localFaces(); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; str << 'f'; forAll(f, fp) diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchCutFaces.C b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchCutFaces.C index ef65f5ac8f43f6992b0207056625cd44b464c8a6..e649b5ace1c4c2df8d2a2380ab7f02de8041f810 100644 --- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchCutFaces.C +++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchCutFaces.C @@ -99,26 +99,26 @@ void Foam::enrichedPatch::calcCutFaces() const (pp.size()*primitiveMesh::edgesPerPoint_); - forAll(lf, faceI) + forAll(lf, facei) { - const face& curLocalFace = lf[faceI]; - const face& curGlobalFace = enFaces[faceI]; + const face& curLocalFace = lf[facei]; + const face& curGlobalFace = enFaces[facei]; - // Pout<< "Doing face " << faceI + // Pout<< "Doing face " << facei // << " local: " << curLocalFace // << " or " << curGlobalFace // << endl; - // if (faceI < slavePatch_.size()) + // if (facei < slavePatch_.size()) // { - // Pout<< "original slave: " << slavePatch_[faceI] - // << " local: " << slavePatch_.localFaces()[faceI] << endl; + // Pout<< "original slave: " << slavePatch_[facei] + // << " local: " << slavePatch_.localFaces()[facei] << endl; // } // else // { // Pout<< "original master: " - // << masterPatch_[faceI - slavePatch_.size()] << " " - // << masterPatch_.localFaces()[faceI - slavePatch_.size()] + // << masterPatch_[facei - slavePatch_.size()] << " " + // << masterPatch_.localFaces()[facei - slavePatch_.size()] // << endl; // } // { @@ -332,7 +332,7 @@ void Foam::enrichedPatch::calcCutFaces() const if (debug) { Pout<< " local: " << cutFaceLocalPoints - << " one side: " << faceI; + << " one side: " << facei; } // Append the face @@ -433,7 +433,7 @@ void Foam::enrichedPatch::calcCutFaces() const // is the other side. If this is not the case, there is no // face on the other side. - if (faceI < slavePatch_.size()) + if (facei < slavePatch_.size()) { Map<labelList>::const_iterator mpfAddrIter = masterPointFaceAddr.find(cutFaceGlobal[0]); @@ -511,7 +511,7 @@ void Foam::enrichedPatch::calcCutFaces() const masterFacesOfPZero[pointI] ); - cfSlave.append(faceI); + cfSlave.append(facei); // Reverse the face such that it // points out of the master patch @@ -536,7 +536,7 @@ void Foam::enrichedPatch::calcCutFaces() const } cfMaster.append(-1); - cfSlave.append(faceI); + cfSlave.append(facei); } } else @@ -548,7 +548,7 @@ void Foam::enrichedPatch::calcCutFaces() const } cfMaster.append(-1); - cfSlave.append(faceI); + cfSlave.append(facei); } } else @@ -558,7 +558,7 @@ void Foam::enrichedPatch::calcCutFaces() const Pout<< " master side" << endl; } - cfMaster.append(faceI - slavePatch_.size()); + cfMaster.append(facei - slavePatch_.size()); cfSlave.append(-1); } } @@ -596,21 +596,21 @@ void Foam::enrichedPatch::calcCutFaces() const face origFace; face origFaceLocal; - if (faceI < slavePatch_.size()) + if (facei < slavePatch_.size()) { - origFace = slavePatch_[faceI]; + origFace = slavePatch_[facei]; origFaceLocal = - slavePatch_.localFaces()[faceI]; + slavePatch_.localFaces()[facei]; } else { origFace = masterPatch_ - [faceI - slavePatch_.size()]; + [facei - slavePatch_.size()]; origFaceLocal = masterPatch_.localFaces() - [faceI - slavePatch_.size()]; + [facei - slavePatch_.size()]; } FatalErrorInFunction @@ -622,7 +622,7 @@ void Foam::enrichedPatch::calcCutFaces() const << "Slave size: " << slavePatch_.size() << " Master size: " << masterPatch_.size() - << " index: " << faceI << ".\n" + << " index: " << facei << ".\n" << "Face: " << curGlobalFace << nl << "Cut face: " << cutFaceGlobalPoints << " local: " << cutFaceLocalPoints @@ -639,7 +639,7 @@ void Foam::enrichedPatch::calcCutFaces() const if (debug) { - Pout<< " Finished face " << faceI << endl; + Pout<< " Finished face " << facei << endl; } } // end of local faces diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchFaces.C b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchFaces.C index 21291aacf14b0ef78269ab66d9bc06bd5662e272..554913a02f80693fb200cdf264423d0bdaf0c2ec 100644 --- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchFaces.C +++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchFaces.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 @@ -77,12 +77,12 @@ void Foam::enrichedPatch::calcEnrichedFaces // Add slave faces into the enriched faces list - forAll(slavePatch_, faceI) + forAll(slavePatch_, facei) { - const face oldFace = slavePatch_[faceI]; - const face oldLocalFace = slaveLocalFaces[faceI]; -// Info<< "old slave face " << faceI << ": " << oldFace << endl; - const labelList& curEdges = slaveFaceEdges[faceI]; + const face oldFace = slavePatch_[facei]; + const face oldLocalFace = slaveLocalFaces[facei]; +// Info<< "old slave face " << facei << ": " << oldFace << endl; + const labelList& curEdges = slaveFaceEdges[facei]; DynamicList<label> newFace(oldFace.size()*enrichedFaceRatio_); @@ -172,7 +172,7 @@ void Foam::enrichedPatch::calcEnrichedFaces { FatalErrorInFunction << " not on the edge for edge " << curEdges[i] - << " of face " << faceI << " in slave patch." << nl + << " of face " << facei << " in slave patch." << nl << "Min weight: " << min(edgePointWeights) << " Max weight: " << max(edgePointWeights) << abort(FatalError); @@ -212,7 +212,7 @@ void Foam::enrichedPatch::calcEnrichedFaces } } } - // Info<< "New slave face " << faceI << ": " << newFace << endl; + // Info<< "New slave face " << facei << ": " << newFace << endl; // Add the new face to the list enrichedFaces[nEnrichedFaces].transfer(newFace); @@ -221,12 +221,12 @@ void Foam::enrichedPatch::calcEnrichedFaces // Add master faces into the enriched faces list - forAll(masterPatch_, faceI) + forAll(masterPatch_, facei) { - const face& oldFace = masterPatch_[faceI]; - const face& oldLocalFace = masterLocalFaces[faceI]; + const face& oldFace = masterPatch_[facei]; + const face& oldLocalFace = masterLocalFaces[facei]; // Info<< "old master face: " << oldFace << endl; - const labelList& curEdges = masterFaceEdges[faceI]; + const labelList& curEdges = masterFaceEdges[facei]; DynamicList<label> newFace(oldFace.size()*enrichedFaceRatio_); @@ -308,7 +308,7 @@ void Foam::enrichedPatch::calcEnrichedFaces { FatalErrorInFunction << " not on the edge for edge " << curEdges[i] - << " of face " << faceI << " in master patch." << nl + << " of face " << facei << " in master patch." << nl << "Min weight: " << min(edgePointWeights) << " Max weight: " << max(edgePointWeights) << abort(FatalError); diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchMasterPoints.C b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchMasterPoints.C index 5113594293107106c62a273efa22dfe85d47b8d8..c5beb388ecf41ffb2caf7068e57df19afb3f9fb4 100644 --- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchMasterPoints.C +++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchMasterPoints.C @@ -56,9 +56,9 @@ void Foam::enrichedPatch::calcMasterPointFaces() const const faceList& ef = enrichedFaces(); // Add the original face points - forAll(masterPatch_, faceI) + forAll(masterPatch_, facei) { - const face& curFace = ef[faceI + slavePatch_.size()]; + const face& curFace = ef[facei + slavePatch_.size()]; // Pout<< "Cur face in pfAddr: " << curFace << endl; forAll(curFace, pointI) { @@ -75,11 +75,11 @@ void Foam::enrichedPatch::calcMasterPointFaces() const ); // Iterator is invalidated - have to find again - mpf.find(curFace[pointI])().append(faceI); + mpf.find(curFace[pointI])().append(facei); } else { - mpfIter().append(faceI); + mpfIter().append(facei); } } } diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchPointPoints.C b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchPointPoints.C index 0ef540e9ba5ff9c608483a9bb09d66b14bd1c881..2a1491e8d1e8cb631e1c43168a469a2034040329 100644 --- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchPointPoints.C +++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchPointPoints.C @@ -53,9 +53,9 @@ void Foam::enrichedPatch::calcPointPoints() const bool found = false; - forAll(lf, faceI) + forAll(lf, facei) { - const face& curFace = lf[faceI]; + const face& curFace = lf[facei]; forAll(curFace, pointI) { diff --git a/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C b/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C index 429367551943c0fb015ecde451f48ce5d6e2221f..155af2a2dd0429bbd0b130ffdc2a766bd5c6ccc4 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C +++ b/src/dynamicMesh/slidingInterface/slidingInterfaceAttachedAddressing.C @@ -64,15 +64,15 @@ void Foam::slidingInterface::calcAttachedAddressing() const masterFaceCellsPtr_ = new labelList(masterPatchFaces.size()); labelList& mfc = *masterFaceCellsPtr_; - forAll(masterPatchFaces, faceI) + forAll(masterPatchFaces, facei) { - if (masterFlip[faceI]) + if (masterFlip[facei]) { - mfc[faceI] = nei[masterPatchFaces[faceI]]; + mfc[facei] = nei[masterPatchFaces[facei]]; } else { - mfc[faceI] = own[masterPatchFaces[faceI]]; + mfc[facei] = own[masterPatchFaces[facei]]; } } @@ -90,15 +90,15 @@ void Foam::slidingInterface::calcAttachedAddressing() const slaveFaceCellsPtr_ = new labelList(slavePatchFaces.size()); labelList& sfc = *slaveFaceCellsPtr_; - forAll(slavePatchFaces, faceI) + forAll(slavePatchFaces, facei) { - if (slaveFlip[faceI]) + if (slaveFlip[facei]) { - sfc[faceI] = nei[slavePatchFaces[faceI]]; + sfc[facei] = nei[slavePatchFaces[facei]]; } else { - sfc[faceI] = own[slavePatchFaces[faceI]]; + sfc[facei] = own[slavePatchFaces[facei]]; } } @@ -107,27 +107,27 @@ void Foam::slidingInterface::calcAttachedAddressing() const { if (debug) { - forAll(mfc, faceI) + forAll(mfc, facei) { - if (mfc[faceI] < 0) + if (mfc[facei] < 0) { - Pout<< "No cell next to master patch face " << faceI - << ". Global face no: " << mfc[faceI] - << " own: " << own[masterPatchFaces[faceI]] - << " nei: " << nei[masterPatchFaces[faceI]] - << " flip: " << masterFlip[faceI] << endl; + Pout<< "No cell next to master patch face " << facei + << ". Global face no: " << mfc[facei] + << " own: " << own[masterPatchFaces[facei]] + << " nei: " << nei[masterPatchFaces[facei]] + << " flip: " << masterFlip[facei] << endl; } } - forAll(sfc, faceI) + forAll(sfc, facei) { - if (sfc[faceI] < 0) + if (sfc[facei] < 0) { - Pout<< "No cell next to slave patch face " << faceI - << ". Global face no: " << sfc[faceI] - << " own: " << own[slavePatchFaces[faceI]] - << " nei: " << nei[slavePatchFaces[faceI]] - << " flip: " << slaveFlip[faceI] << endl; + Pout<< "No cell next to slave patch face " << facei + << ". Global face no: " << sfc[facei] + << " own: " << own[slavePatchFaces[facei]] + << " nei: " << nei[slavePatchFaces[facei]] + << " flip: " << slaveFlip[facei] << endl; } } } @@ -152,17 +152,17 @@ void Foam::slidingInterface::calcAttachedAddressing() const { const labelList& curFaces = pointFaces[masterMeshPoints[pointI]]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { // Check if the face belongs to the master face zone; // if not add it if ( - faceZones.whichZone(curFaces[faceI]) + faceZones.whichZone(curFaces[facei]) != masterFaceZoneID_.index() ) { - masterStickOutFaceMap.insert(curFaces[faceI]); + masterStickOutFaceMap.insert(curFaces[facei]); } } } @@ -181,17 +181,17 @@ void Foam::slidingInterface::calcAttachedAddressing() const { const labelList& curFaces = pointFaces[slaveMeshPoints[pointI]]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { // Check if the face belongs to the slave face zone; // if not add it if ( - faceZones.whichZone(curFaces[faceI]) + faceZones.whichZone(curFaces[facei]) != slaveFaceZoneID_.index() ) { - slaveStickOutFaceMap.insert(curFaces[faceI]); + slaveStickOutFaceMap.insert(curFaces[facei]); } } } @@ -265,13 +265,13 @@ void Foam::slidingInterface::renumberAttachedAddressing const labelList& mfzRenumber = m.faceZoneFaceMap()[masterFaceZoneID_.index()]; - forAll(mfc, faceI) + forAll(mfc, facei) { - label newCellI = reverseCellMap[mfc[mfzRenumber[faceI]]]; + label newCellI = reverseCellMap[mfc[mfzRenumber[facei]]]; if (newCellI >= 0) { - newMfc[faceI] = newCellI; + newMfc[facei] = newCellI; } } @@ -282,13 +282,13 @@ void Foam::slidingInterface::renumberAttachedAddressing const labelList& sfzRenumber = m.faceZoneFaceMap()[slaveFaceZoneID_.index()]; - forAll(sfc, faceI) + forAll(sfc, facei) { - label newCellI = reverseCellMap[sfc[sfzRenumber[faceI]]]; + label newCellI = reverseCellMap[sfc[sfzRenumber[facei]]]; if (newCellI >= 0) { - newSfc[faceI] = newCellI; + newSfc[facei] = newCellI; } } @@ -315,13 +315,13 @@ void Foam::slidingInterface::renumberAttachedAddressing labelList* newMsofPtr = new labelList(msof.size(), -1); labelList& newMsof = *newMsofPtr; - forAll(msof, faceI) + forAll(msof, facei) { - label newFaceI = reverseFaceMap[msof[faceI]]; + label newFaceI = reverseFaceMap[msof[facei]]; if (newFaceI >= 0) { - newMsof[faceI] = newFaceI; + newMsof[facei] = newFaceI; } } // Pout<< "newMsof: " << newMsof << endl; @@ -331,13 +331,13 @@ void Foam::slidingInterface::renumberAttachedAddressing labelList* newSsofPtr = new labelList(ssof.size(), -1); labelList& newSsof = *newSsofPtr; - forAll(ssof, faceI) + forAll(ssof, facei) { - label newFaceI = reverseFaceMap[ssof[faceI]]; + label newFaceI = reverseFaceMap[ssof[facei]]; if (newFaceI >= 0) { - newSsof[faceI] = newFaceI; + newSsof[facei] = newFaceI; } } // Pout<< "newSsof: " << newSsof << endl; diff --git a/src/dynamicMesh/slidingInterface/slidingInterfaceClearCouple.C b/src/dynamicMesh/slidingInterface/slidingInterfaceClearCouple.C index 45e40249ba1376faa9b8e6c297abc87a6135544e..a6648eb5e60977ec0ec41c7045b29ed1f677ac3f 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterfaceClearCouple.C +++ b/src/dynamicMesh/slidingInterface/slidingInterfaceClearCouple.C @@ -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 @@ -60,9 +60,9 @@ void Foam::slidingInterface::clearCouple const labelList& cutFaceZoneLabels = mesh.faceZones()[cutFaceZoneID_.index()]; - forAll(cutFaceZoneLabels, faceI) + forAll(cutFaceZoneLabels, facei) { - ref.setAction(polyRemoveFace(cutFaceZoneLabels[faceI])); + ref.setAction(polyRemoveFace(cutFaceZoneLabels[facei])); } if (debug) diff --git a/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C b/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C index f87b08e6e2d9be3152d964ba0451f3495ad7bc6c..83dded3548888d834cdddac05b6b5c579551095a 100644 --- a/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C +++ b/src/dynamicMesh/slidingInterface/slidingInterfaceProjectPoints.C @@ -151,12 +151,12 @@ bool Foam::slidingInterface::projectPoints() const // Do faces const labelList& curFaces = masterEdgeFaces[edgeI]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - minMasterFaceLength[curFaces[faceI]] = + minMasterFaceLength[curFaces[facei]] = min ( - minMasterFaceLength[curFaces[faceI]], + minMasterFaceLength[curFaces[facei]], curLength ); } @@ -194,12 +194,12 @@ bool Foam::slidingInterface::projectPoints() const // Do faces const labelList& curFaces = slaveEdgeFaces[edgeI]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - minSlaveFaceLength[curFaces[faceI]] = + minSlaveFaceLength[curFaces[facei]] = min ( - minSlaveFaceLength[curFaces[faceI]], + minSlaveFaceLength[curFaces[facei]], curLength ); } @@ -889,9 +889,9 @@ bool Foam::slidingInterface::projectPoints() const const labelList curFaces = curFaceMap.toc(); // Pout<< "curFaces: " << curFaces << endl; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - const face& f = masterLocalFaces[curFaces[faceI]]; + const face& f = masterLocalFaces[curFaces[facei]]; forAll(f, pointI) { diff --git a/src/fileFormats/vtk/vtkUnstructuredReader.C b/src/fileFormats/vtk/vtkUnstructuredReader.C index 8460f61487ccfdbb4b119cffeaf3ae4bd0afa3c2..017765eca5d295f2cd78ae31a4a89ec30f314dd1 100644 --- a/src/fileFormats/vtk/vtkUnstructuredReader.C +++ b/src/fileFormats/vtk/vtkUnstructuredReader.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 @@ -115,12 +115,12 @@ void Foam::vtkUnstructuredReader::extractCells labelList prismPoints(6); labelList hexPoints(8); - label cellI = cells_.size(); - cells_.setSize(cellI+cellTypes.size()); + label celli = cells_.size(); + cells_.setSize(celli+cellTypes.size()); cellMap_.setSize(cells_.size(), -1); - label faceI = faces_.size(); - faces_.setSize(faceI+cellTypes.size()); + label facei = faces_.size(); + faces_.setSize(facei+cellTypes.size()); faceMap_.setSize(faces_.size(), -1); label lineI = lines_.size(); @@ -197,8 +197,8 @@ void Foam::vtkUnstructuredReader::extractCells case VTK_TRIANGLE: { - faceMap_[faceI] = i; - face& f = faces_[faceI++]; + faceMap_[facei] = i; + face& f = faces_[facei++]; f.setSize(3); label nRead = cellVertData[dataIndex++]; if (nRead != 3) @@ -217,8 +217,8 @@ void Foam::vtkUnstructuredReader::extractCells case VTK_QUAD: { - faceMap_[faceI] = i; - face& f = faces_[faceI++]; + faceMap_[facei] = i; + face& f = faces_[facei++]; f.setSize(4); label nRead = cellVertData[dataIndex++]; if (nRead != 4) @@ -238,8 +238,8 @@ void Foam::vtkUnstructuredReader::extractCells case VTK_POLYGON: { - faceMap_[faceI] = i; - face& f = faces_[faceI++]; + faceMap_[facei] = i; + face& f = faces_[facei++]; label nRead = cellVertData[dataIndex++]; f.setSize(nRead); forAll(f, fp) @@ -264,8 +264,8 @@ void Foam::vtkUnstructuredReader::extractCells tetPoints[1] = cellVertData[dataIndex++]; tetPoints[2] = cellVertData[dataIndex++]; tetPoints[3] = cellVertData[dataIndex++]; - cellMap_[cellI] = i; - cells_[cellI++] = cellShape(tet, tetPoints, true); + cellMap_[celli] = i; + cells_[celli++] = cellShape(tet, tetPoints, true); } break; @@ -285,8 +285,8 @@ void Foam::vtkUnstructuredReader::extractCells pyrPoints[2] = cellVertData[dataIndex++]; pyrPoints[3] = cellVertData[dataIndex++]; pyrPoints[4] = cellVertData[dataIndex++]; - cellMap_[cellI] = i; - cells_[cellI++] = cellShape(pyr, pyrPoints, true); + cellMap_[celli] = i; + cells_[celli++] = cellShape(pyr, pyrPoints, true); } break; @@ -307,8 +307,8 @@ void Foam::vtkUnstructuredReader::extractCells prismPoints[3] = cellVertData[dataIndex++]; prismPoints[4] = cellVertData[dataIndex++]; prismPoints[5] = cellVertData[dataIndex++]; - cellMap_[cellI] = i; - cells_[cellI++] = cellShape(prism, prismPoints, true); + cellMap_[celli] = i; + cells_[celli++] = cellShape(prism, prismPoints, true); } break; @@ -331,8 +331,8 @@ void Foam::vtkUnstructuredReader::extractCells hexPoints[5] = cellVertData[dataIndex++]; hexPoints[6] = cellVertData[dataIndex++]; hexPoints[7] = cellVertData[dataIndex++]; - cellMap_[cellI] = i; - cells_[cellI++] = cellShape(hex, hexPoints, true); + cellMap_[celli] = i; + cells_[celli++] = cellShape(hex, hexPoints, true); } break; @@ -345,12 +345,12 @@ void Foam::vtkUnstructuredReader::extractCells if (debug) { - Info<< "Read " << cellI << " cells;" << faceI << " faces." << endl; + Info<< "Read " << celli << " cells;" << facei << " faces." << endl; } - cells_.setSize(cellI); - cellMap_.setSize(cellI); - faces_.setSize(faceI); - faceMap_.setSize(faceI); + cells_.setSize(celli); + cellMap_.setSize(celli); + faces_.setSize(facei); + faceMap_.setSize(facei); lines_.setSize(lineI); lineMap_.setSize(lineI); } @@ -696,21 +696,21 @@ void Foam::vtkUnstructuredReader::read(ISstream& inFile) labelList faceVerts; readBlock(inFile, nNumbers, faceVerts); - label faceI = faces_.size(); - faces_.setSize(faceI+nFaces); + label facei = faces_.size(); + faces_.setSize(facei+nFaces); faceMap_.setSize(faces_.size()); label elemI = 0; for (label i = 0; i < nFaces; i++) { - faceMap_[faceI] = faceI; - face& f = faces_[faceI]; + faceMap_[facei] = facei; + face& f = faces_[facei]; f.setSize(faceVerts[elemI++]); forAll(f, fp) { f[fp] = faceVerts[elemI++]; } - faceI++; + facei++; } } else if (tag == "POINT_DATA") @@ -883,8 +883,8 @@ void Foam::vtkUnstructuredReader::read(ISstream& inFile) // Store - label faceI = faces_.size(); - faces_.setSize(faceI+nTris); + label facei = faces_.size(); + faces_.setSize(facei+nTris); faceMap_.setSize(faces_.size()); elemI = 0; for (label i = 0; i < nStrips; i++) @@ -893,16 +893,16 @@ void Foam::vtkUnstructuredReader::read(ISstream& inFile) label nTris = nVerts-2; // Read first triangle - faceMap_[faceI] = faceI; - face& f = faces_[faceI++]; + faceMap_[facei] = facei; + face& f = faces_[facei++]; f.setSize(3); f[0] = faceVerts[elemI++]; f[1] = faceVerts[elemI++]; f[2] = faceVerts[elemI++]; for (label triI = 1; triI < nTris; triI++) { - faceMap_[faceI] = faceI; - face& f = faces_[faceI++]; + faceMap_[facei] = facei; + face& f = faces_[facei++]; f.setSize(3); f[0] = faceVerts[elemI-1]; f[1] = faceVerts[elemI-2]; diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C index 00fb6ffe09221b2493eb2c16ecc8da030ce73173..8e5f2f7d8840420ba8f635354fa77609db716a11 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZone.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZone.C @@ -74,11 +74,11 @@ void Foam::MRFZone::setMRFFaces() label nZoneFaces = 0; - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - if (zoneCell[own[faceI]] || zoneCell[nei[faceI]]) + if (zoneCell[own[facei]] || zoneCell[nei[facei]]) { - faceType[faceI] = 1; + faceType[facei] = 1; nZoneFaces++; } } @@ -86,19 +86,19 @@ void Foam::MRFZone::setMRFFaces() labelHashSet excludedPatches(excludedPatchLabels_); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; - if (pp.coupled() || excludedPatches.found(patchI)) + if (pp.coupled() || excludedPatches.found(patchi)) { forAll(pp, i) { - label faceI = pp.start()+i; + label facei = pp.start()+i; - if (zoneCell[own[faceI]]) + if (zoneCell[own[facei]]) { - faceType[faceI] = 2; + faceType[facei] = 2; nZoneFaces++; } } @@ -107,11 +107,11 @@ void Foam::MRFZone::setMRFFaces() { forAll(pp, i) { - label faceI = pp.start()+i; + label facei = pp.start()+i; - if (zoneCell[own[faceI]]) + if (zoneCell[own[facei]]) { - faceType[faceI] = 1; + faceType[facei] = 1; nZoneFaces++; } } @@ -131,11 +131,11 @@ void Foam::MRFZone::setMRFFaces() internalFaces_.setSize(mesh_.nFaces()); label nInternal = 0; - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - if (faceType[faceI] == 1) + if (faceType[facei] == 1) { - internalFaces_[nInternal++] = faceI; + internalFaces_[nInternal++] = facei; } } internalFaces_.setSize(nInternal); @@ -149,13 +149,13 @@ void Foam::MRFZone::setMRFFaces() forAll(pp, patchFacei) { - label faceI = pp.start() + patchFacei; + label facei = pp.start() + patchFacei; - if (faceType[faceI] == 1) + if (faceType[facei] == 1) { nIncludedFaces[patchi]++; } - else if (faceType[faceI] == 2) + else if (faceType[facei] == 2) { nExcludedFaces[patchi]++; } @@ -178,13 +178,13 @@ void Foam::MRFZone::setMRFFaces() forAll(pp, patchFacei) { - label faceI = pp.start() + patchFacei; + label facei = pp.start() + patchFacei; - if (faceType[faceI] == 1) + if (faceType[facei] == 1) { includedFaces_[patchi][nIncludedFaces[patchi]++] = patchFacei; } - else if (faceType[faceI] == 2) + else if (faceType[facei] == 2) { excludedFaces_[patchi][nExcludedFaces[patchi]++] = patchFacei; } diff --git a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimerTemplates.C b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimerTemplates.C index 4ec9d4ecac67112921c19033c0a369bcb8cc26db..d8b19eb532b6376cc196751ebfbab9853f7403b4 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimerTemplates.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/DarcyForchheimer/DarcyForchheimerTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -45,15 +45,15 @@ void Foam::porosityModels::DarcyForchheimer::apply forAll(cells, i) { - const label cellI = cells[i]; + const label celli = cells[i]; const label j = this->fieldIndex(i); const tensor Cd = - mu[cellI]*dZones[j] + (rho[cellI]*mag(U[cellI]))*fZones[j]; + mu[celli]*dZones[j] + (rho[celli]*mag(U[celli]))*fZones[j]; const scalar isoCd = tr(Cd); - Udiag[cellI] += V[cellI]*isoCd; - Usource[cellI] -= V[cellI]*((Cd - I*isoCd) & U[cellI]); + Udiag[celli] += V[celli]*isoCd; + Usource[celli] -= V[celli]*((Cd - I*isoCd) & U[celli]); } } } @@ -77,12 +77,12 @@ void Foam::porosityModels::DarcyForchheimer::apply forAll(cells, i) { - const label cellI = cells[i]; + const label celli = cells[i]; const label j = this->fieldIndex(i); const tensor D = dZones[j]; const tensor F = fZones[j]; - AU[cellI] += mu[cellI]*D + (rho[cellI]*mag(U[cellI]))*F; + AU[celli] += mu[celli]*D + (rho[celli]*mag(U[celli]))*F; } } } diff --git a/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C b/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C index 35073cd36aa619ac9f23ca59803d956ee8cbfe44..64a81304ea850a452f099f17267db6c030f77605 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/fixedCoeff/fixedCoeff.C @@ -59,13 +59,13 @@ void Foam::porosityModels::fixedCoeff::apply forAll(cells, i) { - const label cellI = cells[i]; + const label celli = cells[i]; const label j = fieldIndex(i); - const tensor Cd = rho*(alphaZones[j] + betaZones[j]*mag(U[cellI])); + const tensor Cd = rho*(alphaZones[j] + betaZones[j]*mag(U[celli])); const scalar isoCd = tr(Cd); - Udiag[cellI] += V[cellI]*isoCd; - Usource[cellI] -= V[cellI]*((Cd - I*isoCd) & U[cellI]); + Udiag[celli] += V[celli]*isoCd; + Usource[celli] -= V[celli]*((Cd - I*isoCd) & U[celli]); } } } @@ -88,12 +88,12 @@ void Foam::porosityModels::fixedCoeff::apply forAll(cells, i) { - const label cellI = cells[i]; + const label celli = cells[i]; const label j = fieldIndex(i); const tensor alpha = alphaZones[j]; const tensor beta = betaZones[j]; - AU[cellI] += rho*(alpha + beta*mag(U[cellI])); + AU[celli] += rho*(alpha + beta*mag(U[celli])); } } } diff --git a/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLawTemplates.C b/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLawTemplates.C index 086085c5658c937aa7e169914704efec9a76eae9..7ed3d2ead772cf7eaeebb3033490046a8a933a69 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLawTemplates.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/powerLaw/powerLawTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,10 +43,10 @@ void Foam::porosityModels::powerLaw::apply forAll(cells, i) { - const label cellI = cells[i]; + const label celli = cells[i]; - Udiag[cellI] += - V[cellI]*rho[cellI]*C0*pow(magSqr(U[cellI]), C1m1b2); + Udiag[celli] += + V[celli]*rho[celli]*C0*pow(magSqr(U[celli]), C1m1b2); } } } @@ -69,10 +69,10 @@ void Foam::porosityModels::powerLaw::apply forAll(cells, i) { - const label cellI = cells[i]; + const label celli = cells[i]; - AU[cellI] = - AU[cellI] + I*(rho[cellI]*C0*pow(magSqr(U[cellI]), C1m1b2)); + AU[celli] = + AU[celli] + I*(rho[celli]*C0*pow(magSqr(U[celli]), C1m1b2)); } } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C index 568bc9a6f7cca5d0e815f96b9ff715e8002abe3a..1dce40cc0f75ce62ee1bc4d63184f051fd1cc048 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/externalCoupledMixed/externalCoupledMixedFvPatchField.C @@ -158,9 +158,9 @@ void Foam::externalCoupledMixedFvPatchField<Type>::writeGeometry List<faceList> allFaces(Pstream::nProcs()); faceList& patchFaces = allFaces[procI]; patchFaces = p.localFaces(); - forAll(patchFaces, faceI) + forAll(patchFaces, facei) { - inplaceRenumber(pointToGlobal, patchFaces[faceI]); + inplaceRenumber(pointToGlobal, patchFaces[facei]); } Pstream::gatherList(allFaces, tag); @@ -365,13 +365,13 @@ void Foam::externalCoupledMixedFvPatchField<Type>::readData initialiseRead(is); // read data from file - forAll(this->patch(), faceI) + forAll(this->patch(), facei) { if (is.good()) { - is >> this->refValue()[faceI] - >> this->refGrad()[faceI] - >> this->valueFraction()[faceI]; + is >> this->refValue()[facei] + >> this->refGrad()[facei] + >> this->valueFraction()[facei]; } else { @@ -744,11 +744,11 @@ void Foam::externalCoupledMixedFvPatchField<Type>::transferData const Field<Type>& value = values[procI]; const Field<Type>& snGrad = snGrads[procI]; - forAll(magSf, faceI) + forAll(magSf, facei) { - os << magSf[faceI] << token::SPACE - << value[faceI] << token::SPACE - << snGrad[faceI] << nl; + os << magSf[facei] << token::SPACE + << value[facei] << token::SPACE + << snGrad[facei] << nl; } } @@ -761,11 +761,11 @@ void Foam::externalCoupledMixedFvPatchField<Type>::transferData const Field<Type>& value(this->refValue()); const Field<Type> snGrad(this->snGrad()); - forAll(magSf, faceI) + forAll(magSf, facei) { - os << magSf[faceI] << token::SPACE - << value[faceI] << token::SPACE - << snGrad[faceI] << nl; + os << magSf[facei] << token::SPACE + << value[facei] << token::SPACE + << snGrad[facei] << nl; } os.flush(); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C index 589afaf3098d9ebf9be613f802dd11e50782c178..020393e8395b9da1e939eca9e1b2391cac4c1d25 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedField/mappedPatchFieldBase.C @@ -214,14 +214,14 @@ tmp<Field<Type>> mappedPatchFieldBase<Type>::mappedField() const const interpolation<Type>& interp = interpolator(); newValues.setSize(samples.size(), pTraits<Type>::max); - forAll(samples, cellI) + forAll(samples, celli) { - if (samples[cellI] != point::max) + if (samples[celli] != point::max) { - newValues[cellI] = interp.interpolate + newValues[celli] = interp.interpolate ( - samples[cellI], - cellI + samples[celli], + celli ); } } @@ -263,15 +263,15 @@ tmp<Field<Type>> mappedPatchFieldBase<Type>::mappedField() const const fieldType& nbrField = sampleField(); - forAll(nbrField.boundaryField(), patchI) + forAll(nbrField.boundaryField(), patchi) { const fvPatchField<Type>& pf = - nbrField.boundaryField()[patchI]; + nbrField.boundaryField()[patchi]; label faceStart = pf.patch().start(); - forAll(pf, faceI) + forAll(pf, facei) { - allValues[faceStart++] = pf[faceI]; + allValues[faceStart++] = pf[facei]; } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C index 6f5a49c7b624c44068efcb9906da412a44e1a18d..fbbae0c14bf5a471cb7f51b4eb6d09fe1f58bc13 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedFixedInternalValue/mappedFixedInternalValueFvPatchField.C @@ -149,16 +149,16 @@ void Foam::mappedFixedInternalValueFvPatchField<Type>::updateCoeffs() const FieldType& nbrField = this->sampleField(); - forAll(nbrField.boundaryField(), patchI) + forAll(nbrField.boundaryField(), patchi) { - const fvPatchField<Type>& pf = nbrField.boundaryField()[patchI]; + const fvPatchField<Type>& pf = nbrField.boundaryField()[patchi]; const Field<Type> pif(pf.patchInternalField()); label faceStart = pf.patch().start(); - forAll(pf, faceI) + forAll(pf, facei) { - allValues[faceStart++] = pif[faceI]; + allValues[faceStart++] = pif[facei]; } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C index 56a87b9805fb86f54fca14b69bab8c415659c829..c6ce22d446adcd6c72806cf22b2a3a0b9af93c1c 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/mappedVelocityFluxFixedValue/mappedVelocityFluxFixedValueFvPatchField.C @@ -169,17 +169,17 @@ void Foam::mappedVelocityFluxFixedValueFvPatchField::updateCoeffs() vectorField allUValues(nbrMesh.nFaces(), Zero); scalarField allPhiValues(nbrMesh.nFaces(), 0.0); - forAll(UField.boundaryField(), patchI) + forAll(UField.boundaryField(), patchi) { - const fvPatchVectorField& Upf = UField.boundaryField()[patchI]; - const scalarField& phipf = phiField.boundaryField()[patchI]; + const fvPatchVectorField& Upf = UField.boundaryField()[patchi]; + const scalarField& phipf = phiField.boundaryField()[patchi]; label faceStart = Upf.patch().start(); - forAll(Upf, faceI) + forAll(Upf, facei) { - allUValues[faceStart + faceI] = Upf[faceI]; - allPhiValues[faceStart + faceI] = phipf[faceI]; + allUValues[faceStart + facei] = Upf[facei]; + allPhiValues[faceStart + facei] = phipf[facei]; } } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C index 4c9acd7f2130cc0da1e42d9c4cdc48db54dd3598..551d544b17a3adde30016c67d8441061eb7a1152 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/waveSurfacePressure/waveSurfacePressureFvPatchScalarField.C @@ -146,7 +146,7 @@ void Foam::waveSurfacePressureFvPatchScalarField::updateCoeffs() return; } - const label patchI = patch().index(); + const label patchi = patch().index(); const scalar dt = db().time().deltaTValue(); @@ -156,7 +156,7 @@ void Foam::waveSurfacePressureFvPatchScalarField::updateCoeffs() ( db().lookupObject<volVectorField>(zetaName_) ); - vectorField& zetap = zeta.boundaryFieldRef()[patchI]; + vectorField& zetap = zeta.boundaryFieldRef()[patchi]; // lookup d/dt scheme from database for zeta const word ddtSchemeName(zeta.mesh().ddtScheme(zeta.name())); @@ -170,7 +170,7 @@ void Foam::waveSurfacePressureFvPatchScalarField::updateCoeffs() tmp<vectorField> nf(patch().nf()); // change in zeta due to flux - vectorField dZetap(dt*nf()*phi.boundaryField()[patchI]/patch().magSf()); + vectorField dZetap(dt*nf()*phi.boundaryField()[patchi]/patch().magSf()); if (phi.dimensions() == dimDensity*dimVelocity*dimArea) { @@ -187,7 +187,7 @@ void Foam::waveSurfacePressureFvPatchScalarField::updateCoeffs() case tsEuler: case tsCrankNicolson: { - zetap = zeta0.boundaryField()[patchI] + dZetap; + zetap = zeta0.boundaryField()[patchi] + dZetap; break; } @@ -201,8 +201,8 @@ void Foam::waveSurfacePressureFvPatchScalarField::updateCoeffs() zetap = ( - c0*zeta0.boundaryField()[patchI] - - c00*zeta0.oldTime().boundaryField()[patchI] + c0*zeta0.boundaryField()[patchi] + - c00*zeta0.oldTime().boundaryField()[patchi] + dZetap )/c; diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.C b/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.C index 38040b2119b1853aeb0749062f84b452be7cdef1..5b5d1fdf9b4b015804b51b260efa89ed721ac64a 100644 --- a/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.C +++ b/src/finiteVolume/finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.C @@ -96,14 +96,14 @@ gaussConvectionScheme<Type>::fvmDiv fvm.upper() = fvm.lower() + faceFlux.internalField(); fvm.negSumDiag(); - forAll(vf.boundaryField(), patchI) + forAll(vf.boundaryField(), patchi) { - const fvPatchField<Type>& psf = vf.boundaryField()[patchI]; - const fvsPatchScalarField& patchFlux = faceFlux.boundaryField()[patchI]; - const fvsPatchScalarField& pw = weights.boundaryField()[patchI]; + const fvPatchField<Type>& psf = vf.boundaryField()[patchi]; + const fvsPatchScalarField& patchFlux = faceFlux.boundaryField()[patchi]; + const fvsPatchScalarField& pw = weights.boundaryField()[patchi]; - fvm.internalCoeffs()[patchI] = patchFlux*psf.valueInternalCoeffs(pw); - fvm.boundaryCoeffs()[patchI] = -patchFlux*psf.valueBoundaryCoeffs(pw); + fvm.internalCoeffs()[patchi] = patchFlux*psf.valueInternalCoeffs(pw); + fvm.boundaryCoeffs()[patchi] = -patchFlux*psf.valueBoundaryCoeffs(pw); } if (tinterpScheme_().corrected()) diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C index 55e5c0c391f18980d8002e6191c09f3656a6f4cd..a7d1b8ba3128187fc4c34e12f80d543b0870c6a3 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CoEulerDdtScheme/CoEulerDdtScheme.C @@ -66,13 +66,13 @@ tmp<volScalarField> CoEulerDdtScheme<Type>::CorDeltaT() const const labelUList& owner = mesh().owner(); const labelUList& neighbour = mesh().neighbour(); - forAll(owner, faceI) + forAll(owner, facei) { - corDeltaT[owner[faceI]] = - max(corDeltaT[owner[faceI]], cofrDeltaT[faceI]); + corDeltaT[owner[facei]] = + max(corDeltaT[owner[facei]], cofrDeltaT[facei]); - corDeltaT[neighbour[faceI]] = - max(corDeltaT[neighbour[faceI]], cofrDeltaT[faceI]); + corDeltaT[neighbour[facei]] = + max(corDeltaT[neighbour[facei]], cofrDeltaT[facei]); } const surfaceScalarField::GeometricBoundaryField& cofrDeltaTbf = diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C index 399487792213c29ee6524c6d3d9337fe2dd26eef..12512767c7e4a18970219d56771f09f351fec9e6 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/SLTSDdtScheme/SLTSDdtScheme.C @@ -50,17 +50,17 @@ void SLTSDdtScheme<Type>::relaxedDiag const labelUList& neighbour = mesh().neighbour(); scalarField diag(rD.size(), 0.0); - forAll(owner, faceI) + forAll(owner, facei) { - if (phi[faceI] > 0.0) + if (phi[facei] > 0.0) { - diag[owner[faceI]] += phi[faceI]; - rD[neighbour[faceI]] += phi[faceI]; + diag[owner[facei]] += phi[facei]; + rD[neighbour[facei]] += phi[facei]; } else { - diag[neighbour[faceI]] -= phi[faceI]; - rD[owner[faceI]] -= phi[faceI]; + diag[neighbour[facei]] -= phi[facei]; + rD[owner[facei]] -= phi[facei]; } } diff --git a/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C b/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C index bbc5cfc275f322461c00c0dde080e5975fd8ab8f..19753c8eba3e38738a1f491cc0c01e2de9941326 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcCellReduce.C @@ -77,13 +77,13 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> cellReduce forAll(own, i) { - label cellI = own[i]; - cop(result[cellI], ssf[i]); + label celli = own[i]; + cop(result[celli], ssf[i]); } forAll(nbr, i) { - label cellI = nbr[i]; - cop(result[cellI], ssf[i]); + label celli = nbr[i]; + cop(result[celli], ssf[i]); } result.correctBoundaryConditions(); diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C index afb76abede397414a3acad888ea12cad588cf114..fb61324fbab64454d61dd8b8136325228451b3b5 100644 --- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C +++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C @@ -48,9 +48,9 @@ void Foam::fvMatrix<Type>::addToInternalField << abort(FatalError); } - forAll(addr, faceI) + forAll(addr, facei) { - intf[addr[faceI]] += pf[faceI]; + intf[addr[facei]] += pf[facei]; } } @@ -85,9 +85,9 @@ void Foam::fvMatrix<Type>::subtractFromInternalField << abort(FatalError); } - forAll(addr, faceI) + forAll(addr, facei) { - intf[addr[faceI]] -= pf[faceI]; + intf[addr[facei]] -= pf[facei]; } } @@ -113,12 +113,12 @@ void Foam::fvMatrix<Type>::addBoundaryDiag const direction solveCmpt ) const { - forAll(internalCoeffs_, patchI) + forAll(internalCoeffs_, patchi) { addToInternalField ( - lduAddr().patchAddr(patchI), - internalCoeffs_[patchI].component(solveCmpt), + lduAddr().patchAddr(patchi), + internalCoeffs_[patchi].component(solveCmpt), diag ); } @@ -128,12 +128,12 @@ void Foam::fvMatrix<Type>::addBoundaryDiag template<class Type> void Foam::fvMatrix<Type>::addCmptAvBoundaryDiag(scalarField& diag) const { - forAll(internalCoeffs_, patchI) + forAll(internalCoeffs_, patchi) { addToInternalField ( - lduAddr().patchAddr(patchI), - cmptAv(internalCoeffs_[patchI]), + lduAddr().patchAddr(patchi), + cmptAv(internalCoeffs_[patchi]), diag ); } @@ -147,21 +147,21 @@ void Foam::fvMatrix<Type>::addBoundarySource const bool couples ) const { - forAll(psi_.boundaryField(), patchI) + forAll(psi_.boundaryField(), patchi) { - const fvPatchField<Type>& ptf = psi_.boundaryField()[patchI]; - const Field<Type>& pbc = boundaryCoeffs_[patchI]; + const fvPatchField<Type>& ptf = psi_.boundaryField()[patchi]; + const Field<Type>& pbc = boundaryCoeffs_[patchi]; if (!ptf.coupled()) { - addToInternalField(lduAddr().patchAddr(patchI), pbc, source); + addToInternalField(lduAddr().patchAddr(patchi), pbc, source); } else if (couples) { const tmp<Field<Type>> tpnf = ptf.patchNeighbourField(); const Field<Type>& pnf = tpnf(); - const labelUList& addr = lduAddr().patchAddr(patchI); + const labelUList& addr = lduAddr().patchAddr(patchi); forAll(addr, facei) { @@ -285,24 +285,24 @@ Foam::fvMatrix<Type>::fvMatrix } // Initialise coupling coefficients - forAll(psi.mesh().boundary(), patchI) + forAll(psi.mesh().boundary(), patchi) { internalCoeffs_.set ( - patchI, + patchi, new Field<Type> ( - psi.mesh().boundary()[patchI].size(), + psi.mesh().boundary()[patchi].size(), Zero ) ); boundaryCoeffs_.set ( - patchI, + patchi, new Field<Type> ( - psi.mesh().boundary()[patchI].size(), + psi.mesh().boundary()[patchi].size(), Zero ) ); @@ -425,24 +425,24 @@ Foam::fvMatrix<Type>::fvMatrix } // Initialise coupling coefficients - forAll(psi.mesh().boundary(), patchI) + forAll(psi.mesh().boundary(), patchi) { internalCoeffs_.set ( - patchI, + patchi, new Field<Type> ( - psi.mesh().boundary()[patchI].size(), + psi.mesh().boundary()[patchi].size(), Zero ) ); boundaryCoeffs_.set ( - patchI, + patchi, new Field<Type> ( - psi.mesh().boundary()[patchI].size(), + psi.mesh().boundary()[patchi].size(), Zero ) ); @@ -532,18 +532,18 @@ void Foam::fvMatrix<Type>::relax(const scalar alpha) sumMagOffDiag(sumOff); // Handle the boundary contributions to the diagonal - forAll(psi_.boundaryField(), patchI) + forAll(psi_.boundaryField(), patchi) { - const fvPatchField<Type>& ptf = psi_.boundaryField()[patchI]; + const fvPatchField<Type>& ptf = psi_.boundaryField()[patchi]; if (ptf.size()) { - const labelUList& pa = lduAddr().patchAddr(patchI); - Field<Type>& iCoeffs = internalCoeffs_[patchI]; + const labelUList& pa = lduAddr().patchAddr(patchi); + Field<Type>& iCoeffs = internalCoeffs_[patchi]; if (ptf.coupled()) { - const Field<Type>& pCoeffs = boundaryCoeffs_[patchI]; + const Field<Type>& pCoeffs = boundaryCoeffs_[patchi]; // For coupled boundaries add the diagonal and // off-diagonal contributions @@ -627,14 +627,14 @@ void Foam::fvMatrix<Type>::relax(const scalar alpha) D /= alpha; // Now remove the diagonal contribution from coupled boundaries - forAll(psi_.boundaryField(), patchI) + forAll(psi_.boundaryField(), patchi) { - const fvPatchField<Type>& ptf = psi_.boundaryField()[patchI]; + const fvPatchField<Type>& ptf = psi_.boundaryField()[patchi]; if (ptf.size()) { - const labelUList& pa = lduAddr().patchAddr(patchI); - Field<Type>& iCoeffs = internalCoeffs_[patchI]; + const labelUList& pa = lduAddr().patchAddr(patchi); + Field<Type>& iCoeffs = internalCoeffs_[patchi]; if (ptf.coupled()) { @@ -681,9 +681,9 @@ void Foam::fvMatrix<Type>::boundaryManipulate GeometricBoundaryField& bFields ) { - forAll(bFields, patchI) + forAll(bFields, patchi) { - bFields[patchI].manipulateMatrix(*this); + bFields[patchi].manipulateMatrix(*this); } } @@ -702,16 +702,16 @@ Foam::tmp<Foam::Field<Type>> Foam::fvMatrix<Type>::DD() const { tmp<Field<Type>> tdiag(pTraits<Type>::one*diag()); - forAll(psi_.boundaryField(), patchI) + forAll(psi_.boundaryField(), patchi) { - const fvPatchField<Type>& ptf = psi_.boundaryField()[patchI]; + const fvPatchField<Type>& ptf = psi_.boundaryField()[patchi]; if (!ptf.coupled() && ptf.size()) { addToInternalField ( - lduAddr().patchAddr(patchI), - internalCoeffs_[patchI], + lduAddr().patchAddr(patchi), + internalCoeffs_[patchi], tdiag.ref() ); } @@ -836,16 +836,16 @@ Foam::tmp<Foam::volScalarField> Foam::fvMatrix<Type>::H1() const H1_.internalField() = lduMatrix::H1(); - forAll(psi_.boundaryField(), patchI) + forAll(psi_.boundaryField(), patchi) { - const fvPatchField<Type>& ptf = psi_.boundaryField()[patchI]; + const fvPatchField<Type>& ptf = psi_.boundaryField()[patchi]; if (ptf.coupled() && ptf.size()) { addToInternalField ( - lduAddr().patchAddr(patchI), - boundaryCoeffs_[patchI].component(0), + lduAddr().patchAddr(patchi), + boundaryCoeffs_[patchi].component(0), H1_ ); } @@ -903,27 +903,27 @@ flux() const FieldField<Field, Type> InternalContrib = internalCoeffs_; - forAll(InternalContrib, patchI) + forAll(InternalContrib, patchi) { - InternalContrib[patchI] = + InternalContrib[patchi] = cmptMultiply ( - InternalContrib[patchI], - psi_.boundaryField()[patchI].patchInternalField() + InternalContrib[patchi], + psi_.boundaryField()[patchi].patchInternalField() ); } FieldField<Field, Type> NeighbourContrib = boundaryCoeffs_; - forAll(NeighbourContrib, patchI) + forAll(NeighbourContrib, patchi) { - if (psi_.boundaryField()[patchI].coupled()) + if (psi_.boundaryField()[patchi].coupled()) { - NeighbourContrib[patchI] = + NeighbourContrib[patchi] = cmptMultiply ( - NeighbourContrib[patchI], - psi_.boundaryField()[patchI].patchNeighbourField() + NeighbourContrib[patchi], + psi_.boundaryField()[patchi].patchNeighbourField() ); } } @@ -931,9 +931,9 @@ flux() const typename GeometricField<Type, fvsPatchField, surfaceMesh>:: GeometricBoundaryField& ffbf = fieldFlux.boundaryFieldRef(); - forAll(ffbf, patchI) + forAll(ffbf, patchi) { - ffbf[patchI] = InternalContrib[patchI] - NeighbourContrib[patchI]; + ffbf[patchi] = InternalContrib[patchi] - NeighbourContrib[patchi]; } if (faceFluxCorrectionPtr_) @@ -1184,15 +1184,15 @@ void Foam::fvMatrix<Type>::operator*= lduMatrix::operator*=(dsf.field()); source_ *= dsf.field(); - forAll(boundaryCoeffs_, patchI) + forAll(boundaryCoeffs_, patchi) { scalarField pisf ( - dsf.mesh().boundary()[patchI].patchInternalField(dsf.field()) + dsf.mesh().boundary()[patchi].patchInternalField(dsf.field()) ); - internalCoeffs_[patchI] *= pisf; - boundaryCoeffs_[patchI] *= pisf; + internalCoeffs_[patchi] *= pisf; + boundaryCoeffs_[patchi] *= pisf; } if (faceFluxCorrectionPtr_) diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencil.C index 54e0eb446e84c8319a24ab4a9c2f632c8e367ff7..8f602b750fa4cf0c1521e87d39059a240ed15976 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCellToCellStencil.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 @@ -34,12 +34,12 @@ Foam::extendedCellToCellStencil::extendedCellToCellStencil(const polyMesh& mesh) // Check for transformation - not supported. const polyBoundaryMesh& patches = mesh.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { const coupledPolyPatch& cpp = - refCast<const coupledPolyPatch>(patches[patchI]); + refCast<const coupledPolyPatch>(patches[patchi]); if (!cpp.parallel() || cpp.separated()) { diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.C index 1b9c347b6f18784488c4e7e1e187e97abff3802e..16a6cc3f867089341b9530fbf77ff6caab4420e1 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/extendedCentredCellToCellStencil.C @@ -57,9 +57,9 @@ void Foam::extendedCentredCellToCellStencil::compact() { boolList isInStencil(map().constructSize(), false); - forAll(stencil_, cellI) + forAll(stencil_, celli) { - const labelList& stencilCells = stencil_[cellI]; + const labelList& stencilCells = stencil_[celli]; forAll(stencilCells, i) { diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.C index 41e03b552d0f8534e241dfaeee255dc552914251..f3067fa6ded9f4c4ea4bf298444bb69015a8b9bc 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CECCellToCellStencil.C @@ -130,14 +130,14 @@ void Foam::CECCellToCellStencil::calcCellStencil forAll(eCells, j) { - label cellI = eCells[j]; + label celli = eCells[j]; // Insert pGlobals into globalCellCells merge ( - globalNumbering().toGlobal(cellI), + globalNumbering().toGlobal(celli), eGlobals, - globalCellCells[cellI] + globalCellCells[celli] ); } } @@ -162,13 +162,13 @@ void Foam::CECCellToCellStencil::calcCellStencil forAll(eCells, j) { - label cellI = eCells[j]; + label celli = eCells[j]; merge ( - globalNumbering().toGlobal(cellI), + globalNumbering().toGlobal(celli), eGlobals, - globalCellCells[cellI] + globalCellCells[celli] ); } } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C index 7cbde7abf8f9a110066e6ede9efd4b7aa44f955a..a54af5d77b5369303fee78f5e9114a2da4373706 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CFCCellToCellStencil.C @@ -41,28 +41,28 @@ void Foam::CFCCellToCellStencil::calcFaceBoundaryData neiGlobal.setSize(nBnd); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; - label faceI = pp.start(); + const polyPatch& pp = patches[patchi]; + label facei = pp.start(); if (pp.coupled()) { // For coupled faces get the cell on the other side forAll(pp, i) { - label bFaceI = faceI-mesh().nInternalFaces(); - neiGlobal[bFaceI] = globalNumbering().toGlobal(own[faceI]); - faceI++; + label bFaceI = facei-mesh().nInternalFaces(); + neiGlobal[bFaceI] = globalNumbering().toGlobal(own[facei]); + facei++; } } else if (isA<emptyPolyPatch>(pp)) { forAll(pp, i) { - label bFaceI = faceI-mesh().nInternalFaces(); + label bFaceI = facei-mesh().nInternalFaces(); neiGlobal[bFaceI] = -1; - faceI++; + facei++; } } else @@ -70,10 +70,10 @@ void Foam::CFCCellToCellStencil::calcFaceBoundaryData // For noncoupled faces get the boundary face. forAll(pp, i) { - label bFaceI = faceI-mesh().nInternalFaces(); + label bFaceI = facei-mesh().nInternalFaces(); neiGlobal[bFaceI] = globalNumbering().toGlobal(mesh().nCells()+bFaceI); - faceI++; + facei++; } } } @@ -102,36 +102,36 @@ void Foam::CFCCellToCellStencil::calcCellStencil // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ globalCellCells.setSize(mesh().nCells()); - forAll(globalCellCells, cellI) + forAll(globalCellCells, celli) { - const cell& cFaces = mesh().cells()[cellI]; + const cell& cFaces = mesh().cells()[celli]; - labelList& cCells = globalCellCells[cellI]; + labelList& cCells = globalCellCells[celli]; cCells.setSize(cFaces.size()+1); label nNbr = 0; // Myself - cCells[nNbr++] = globalNumbering().toGlobal(cellI); + cCells[nNbr++] = globalNumbering().toGlobal(celli); // Collect neighbouring cells/faces forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (mesh().isInternalFace(faceI)) + 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); } else { - label nbrCellI = neiGlobal[faceI-mesh().nInternalFaces()]; + label nbrCellI = neiGlobal[facei-mesh().nInternalFaces()]; if (nbrCellI != -1) { cCells[nNbr++] = nbrCellI; diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.C index 660a04d6d66327d63f55f25477772b968d4c24d6..9253d9259d476d21a15baf73f8ace7208a0298df 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/CPCCellToCellStencil.C @@ -104,14 +104,14 @@ void Foam::CPCCellToCellStencil::calcCellStencil forAll(pCells, j) { - label cellI = pCells[j]; + label celli = pCells[j]; // Insert pGlobals into globalCellCells merge ( - globalNumbering().toGlobal(cellI), + globalNumbering().toGlobal(celli), pGlobals, - globalCellCells[cellI] + globalCellCells[celli] ); } } @@ -136,13 +136,13 @@ void Foam::CPCCellToCellStencil::calcCellStencil forAll(pCells, j) { - label cellI = pCells[j]; + label celli = pCells[j]; merge ( - globalNumbering().toGlobal(cellI), + globalNumbering().toGlobal(celli), pGlobals, - globalCellCells[cellI] + globalCellCells[celli] ); } } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C index 1aad1b4e20cb51b6dc52c7aaa00aa7bf52f748b9..1ee76c8627624ce8f3d5e3dea660cb7b9f374360 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToCell/globalIndexStencils/cellToCellStencil.C @@ -171,9 +171,9 @@ void Foam::cellToCellStencil::validBoundaryFaces(boolList& isValidBFace) const isValidBFace.setSize(mesh().nFaces()-mesh().nInternalFaces(), true); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled() || isA<emptyPolyPatch>(pp)) { @@ -194,9 +194,9 @@ Foam::cellToCellStencil::allCoupledFacesPatch() const label nCoupled = 0; - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { @@ -206,17 +206,17 @@ Foam::cellToCellStencil::allCoupledFacesPatch() const labelList coupledFaces(nCoupled); nCoupled = 0; - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - coupledFaces[nCoupled++] = faceI++; + coupledFaces[nCoupled++] = facei++; } } } @@ -275,17 +275,17 @@ void Foam::cellToCellStencil::insertFaceCells forAll(faceLabels, i) { - label faceI = faceLabels[i]; + label facei = faceLabels[i]; - label globalOwn = globalNumbering().toGlobal(own[faceI]); + label globalOwn = globalNumbering().toGlobal(own[facei]); if (globalOwn != exclude0 && globalOwn != exclude1) { globals.insert(globalOwn); } - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { - label globalNei = globalNumbering().toGlobal(nei[faceI]); + label globalNei = globalNumbering().toGlobal(nei[facei]); if (globalNei != exclude0 && globalNei != exclude1) { globals.insert(globalNei); @@ -293,7 +293,7 @@ void Foam::cellToCellStencil::insertFaceCells } else { - label bFaceI = faceI-mesh().nInternalFaces(); + label bFaceI = facei-mesh().nInternalFaces(); if (isValidBFace[bFaceI]) { diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C index 5409e01b98dfe82f87d683d1e21da4d165572af4..0ace3a8c461e4e7bd8f10c5f965ba540b58d5cc2 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencil.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 @@ -104,12 +104,12 @@ Foam::extendedCellToFaceStencil::extendedCellToFaceStencil(const polyMesh& mesh) // Check for transformation - not supported. const polyBoundaryMesh& patches = mesh.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { const coupledPolyPatch& cpp = - refCast<const coupledPolyPatch>(patches[patchI]); + refCast<const coupledPolyPatch>(patches[patchi]); if (!cpp.parallel() || cpp.separated()) { diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C index 0870d3bf7ff5f89c1cba1ad468a893ada723e688..c60ced2cd1aa0533b733af476ace152ff34858f7 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C @@ -40,14 +40,14 @@ void Foam::extendedCellToFaceStencil::collectData List<Type> flatFld(map.constructSize(), Zero); // Insert my internal values - forAll(fld, cellI) + forAll(fld, celli) { - flatFld[cellI] = fld[cellI]; + flatFld[celli] = fld[celli]; } // Insert my boundary values - forAll(fld.boundaryField(), patchI) + forAll(fld.boundaryField(), patchi) { - const fvPatchField<Type>& pfld = fld.boundaryField()[patchI]; + const fvPatchField<Type>& pfld = fld.boundaryField()[patchi]; label nCompact = pfld.patch().start() @@ -66,15 +66,15 @@ void Foam::extendedCellToFaceStencil::collectData // 2. Pull to stencil stencilFld.setSize(stencil.size()); - forAll(stencil, faceI) + forAll(stencil, facei) { - const labelList& compactCells = stencil[faceI]; + const labelList& compactCells = stencil[facei]; - stencilFld[faceI].setSize(compactCells.size()); + stencilFld[facei].setSize(compactCells.size()); forAll(compactCells, i) { - stencilFld[faceI][i] = flatFld[compactCells[i]]; + stencilFld[facei][i] = flatFld[compactCells[i]]; } } } @@ -121,14 +121,14 @@ Foam::extendedCellToFaceStencil::weightedSum GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsfCorr.ref(); // Internal faces - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - const List<Type>& stField = stencilFld[faceI]; - const List<scalar>& stWeight = stencilWeights[faceI]; + const List<Type>& stField = stencilFld[facei]; + const List<scalar>& stWeight = stencilWeights[facei]; forAll(stField, i) { - sf[faceI] += stField[i]*stWeight[i]; + sf[facei] += stField[i]*stWeight[i]; } } @@ -143,19 +143,19 @@ Foam::extendedCellToFaceStencil::weightedSum if (pSfCorr.coupled()) { - label faceI = pSfCorr.patch().start(); + label facei = pSfCorr.patch().start(); forAll(pSfCorr, i) { - const List<Type>& stField = stencilFld[faceI]; - const List<scalar>& stWeight = stencilWeights[faceI]; + const List<Type>& stField = stencilFld[facei]; + const List<scalar>& stWeight = stencilWeights[facei]; forAll(stField, j) { pSfCorr[i] += stField[j]*stWeight[j]; } - faceI++; + facei++; } } } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C index 5fe891d07884df4238f033aef82a0af0e3682626..9aab365f8ddccf284fabe6f7f815c5da663eb886 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCentredCellToFaceStencil.C @@ -59,9 +59,9 @@ void Foam::extendedCentredCellToFaceStencil::compact() boolList isInStencil(map().constructSize(), false); - forAll(stencil_, faceI) + forAll(stencil_, facei) { - const labelList& stencilCells = stencil_[faceI]; + const labelList& stencilCells = stencil_[facei]; forAll(stencilCells, i) { diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C index 61e0de79f37d8445b666f4d63a531730b541a0d9..e3368ebe0bf257924aa8160b657723e4c8cd3c51 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.C @@ -35,14 +35,14 @@ void Foam::extendedUpwindCellToFaceStencil::selectOppositeFaces ( const boolList& nonEmptyFace, const scalar minOpposedness, - const label faceI, - const label cellI, + const label facei, + const label celli, DynamicList<label>& oppositeFaces ) const { const vectorField& areas = mesh_.faceAreas(); const labelList& own = mesh_.faceOwner(); - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; SortableList<scalar> opposedness(cFaces.size(), -GREAT); @@ -51,15 +51,15 @@ void Foam::extendedUpwindCellToFaceStencil::selectOppositeFaces { 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]); } } } @@ -68,7 +68,7 @@ void Foam::extendedUpwindCellToFaceStencil::selectOppositeFaces oppositeFaces.clear(); - scalar myAreaSqr = magSqr(areas[faceI]); + scalar myAreaSqr = magSqr(areas[facei]); if (myAreaSqr > VSMALL) { @@ -108,8 +108,8 @@ void Foam::extendedUpwindCellToFaceStencil::transportStencil const boolList& nonEmptyFace, const labelListList& faceStencil, const scalar minOpposedness, - const label faceI, - const label cellI, + const label facei, + const label celli, const bool stencilHasNeighbour, DynamicList<label>& oppositeFaces, @@ -117,11 +117,11 @@ void Foam::extendedUpwindCellToFaceStencil::transportStencil labelList& transportedStencil ) const { - label globalOwn = faceStencil[faceI][0]; + label globalOwn = faceStencil[facei][0]; label globalNei = -1; - if (stencilHasNeighbour && faceStencil[faceI].size() >= 2) + if (stencilHasNeighbour && faceStencil[facei].size() >= 2) { - globalNei = faceStencil[faceI][1]; + globalNei = faceStencil[facei][1]; } @@ -129,8 +129,8 @@ void Foam::extendedUpwindCellToFaceStencil::transportStencil ( nonEmptyFace, minOpposedness, - faceI, - cellI, + facei, + celli, oppositeFaces ); @@ -216,16 +216,16 @@ void Foam::extendedUpwindCellToFaceStencil::transportStencils // For quick detection of empty faces boolList nonEmptyFace(mesh_.nFaces(), true); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (isA<emptyPolyPatch>(pp)) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - nonEmptyFace[faceI++] = false; + nonEmptyFace[facei++] = false; } } } @@ -238,7 +238,7 @@ void Foam::extendedUpwindCellToFaceStencil::transportStencils ownStencil.setSize(mesh_.nFaces()); // Internal faces - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { // Get stencil as owner + neighbour + stencil from 'opposite' faces transportStencil @@ -246,19 +246,19 @@ void Foam::extendedUpwindCellToFaceStencil::transportStencils nonEmptyFace, faceStencil, minOpposedness, - faceI, - own[faceI], + facei, + own[facei], true, //stencilHasNeighbour oppositeFaces, faceStencilSet, - ownStencil[faceI] + ownStencil[facei] ); } // Boundary faces - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; - label faceI = pp.start(); + const polyPatch& pp = patches[patchi]; + label facei = pp.start(); if (pp.coupled()) { @@ -269,15 +269,15 @@ void Foam::extendedUpwindCellToFaceStencil::transportStencils nonEmptyFace, faceStencil, minOpposedness, - faceI, - own[faceI], + facei, + own[facei], true, //stencilHasNeighbour oppositeFaces, faceStencilSet, - ownStencil[faceI] + ownStencil[facei] ); - faceI++; + facei++; } } else if (!isA<emptyPolyPatch>(pp)) @@ -290,15 +290,15 @@ void Foam::extendedUpwindCellToFaceStencil::transportStencils nonEmptyFace, faceStencil, minOpposedness, - faceI, - own[faceI], + facei, + own[facei], false, //stencilHasNeighbour oppositeFaces, faceStencilSet, - ownStencil[faceI] + ownStencil[facei] ); - faceI++; + facei++; } } } @@ -308,9 +308,9 @@ void Foam::extendedUpwindCellToFaceStencil::transportStencils // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ labelListList neiBndStencil(nBnd); - for (label faceI = mesh_.nInternalFaces(); faceI < mesh_.nFaces(); faceI++) + for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++) { - neiBndStencil[faceI-mesh_.nInternalFaces()] = ownStencil[faceI]; + neiBndStencil[facei-mesh_.nInternalFaces()] = ownStencil[facei]; } //syncTools::swapBoundaryFaceList(mesh_, neiBndStencil); syncTools::syncBoundaryFaceList @@ -332,38 +332,38 @@ void Foam::extendedUpwindCellToFaceStencil::transportStencils neiStencil.setSize(mesh_.nFaces()); // Internal faces - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { transportStencil ( nonEmptyFace, faceStencil, minOpposedness, - faceI, - nei[faceI], + facei, + nei[facei], true, //stencilHasNeighbour oppositeFaces, faceStencilSet, - neiStencil[faceI] + neiStencil[facei] ); } // Boundary faces - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; - label faceI = pp.start(); + const polyPatch& pp = patches[patchi]; + label facei = pp.start(); if (pp.coupled()) { forAll(pp, i) { - neiStencil[faceI].transfer + neiStencil[facei].transfer ( - neiBndStencil[faceI-mesh_.nInternalFaces()] + neiBndStencil[facei-mesh_.nInternalFaces()] ); - faceI++; + facei++; } } else @@ -386,11 +386,11 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil extendedCellToFaceStencil(stencil.mesh()), pureUpwind_(pureUpwind) { - //forAll(stencil, faceI) + //forAll(stencil, facei) //{ - // const labelList& fCells = stencil[faceI]; + // const labelList& fCells = stencil[facei]; // - // Pout<< "Face:" << faceI << " at:" << mesh_.faceCentres()[faceI] + // Pout<< "Face:" << facei << " at:" << mesh_.faceCentres()[facei] // << endl; // // forAll(fCells, i) @@ -404,10 +404,10 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil // } // else // { - // label faceI = globalI-mesh_.nCells() + mesh_.nInternalFaces(); + // label facei = globalI-mesh_.nCells() + mesh_.nInternalFaces(); // - // Pout<< " boundary:" << faceI - // << " at:" << mesh_.faceCentres()[faceI] << endl; + // Pout<< " boundary:" << facei + // << " at:" << mesh_.faceCentres()[facei] << endl; // } // } //} @@ -463,13 +463,13 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil collectData(ownMapPtr_(), ownStencil_, mesh.C(), stencilPoints); // Mask off all stencil points on wrong side of face - forAll(stencilPoints, faceI) + forAll(stencilPoints, facei) { - const point& fc = mesh.faceCentres()[faceI]; - const vector& fArea = mesh.faceAreas()[faceI]; + const point& fc = mesh.faceCentres()[facei]; + const vector& fArea = mesh.faceAreas()[facei]; - const List<point>& points = stencilPoints[faceI]; - const labelList& stencil = ownStencil_[faceI]; + const List<point>& points = stencilPoints[facei]; + const labelList& stencil = ownStencil_[facei]; DynamicList<label> newStencil(stencil.size()); forAll(points, i) @@ -481,7 +481,7 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil } if (newStencil.size() != stencil.size()) { - ownStencil_[faceI].transfer(newStencil); + ownStencil_[facei].transfer(newStencil); } } @@ -492,13 +492,13 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil collectData(neiMapPtr_(), neiStencil_, mesh.C(), stencilPoints); // Mask off all stencil points on wrong side of face - forAll(stencilPoints, faceI) + forAll(stencilPoints, facei) { - const point& fc = mesh.faceCentres()[faceI]; - const vector& fArea = mesh.faceAreas()[faceI]; + const point& fc = mesh.faceCentres()[facei]; + const vector& fArea = mesh.faceAreas()[facei]; - const List<point>& points = stencilPoints[faceI]; - const labelList& stencil = neiStencil_[faceI]; + const List<point>& points = stencilPoints[facei]; + const labelList& stencil = neiStencil_[facei]; DynamicList<label> newStencil(stencil.size()); forAll(points, i) @@ -510,7 +510,7 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil } if (newStencil.size() != stencil.size()) { - neiStencil_[faceI].transfer(newStencil); + neiStencil_[facei].transfer(newStencil); } } @@ -553,13 +553,13 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil // Split stencil into owner and neighbour neiStencil_.setSize(ownStencil_.size()); - forAll(stencilPoints, faceI) + forAll(stencilPoints, facei) { - const point& fc = mesh.faceCentres()[faceI]; - const vector& fArea = mesh.faceAreas()[faceI]; + const point& fc = mesh.faceCentres()[facei]; + const vector& fArea = mesh.faceAreas()[facei]; - const List<point>& points = stencilPoints[faceI]; - const labelList& stencil = ownStencil_[faceI]; + const List<point>& points = stencilPoints[facei]; + const labelList& stencil = ownStencil_[facei]; DynamicList<label> newOwnStencil(stencil.size()); DynamicList<label> newNeiStencil(stencil.size()); @@ -576,8 +576,8 @@ Foam::extendedUpwindCellToFaceStencil::extendedUpwindCellToFaceStencil } if (newNeiStencil.size() > 0) { - ownStencil_[faceI].transfer(newOwnStencil); - neiStencil_[faceI].transfer(newNeiStencil); + ownStencil_[facei].transfer(newOwnStencil); + neiStencil_[facei].transfer(newNeiStencil); } } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.H b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.H index e7aa86a8ba36f29bfa3fd711c9699b7e702e80d6..1ce6ca120975b6a1acaabdf97062945072efdc7d 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.H +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencil.H @@ -83,8 +83,8 @@ class extendedUpwindCellToFaceStencil ( const boolList& nonEmptyFace, const scalar minOpposedness, - const label faceI, - const label cellI, + const label facei, + const label celli, DynamicList<label>& oppositeFaces ) const; @@ -94,8 +94,8 @@ class extendedUpwindCellToFaceStencil const boolList& nonEmptyFace, const labelListList& faceStencil, const scalar minOpposedness, - const label faceI, - const label cellI, + const label facei, + const label celli, const bool stencilHasNeighbour, DynamicList<label>& oppositeFaces, diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C index 460b482b077adb6ccdb8bd70275bb62e17c5ff4f..28fc3f0282cfae270d7ba92db9285c80c06fed9c 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C @@ -70,27 +70,27 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum GeometricField<Type, fvsPatchField, surfaceMesh>& sf = tsfCorr.ref(); // Internal faces - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - if (phi[faceI] > 0) + if (phi[facei] > 0) { // Flux out of owner. Use upwind (= owner side) stencil. - const List<Type>& stField = ownFld[faceI]; - const List<scalar>& stWeight = ownWeights[faceI]; + const List<Type>& stField = ownFld[facei]; + const List<scalar>& stWeight = ownWeights[facei]; forAll(stField, i) { - sf[faceI] += stField[i]*stWeight[i]; + sf[facei] += stField[i]*stWeight[i]; } } else { - const List<Type>& stField = neiFld[faceI]; - const List<scalar>& stWeight = neiWeights[faceI]; + const List<Type>& stField = neiFld[facei]; + const List<scalar>& stWeight = neiWeights[facei]; forAll(stField, i) { - sf[faceI] += stField[i]*stWeight[i]; + sf[facei] += stField[i]*stWeight[i]; } } } @@ -106,15 +106,15 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum if (pSfCorr.coupled()) { - label faceI = pSfCorr.patch().start(); + label facei = pSfCorr.patch().start(); forAll(pSfCorr, i) { if (phi.boundaryField()[patchi][i] > 0) { // Flux out of owner. Use upwind (= owner side) stencil. - const List<Type>& stField = ownFld[faceI]; - const List<scalar>& stWeight = ownWeights[faceI]; + const List<Type>& stField = ownFld[facei]; + const List<scalar>& stWeight = ownWeights[facei]; forAll(stField, j) { @@ -123,15 +123,15 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum } else { - const List<Type>& stField = neiFld[faceI]; - const List<scalar>& stWeight = neiWeights[faceI]; + const List<Type>& stField = neiFld[facei]; + const List<scalar>& stWeight = neiWeights[facei]; forAll(stField, j) { pSfCorr[i] += stField[j]*stWeight[j]; } } - faceI++; + facei++; } } } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C index 29f929c01f3e06761b3cf4a66db6e1110c27ff2f..f4e6eb88c93c86cac5274ea07665e24d38191171 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/FECCellToFaceStencil.C @@ -77,19 +77,19 @@ void Foam::FECCellToFaceStencil::calcFaceStencil // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ labelList neiGlobalCell(nBnd); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - neiGlobalCell[faceI-mesh().nInternalFaces()] = - globalNumbering().toGlobal(own[faceI]); - faceI++; + neiGlobalCell[facei-mesh().nInternalFaces()] = + globalNumbering().toGlobal(own[facei]); + facei++; } } } @@ -145,10 +145,10 @@ void Foam::FECCellToFaceStencil::calcFaceStencil forAll(eFaces, j) { - label faceI = eFaces[j]; + label facei = eFaces[j]; // Insert eGlobals into faceStencil. - merge(-1, -1, eGlobals, faceStencil[faceI]); + merge(-1, -1, eGlobals, faceStencil[facei]); } } neiGlobal.clear(); @@ -161,10 +161,10 @@ void Foam::FECCellToFaceStencil::calcFaceStencil DynamicList<label> eFacesSet; labelHashSet faceStencilSet; - for (label faceI = 0; faceI < mesh().nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh().nInternalFaces(); facei++) { - label globalOwn = globalNumbering().toGlobal(own[faceI]); - label globalNei = globalNumbering().toGlobal(nei[faceI]); + label globalOwn = globalNumbering().toGlobal(own[facei]); + label globalNei = globalNumbering().toGlobal(nei[facei]); // Convert any existing faceStencil (from coupled edges) into // set and operate on this. @@ -172,18 +172,18 @@ void Foam::FECCellToFaceStencil::calcFaceStencil faceStencilSet.clear(); // Insert all but global owner and neighbour - forAll(faceStencil[faceI], i) + forAll(faceStencil[facei], i) { - label globalI = faceStencil[faceI][i]; + label globalI = faceStencil[facei][i]; if (globalI != globalOwn && globalI != globalNei) { faceStencilSet.insert(globalI); } } - faceStencil[faceI].clear(); + faceStencil[facei].clear(); // Collect all edge connected (internal) cells - const labelList& fEdges = mesh().faceEdges(faceI, fEdgesSet); + const labelList& fEdges = mesh().faceEdges(facei, fEdgesSet); forAll(fEdges, i) { @@ -200,10 +200,10 @@ void Foam::FECCellToFaceStencil::calcFaceStencil } // Extract, guarantee owner first, neighbour second. - faceStencil[faceI].setSize(faceStencilSet.size()+2); + faceStencil[facei].setSize(faceStencilSet.size()+2); label n = 0; - faceStencil[faceI][n++] = globalOwn; - faceStencil[faceI][n++] = globalNei; + faceStencil[facei][n++] = globalOwn; + faceStencil[facei][n++] = globalNei; forAllConstIter(labelHashSet, faceStencilSet, iter) { if (iter.key() == globalOwn || iter.key() == globalNei) @@ -212,20 +212,20 @@ void Foam::FECCellToFaceStencil::calcFaceStencil << "problem:" << faceStencilSet << abort(FatalError); } - faceStencil[faceI][n++] = iter.key(); + faceStencil[facei][n++] = iter.key(); } } - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; - label faceI = pp.start(); + const polyPatch& pp = patches[patchi]; + label facei = pp.start(); if (pp.coupled()) { forAll(pp, i) { - label globalOwn = globalNumbering().toGlobal(own[faceI]); - label globalNei = neiGlobalCell[faceI-mesh().nInternalFaces()]; + label globalOwn = globalNumbering().toGlobal(own[facei]); + label globalNei = neiGlobalCell[facei-mesh().nInternalFaces()]; // Convert any existing faceStencil (from coupled edges) into // set and operate on this. @@ -233,18 +233,18 @@ void Foam::FECCellToFaceStencil::calcFaceStencil faceStencilSet.clear(); // Insert all but global owner and neighbour - forAll(faceStencil[faceI], i) + forAll(faceStencil[facei], i) { - label globalI = faceStencil[faceI][i]; + label globalI = faceStencil[facei][i]; if (globalI != globalOwn && globalI != globalNei) { faceStencilSet.insert(globalI); } } - faceStencil[faceI].clear(); + faceStencil[facei].clear(); // Collect all edge connected (internal) cells - const labelList& fEdges = mesh().faceEdges(faceI, fEdgesSet); + const labelList& fEdges = mesh().faceEdges(facei, fEdgesSet); forAll(fEdges, i) { @@ -261,10 +261,10 @@ void Foam::FECCellToFaceStencil::calcFaceStencil } // Extract, guarantee owner first, neighbour second. - faceStencil[faceI].setSize(faceStencilSet.size()+2); + faceStencil[facei].setSize(faceStencilSet.size()+2); label n = 0; - faceStencil[faceI][n++] = globalOwn; - faceStencil[faceI][n++] = globalNei; + faceStencil[facei][n++] = globalOwn; + faceStencil[facei][n++] = globalNei; forAllConstIter(labelHashSet, faceStencilSet, iter) { if (iter.key() == globalOwn || iter.key() == globalNei) @@ -273,24 +273,24 @@ void Foam::FECCellToFaceStencil::calcFaceStencil << "problem:" << faceStencilSet << abort(FatalError); } - faceStencil[faceI][n++] = iter.key(); + faceStencil[facei][n++] = iter.key(); } - if (n != faceStencil[faceI].size()) + if (n != faceStencil[facei].size()) { FatalErrorInFunction - << " size:" << faceStencil[faceI].size() + << " size:" << faceStencil[facei].size() << abort(FatalError); } - faceI++; + facei++; } } else if (!isA<emptyPolyPatch>(pp)) { forAll(pp, i) { - label globalOwn = globalNumbering().toGlobal(own[faceI]); + label globalOwn = globalNumbering().toGlobal(own[facei]); // Convert any existing faceStencil (from coupled edges) into // set and operate on this. @@ -298,18 +298,18 @@ void Foam::FECCellToFaceStencil::calcFaceStencil faceStencilSet.clear(); // Insert all but global owner and neighbour - forAll(faceStencil[faceI], i) + forAll(faceStencil[facei], i) { - label globalI = faceStencil[faceI][i]; + label globalI = faceStencil[facei][i]; if (globalI != globalOwn) { faceStencilSet.insert(globalI); } } - faceStencil[faceI].clear(); + faceStencil[facei].clear(); // Collect all edge connected (internal) cells - const labelList& fEdges = mesh().faceEdges(faceI, fEdgesSet); + const labelList& fEdges = mesh().faceEdges(facei, fEdgesSet); forAll(fEdges, i) { @@ -326,9 +326,9 @@ void Foam::FECCellToFaceStencil::calcFaceStencil } // Extract, guarantee owner first, neighbour second. - faceStencil[faceI].setSize(faceStencilSet.size()+1); + faceStencil[facei].setSize(faceStencilSet.size()+1); label n = 0; - faceStencil[faceI][n++] = globalOwn; + faceStencil[facei][n++] = globalOwn; forAllConstIter(labelHashSet, faceStencilSet, iter) { if (iter.key() == globalOwn) @@ -337,59 +337,59 @@ void Foam::FECCellToFaceStencil::calcFaceStencil << "problem:" << faceStencilSet << abort(FatalError); } - faceStencil[faceI][n++] = iter.key(); + faceStencil[facei][n++] = iter.key(); } - faceI++; + facei++; } } } - for (label faceI = 0; faceI < mesh().nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh().nInternalFaces(); facei++) { - label globalOwn = globalNumbering().toGlobal(own[faceI]); - if (faceStencil[faceI][0] != globalOwn) + label globalOwn = globalNumbering().toGlobal(own[facei]); + if (faceStencil[facei][0] != globalOwn) { FatalErrorInFunction - << "problem:" << faceStencil[faceI] + << "problem:" << faceStencil[facei] << " globalOwn:" << globalOwn << abort(FatalError); } - label globalNei = globalNumbering().toGlobal(nei[faceI]); - if (faceStencil[faceI][1] != globalNei) + label globalNei = globalNumbering().toGlobal(nei[facei]); + if (faceStencil[facei][1] != globalNei) { FatalErrorInFunction - << "problem:" << faceStencil[faceI] + << "problem:" << faceStencil[facei] << " globalNei:" << globalNei << abort(FatalError); } } - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start()+i; + label facei = pp.start()+i; - label globalOwn = globalNumbering().toGlobal(own[faceI]); - if (faceStencil[faceI][0] != globalOwn) + label globalOwn = globalNumbering().toGlobal(own[facei]); + if (faceStencil[facei][0] != globalOwn) { FatalErrorInFunction - << "problem:" << faceStencil[faceI] + << "problem:" << faceStencil[facei] << " globalOwn:" << globalOwn << abort(FatalError); } - label globalNei = neiGlobalCell[faceI-mesh().nInternalFaces()]; - if (faceStencil[faceI][1] != globalNei) + label globalNei = neiGlobalCell[facei-mesh().nInternalFaces()]; + if (faceStencil[facei][1] != globalNei) { FatalErrorInFunction - << "problem:" << faceStencil[faceI] + << "problem:" << faceStencil[facei] << " globalNei:" << globalNei << abort(FatalError); } @@ -399,13 +399,13 @@ void Foam::FECCellToFaceStencil::calcFaceStencil { forAll(pp, i) { - label faceI = pp.start()+i; + label facei = pp.start()+i; - label globalOwn = globalNumbering().toGlobal(own[faceI]); - if (faceStencil[faceI][0] != globalOwn) + label globalOwn = globalNumbering().toGlobal(own[facei]); + if (faceStencil[facei][0] != globalOwn) { FatalErrorInFunction - << "problem:" << faceStencil[faceI] + << "problem:" << faceStencil[facei] << " globalOwn:" << globalOwn << abort(FatalError); } diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C index c9ac094164b228a24d728edbd21a760af185249d..10fb6fc04516dd75db218eb5948c5c5354739bc3 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/globalIndexStencils/cellToFaceStencil.C @@ -172,9 +172,9 @@ void Foam::cellToFaceStencil::validBoundaryFaces(boolList& isValidBFace) const isValidBFace.setSize(mesh().nFaces()-mesh().nInternalFaces(), true); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled() || isA<emptyPolyPatch>(pp)) { @@ -195,9 +195,9 @@ Foam::cellToFaceStencil::allCoupledFacesPatch() const label nCoupled = 0; - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { @@ -207,17 +207,17 @@ Foam::cellToFaceStencil::allCoupledFacesPatch() const labelList coupledFaces(nCoupled); nCoupled = 0; - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - coupledFaces[nCoupled++] = faceI++; + coupledFaces[nCoupled++] = facei++; } } } @@ -276,17 +276,17 @@ void Foam::cellToFaceStencil::insertFaceCells forAll(faceLabels, i) { - label faceI = faceLabels[i]; + label facei = faceLabels[i]; - label globalOwn = globalNumbering().toGlobal(own[faceI]); + label globalOwn = globalNumbering().toGlobal(own[facei]); if (globalOwn != exclude0 && globalOwn != exclude1) { globals.insert(globalOwn); } - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { - label globalNei = globalNumbering().toGlobal(nei[faceI]); + label globalNei = globalNumbering().toGlobal(nei[facei]); if (globalNei != exclude0 && globalNei != exclude1) { globals.insert(globalNei); @@ -294,7 +294,7 @@ void Foam::cellToFaceStencil::insertFaceCells } else { - label bFaceI = faceI-mesh().nInternalFaces(); + label bFaceI = facei-mesh().nInternalFaces(); if (isValidBFace[bFaceI]) { @@ -354,19 +354,19 @@ void Foam::cellToFaceStencil::calcFaceStencil // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ labelListList neiGlobalCellCells(nBnd); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - neiGlobalCellCells[faceI-mesh_.nInternalFaces()] = - globalCellCells[own[faceI]]; - faceI++; + neiGlobalCellCells[facei-mesh_.nInternalFaces()] = + globalCellCells[own[facei]]; + facei++; } } } @@ -388,11 +388,11 @@ void Foam::cellToFaceStencil::calcFaceStencil labelHashSet faceStencilSet; - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { faceStencilSet.clear(); - const labelList& ownCCells = globalCellCells[own[faceI]]; + const labelList& ownCCells = globalCellCells[own[facei]]; label globalOwn = ownCCells[0]; // Insert cellCells forAll(ownCCells, i) @@ -400,7 +400,7 @@ void Foam::cellToFaceStencil::calcFaceStencil faceStencilSet.insert(ownCCells[i]); } - const labelList& neiCCells = globalCellCells[nei[faceI]]; + const labelList& neiCCells = globalCellCells[nei[facei]]; label globalNei = neiCCells[0]; // Insert cellCells forAll(neiCCells, i) @@ -409,24 +409,24 @@ void Foam::cellToFaceStencil::calcFaceStencil } // Guarantee owner first, neighbour second. - faceStencil[faceI].setSize(faceStencilSet.size()); + faceStencil[facei].setSize(faceStencilSet.size()); label n = 0; - faceStencil[faceI][n++] = globalOwn; - faceStencil[faceI][n++] = globalNei; + faceStencil[facei][n++] = globalOwn; + faceStencil[facei][n++] = globalNei; forAllConstIter(labelHashSet, faceStencilSet, iter) { if (iter.key() != globalOwn && iter.key() != globalNei) { - faceStencil[faceI][n++] = iter.key(); + faceStencil[facei][n++] = iter.key(); } } - //Pout<< "internalface:" << faceI << " toc:" << faceStencilSet.toc() - // << " faceStencil:" << faceStencil[faceI] << endl; + //Pout<< "internalface:" << facei << " toc:" << faceStencilSet.toc() + // << " faceStencil:" << faceStencil[facei] << endl; } - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; - label faceI = pp.start(); + const polyPatch& pp = patches[patchi]; + label facei = pp.start(); if (pp.coupled()) { @@ -434,7 +434,7 @@ void Foam::cellToFaceStencil::calcFaceStencil { faceStencilSet.clear(); - const labelList& ownCCells = globalCellCells[own[faceI]]; + const labelList& ownCCells = globalCellCells[own[facei]]; label globalOwn = ownCCells[0]; forAll(ownCCells, i) { @@ -443,7 +443,7 @@ void Foam::cellToFaceStencil::calcFaceStencil // And the neighbours of the coupled cell const labelList& neiCCells = - neiGlobalCellCells[faceI-mesh_.nInternalFaces()]; + neiGlobalCellCells[facei-mesh_.nInternalFaces()]; label globalNei = neiCCells[0]; forAll(neiCCells, i) { @@ -451,23 +451,23 @@ void Foam::cellToFaceStencil::calcFaceStencil } // Guarantee owner first, neighbour second. - faceStencil[faceI].setSize(faceStencilSet.size()); + faceStencil[facei].setSize(faceStencilSet.size()); label n = 0; - faceStencil[faceI][n++] = globalOwn; - faceStencil[faceI][n++] = globalNei; + faceStencil[facei][n++] = globalOwn; + faceStencil[facei][n++] = globalNei; forAllConstIter(labelHashSet, faceStencilSet, iter) { if (iter.key() != globalOwn && iter.key() != globalNei) { - faceStencil[faceI][n++] = iter.key(); + faceStencil[facei][n++] = iter.key(); } } - //Pout<< "coupledface:" << faceI + //Pout<< "coupledface:" << facei // << " toc:" << faceStencilSet.toc() - // << " faceStencil:" << faceStencil[faceI] << endl; + // << " faceStencil:" << faceStencil[facei] << endl; - faceI++; + facei++; } } else if (!isA<emptyPolyPatch>(pp)) @@ -476,7 +476,7 @@ void Foam::cellToFaceStencil::calcFaceStencil { faceStencilSet.clear(); - const labelList& ownCCells = globalCellCells[own[faceI]]; + const labelList& ownCCells = globalCellCells[own[facei]]; label globalOwn = ownCCells[0]; forAll(ownCCells, i) { @@ -484,22 +484,22 @@ void Foam::cellToFaceStencil::calcFaceStencil } // Guarantee owner first - faceStencil[faceI].setSize(faceStencilSet.size()); + faceStencil[facei].setSize(faceStencilSet.size()); label n = 0; - faceStencil[faceI][n++] = globalOwn; + faceStencil[facei][n++] = globalOwn; forAllConstIter(labelHashSet, faceStencilSet, iter) { if (iter.key() != globalOwn) { - faceStencil[faceI][n++] = iter.key(); + faceStencil[facei][n++] = iter.key(); } } - //Pout<< "boundaryface:" << faceI + //Pout<< "boundaryface:" << facei // << " toc:" << faceStencilSet.toc() - // << " faceStencil:" << faceStencil[faceI] << endl; + // << " faceStencil:" << faceStencil[facei] << endl; - faceI++; + facei++; } } } diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C index a2d40b587195a3e1d90560604af8c6520d7a1ca4..af8dd7f9bec9b90d8e2dfe0073fa9f202ebbd8ad 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedCentredFaceToCellStencil.C @@ -57,9 +57,9 @@ void Foam::extendedCentredFaceToCellStencil::compact() { boolList isInStencil(map().constructSize(), false); - forAll(stencil_, faceI) + forAll(stencil_, facei) { - const labelList& stencilCells = stencil_[faceI]; + const labelList& stencilCells = stencil_[facei]; forAll(stencilCells, i) { diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.C index ea4899d57d9d46e539e4d1efafad6e8e4abe0cba..d98dd42aedefab33417af30437102561ced025dd 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencil.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 @@ -36,12 +36,12 @@ Foam::extendedFaceToCellStencil::extendedFaceToCellStencil(const polyMesh& mesh) // Check for transformation - not supported. const polyBoundaryMesh& patches = mesh.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { const coupledPolyPatch& cpp = - refCast<const coupledPolyPatch>(patches[patchI]); + refCast<const coupledPolyPatch>(patches[patchi]); if (!cpp.parallel() || cpp.separated()) { diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C index 0535e0548d016099bbea8924638e2d0db17741fc..f2d9edea8abca3f401c0ceb9ca7d3e1424746f9e 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/extendedFaceToCellStencilTemplates.C @@ -40,14 +40,14 @@ void Foam::extendedFaceToCellStencil::collectData List<Type> flatFld(map.constructSize(), Zero); // Insert my internal values - forAll(fld, cellI) + forAll(fld, celli) { - flatFld[cellI] = fld[cellI]; + flatFld[celli] = fld[celli]; } // Insert my boundary values - forAll(fld.boundaryField(), patchI) + forAll(fld.boundaryField(), patchi) { - const fvsPatchField<Type>& pfld = fld.boundaryField()[patchI]; + const fvsPatchField<Type>& pfld = fld.boundaryField()[patchi]; label nCompact = pfld.patch().start(); @@ -63,15 +63,15 @@ void Foam::extendedFaceToCellStencil::collectData // 2. Pull to stencil stencilFld.setSize(stencil.size()); - forAll(stencil, faceI) + forAll(stencil, facei) { - const labelList& compactCells = stencil[faceI]; + const labelList& compactCells = stencil[facei]; - stencilFld[faceI].setSize(compactCells.size()); + stencilFld[facei].setSize(compactCells.size()); forAll(compactCells, i) { - stencilFld[faceI][i] = flatFld[compactCells[i]]; + stencilFld[facei][i] = flatFld[compactCells[i]]; } } } @@ -115,14 +115,14 @@ Foam::extendedFaceToCellStencil::weightedSum GeometricField<Type, fvPatchField, volMesh>& sf = tsfCorr.ref(); // cells - forAll(sf, cellI) + forAll(sf, celli) { - const List<Type>& stField = stencilFld[cellI]; - const List<scalar>& stWeight = stencilWeights[cellI]; + const List<Type>& stField = stencilFld[celli]; + const List<scalar>& stWeight = stencilWeights[celli]; forAll(stField, i) { - sf[cellI] += stField[i]*stWeight[i]; + sf[celli] += stField[i]*stWeight[i]; } } diff --git a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C index 8a60abd4375c20201b8ba97b4311eb9cf2e779a7..bc9ef3c429d18f91ce7565aa5fcc3b17edc8aff7 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C +++ b/src/finiteVolume/fvMesh/extendedStencil/faceToCell/globalIndexStencils/CFCFaceToCellStencil.C @@ -41,25 +41,25 @@ void Foam::CFCFaceToCellStencil::calcFaceBoundaryData neiGlobal.setSize(nBnd); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; - label faceI = pp.start(); + const polyPatch& pp = patches[patchi]; + label facei = pp.start(); if (pp.coupled()) { // For coupled faces get the faces of the cell on the other side forAll(pp, i) { - const labelList& cFaces = mesh().cells()[own[faceI]]; + const labelList& cFaces = mesh().cells()[own[facei]]; - labelList& globFaces = neiGlobal[faceI-mesh().nInternalFaces()]; + labelList& globFaces = neiGlobal[facei-mesh().nInternalFaces()]; globFaces.setSize(cFaces.size()-1); label globI = 0; forAll(cFaces, j) { - if (cFaces[j] != faceI) + if (cFaces[j] != facei) { globFaces[globI++] = globalNumbering().toGlobal ( @@ -67,7 +67,7 @@ void Foam::CFCFaceToCellStencil::calcFaceBoundaryData ); } } - faceI++; + facei++; } } else if (isA<emptyPolyPatch>(pp)) @@ -112,9 +112,9 @@ void Foam::CFCFaceToCellStencil::calcCellStencil boolList validBFace(mesh().nFaces()-mesh().nInternalFaces(), true); const polyBoundaryMesh& patches = mesh().boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (isA<emptyPolyPatch>(pp)) { @@ -133,38 +133,38 @@ void Foam::CFCFaceToCellStencil::calcCellStencil DynamicList<label> allGlobalFaces(100); globalCellFaces.setSize(mesh().nCells()); - forAll(globalCellFaces, cellI) + forAll(globalCellFaces, celli) { - const cell& cFaces = mesh().cells()[cellI]; + const cell& cFaces = mesh().cells()[celli]; allGlobalFaces.clear(); // My faces first forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; if ( - mesh().isInternalFace(faceI) - || validBFace[faceI-mesh().nInternalFaces()] + mesh().isInternalFace(facei) + || validBFace[facei-mesh().nInternalFaces()] ) { - allGlobalFaces.append(globalNumbering().toGlobal(faceI)); + allGlobalFaces.append(globalNumbering().toGlobal(facei)); } } // faces of neighbouring cells second forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (mesh().isInternalFace(faceI)) + 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]; @@ -191,7 +191,7 @@ void Foam::CFCFaceToCellStencil::calcCellStencil else { const labelList& nbrGlobalFaces = - neiGlobal[faceI-mesh().nInternalFaces()]; + neiGlobal[facei-mesh().nInternalFaces()]; forAll(nbrGlobalFaces, j) { @@ -206,16 +206,16 @@ void Foam::CFCFaceToCellStencil::calcCellStencil } } - globalCellFaces[cellI] = allGlobalFaces; - //Pout<< "** cell:" << cellI - // << " at:" << mesh().cellCentres()[cellI] + globalCellFaces[celli] = allGlobalFaces; + //Pout<< "** cell:" << celli + // << " at:" << mesh().cellCentres()[celli] // << endl; - //const labelList& globalFaces = globalCellFaces[cellI]; + //const labelList& globalFaces = globalCellFaces[celli]; //forAll(globalFaces, i) //{ - // label faceI = globalNumbering().toLocal(globalFaces[i]); - // Pout<< " face:" << faceI - // << " at:" << mesh().faceCentres()[faceI] + // label facei = globalNumbering().toLocal(globalFaces[i]); + // Pout<< " face:" << facei + // << " at:" << mesh().faceCentres()[facei] // << endl; //} } diff --git a/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.C b/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.C index 0d7f7ebabbdcabf72454c7c38f82c57f082e617d..27d76e2df029b997338368932cdb12afb862df26 100644 --- a/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.C +++ b/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.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 @@ -36,9 +36,9 @@ void Foam::fvBoundaryMesh::addPatches(const polyBoundaryMesh& basicBdry) // Set boundary patches fvPatchList& Patches = *this; - forAll(Patches, patchI) + forAll(Patches, patchi) { - Patches.set(patchI, fvPatch::New(basicBdry[patchI], *this)); + Patches.set(patchi, fvPatch::New(basicBdry[patchi], *this)); } } @@ -74,11 +74,11 @@ Foam::label Foam::fvBoundaryMesh::findPatchID(const word& patchName) const { const fvPatchList& patches = *this; - forAll(patches, patchI) + forAll(patches, patchi) { - if (patches[patchI].name() == patchName) + if (patches[patchi].name() == patchName) { - return patchI; + return patchi; } } @@ -99,14 +99,14 @@ Foam::labelList Foam::fvBoundaryMesh::findIndices void Foam::fvBoundaryMesh::movePoints() { - forAll(*this, patchI) + forAll(*this, patchi) { - operator[](patchI).initMovePoints(); + operator[](patchi).initMovePoints(); } - forAll(*this, patchI) + forAll(*this, patchi) { - operator[](patchI).movePoints(); + operator[](patchi).movePoints(); } } @@ -115,14 +115,14 @@ Foam::lduInterfacePtrsList Foam::fvBoundaryMesh::interfaces() const { lduInterfacePtrsList interfaces(size()); - forAll(interfaces, patchI) + forAll(interfaces, patchi) { - if (isA<lduInterface>(this->operator[](patchI))) + if (isA<lduInterface>(this->operator[](patchi))) { interfaces.set ( - patchI, - &refCast<const lduInterface>(this->operator[](patchI)) + patchi, + &refCast<const lduInterface>(this->operator[](patchi)) ); } } @@ -145,16 +145,16 @@ const Foam::fvPatch& Foam::fvBoundaryMesh::operator[] const word& patchName ) const { - const label patchI = findPatchID(patchName); + const label patchi = findPatchID(patchName); - if (patchI < 0) + if (patchi < 0) { FatalErrorInFunction << "Patch named " << patchName << " not found." << nl << abort(FatalError); } - return operator[](patchI); + return operator[](patchi); } @@ -163,16 +163,16 @@ Foam::fvPatch& Foam::fvBoundaryMesh::operator[] const word& patchName ) { - const label patchI = findPatchID(patchName); + const label patchi = findPatchID(patchName); - if (patchI < 0) + if (patchi < 0) { FatalErrorInFunction << "Patch named " << patchName << " not found." << nl << abort(FatalError); } - return operator[](patchI); + return operator[](patchi); } diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index 09c81f5845e1dad23f1f940f617c2a2ad19cf929..68cff3e5096e5f3c84a8af9459dda4cd81f95dcd 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -658,9 +658,9 @@ void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap) if (index < -1) { - label cellI = -index-2; + label celli = -index-2; - V0[cellI] += savedV0[oldCellI]; + V0[celli] += savedV0[oldCellI]; nMerged++; } @@ -702,9 +702,9 @@ void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap) if (index < -1) { - label cellI = -index-2; + label celli = -index-2; - V00[cellI] += savedV00[oldCellI]; + V00[celli] += savedV00[oldCellI]; nMerged++; } } @@ -770,10 +770,10 @@ Foam::tmp<Foam::scalarField> Foam::fvMesh::movePoints(const pointField& p) surfaceScalarField::GeometricBoundaryField& phibf = phi.boundaryFieldRef(); - forAll(patches, patchI) + forAll(patches, patchi) { - phibf[patchI] = patches[patchI].patchSlice(sweptVols); - phibf[patchI] *= rDeltaT; + phibf[patchi] = patches[patchi].patchSlice(sweptVols); + phibf[patchi] *= rDeltaT; } // Update or delete the local geometric properties as early as possible so diff --git a/src/finiteVolume/fvMesh/fvMeshLduAddressing.H b/src/finiteVolume/fvMesh/fvMeshLduAddressing.H index 6a86c095c009148b2ee552996b28bb71a640560c..7b3267ba24d62e4996f1ea0997e0b5ee8f27cc20 100644 --- a/src/finiteVolume/fvMesh/fvMeshLduAddressing.H +++ b/src/finiteVolume/fvMesh/fvMeshLduAddressing.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 @@ -95,9 +95,9 @@ public: patchAddr_(mesh.boundary().size()), patchSchedule_(mesh.globalData().patchSchedule()) { - forAll(mesh.boundary(), patchI) + forAll(mesh.boundary(), patchi) { - patchAddr_[patchI] = &mesh.boundary()[patchI].faceCells(); + patchAddr_[patchi] = &mesh.boundary()[patchi].faceCells(); } } diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvBoundaryMeshMapper.H b/src/finiteVolume/fvMesh/fvMeshMapper/fvBoundaryMeshMapper.H index b0ed0192cd273a7efe94ab6be8e01b7b93a3812c..7e2dacdbdb59c6d44e98ef6ba55003b82aa2f015 100644 --- a/src/finiteVolume/fvMesh/fvMeshMapper/fvBoundaryMeshMapper.H +++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvBoundaryMeshMapper.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 @@ -72,14 +72,14 @@ public: { const fvBoundaryMesh& patches = mesh.boundary(); - forAll(patches, patchI) + forAll(patches, patchi) { set ( - patchI, + patchi, new fvPatchMapper ( - patches[patchI], + patches[patchi], faceMap ) ); diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C b/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C index cd7502a100927fff33dd43b4b525aa3d77a11671..fd41e045e77175a3c7e9058bccebca4699512f27 100644 --- a/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C +++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvPatchMapper.C @@ -70,20 +70,20 @@ void Foam::fvPatchMapper::calcAddressing() const // Adjust mapping to manage hits into other patches and into // internal - forAll(addr, faceI) + forAll(addr, facei) { if ( - addr[faceI] >= oldPatchStart - && addr[faceI] < oldPatchEnd + addr[facei] >= oldPatchStart + && addr[facei] < oldPatchEnd ) { - addr[faceI] -= oldPatchStart; + addr[facei] -= oldPatchStart; } else { - //addr[faceI] = 0; - addr[faceI] = -1; + //addr[facei] = 0; + addr[facei] = -1; hasUnmapped_ = true; } } @@ -118,10 +118,10 @@ void Foam::fvPatchMapper::calcAddressing() const // Adjust mapping to manage hits into other patches and into // internal - forAll(addr, faceI) + forAll(addr, facei) { - labelList& curAddr = addr[faceI]; - scalarList& curW = w[faceI]; + labelList& curAddr = addr[facei]; + scalarList& curW = w[facei]; if ( diff --git a/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C b/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C index c2d5fbcfcabb69b7c8260cc0138e52f0fe2bc9e4..32e6a39a2c62e2fbe469e06529cbfb24ce89160b 100644 --- a/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C +++ b/src/finiteVolume/fvMesh/fvMeshMapper/fvSurfaceMapper.C @@ -64,11 +64,11 @@ void Foam::fvSurfaceMapper::calcAddressing() const labelList& addr = *directAddrPtr_; // Adjust for creation of an internal face from a boundary face - forAll(addr, faceI) + forAll(addr, facei) { - if (addr[faceI] > oldNInternal) + if (addr[facei] > oldNInternal) { - addr[faceI] = 0; + addr[facei] = 0; } } } @@ -90,12 +90,12 @@ void Foam::fvSurfaceMapper::calcAddressing() const scalarListList& w = *weightsPtr_; // Adjust for creation of an internal face from a boundary face - forAll(addr, faceI) + forAll(addr, facei) { - if (max(addr[faceI]) >= oldNInternal) + if (max(addr[facei]) >= oldNInternal) { - addr[faceI] = labelList(1, label(0)); - w[faceI] = scalarList(1, 1.0); + addr[facei] = labelList(1, label(0)); + w[facei] = scalarList(1, 1.0); } } } @@ -112,12 +112,12 @@ void Foam::fvSurfaceMapper::calcAddressing() const label nIns = 0; - forAll(insFaces, faceI) + forAll(insFaces, facei) { // If the face is internal, keep it here - if (insFaces[faceI] < size()) + if (insFaces[facei] < size()) { - ins[nIns] = insFaces[faceI]; + ins[nIns] = insFaces[facei]; nIns++; } } diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C index 03569022229c5a75822948b21fc0180c3d25c55c..3f66ebebe8dc5a35ef727bbe9299266505302a77 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C @@ -416,20 +416,20 @@ void Foam::fvMeshSubset::setCellSubset Map<label> facesToSubset(avgNFacesPerCell*nCellsInSet); - forAll(cellMap_, cellI) + forAll(cellMap_, celli) { // Mark all faces from the cell - const labelList& curFaces = oldCells[cellMap_[cellI]]; + const labelList& curFaces = oldCells[cellMap_[celli]]; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - if (!facesToSubset.found(curFaces[faceI])) + if (!facesToSubset.found(curFaces[facei])) { - facesToSubset.insert(curFaces[faceI], 1); + facesToSubset.insert(curFaces[facei], 1); } else { - facesToSubset[curFaces[faceI]]++; + facesToSubset[curFaces[facei]]++; } } } @@ -448,16 +448,16 @@ void Foam::fvMeshSubset::setCellSubset faceMap_.setSize(facesToc.size()); // 1. Get all faces that will be internal to the submesh. - forAll(facesToc, faceI) + forAll(facesToc, facei) { - if (facesToSubset[facesToc[faceI]] == 2) + if (facesToSubset[facesToc[facei]] == 2) { // Mark face and increment number of points in set - faceMap_[globalFaceMap.size()] = facesToc[faceI]; - globalFaceMap.insert(facesToc[faceI], globalFaceMap.size()); + faceMap_[globalFaceMap.size()] = facesToc[facei]; + globalFaceMap.insert(facesToc[facei], globalFaceMap.size()); // Mark all points from the face - markPoints(oldFaces[facesToc[faceI]], globalPointMap); + markPoints(oldFaces[facesToc[facei]], globalPointMap); } } @@ -473,27 +473,27 @@ void Foam::fvMeshSubset::setCellSubset } - label faceI = 0; + label facei = 0; // 2. Boundary faces up to where we want to insert old internal faces - for (; faceI< facesToc.size(); faceI++) + for (; facei< facesToc.size(); facei++) { - if (facesToc[faceI] >= oldPatchStart) + if (facesToc[facei] >= oldPatchStart) { break; } if ( - !baseMesh().isInternalFace(facesToc[faceI]) - && facesToSubset[facesToc[faceI]] == 1 + !baseMesh().isInternalFace(facesToc[facei]) + && facesToSubset[facesToc[facei]] == 1 ) { // Mark face and increment number of points in set - faceMap_[globalFaceMap.size()] = facesToc[faceI]; - globalFaceMap.insert(facesToc[faceI], globalFaceMap.size()); + faceMap_[globalFaceMap.size()] = facesToc[facei]; + globalFaceMap.insert(facesToc[facei], globalFaceMap.size()); // Mark all points from the face - markPoints(oldFaces[facesToc[faceI]], globalPointMap); + markPoints(oldFaces[facesToc[facei]], globalPointMap); } } @@ -516,20 +516,20 @@ void Foam::fvMeshSubset::setCellSubset } // 4. Remaining boundary faces - for (; faceI< facesToc.size(); faceI++) + for (; facei< facesToc.size(); facei++) { if ( - !baseMesh().isInternalFace(facesToc[faceI]) - && facesToSubset[facesToc[faceI]] == 1 + !baseMesh().isInternalFace(facesToc[facei]) + && facesToSubset[facesToc[facei]] == 1 ) { // Mark face and increment number of points in set - faceMap_[globalFaceMap.size()] = facesToc[faceI]; - globalFaceMap.insert(facesToc[faceI], globalFaceMap.size()); + faceMap_[globalFaceMap.size()] = facesToc[facei]; + globalFaceMap.insert(facesToc[facei], globalFaceMap.size()); // Mark all points from the face - markPoints(oldFaces[facesToc[faceI]], globalPointMap); + markPoints(oldFaces[facesToc[facei]], globalPointMap); } } @@ -564,9 +564,9 @@ void Foam::fvMeshSubset::setCellSubset label nNewFaces = 0; // Make internal faces - for (label faceI = 0; faceI < nInternalFaces; faceI++) + for (label facei = 0; facei < nInternalFaces; facei++) { - const face& oldF = oldFaces[faceMap_[faceI]]; + const face& oldF = oldFaces[faceMap_[facei]]; face newF(oldF.size()); @@ -604,9 +604,9 @@ void Foam::fvMeshSubset::setCellSubset labelList boundaryPatchSizes(nbSize, 0); // Assign boundary faces. Visited in order of faceMap_. - for (label faceI = nInternalFaces; faceI < faceMap_.size(); faceI++) + for (label facei = nInternalFaces; facei < faceMap_.size(); facei++) { - label oldFaceI = faceMap_[faceI]; + label oldFaceI = faceMap_[facei]; face oldF = oldFaces[oldFaceI]; @@ -653,9 +653,9 @@ void Foam::fvMeshSubset::setCellSubset label nNewCells = 0; - forAll(cellMap_, cellI) + forAll(cellMap_, celli) { - const labelList& oldC = oldCells[cellMap_[cellI]]; + const labelList& oldC = oldCells[cellMap_[celli]]; labelList newC(oldC.size()); @@ -697,21 +697,21 @@ void Foam::fvMeshSubset::setCellSubset label nNewPatches = 0; label patchStart = nInternalFaces; - forAll(oldPatches, patchI) + forAll(oldPatches, patchi) { - if (boundaryPatchSizes[patchI] > 0) + if (boundaryPatchSizes[patchi] > 0) { // Patch still exists. Add it - newBoundary[nNewPatches] = oldPatches[patchI].clone + newBoundary[nNewPatches] = oldPatches[patchi].clone ( fvMeshSubsetPtr_().boundaryMesh(), nNewPatches, - boundaryPatchSizes[patchI], + boundaryPatchSizes[patchi], patchStart ).ptr(); - patchStart += boundaryPatchSizes[patchI]; - patchMap_[nNewPatches] = patchI; + patchStart += boundaryPatchSizes[patchi]; + patchMap_[nNewPatches] = patchi; nNewPatches++; } } @@ -870,11 +870,11 @@ void Foam::fvMeshSubset::setLargeCellSubset // processorPatches) // and put all exposed internal faces in there. - forAll(oldPatches, patchI) + forAll(oldPatches, patchi) { - if (isA<processorPolyPatch>(oldPatches[patchI])) + if (isA<processorPolyPatch>(oldPatches[patchi])) { - nextPatchID = patchI; + nextPatchID = patchi; break; } oldInternalPatchID++; @@ -913,15 +913,15 @@ void Foam::fvMeshSubset::setLargeCellSubset labelList globalPointMap(oldPoints.size(), -1); labelList globalFaceMap(oldFaces.size(), -1); - label faceI = 0; + label facei = 0; // 1. Pick up all preserved internal faces. for (label oldFaceI = 0; oldFaceI < oldNInternalFaces; oldFaceI++) { 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); @@ -929,7 +929,7 @@ void Foam::fvMeshSubset::setLargeCellSubset } // These are all the internal faces in the mesh. - label nInternalFaces = faceI; + label nInternalFaces = facei; // 2. Boundary faces up to where we want to insert old internal faces for @@ -951,8 +951,8 @@ void Foam::fvMeshSubset::setLargeCellSubset // 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); @@ -969,8 +969,8 @@ void Foam::fvMeshSubset::setLargeCellSubset { 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); @@ -990,8 +990,8 @@ void Foam::fvMeshSubset::setLargeCellSubset { 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); @@ -1020,8 +1020,8 @@ void Foam::fvMeshSubset::setLargeCellSubset // 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); @@ -1033,7 +1033,7 @@ void Foam::fvMeshSubset::setLargeCellSubset } } - if (faceI != nFacesInSet) + if (facei != nFacesInSet) { FatalErrorInFunction << "Problem" << abort(FatalError); @@ -1084,9 +1084,9 @@ void Foam::fvMeshSubset::setLargeCellSubset label nNewFaces = 0; // Make internal faces - for (label faceI = 0; faceI < nInternalFaces; faceI++) + for (label facei = 0; facei < nInternalFaces; facei++) { - const face& oldF = oldFaces[faceMap_[faceI]]; + const face& oldF = oldFaces[faceMap_[facei]]; face newF(oldF.size()); @@ -1102,9 +1102,9 @@ void Foam::fvMeshSubset::setLargeCellSubset // Make boundary faces. (different from internal since might need to be // flipped) - for (label faceI = nInternalFaces; faceI < faceMap_.size(); faceI++) + for (label facei = nInternalFaces; facei < faceMap_.size(); facei++) { - label oldFaceI = faceMap_[faceI]; + label oldFaceI = faceMap_[facei]; face oldF = oldFaces[oldFaceI]; @@ -1141,9 +1141,9 @@ void Foam::fvMeshSubset::setLargeCellSubset label nNewCells = 0; - forAll(cellMap_, cellI) + forAll(cellMap_, celli) { - const labelList& oldC = oldCells[cellMap_[cellI]]; + const labelList& oldC = oldCells[cellMap_[celli]]; labelList newC(oldC.size()); diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C index eea4d29bbfea05b12ef430fae821c4a7f9ddb100..b188a4326c9f2dd6863d8855a487c6bdf2c5fc67 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C @@ -50,19 +50,19 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> fvMeshSubset::interpolate // 1. Create the complete field with dummy patch fields PtrList<fvPatchField<Type>> patchFields(patchMap.size()); - forAll(patchFields, patchI) + forAll(patchFields, patchi) { // Set the first one by hand as it corresponds to the // exposed internal faces. Additional interpolation can be put here // as necessary. - if (patchMap[patchI] == -1) + if (patchMap[patchi] == -1) { patchFields.set ( - patchI, + patchi, new emptyFvPatchField<Type> ( - sMesh.boundary()[patchI], + sMesh.boundary()[patchi], DimensionedField<Type, volMesh>::null() ) ); @@ -71,11 +71,11 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> fvMeshSubset::interpolate { patchFields.set ( - patchI, + patchi, fvPatchField<Type>::New ( calculatedFvPatchField<Type>::typeName, - sMesh.boundary()[patchI], + sMesh.boundary()[patchi], DimensionedField<Type, volMesh>::null() ) ); @@ -109,13 +109,13 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> fvMeshSubset::interpolate typename GeometricField<Type, fvPatchField, volMesh>:: GeometricBoundaryField& bf = resF.boundaryFieldRef(); - forAll(bf, patchI) + forAll(bf, patchi) { - if (patchMap[patchI] != -1) + if (patchMap[patchi] != -1) { // Construct addressing - const fvPatch& subPatch = sMesh.boundary()[patchI]; - const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]]; + const fvPatch& subPatch = sMesh.boundary()[patchi]; + const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchi]]; const label baseStart = basePatch.start(); const label baseSize = basePatch.size(); @@ -139,10 +139,10 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> fvMeshSubset::interpolate bf.set ( - patchI, + patchi, fvPatchField<Type>::New ( - vf.boundaryField()[patchMap[patchI]], + vf.boundaryField()[patchMap[patchi]], subPatch, resF.dimensionedInternalField(), directFvPatchFieldMapper(directAddressing) @@ -184,19 +184,19 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate // 1. Create the complete field with dummy patch fields PtrList<fvsPatchField<Type>> patchFields(patchMap.size()); - forAll(patchFields, patchI) + forAll(patchFields, patchi) { // Set the first one by hand as it corresponds to the // exposed internal faces. Additional interpolation can be put here // as necessary. - if (patchMap[patchI] == -1) + if (patchMap[patchi] == -1) { patchFields.set ( - patchI, + patchi, new emptyFvsPatchField<Type> ( - sMesh.boundary()[patchI], + sMesh.boundary()[patchi], DimensionedField<Type, surfaceMesh>::null() ) ); @@ -205,11 +205,11 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate { patchFields.set ( - patchI, + patchi, fvsPatchField<Type>::New ( calculatedFvsPatchField<Type>::typeName, - sMesh.boundary()[patchI], + sMesh.boundary()[patchi], DimensionedField<Type, surfaceMesh>::null() ) ); @@ -252,13 +252,13 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate typename GeometricField<Type, fvsPatchField, surfaceMesh>:: GeometricBoundaryField& bf = resF.boundaryFieldRef(); - forAll(bf, patchI) + forAll(bf, patchi) { - if (patchMap[patchI] != -1) + if (patchMap[patchi] != -1) { // Construct addressing - const fvPatch& subPatch = sMesh.boundary()[patchI]; - const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]]; + const fvPatch& subPatch = sMesh.boundary()[patchi]; + const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchi]]; const label baseStart = basePatch.start(); const label baseSize = basePatch.size(); @@ -283,10 +283,10 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate bf.set ( - patchI, + patchi, fvsPatchField<Type>::New ( - vf.boundaryField()[patchMap[patchI]], + vf.boundaryField()[patchMap[patchi]], subPatch, resF.dimensionedInternalField(), directFvPatchFieldMapper(directAddressing) @@ -296,7 +296,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate // Postprocess patch field for exposed faces - fvsPatchField<Type>& pfld = bf[patchI]; + fvsPatchField<Type>& pfld = bf[patchi]; forAll(pfld, i) { @@ -310,13 +310,13 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh>> fvMeshSubset::interpolate { // Exposed face from other patch. // Only possible in case of a coupled boundary - label patchI = vf.mesh().boundaryMesh().whichPatch + label patchi = vf.mesh().boundaryMesh().whichPatch ( baseFaceI ); - const fvPatch& otherPatch = vf.mesh().boundary()[patchI]; + const fvPatch& otherPatch = vf.mesh().boundary()[patchi]; label patchFaceI = otherPatch.patch().whichFace(baseFaceI); - pfld[i] = vf.boundaryField()[patchI][patchFaceI]; + pfld[i] = vf.boundaryField()[patchi][patchFaceI]; } } } @@ -355,19 +355,19 @@ fvMeshSubset::interpolate // 1. Create the complete field with dummy patch fields PtrList<pointPatchField<Type>> patchFields(patchMap.size()); - forAll(patchFields, patchI) + forAll(patchFields, patchi) { // Set the first one by hand as it corresponds to the // exposed internal faces. Additional interpolation can be put here // as necessary. - if (patchMap[patchI] == -1) + if (patchMap[patchi] == -1) { patchFields.set ( - patchI, + patchi, new emptyPointPatchField<Type> ( - sMesh.boundary()[patchI], + sMesh.boundary()[patchi], DimensionedField<Type, pointMesh>::null() ) ); @@ -376,11 +376,11 @@ fvMeshSubset::interpolate { patchFields.set ( - patchI, + patchi, pointPatchField<Type>::New ( calculatedPointPatchField<Type>::typeName, - sMesh.boundary()[patchI], + sMesh.boundary()[patchi], DimensionedField<Type, pointMesh>::null() ) ); @@ -415,16 +415,16 @@ fvMeshSubset::interpolate typename GeometricField<Type, pointPatchField, pointMesh>:: GeometricBoundaryField& bf = resF.boundaryFieldRef(); - forAll(bf, patchI) + forAll(bf, patchi) { // Set the first one by hand as it corresponds to the // exposed internal faces. Additional interpolation can be put here // as necessary. - if (patchMap[patchI] != -1) + if (patchMap[patchi] != -1) { // Construct addressing const pointPatch& basePatch = - vf.mesh().boundary()[patchMap[patchI]]; + vf.mesh().boundary()[patchMap[patchi]]; const labelList& meshPoints = basePatch.meshPoints(); @@ -436,7 +436,7 @@ fvMeshSubset::interpolate } // Find which subpatch points originate from which patch point - const pointPatch& subPatch = sMesh.boundary()[patchI]; + const pointPatch& subPatch = sMesh.boundary()[patchi]; const labelList& subMeshPoints = subPatch.meshPoints(); // If mapped from outside patch leave handling up to patchField @@ -457,10 +457,10 @@ fvMeshSubset::interpolate bf.set ( - patchI, + patchi, pointPatchField<Type>::New ( - vf.boundaryField()[patchMap[patchI]], + vf.boundaryField()[patchMap[patchi]], subPatch, resF.dimensionedInternalField(), directPointPatchFieldMapper(directAddressing) diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.C index 174372192db4e1581976891fcbaa4a0545c64833..8812cd7b3ab07a5d92f3e7f90b39b011ff8910ae 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicACMI/cyclicACMIFvPatch.C @@ -94,12 +94,12 @@ void Foam::cyclicACMIFvPatch::makeWeights(scalarField& w) const ) ); - forAll(deltas, faceI) + forAll(deltas, facei) { - scalar di = deltas[faceI]; - scalar dni = nbrDeltas[faceI]; + scalar di = deltas[facei]; + scalar dni = nbrDeltas[facei]; - w[faceI] = dni/(di + dni); + w[facei] = dni/(di + dni); } } else @@ -153,22 +153,22 @@ Foam::tmp<Foam::vectorField> Foam::cyclicACMIFvPatch::delta() const // do the transformation if necessary if (parallel()) { - forAll(patchD, faceI) + forAll(patchD, facei) { - const vector& ddi = patchD[faceI]; - const vector& dni = nbrPatchD[faceI]; + const vector& ddi = patchD[facei]; + const vector& dni = nbrPatchD[facei]; - pdv[faceI] = ddi - dni; + pdv[facei] = ddi - dni; } } else { - forAll(patchD, faceI) + forAll(patchD, facei) { - const vector& ddi = patchD[faceI]; - const vector& dni = nbrPatchD[faceI]; + const vector& ddi = patchD[facei]; + const vector& dni = nbrPatchD[facei]; - pdv[faceI] = ddi - transform(forwardT()[0], dni); + pdv[facei] = ddi - transform(forwardT()[0], dni); } } diff --git a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C index 29439cc879b86e2edd6771b1657d515922d90633..a71241b49dca1a0b392e9e03c76c03b09f7e1972 100644 --- a/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C @@ -71,12 +71,12 @@ void Foam::cyclicAMIFvPatch::makeWeights(scalarField& w) const const scalarField& nbrDeltas = tnbrDeltas(); - forAll(deltas, faceI) + forAll(deltas, facei) { - scalar di = deltas[faceI]; - scalar dni = nbrDeltas[faceI]; + scalar di = deltas[facei]; + scalar dni = nbrDeltas[facei]; - w[faceI] = dni/(di + dni); + w[facei] = dni/(di + dni); } } else @@ -118,22 +118,22 @@ Foam::tmp<Foam::vectorField> Foam::cyclicAMIFvPatch::delta() const // do the transformation if necessary if (parallel()) { - forAll(patchD, faceI) + forAll(patchD, facei) { - const vector& ddi = patchD[faceI]; - const vector& dni = nbrPatchD[faceI]; + const vector& ddi = patchD[facei]; + const vector& dni = nbrPatchD[facei]; - pdv[faceI] = ddi - dni; + pdv[facei] = ddi - dni; } } else { - forAll(patchD, faceI) + forAll(patchD, facei) { - const vector& ddi = patchD[faceI]; - const vector& dni = nbrPatchD[faceI]; + const vector& ddi = patchD[facei]; + const vector& dni = nbrPatchD[facei]; - pdv[faceI] = ddi - transform(forwardT()[0], dni); + pdv[facei] = ddi - transform(forwardT()[0], dni); } } diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C index a3a9a2dd77c1f73dc69b7dca00bab5e97c9c2e06..77c05e08631b54abd5ff7c2fa13d53a11bfbfb11 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C @@ -112,9 +112,9 @@ Foam::tmp<Foam::vectorField> Foam::fvPatch::Cn() const // get reference to global cell centres const vectorField& gcc = boundaryMesh().mesh().cellCentres(); - forAll(faceCells, faceI) + forAll(faceCells, facei) { - cc[faceI] = gcc[faceCells[faceI]]; + cc[facei] = gcc[faceCells[facei]]; } return tcc; diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C index a4287b86756e36aaaeaa612d4ebd11d218a9585b..01ae829ac7d8fe7eb98aca030dc47d48414fc6aa 100644 --- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C +++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.C @@ -45,19 +45,19 @@ void Foam::singleCellFvMesh::agglomerateMesh // Check agglomeration within patch face range and continuous labelList nAgglom(oldPatches.size(), 0); - forAll(oldPatches, patchI) + forAll(oldPatches, patchi) { - const polyPatch& pp = oldPatches[patchI]; + const polyPatch& pp = oldPatches[patchi]; if (pp.size() > 0) { - nAgglom[patchI] = max(agglom[patchI])+1; + nAgglom[patchi] = max(agglom[patchi])+1; forAll(pp, i) { - if (agglom[patchI][i] < 0 || agglom[patchI][i] >= pp.size()) + if (agglom[patchi][i] < 0 || agglom[patchi][i] >= pp.size()) { FatalErrorInFunction - << "agglomeration on patch " << patchI + << "agglomeration on patch " << patchi << " is out of range 0.." << pp.size()-1 << exit(FatalError); } @@ -69,16 +69,16 @@ void Foam::singleCellFvMesh::agglomerateMesh { // Get neighbouring agglomeration labelList nbrAgglom(mesh.nFaces()-mesh.nInternalFaces()); - forAll(oldPatches, patchI) + forAll(oldPatches, patchi) { - const polyPatch& pp = oldPatches[patchI]; + const polyPatch& pp = oldPatches[patchi]; if (pp.coupled()) { label offset = pp.start()-mesh.nInternalFaces(); forAll(pp, i) { - nbrAgglom[offset+i] = agglom[patchI][i]; + nbrAgglom[offset+i] = agglom[patchi][i]; } } } @@ -88,9 +88,9 @@ void Foam::singleCellFvMesh::agglomerateMesh // Get correspondence between this agglomeration and remote one Map<label> localToNbr(nbrAgglom.size()/10); - forAll(oldPatches, patchI) + forAll(oldPatches, patchi) { - const polyPatch& pp = oldPatches[patchI]; + const polyPatch& pp = oldPatches[patchi]; if (pp.coupled()) { @@ -99,7 +99,7 @@ void Foam::singleCellFvMesh::agglomerateMesh forAll(pp, i) { label bFaceI = offset+i; - label myZone = agglom[patchI][i]; + label myZone = agglom[patchi][i]; label nbrZone = nbrAgglom[bFaceI]; Map<label>::const_iterator iter = localToNbr.find(myZone); @@ -131,9 +131,9 @@ void Foam::singleCellFvMesh::agglomerateMesh label coarseI = 0; - forAll(nAgglom, patchI) + forAll(nAgglom, patchi) { - coarseI += nAgglom[patchI]; + coarseI += nAgglom[patchi]; } // New faces faceList patchFaces(coarseI); @@ -152,38 +152,38 @@ void Foam::singleCellFvMesh::agglomerateMesh coarseI = 0; - forAll(oldPatches, patchI) + forAll(oldPatches, patchi) { - patchStarts[patchI] = coarseI; + patchStarts[patchi] = coarseI; - const polyPatch& pp = oldPatches[patchI]; + const polyPatch& pp = oldPatches[patchi]; if (pp.size() > 0) { - patchFaceMap_[patchI].setSize(nAgglom[patchI]); + patchFaceMap_[patchi].setSize(nAgglom[patchi]); // Patchfaces per agglomeration labelListList agglomToPatch ( - invertOneToMany(nAgglom[patchI], agglom[patchI]) + invertOneToMany(nAgglom[patchi], agglom[patchi]) ); // From agglomeration to compact patch face - labelList agglomToFace(nAgglom[patchI], -1); + labelList agglomToFace(nAgglom[patchi], -1); forAll(pp, i) { - label myAgglom = agglom[patchI][i]; + label myAgglom = agglom[patchi][i]; if (agglomToFace[myAgglom] == -1) { // Agglomeration not yet done. We now have: // - coarseI : current coarse mesh face - // - patchStarts[patchI] : coarse mesh patch start + // - patchStarts[patchi] : coarse mesh patch start // - myAgglom : agglomeration // - agglomToPatch[myAgglom] : fine mesh faces for zone - label coarsePatchFaceI = coarseI - patchStarts[patchI]; - patchFaceMap_[patchI][coarsePatchFaceI] = myAgglom; + label coarsePatchFaceI = coarseI - patchStarts[patchi]; + patchFaceMap_[patchi][coarsePatchFaceI] = myAgglom; agglomToFace[myAgglom] = coarsePatchFaceI; const labelList& fineFaces = agglomToPatch[myAgglom]; @@ -207,7 +207,7 @@ void Foam::singleCellFvMesh::agglomerateMesh << "agglomeration does not create a" << " single, non-manifold" << " face for agglomeration " << myAgglom - << " on patch " << patchI + << " on patch " << patchi << exit(FatalError); } @@ -223,7 +223,7 @@ void Foam::singleCellFvMesh::agglomerateMesh } } - patchSizes[patchI] = coarseI-patchStarts[patchI]; + patchSizes[patchi] = coarseI-patchStarts[patchi]; } //Pout<< "patchStarts:" << patchStarts << endl; @@ -256,12 +256,12 @@ void Foam::singleCellFvMesh::agglomerateMesh // Add patches (on still zero sized mesh) List<polyPatch*> newPatches(oldPatches.size()); - forAll(oldPatches, patchI) + forAll(oldPatches, patchi) { - newPatches[patchI] = oldPatches[patchI].clone + newPatches[patchi] = oldPatches[patchi].clone ( boundaryMesh(), - patchI, + patchi, 0, 0 ).ptr(); @@ -473,9 +473,9 @@ Foam::singleCellFvMesh::singleCellFvMesh labelListList agglom(oldPatches.size()); - forAll(oldPatches, patchI) + forAll(oldPatches, patchi) { - agglom[patchI] = identity(oldPatches[patchI].size()); + agglom[patchi] = identity(oldPatches[patchi].size()); } agglomerateMesh(mesh, agglom); diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C index 4047bd95291e6010e0667a613163cc4fe6d3904a..e3c9dff6db6515434380e6f8f637ded4918d4ff3 100644 --- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C +++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C @@ -44,15 +44,15 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> singleCellFvMesh::interpolate // 1. Create the complete field with dummy patch fields PtrList<fvPatchField<Type>> patchFields(vf.boundaryField().size()); - forAll(patchFields, patchI) + forAll(patchFields, patchi) { patchFields.set ( - patchI, + patchi, fvPatchField<Type>::New ( calculatedFvPatchField<Type>::typeName, - boundary()[patchI], + boundary()[patchi], DimensionedField<Type, volMesh>::null() ) ); @@ -88,15 +88,15 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> singleCellFvMesh::interpolate if (agglomerate()) { - forAll(vf.boundaryField(), patchI) + forAll(vf.boundaryField(), patchi) { - const labelList& agglom = patchFaceAgglomeration_[patchI]; + const labelList& agglom = patchFaceAgglomeration_[patchi]; label nAgglom = max(agglom)+1; // Use inverse of agglomeration. This is from agglomeration to // original (fine) mesh patch face. labelListList coarseToFine(invertOneToMany(nAgglom, agglom)); - inplaceReorder(patchFaceMap_[patchI], coarseToFine); + inplaceReorder(patchFaceMap_[patchi], coarseToFine); scalarListList coarseWeights(nAgglom); forAll(coarseToFine, coarseI) { @@ -110,11 +110,11 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> singleCellFvMesh::interpolate bf.set ( - patchI, + patchi, fvPatchField<Type>::New ( - vf.boundaryField()[patchI], - boundary()[patchI], + vf.boundaryField()[patchi], + boundary()[patchi], resF.dimensionedInternalField(), agglomPatchFieldMapper(coarseToFine, coarseWeights) ) @@ -123,17 +123,17 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> singleCellFvMesh::interpolate } else { - forAll(vf.boundaryField(), patchI) + forAll(vf.boundaryField(), patchi) { - labelList map(identity(vf.boundaryField()[patchI].size())); + labelList map(identity(vf.boundaryField()[patchi].size())); bf.set ( - patchI, + patchi, fvPatchField<Type>::New ( - vf.boundaryField()[patchI], - boundary()[patchI], + vf.boundaryField()[patchi], + boundary()[patchi], resF.dimensionedInternalField(), directFvPatchFieldMapper(map) ) diff --git a/src/finiteVolume/fvMesh/wallDist/nearWallDist/nearWallDist.C b/src/finiteVolume/fvMesh/wallDist/nearWallDist/nearWallDist.C index c047ba90ca40d458a72457f2c6dadc0a23ebeb38..8877303e1f224f72b500a18308f585373fbdb2fb 100644 --- a/src/finiteVolume/fvMesh/wallDist/nearWallDist/nearWallDist.C +++ b/src/finiteVolume/fvMesh/wallDist/nearWallDist/nearWallDist.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,11 +47,11 @@ void Foam::nearWallDist::calculate() const volVectorField& cellCentres = mesh_.C(); - forAll(mesh_.boundary(), patchI) + forAll(mesh_.boundary(), patchi) { - fvPatchScalarField& ypatch = operator[](patchI); + fvPatchScalarField& ypatch = operator[](patchi); - const fvPatch& patch = mesh_.boundary()[patchI]; + const fvPatch& patch = mesh_.boundary()[patchi]; if (isA<wallFvPatch>(patch)) { @@ -121,15 +121,15 @@ void Foam::nearWallDist::correct() const fvBoundaryMesh& bnd = mesh_.boundary(); this->setSize(bnd.size()); - forAll(*this, patchI) + forAll(*this, patchi) { this->set ( - patchI, + patchi, fvPatchField<scalar>::New ( calculatedFvPatchScalarField::typeName, - bnd[patchI], + bnd[patchi], V ) ); diff --git a/src/finiteVolume/fvMesh/wallDist/nearWallDist/nearWallDistNoSearch.C b/src/finiteVolume/fvMesh/wallDist/nearWallDist/nearWallDistNoSearch.C index 6d6e05f60fee7abc555b11b8f9b63fbb33a0bbce..02755b8974f76cab6a532f5fb06fb00cbd36e06c 100644 --- a/src/finiteVolume/fvMesh/wallDist/nearWallDist/nearWallDistNoSearch.C +++ b/src/finiteVolume/fvMesh/wallDist/nearWallDist/nearWallDistNoSearch.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 @@ -35,22 +35,22 @@ void Foam::nearWallDistNoSearch::doAll() const volVectorField& cellCentres = mesh_.C(); const fvPatchList& patches = mesh_.boundary(); - forAll(patches, patchI) + forAll(patches, patchi) { - fvPatchScalarField& ypatch = operator[](patchI); + fvPatchScalarField& ypatch = operator[](patchi); - if (isA<wallFvPatch>(patches[patchI])) + if (isA<wallFvPatch>(patches[patchi])) { - const labelUList& faceCells = patches[patchI].faceCells(); + const labelUList& faceCells = patches[patchi].faceCells(); const fvPatchVectorField& patchCentres - = cellCentres.boundaryField()[patchI]; + = cellCentres.boundaryField()[patchi]; const fvsPatchVectorField& Apatch - = mesh_.Sf().boundaryField()[patchI]; + = mesh_.Sf().boundaryField()[patchi]; const fvsPatchScalarField& magApatch - = mesh_.magSf().boundaryField()[patchI]; + = mesh_.magSf().boundaryField()[patchi]; forAll(patchCentres, facei) { @@ -101,9 +101,9 @@ void Foam::nearWallDistNoSearch::correct() if (mesh_.changing()) { // Update size of GeometricBoundaryField - forAll(mesh_.boundary(), patchI) + forAll(mesh_.boundary(), patchi) { - operator[](patchI).setSize(mesh_.boundary()[patchI].size()); + operator[](patchi).setSize(mesh_.boundary()[patchi].size()); } } diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/meshWavePatchDistMethod.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/meshWavePatchDistMethod.C index 3bc87d39116d0f846166ec5eb890e07080c24e4e..809dc50deceb466a41cc99453bd7baeaf540eed4 100644 --- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/meshWavePatchDistMethod.C +++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/meshWavePatchDistMethod.C @@ -86,13 +86,13 @@ bool Foam::patchDistMethods::meshWave::correct(volScalarField& y) // Transfer values on patches into boundaryField of y volScalarField::GeometricBoundaryField& ybf = y.boundaryFieldRef(); - forAll(ybf, patchI) + forAll(ybf, patchi) { - if (!isA<emptyFvPatchScalarField>(ybf[patchI])) + if (!isA<emptyFvPatchScalarField>(ybf[patchi])) { - scalarField& waveFld = wave.patchDistance()[patchI]; + scalarField& waveFld = wave.patchDistance()[patchi]; - ybf[patchI].transfer(waveFld); + ybf[patchi].transfer(waveFld); } } @@ -116,9 +116,9 @@ bool Foam::patchDistMethods::meshWave::correct volVectorField::GeometricBoundaryField& nbf = n.boundaryFieldRef(); - forAll(nbf, patchI) + forAll(nbf, patchi) { - patchData.set(patchI, &nbf[patchI]); + patchData.set(patchi, &nbf[patchi]); } // Do mesh wave @@ -138,17 +138,17 @@ bool Foam::patchDistMethods::meshWave::correct // Transfer values on patches into boundaryField of y and n volScalarField::GeometricBoundaryField& ybf = y.boundaryFieldRef(); - forAll(ybf, patchI) + forAll(ybf, patchi) { - scalarField& waveFld = wave.patchDistance()[patchI]; + scalarField& waveFld = wave.patchDistance()[patchi]; - if (!isA<emptyFvPatchScalarField>(ybf[patchI])) + if (!isA<emptyFvPatchScalarField>(ybf[patchi])) { - ybf[patchI].transfer(waveFld); + ybf[patchi].transfer(waveFld); - vectorField& wavePatchData = wave.patchData()[patchI]; + vectorField& wavePatchData = wave.patchData()[patchi]; - nbf[patchI].transfer(wavePatchData); + nbf[patchi].transfer(wavePatchData); } } diff --git a/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H b/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H index ecd615b9f8478518999a8444009be15bcd19ec4d..d4ffd57a040418394eaeec7356a9120ed3f6bb3f 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H +++ b/src/finiteVolume/fvMesh/wallDist/wallPointYPlus/wallPointYPlus.H @@ -102,7 +102,7 @@ public: // Needed by FaceCellWave //- Influence of neighbouring face. - // Calls update(...) with cellCentre of cellI + // Calls update(...) with cellCentre of celli template<class TrackingData> inline bool updateCell ( @@ -115,7 +115,7 @@ public: ); //- Influence of neighbouring cell. - // Calls update(...) with faceCentre of faceI + // Calls update(...) with faceCentre of facei template<class TrackingData> inline bool updateFace ( @@ -129,7 +129,7 @@ public: //- Influence of different value on same face. // Merge new and old info. - // Calls update(...) with faceCentre of faceI + // Calls update(...) with faceCentre of facei template<class TrackingData> inline bool updateFace ( diff --git a/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H b/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H index bb3a6afbce5602bc3453babadacd572bec4568fb..f47e52f9c9ea743008b94086aa55edfb801d9da4 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H +++ b/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.H @@ -131,8 +131,8 @@ public: virtual Type interpolate ( const vector& position, - const label cellI, - const label faceI = -1 + const label celli, + const label facei = -1 ) const = 0; //- Interpolate field to the given point in the tetrahedron @@ -143,10 +143,10 @@ public: ( const vector& position, const tetIndices& tetIs, - const label faceI = -1 + const label facei = -1 ) const { - return interpolate(position, tetIs.cell(), faceI); + return interpolate(position, tetIs.cell(), facei); } }; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.C b/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.C index 82356d91aa436113446977e9ca30e8792b8cc075..b6ffa13a6cd3b065d038cb058c1bcbc4701b20a0 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.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,11 +44,11 @@ template<class Type> Type Foam::interpolationCell<Type>::interpolate ( const vector&, - const label cellI, + const label celli, const label ) const { - return this->psi_[cellI]; + return this->psi_[celli]; } diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.H b/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.H index 209f3d3ea66058e7b252277397077d563b0e10f9..ce6c0df8822113e4d0f3328aae33065fe2522583 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCell/interpolationCell.H @@ -72,8 +72,8 @@ public: Type interpolate ( const vector& position, - const label cellI, - const label faceI = -1 + const label celli, + const label facei = -1 ) const; }; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C index 3f6bfb5a90d29f63a1e130dadf720a068257eae2..9d052527bab3bbef11ca871d5b47cc0d1aef8b94 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.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,22 +44,22 @@ template<class Type> Type Foam::interpolationCellPatchConstrained<Type>::interpolate ( const vector& pt, - const label cellI, - const label faceI + const label celli, + const label facei ) const { - if (faceI >= 0 && faceI >= this->psi_.mesh().nInternalFaces()) + if (facei >= 0 && facei >= this->psi_.mesh().nInternalFaces()) { // 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 patchi = pbm.patchID()[facei-this->psi_.mesh().nInternalFaces()]; + label patchFaceI = pbm[patchi].whichFace(facei); - return this->psi_.boundaryField()[patchI][patchFaceI]; + return this->psi_.boundaryField()[patchi][patchFaceI]; } else { - return this->psi_[cellI]; + return this->psi_[celli]; } } diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.H index 4f8babdfd211cd0705d88da2c5a2ecb05d10db60..d0b11f8ff86ef8ec9e707779dc36961bc0539b56 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPatchConstrained/interpolationCellPatchConstrained.H @@ -74,8 +74,8 @@ public: Type interpolate ( const vector& position, - const label cellI, - const label faceI = -1 + const label celli, + const label facei = -1 ) const; }; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.C index 52152cee2c1c395f3cd1c2879d64951760f9b690..e24093da4156d36ba79e0f34ff3e0ff63e4ff991 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.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 @@ -39,24 +39,24 @@ void Foam::cellPointWeight::findTetrahedron ( const polyMesh& mesh, const vector& position, - const label cellI + const label celli ) { if (debug) { Pout<< nl << "Foam::cellPointWeight::findTetrahedron" << nl << "position = " << position << nl - << "cellI = " << cellI << endl; + << "celli = " << celli << endl; } List<tetIndices> cellTets = polyMeshTetDecomposition::cellTetIndices ( mesh, - cellI + celli ); const faceList& pFaces = mesh.faces(); - const scalar cellVolume = mesh.cellVolumes()[cellI]; + const scalar cellVolume = mesh.cellVolumes()[celli]; forAll(cellTets, tetI) { @@ -117,7 +117,7 @@ void Foam::cellPointWeight::findTetrahedron << " Tetrahedron search failed; using closest tet to point " << position << nl << " cell: " - << cellI << nl + << celli << nl << endl; } @@ -141,26 +141,26 @@ void Foam::cellPointWeight::findTriangle ( const polyMesh& mesh, const vector& position, - const label faceI + const label facei ) { if (debug) { Pout<< "\nbool Foam::cellPointWeight::findTriangle" << nl << "position = " << position << nl - << "faceI = " << faceI << endl; + << "facei = " << facei << endl; } List<tetIndices> faceTets = polyMeshTetDecomposition::faceTetIndices ( mesh, - faceI, - mesh.faceOwner()[faceI] + facei, + mesh.faceOwner()[facei] ); - const scalar faceAreaSqr = magSqr(mesh.faceAreas()[faceI]); + const scalar faceAreaSqr = magSqr(mesh.faceAreas()[facei]); - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(faceTets, tetI) { @@ -224,7 +224,7 @@ void Foam::cellPointWeight::findTriangle << " Triangle search failed; using closest tri to point " << position << nl << " face: " - << faceI << nl + << facei << nl << endl; } @@ -256,23 +256,23 @@ Foam::cellPointWeight::cellPointWeight ( const polyMesh& mesh, const vector& position, - const label cellI, - const label faceI + const label celli, + const label facei ) : - cellI_(cellI), + celli_(celli), weights_(4), faceVertices_(3) { - if (faceI < 0) + if (facei < 0) { // Face data not supplied - findTetrahedron(mesh, position, cellI); + findTetrahedron(mesh, position, celli); } else { // Face data supplied - findTriangle(mesh, position, faceI); + findTriangle(mesh, position, facei); } } diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.H index 13371a7789698e05269b3a0e28055be583e7dfe8..8bd162c1ce438624edcc13e84b84069363ba4ea0 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/cellPointWeight/cellPointWeight.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 @@ -55,7 +55,7 @@ protected: // Protected data //- Cell index - const label cellI_; + const label celli_; //- Weights applied to tet vertices List<scalar> weights_; @@ -70,14 +70,14 @@ protected: ( const polyMesh& mesh, const vector& position, - const label cellI + const label celli ); void findTriangle ( const polyMesh& mesh, const vector& position, - const label faceI + const label facei ); @@ -98,8 +98,8 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, - const label faceI = -1 + const label celli, + const label facei = -1 ); @@ -108,7 +108,7 @@ public: //- Cell index inline label cell() const { - return cellI_; + return celli_; } //- Interpolation weights diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPoint.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPoint.H index 4cb6804597c38ad82772e76ccb394ce1c4b6b004..7a4302f7aeeb4dde5fa1d85cb21d8ee689d94115 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPoint.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPoint.H @@ -82,8 +82,8 @@ public: inline Type interpolate ( const vector& position, - const label cellI, - const label faceI = -1 + const label celli, + const label facei = -1 ) const; //- Interpolate field to the given point in the tetrahedron @@ -92,7 +92,7 @@ public: ( const vector& position, const tetIndices& tetIs, - const label faceI = -1 + const label facei = -1 ) const; }; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPointI.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPointI.H index 8d641af37b2bdb0fa57eaa27c2fe994e5578b551..dfd3a3b99b12e50639098c9c829e1f400c56aaca 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPointI.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPoint/interpolationCellPointI.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 @@ -47,11 +47,11 @@ template<class Type> inline Type Foam::interpolationCellPoint<Type>::interpolate ( const vector& position, - const label cellI, - const label faceI + const label celli, + const label facei ) const { - return interpolate(cellPointWeight(this->pMesh_, position, cellI, faceI)); + return interpolate(cellPointWeight(this->pMesh_, position, celli, facei)); } @@ -60,20 +60,20 @@ inline Type Foam::interpolationCellPoint<Type>::interpolate ( const vector& position, const tetIndices& tetIs, - const label faceI + const label facei ) const { // Assumes that the position is consistent with the supplied - // tetIndices. Does not pay attention to whether or not faceI is + // tetIndices. Does not pay attention to whether or not facei is // supplied or not - the result will be essentially the same. // Performs a consistency check, however. - if (faceI >= 0) + if (facei >= 0) { - if (faceI != tetIs.face()) + if (facei != tetIs.face()) { FatalErrorInFunction - << "specified face " << faceI << " inconsistent with the face " + << "specified face " << facei << " inconsistent with the face " << "stored by tetIndices: " << tetIs.face() << exit(FatalError); } diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C index deecb80321dcd3fabe0bcb220230e60ba99213c9..d7b130a1ca64d37e813054bbfaf709c8497fad52 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.C @@ -59,8 +59,8 @@ template<class Type> Type Foam::interpolationCellPointFace<Type>::interpolate ( const vector& position, - const label cellI, - const label faceI + const label celli, + const label facei ) const { Type ts[4]; @@ -71,10 +71,10 @@ Type Foam::interpolationCellPointFace<Type>::interpolate Type t = Zero; // only use face information when the position is on a face - if (faceI < 0) + if (facei < 0) { - const vector& cellCentre = this->pMesh_.cellCentres()[cellI]; - const labelList& cellFaces = this->pMesh_.cells()[cellI]; + const vector& cellCentre = this->pMesh_.cellCentres()[celli]; + const labelList& cellFaces = this->pMesh_.cells()[celli]; vector projection = position - cellCentre; tetPoints[3] = cellCentre; @@ -88,9 +88,9 @@ Type Foam::interpolationCellPointFace<Type>::interpolate label closestFace = -1; scalar minDistance = GREAT; - forAll(cellFaces, faceI) + forAll(cellFaces, facei) { - label nFace = cellFaces[faceI]; + label nFace = cellFaces[facei]; vector normal = this->pMeshFaceAreas_[nFace]; normal /= mag(normal); @@ -163,10 +163,10 @@ Type Foam::interpolationCellPointFace<Type>::interpolate { minDistance = GREAT; - label faceI = 0; - while (faceI < cellFaces.size() && !foundTet) + label facei = 0; + while (facei < cellFaces.size() && !foundTet) { - label nFace = cellFaces[faceI]; + label nFace = cellFaces[facei]; if (nFace < this->pMeshFaceAreas_.size()) { foundTet = findTet @@ -182,7 +182,7 @@ Type Foam::interpolationCellPointFace<Type>::interpolate minDistance ); } - faceI++; + facei++; } } @@ -220,16 +220,16 @@ Type Foam::interpolationCellPointFace<Type>::interpolate } else { - label patchI = + label patchi = this->pMesh_.boundaryMesh().whichPatch(closestFace); // If the boundary patch is not empty use the face value // else use the cell value - if (this->psi_.boundaryField()[patchI].size()) + if (this->psi_.boundaryField()[patchi].size()) { - ts[2] = this->psi_.boundaryField()[patchI] + ts[2] = this->psi_.boundaryField()[patchi] [ - this->pMesh_.boundaryMesh()[patchI].whichFace + this->pMesh_.boundaryMesh()[patchi].whichFace ( closestFace ) @@ -237,11 +237,11 @@ Type Foam::interpolationCellPointFace<Type>::interpolate } else { - ts[2] = this->psi_[cellI]; + ts[2] = this->psi_[celli]; } } - ts[3] = this->psi_[cellI]; + ts[3] = this->psi_[celli]; for (label n=0; n<4; n++) { @@ -255,7 +255,7 @@ Type Foam::interpolationCellPointFace<Type>::interpolate { InfoInFunction << "search failed; using closest cellFace value" << endl - << "cell number " << cellI << tab + << "cell number " << celli << tab << "position " << position << endl; if (closestFace < psis_.size()) @@ -264,16 +264,16 @@ Type Foam::interpolationCellPointFace<Type>::interpolate } else { - label patchI = + label patchi = this->pMesh_.boundaryMesh().whichPatch(closestFace); // If the boundary patch is not empty use the face value // else use the cell value - if (this->psi_.boundaryField()[patchI].size()) + if (this->psi_.boundaryField()[patchi].size()) { - t = this->psi_.boundaryField()[patchI] + t = this->psi_.boundaryField()[patchi] [ - this->pMesh_.boundaryMesh()[patchI].whichFace + this->pMesh_.boundaryMesh()[patchi].whichFace ( closestFace ) @@ -281,7 +281,7 @@ Type Foam::interpolationCellPointFace<Type>::interpolate } else { - t = this->psi_[cellI]; + t = this->psi_[celli]; } } } @@ -291,7 +291,7 @@ Type Foam::interpolationCellPointFace<Type>::interpolate bool foundTriangle = findTriangle ( position, - faceI, + facei, tetPointLabels, phi ); @@ -306,48 +306,48 @@ Type Foam::interpolationCellPointFace<Type>::interpolate } // ... and the face value - if (faceI < psis_.size()) + if (facei < psis_.size()) { - t += phi[2]*psis_[faceI]; + t += phi[2]*psis_[facei]; } else { - label patchI = this->pMesh_.boundaryMesh().whichPatch(faceI); + label patchi = this->pMesh_.boundaryMesh().whichPatch(facei); // If the boundary patch is not empty use the face value // else use the cell value - if (this->psi_.boundaryField()[patchI].size()) + if (this->psi_.boundaryField()[patchi].size()) { - t += phi[2]*this->psi_.boundaryField()[patchI] - [this->pMesh_.boundaryMesh()[patchI].whichFace(faceI)]; + t += phi[2]*this->psi_.boundaryField()[patchi] + [this->pMesh_.boundaryMesh()[patchi].whichFace(facei)]; } else { - t += phi[2]*this->psi_[cellI]; + t += phi[2]*this->psi_[celli]; } } } else { // use face value only - if (faceI < psis_.size()) + if (facei < psis_.size()) { - t = psis_[faceI]; + t = psis_[facei]; } else { - label patchI = this->pMesh_.boundaryMesh().whichPatch(faceI); + label patchi = this->pMesh_.boundaryMesh().whichPatch(facei); // If the boundary patch is not empty use the face value // else use the cell value - if (this->psi_.boundaryField()[patchI].size()) + if (this->psi_.boundaryField()[patchi].size()) { - t = this->psi_.boundaryField()[patchI] - [this->pMesh_.boundaryMesh()[patchI].whichFace(faceI)]; + t = this->psi_.boundaryField()[patchi] + [this->pMesh_.boundaryMesh()[patchi].whichFace(facei)]; } else { - t = this->psi_[cellI]; + t = this->psi_[celli]; } } } diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.H index e26b2e5f64c565c6438a6ad9e33b84997a833acd..f5e9a0e80bf12ee0e69c828907656813f8627a37 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/interpolationCellPointFace.H @@ -99,8 +99,8 @@ public: Type interpolate ( const vector& position, - const label cellI, - const label faceI = -1 + const label celli, + const label facei = -1 ) const; }; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C index d599b5aa01ac8109b92efd9d901784e32e258eb1..eef9a8f988a473edde51ab488864b56369ae105a 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C @@ -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 @@ -31,22 +31,22 @@ Foam::cellPointWeightWallModified::cellPointWeightWallModified ( const polyMesh& mesh, const vector& position, - const label cellI, - const label faceI + const label celli, + const label facei ) : - cellPointWeight(mesh, position, cellI, faceI) + cellPointWeight(mesh, position, celli, facei) { // findTetrahedron or findTriangle will already have been called // by the cellPointWeight constructor - if (faceI >= 0) + if (facei >= 0) { const polyBoundaryMesh& bm = mesh.boundaryMesh(); - label patchI = bm.whichPatch(faceI); - if (patchI != -1) + label patchi = bm.whichPatch(facei); + if (patchi != -1) { - if (isA<wallPolyPatch>(bm[patchI])) + if (isA<wallPolyPatch>(bm[patchi])) { // Apply cell centre value wall faces weights_[0] = 1.0; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H index f56ba76007b7fb94affbc7f8ea848c7a937c19c1..052377d5a2eef2b7abd8f4824b29355ff117c370 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.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 @@ -64,8 +64,8 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, - const label faceI = -1 + const label celli, + const label facei = -1 ); }; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H index 2af0957cd724ebca277015a581d58d06ca39e7a8..a2bd9c751845f981ae401028433495d3e553ab80 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModified.H @@ -74,8 +74,8 @@ public: inline Type interpolate ( const vector& position, - const label cellI, - const label faceI = -1 + const label celli, + const label facei = -1 ) const; //- Interpolate field to the given point in the tetrahedron @@ -84,7 +84,7 @@ public: ( const vector& position, const tetIndices& tetIs, - const label faceI = -1 + const label facei = -1 ) const; }; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H index b776dae3782851c3bf24bbb8ef8bbde163872d4b..d1861134796de710cfc9d991a085c39d160306e7 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/interpolationCellPointWallModifiedI.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 @@ -47,8 +47,8 @@ template<class Type> inline Type Foam::interpolationCellPointWallModified<Type>::interpolate ( const vector& position, - const label cellI, - const label faceI + const label celli, + const label facei ) const { return interpolate @@ -57,8 +57,8 @@ inline Type Foam::interpolationCellPointWallModified<Type>::interpolate ( this->pMesh_, position, - cellI, - faceI + celli, + facei ) ); } @@ -69,25 +69,25 @@ inline Type Foam::interpolationCellPointWallModified<Type>::interpolate ( const vector& position, const tetIndices& tetIs, - const label faceI + const label facei ) const { - if (faceI >= 0) + if (facei >= 0) { - if (faceI != tetIs.face()) + if (facei != tetIs.face()) { FatalErrorInFunction - << "specified face " << faceI << " inconsistent with the face " + << "specified face " << facei << " inconsistent with the face " << "stored by tetIndices: " << tetIs.face() << exit(FatalError); } const polyBoundaryMesh& bm = this->pMesh_.boundaryMesh(); - label patchI = bm.whichPatch(faceI); + label patchi = bm.whichPatch(facei); - if (patchI != -1) + if (patchi != -1) { - if (isA<wallPolyPatch>(bm[patchI])) + if (isA<wallPolyPatch>(bm[patchi])) { Type t = this->psi_[tetIs.cell()]; @@ -103,7 +103,7 @@ inline Type Foam::interpolationCellPointWallModified<Type>::interpolate ( position, tetIs, - faceI + facei ); } diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.H b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.H index 81028eccbf73d81f359749e96c4ff0193c98e643..d771ec5ee8d2ea14e88199d18c97d02a36c9f244 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVC.H @@ -85,8 +85,8 @@ public: inline Type interpolate ( const vector& position, - const label cellI, - const label faceI = -1 + const label celli, + const label facei = -1 ) const; }; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVCI.H b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVCI.H index f0671c88fe9ad56b3ba072ccc699de27b82f2e46..db4ffae65c289110d849b53a5bb1b2ebbad67df8 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVCI.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/interpolationPointMVCI.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 @@ -39,13 +39,13 @@ template<class Type> inline Type Foam::interpolationPointMVC<Type>::interpolate ( const vector& position, - const label cellI, - const label faceI + const label celli, + const label facei ) const { return interpolate ( - pointMVCWeight(this->pMesh_, position, cellI, faceI) + pointMVCWeight(this->pMesh_, position, celli, facei) ); } diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C index d77af00d4efb3d27e8ca395153f2066870b462c7..5177dcaa827186b0c564f1eaceadd352ece68eab 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.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 @@ -99,10 +99,10 @@ void Foam::pointMVCWeight::calcWeights forAll(cFaces, iter) { - label faceI = cFaces[iter]; - const face& f = mesh.faces()[faceI]; + label facei = cFaces[iter]; + const face& f = mesh.faces()[facei]; - //Pout<< "face:" << faceI << " at:" + //Pout<< "face:" << facei << " at:" // << pointField(mesh.points(), f) // << endl; diff --git a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.H b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.H index 32b6c5ec3688fe89027602d9b11913eceb99b431..a76fc7f951eca91837c87bdc19b97bb0f9489ba0 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.H +++ b/src/finiteVolume/interpolation/interpolation/interpolationPointMVC/pointMVCWeight.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 @@ -119,8 +119,8 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, - const label faceI = -1 + const label celli, + const label facei = -1 ); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C index f3c7bce6d19443215b698e3be02a9fa7d6d32eef..bd068cc501e812a2b3f70c4b2ec4e94c96cd0253 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/PhiScheme/PhiScheme.C @@ -102,24 +102,24 @@ Foam::PhiScheme<Type, PhiLimiter>::limiter surfaceScalarField::GeometricBoundaryField& bLimiter = Limiter.boundaryFieldRef(); - forAll(bLimiter, patchI) + forAll(bLimiter, patchi) { - scalarField& pLimiter = bLimiter[patchI]; + scalarField& pLimiter = bLimiter[patchi]; - if (bLimiter[patchI].coupled()) + if (bLimiter[patchi].coupled()) { - const scalarField& pCDweights = CDweights.boundaryField()[patchI]; - const vectorField& pSf = Sf.boundaryField()[patchI]; - const scalarField& pmagSf = magSf.boundaryField()[patchI]; - const scalarField& pFaceFlux = Uflux.boundaryField()[patchI]; + const scalarField& pCDweights = CDweights.boundaryField()[patchi]; + const vectorField& pSf = Sf.boundaryField()[patchi]; + const scalarField& pmagSf = magSf.boundaryField()[patchi]; + const scalarField& pFaceFlux = Uflux.boundaryField()[patchi]; const Field<Type> pphiP ( - phi.boundaryField()[patchI].patchInternalField() + phi.boundaryField()[patchi].patchInternalField() ); const Field<Type> pphiN ( - phi.boundaryField()[patchI].patchNeighbourField() + phi.boundaryField()[patchi].patchNeighbourField() ); forAll(pLimiter, face) diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C index b3dc8a993bd9069a00f08357066039f550c9cb1c..82d836e84babc698c931e3bc80f1803fd1420d8a 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C @@ -161,12 +161,12 @@ Foam::limitedSurfaceInterpolationScheme<Type>::weights surfaceScalarField::GeometricBoundaryField& bWeights = Weights.boundaryFieldRef(); - forAll(bWeights, patchI) + forAll(bWeights, patchi) { - scalarField& pWeights = bWeights[patchI]; + scalarField& pWeights = bWeights[patchi]; - const scalarField& pCDweights = CDweights.boundaryField()[patchI]; - const scalarField& pFaceFlux = faceFlux_.boundaryField()[patchI]; + const scalarField& pCDweights = CDweights.boundaryField()[patchi]; + const scalarField& pFaceFlux = faceFlux_.boundaryField()[patchi]; forAll(pWeights, face) { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/reverseLinear/reverseLinear.H b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/reverseLinear/reverseLinear.H index ffc68526b513a904af3b7f3877fa75c675aa4389..3a27d2aa4fb9dbcc4cb267772c3525dfc1b9f940 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/reverseLinear/reverseLinear.H +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/reverseLinear/reverseLinear.H @@ -132,15 +132,15 @@ public: reverseLinearWeights.boundaryFieldRef(); - forAll(mesh.boundary(), patchI) + forAll(mesh.boundary(), patchi) { - if (rlwbf[patchI].coupled()) + if (rlwbf[patchi].coupled()) { - rlwbf[patchI] = 1.0 - cdWeights.boundaryField()[patchI]; + rlwbf[patchi] = 1.0 - cdWeights.boundaryField()[patchi]; } else { - rlwbf[patchI] = cdWeights.boundaryField()[patchI]; + rlwbf[patchi] = cdWeights.boundaryField()[patchi]; } } diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraintsTemplates.C b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraintsTemplates.C index 4c4bf2d4e43f27aa56f1556995cecc0e8d97d1ef..ed0922c0ac49bb2493f0a5cb4a4f39384d57fa9c 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/pointConstraintsTemplates.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/pointConstraintsTemplates.C @@ -94,9 +94,9 @@ void Foam::pointConstraints::setPatchFields typename GeometricField<Type, pointPatchField, pointMesh>:: GeometricBoundaryField& pfbf = pf.boundaryFieldRef(); - forAll(pfbf, patchI) + forAll(pfbf, patchi) { - pointPatchField<Type>& ppf = pfbf[patchI]; + pointPatchField<Type>& ppf = pfbf[patchi]; if (isA<valuePointPatchField<Type>>(ppf)) { diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C index 74b2f6b6555429f8a1eabcf4b63a0b0ed1ace8eb..3c6ee43ad00258d0ecd0d50068e51be5519892f4 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolate.C @@ -89,12 +89,12 @@ void Foam::volPointInterpolation::addSeparated typename GeometricField<Type, pointPatchField, pointMesh>:: GeometricBoundaryField& pfbf = pf.boundaryFieldRef(); - forAll(pfbf, patchI) + forAll(pfbf, patchi) { - if (pfbf[patchI].coupled()) + if (pfbf[patchi].coupled()) { refCast<coupledPointPatchField<Type>> - (pfbf[patchI]).initSwapAddSeparated + (pfbf[patchi]).initSwapAddSeparated ( Pstream::nonBlocking, pf.internalField() @@ -105,12 +105,12 @@ void Foam::volPointInterpolation::addSeparated // Block for any outstanding requests Pstream::waitRequests(); - forAll(pfbf, patchI) + forAll(pfbf, patchi) { - if (pfbf[patchI].coupled()) + if (pfbf[patchi].coupled()) { refCast<coupledPointPatchField<Type>> - (pfbf[patchI]).swapAddSeparated + (pfbf[patchi]).swapAddSeparated ( Pstream::nonBlocking, pf.internalField() @@ -172,26 +172,26 @@ Foam::tmp<Foam::Field<Type>> Foam::volPointInterpolation::flatBoundaryField ); Field<Type>& boundaryVals = tboundaryVals.ref(); - forAll(vf.boundaryField(), patchI) + forAll(vf.boundaryField(), patchi) { - label bFaceI = bm[patchI].patch().start() - mesh.nInternalFaces(); + label bFaceI = bm[patchi].patch().start() - mesh.nInternalFaces(); if ( - !isA<emptyFvPatch>(bm[patchI]) - && !vf.boundaryField()[patchI].coupled() + !isA<emptyFvPatch>(bm[patchi]) + && !vf.boundaryField()[patchi].coupled() ) { SubList<Type> ( boundaryVals, - vf.boundaryField()[patchI].size(), + vf.boundaryField()[patchi].size(), bFaceI - ) = vf.boundaryField()[patchI]; + ) = vf.boundaryField()[patchi]; } else { - const polyPatch& pp = bm[patchI].patch(); + const polyPatch& pp = bm[patchi].patch(); forAll(pp, i) { diff --git a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C index 12ca3fea5b6cf072ba3290cebb0fc9cdfa921865..cf41cebc3814fc0a0ca2d660a0172ee24a0026bc 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/volPointInterpolation.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 @@ -77,14 +77,14 @@ void Foam::volPointInterpolation::calcBoundaryAddressing() // cyclicAMI const surfaceScalarField& magSf = mesh().magSf(); - forAll(pbm, patchI) + forAll(pbm, patchi) { - const polyPatch& pp = pbm[patchI]; + const polyPatch& pp = pbm[patchi]; if ( !isA<emptyPolyPatch>(pp) - && !magSf.boundaryField()[patchI].coupled() + && !magSf.boundaryField()[patchi].coupled() ) { label bFaceI = pp.start()-mesh().nInternalFaces(); @@ -225,9 +225,9 @@ void Foam::volPointInterpolation::makeBoundaryWeights(scalarField& sumWeights) { if (boundaryIsPatchFace_[pFaces[i]]) { - label faceI = mesh().nInternalFaces() + pFaces[i]; + label facei = mesh().nInternalFaces() + pFaces[i]; - pw[i] = 1.0/mag(points[pointI] - faceCentres[faceI]); + pw[i] = 1.0/mag(points[pointI] - faceCentres[facei]); sumWeights[pointI] += pw[i]; } else diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C index 1b468f825d1c7af72b13c2315ae21badfde52c40..6959e4b2fde97c30951cbd638470caadd4411c90 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.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 @@ -145,14 +145,14 @@ void Foam::MGridGenGAMGAgglomeration::detectSharedFaces sharedFaces.resize(addr.lowerAddr().size()/100); // Detect any faces inbetween same value - forAll(lower, faceI) + forAll(lower, facei) { - label lowerData = value[lower[faceI]]; - label upperData = value[upper[faceI]]; + label lowerData = value[lower[facei]]; + label upperData = value[upper[facei]]; if (lowerData != -1 && lowerData == upperData) { - sharedFaces.insert(faceI); + sharedFaces.insert(facei); } } } @@ -242,9 +242,9 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration const globalIndex globalNumbering(nCoarseCells); labelField globalAgglom(addr.size()); - forAll(agglom, cellI) + forAll(agglom, celli) { - globalAgglom[cellI] = globalNumbering.toGlobal(agglom[cellI]); + globalAgglom[celli] = globalNumbering.toGlobal(agglom[celli]); } // Get the interface agglomeration @@ -269,8 +269,8 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration scalarField weights = *magSfPtr; forAllConstIter(labelHashSet, sharedFaces, iter) { - label faceI= iter.key(); - weights[faceI] *= 2.0; + label facei= iter.key(); + weights[facei] *= 2.0; } // Redo the agglomeration using the new weights diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C index 4577df756ae81c1bd258e60ecaf0bb75610ec423..cf2c464ae20663eede78740d2e105011f958bf23 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C @@ -219,7 +219,7 @@ Foam::displacementLayeredMotionMotionSolver::faceZoneEvaluate const labelList& meshPoints, const dictionary& dict, const PtrList<pointVectorField>& patchDisp, - const label patchI + const label patchi ) const { tmp<vectorField> tfld(new vectorField(meshPoints.size())); @@ -239,14 +239,14 @@ Foam::displacementLayeredMotionMotionSolver::faceZoneEvaluate } else if (type == "slip") { - if ((patchI % 2) != 1) + if ((patchi % 2) != 1) { FatalIOErrorInFunction(*this) << "FaceZone:" << fz.name() << exit(FatalIOError); } // Use field set by previous bc - fld = vectorField(patchDisp[patchI - 1], meshPoints); + fld = vectorField(patchDisp[patchi - 1], meshPoints); } else if (type == "follow") { @@ -300,10 +300,10 @@ void Foam::displacementLayeredMotionMotionSolver::cellZoneSolve PtrList<pointVectorField> patchDisp(patchesDict.size()); // Allocate the fields - label patchI = 0; - forAllConstIter(dictionary, patchesDict, patchIter) + label patchi = 0; + forAllConstIter(dictionary, patchesDict, patchiter) { - const word& faceZoneName = patchIter().keyword(); + const word& faceZoneName = patchiter().keyword(); label zoneI = mesh().faceZones().findZoneID(faceZoneName); if (zoneI == -1) { @@ -316,10 +316,10 @@ void Foam::displacementLayeredMotionMotionSolver::cellZoneSolve // Determine the points of the faceZone within the cellZone const faceZone& fz = mesh().faceZones()[zoneI]; - patchDist.set(patchI, new scalarField(mesh().nPoints())); + patchDist.set(patchi, new scalarField(mesh().nPoints())); patchDisp.set ( - patchI, + patchi, new pointVectorField ( IOobject @@ -335,7 +335,7 @@ void Foam::displacementLayeredMotionMotionSolver::cellZoneSolve ) ); - patchI++; + patchi++; } @@ -347,11 +347,11 @@ void Foam::displacementLayeredMotionMotionSolver::cellZoneSolve // Make sure we can pick up bc values from field pointDisplacement_.correctBoundaryConditions(); - patchI = 0; - forAllConstIter(dictionary, patchesDict, patchIter) + patchi = 0; + forAllConstIter(dictionary, patchesDict, patchiter) { - const word& faceZoneName = patchIter().keyword(); - const dictionary& faceZoneDict = patchIter().dict(); + const word& faceZoneName = patchiter().keyword(); + const dictionary& faceZoneDict = patchiter().dict(); // Determine the points of the faceZone within the cellZone const faceZone& fz = mesh().faceZones()[faceZoneName]; @@ -372,7 +372,7 @@ void Foam::displacementLayeredMotionMotionSolver::cellZoneSolve meshPoints, faceZoneDict, patchDisp, - patchI + patchi ); if (debug) @@ -396,14 +396,14 @@ void Foam::displacementLayeredMotionMotionSolver::cellZoneSolve meshPoints, tseed, - patchDist[patchI], - patchDisp[patchI] + patchDist[patchi], + patchDisp[patchi] ); // Implement real bc. - patchDisp[patchI].correctBoundaryConditions(); + patchDisp[patchi].correctBoundaryConditions(); - patchI++; + patchi++; } diff --git a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C index 61ec8e11dea5aab7fff8ab0fe4efc8a1b6e114f2..91af7578fe4fc95cdbb877c6b6056c1e978cdbef 100644 --- a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C @@ -120,23 +120,23 @@ void Foam::inverseFaceDistanceDiffusivity::correct() const List<wallPoint>& faceInfo = waveInfo.allFaceInfo(); const List<wallPoint>& cellInfo = waveInfo.allCellInfo(); - for (label faceI=0; faceI<mesh().nInternalFaces(); faceI++) + for (label facei=0; facei<mesh().nInternalFaces(); facei++) { - scalar dist = faceInfo[faceI].distSqr(); + scalar dist = faceInfo[facei].distSqr(); - faceDiffusivity_[faceI] = 1.0/sqrt(dist); + faceDiffusivity_[facei] = 1.0/sqrt(dist); } surfaceScalarField::GeometricBoundaryField& faceDiffusivityBf = faceDiffusivity_.boundaryFieldRef(); - forAll(faceDiffusivityBf, patchI) + forAll(faceDiffusivityBf, patchi) { - fvsPatchScalarField& bfld = faceDiffusivityBf[patchI]; + fvsPatchScalarField& bfld = faceDiffusivityBf[patchi]; const labelUList& faceCells = bfld.patch().faceCells(); - if (patchSet.found(patchI)) + if (patchSet.found(patchi)) { forAll(bfld, i) { diff --git a/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C index 6468e49dcef78e11768afb7c08358b16c6b74b0a..3e28d7792e90d7d8ae729dc647381657a11d7dd1 100644 --- a/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C @@ -137,9 +137,9 @@ void Foam::inversePointDistanceDiffusivity::correct() } - for (label faceI=0; faceI<mesh().nInternalFaces(); faceI++) + for (label facei=0; facei<mesh().nInternalFaces(); facei++) { - const face& f = mesh().faces()[faceI]; + const face& f = mesh().faces()[facei]; scalar dist = 0; @@ -149,18 +149,18 @@ void Foam::inversePointDistanceDiffusivity::correct() } dist /= f.size(); - faceDiffusivity_[faceI] = 1.0/dist; + faceDiffusivity_[facei] = 1.0/dist; } surfaceScalarField::GeometricBoundaryField& faceDiffusivityBf = faceDiffusivity_.boundaryFieldRef(); - forAll(faceDiffusivityBf, patchI) + forAll(faceDiffusivityBf, patchi) { - fvsPatchScalarField& bfld = faceDiffusivityBf[patchI]; + fvsPatchScalarField& bfld = faceDiffusivityBf[patchi]; - if (patchSet.found(patchI)) + if (patchSet.found(patchi)) { const labelUList& faceCells = bfld.patch().faceCells(); diff --git a/src/fvOptions/cellSetOption/cellSetOption.C b/src/fvOptions/cellSetOption/cellSetOption.C index 8864683ceb098c806e13ed5ae0512d9cd8e3eea2..e0cceb2644a2e1f2af37c86abce0647b90565f2c 100644 --- a/src/fvOptions/cellSetOption/cellSetOption.C +++ b/src/fvOptions/cellSetOption/cellSetOption.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,13 +101,13 @@ void Foam::fv::cellSetOption::setCellSet() forAll(points_, i) { - label cellI = mesh_.findCell(points_[i]); - if (cellI >= 0) + label celli = mesh_.findCell(points_[i]); + if (celli >= 0) { - selectedCells.insert(cellI); + selectedCells.insert(celli); } - label globalCellI = returnReduce(cellI, maxOp<label>()); + label globalCellI = returnReduce(celli, maxOp<label>()); if (globalCellI < 0) { WarningInFunction diff --git a/src/fvOptions/corrections/limitTemperature/limitTemperature.C b/src/fvOptions/corrections/limitTemperature/limitTemperature.C index d2f5530c6fbfe9ce5af349edf1734888ab3d6a1c..012573b43d91b5dd2759d9e75adc66dae388df30 100644 --- a/src/fvOptions/corrections/limitTemperature/limitTemperature.C +++ b/src/fvOptions/corrections/limitTemperature/limitTemperature.C @@ -88,8 +88,8 @@ void Foam::fv::limitTemperature::correct(volScalarField& he) forAll(cells_, i) { - label cellI = cells_[i]; - hec[cellI]= max(min(hec[cellI], heMax[i]), heMin[i]); + label celli = cells_[i]; + hec[celli]= max(min(hec[celli], heMax[i]), heMin[i]); } // handle boundaries in the case of 'all' diff --git a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C index d354c44303c73bc64e25cb2cc03a6ac25d841a7b..aa7f6b2db22348863cdea241711d660101094860 100644 --- a/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.C +++ b/src/fvOptions/sources/derived/effectivenessHeatExchangerSource/effectivenessHeatExchangerSource.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 @@ -61,23 +61,23 @@ void Foam::fv::effectivenessHeatExchangerSource::initialise() label count = 0; forAll(fZone, i) { - label faceI = fZone[i]; + label facei = fZone[i]; label faceId = -1; label facePatchId = -1; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - faceId = faceI; + faceId = facei; facePatchId = -1; } else { - facePatchId = mesh_.boundaryMesh().whichPatch(faceI); + facePatchId = mesh_.boundaryMesh().whichPatch(facei); const polyPatch& pp = mesh_.boundaryMesh()[facePatchId]; if (isA<coupledPolyPatch>(pp)) { if (refCast<const coupledPolyPatch>(pp).owner()) { - faceId = pp.whichFace(faceI); + faceId = pp.whichFace(facei); } else { @@ -86,7 +86,7 @@ void Foam::fv::effectivenessHeatExchangerSource::initialise() } else if (!isA<emptyPolyPatch>(pp)) { - faceId = faceI - pp.start(); + faceId = facei - pp.start(); } else { @@ -126,15 +126,15 @@ void Foam::fv::effectivenessHeatExchangerSource::calculateTotalArea area = 0; forAll(faceId_, i) { - label faceI = faceId_[i]; + label facei = faceId_[i]; if (facePatchId_[i] != -1) { - label patchI = facePatchId_[i]; - area += mesh_.magSf().boundaryField()[patchI][faceI]; + label patchi = facePatchId_[i]; + area += mesh_.magSf().boundaryField()[patchi][facei]; } else { - area += mesh_.magSf()[faceI]; + area += mesh_.magSf()[facei]; } } reduce(area, sumOp<scalar>()); @@ -212,20 +212,20 @@ void Foam::fv::effectivenessHeatExchangerSource::addSup scalar CpfMean = 0; forAll(faceId_, i) { - label faceI = faceId_[i]; + label facei = faceId_[i]; if (facePatchId_[i] != -1) { - label patchI = facePatchId_[i]; - totalphi += phi.boundaryField()[patchI][faceI]*faceSign_[i]; + label patchi = facePatchId_[i]; + totalphi += phi.boundaryField()[patchi][facei]*faceSign_[i]; CpfMean += - Cpf.boundaryField()[patchI][faceI] - *mesh_.magSf().boundaryField()[patchI][faceI]; + Cpf.boundaryField()[patchi][facei] + *mesh_.magSf().boundaryField()[patchi][facei]; } else { - totalphi += phi[faceI]*faceSign_[i]; - CpfMean += Cpf[faceI]*mesh_.magSf()[faceI]; + totalphi += phi[facei]*faceSign_[i]; + CpfMean += Cpf[facei]*mesh_.magSf()[facei]; } } reduce(CpfMean, sumOp<scalar>()); diff --git a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C index 65af46d7acadb92083451b79be96d5c8ea34384f..24ca385704752b6a78b22be66e936249929cfa5c 100644 --- a/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C +++ b/src/fvOptions/sources/derived/meanVelocityForce/meanVelocityForce.C @@ -132,9 +132,9 @@ Foam::scalar Foam::fv::meanVelocityForce::magUbarAve const scalarField& cv = mesh_.V(); forAll(cells_, i) { - label cellI = cells_[i]; - scalar volCell = cv[cellI]; - magUbarAve += (flowDir_ & U[cellI])*volCell; + label celli = cells_[i]; + scalar volCell = cv[celli]; + magUbarAve += (flowDir_ & U[celli])*volCell; } reduce(magUbarAve, sumOp<scalar>()); @@ -154,9 +154,9 @@ void Foam::fv::meanVelocityForce::correct(volVectorField& U) const scalarField& cv = mesh_.V(); forAll(cells_, i) { - label cellI = cells_[i]; - scalar volCell = cv[cellI]; - rAUave += rAU[cellI]*volCell; + label celli = cells_[i]; + scalar volCell = cv[celli]; + rAUave += rAU[celli]*volCell; } // Collect across all processors @@ -174,8 +174,8 @@ void Foam::fv::meanVelocityForce::correct(volVectorField& U) // Apply correction to velocity field forAll(cells_, i) { - label cellI = cells_[i]; - U[cellI] += flowDir_*rAU[cellI]*dGradP_; + label celli = cells_[i]; + U[celli] += flowDir_*rAU[celli]*dGradP_; } scalar gradP = gradP0_ + dGradP_; diff --git a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C index 1806a7acc0928b0e2cbf556ba3c8dee505a74799..6aaa40220440bf3b82dd1b64711c89239e04e3ea 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSource.C @@ -141,17 +141,17 @@ void Foam::fv::rotorDiskSource::setFaceArea(vector& axis, const bool correct) labelList cellAddr(mesh_.nCells(), -1); UIndirectList<label>(cellAddr, cells_) = identity(cells_.size()); labelList nbrFaceCellAddr(mesh_.nFaces() - nInternalFaces, -1); - forAll(pbm, patchI) + forAll(pbm, patchi) { - const polyPatch& pp = pbm[patchI]; + const polyPatch& pp = pbm[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start() + i; - label nbrFaceI = faceI - nInternalFaces; - label own = mesh_.faceOwner()[faceI]; + label facei = pp.start() + i; + label nbrFaceI = facei - nInternalFaces; + label own = mesh_.faceOwner()[facei]; nbrFaceCellAddr[nbrFaceI] = cellAddr[own]; } } @@ -161,48 +161,48 @@ void Foam::fv::rotorDiskSource::setFaceArea(vector& axis, const bool correct) syncTools::swapBoundaryFaceList(mesh_, nbrFaceCellAddr); // Add internal field contributions - for (label faceI = 0; faceI < nInternalFaces; faceI++) + for (label facei = 0; facei < nInternalFaces; facei++) { - const label own = cellAddr[mesh_.faceOwner()[faceI]]; - const label nbr = cellAddr[mesh_.faceNeighbour()[faceI]]; + const label own = cellAddr[mesh_.faceOwner()[facei]]; + const label nbr = cellAddr[mesh_.faceNeighbour()[facei]]; if ((own != -1) && (nbr == -1)) { - vector nf = Sf[faceI]/magSf[faceI]; + vector nf = Sf[facei]/magSf[facei]; if ((nf & axis) > tol) { - area_[own] += magSf[faceI]; - n += Sf[faceI]; + area_[own] += magSf[facei]; + n += Sf[facei]; } } else if ((own == -1) && (nbr != -1)) { - vector nf = Sf[faceI]/magSf[faceI]; + vector nf = Sf[facei]/magSf[facei]; if ((-nf & axis) > tol) { - area_[nbr] += magSf[faceI]; - n -= Sf[faceI]; + area_[nbr] += magSf[facei]; + n -= Sf[facei]; } } } // Add boundary contributions - forAll(pbm, patchI) + forAll(pbm, patchi) { - const polyPatch& pp = pbm[patchI]; - const vectorField& Sfp = mesh_.Sf().boundaryField()[patchI]; - const scalarField& magSfp = mesh_.magSf().boundaryField()[patchI]; + const polyPatch& pp = pbm[patchi]; + const vectorField& Sfp = mesh_.Sf().boundaryField()[patchi]; + const scalarField& magSfp = mesh_.magSf().boundaryField()[patchi]; if (pp.coupled()) { forAll(pp, j) { - const label faceI = pp.start() + j; - const label own = cellAddr[mesh_.faceOwner()[faceI]]; - const label nbr = nbrFaceCellAddr[faceI - nInternalFaces]; + const label facei = pp.start() + j; + const label own = cellAddr[mesh_.faceOwner()[facei]]; + const label nbr = nbrFaceCellAddr[facei - nInternalFaces]; const vector nf = Sfp[j]/magSfp[j]; if ((own != -1) && (nbr == -1) && ((nf & axis) > tol)) @@ -216,8 +216,8 @@ void Foam::fv::rotorDiskSource::setFaceArea(vector& axis, const bool correct) { forAll(pp, j) { - const label faceI = pp.start() + j; - const label own = cellAddr[mesh_.faceOwner()[faceI]]; + const label facei = pp.start() + j; + const label own = cellAddr[mesh_.faceOwner()[facei]]; const vector nf = Sfp[j]/magSfp[j]; if ((own != -1) && ((nf & axis) > tol)) @@ -280,9 +280,9 @@ void Foam::fv::rotorDiskSource::createCoordinateSystem() const vectorField& C = mesh_.C(); forAll(cells_, i) { - const label cellI = cells_[i]; - sumV += V[cellI]; - origin += V[cellI]*C[cellI]; + const label celli = cells_[i]; + sumV += V[celli]; + origin += V[celli]*C[celli]; } reduce(origin, sumOp<vector>()); reduce(sumV, sumOp<scalar>()); @@ -293,8 +293,8 @@ void Foam::fv::rotorDiskSource::createCoordinateSystem() scalar magR = -GREAT; forAll(cells_, i) { - const label cellI = cells_[i]; - vector test = C[cellI] - origin; + const label celli = cells_[i]; + vector test = C[celli] - origin; if (mag(test) > magR) { dx1 = test; @@ -307,8 +307,8 @@ void Foam::fv::rotorDiskSource::createCoordinateSystem() // Determine second radial vector and cross to determine axis forAll(cells_, i) { - const label cellI = cells_[i]; - vector dx2 = C[cellI] - origin; + const label celli = cells_[i]; + vector dx2 = C[celli] - origin; if (mag(dx2) > 0.5*magR) { axis = dx1 ^ dx2; @@ -403,10 +403,10 @@ void Foam::fv::rotorDiskSource::constructGeometry() { if (area_[i] > ROOTVSMALL) { - const label cellI = cells_[i]; + const label celli = cells_[i]; // Position in (planar) rotor co-ordinate system - x_[i] = coordSys_.localPosition(C[cellI]); + x_[i] = coordSys_.localPosition(C[celli]); // Cache max radius rMax_ = max(rMax_, x_[i].x()); diff --git a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C index 0d757a57c8144f90cf5be560ca866a1a4cdde32b..299fa07355e2b4268a984801ca4ae9f070a9679d 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/rotorDiskSourceTemplates.C @@ -54,12 +54,12 @@ void Foam::fv::rotorDiskSource::calculate { if (area_[i] > ROOTVSMALL) { - const label cellI = cells_[i]; + const label celli = cells_[i]; const scalar radius = x_[i].x(); // Transform velocity into local cylindrical reference frame - vector Uc = cylindrical_->invTransform(U[cellI], i); + vector Uc = cylindrical_->invTransform(U[celli], i); // Transform velocity into local coning system Uc = R_[i] & Uc; @@ -119,7 +119,7 @@ void Foam::fv::rotorDiskSource::calculate scalar tipFactor = neg(radius/rMax_ - tipEffect_); // Calculate forces perpendicular to blade - scalar pDyn = 0.5*rho[cellI]*magSqr(Uc); + scalar pDyn = 0.5*rho[celli]*magSqr(Uc); scalar f = pDyn*chord*nBlades_*area_[i]/radius/mathematical::twoPi; vector localForce = vector(0.0, -f*Cd, tipFactor*f*Cl); @@ -132,11 +132,11 @@ void Foam::fv::rotorDiskSource::calculate localForce = invR_[i] & localForce; // Transform force into global Cartesian co-ordinate system - force[cellI] = cylindrical_->transform(localForce, i); + force[celli] = cylindrical_->transform(localForce, i); if (divideVolume) { - force[cellI] /= V[cellI]; + force[celli] /= V[celli]; } } } @@ -196,8 +196,8 @@ void Foam::fv::rotorDiskSource::writeField forAll(cells_, i) { - const label cellI = cells_[i]; - field[cellI] = values[i]; + const label celli = cells_[i]; + field[celli] = values[i]; } tfield().write(); diff --git a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C index e23a0643fd78d82232ef8b539b336fd7c37369ad..683e356b238998310d0fb63758608a52f9d74084 100644 --- a/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C +++ b/src/fvOptions/sources/derived/rotorDiskSource/trimModel/targetCoeff/targetCoeffTrim.C @@ -66,15 +66,15 @@ Foam::vector Foam::targetCoeffTrim::calcCoeffs vector cf(Zero); forAll(cells, i) { - label cellI = cells[i]; + label celli = cells[i]; - vector fc = force[cellI]; - vector mc = fc^(C[cellI] - origin); + vector fc = force[celli]; + vector mc = fc^(C[celli] - origin); if (useCoeffs_) { scalar radius = x[i].x(); - scalar coeff2 = rho[cellI]*coeff1*pow4(radius); + scalar coeff2 = rho[celli]*coeff1*pow4(radius); // add to coefficient vector cf[0] += (fc & yawAxis)/(coeff2 + ROOTVSMALL); diff --git a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C index 5ed89df046d08e26cd78db642a01ace2bb2cb695..77a0f971be66ac2b2940832f851806d26b599bd8 100644 --- a/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C +++ b/src/fvOptions/sources/derived/solidificationMeltingSource/solidificationMeltingSource.C @@ -161,13 +161,13 @@ void Foam::fv::solidificationMeltingSource::update(const volScalarField& Cp) forAll(cells_, i) { - label cellI = cells_[i]; + label celli = cells_[i]; - scalar Tc = T[cellI]; - scalar Cpc = Cp[cellI]; - scalar alpha1New = alpha1_[cellI] + relax_*Cpc*(Tc - Tmelt_)/L_; + scalar Tc = T[celli]; + scalar Cpc = Cp[celli]; + scalar alpha1New = alpha1_[celli] + relax_*Cpc*(Tc - Tmelt_)/L_; - alpha1_[cellI] = max(0, min(alpha1New, 1)); + alpha1_[celli] = max(0, min(alpha1New, 1)); deltaT_[i] = Tc - Tmelt_; } @@ -293,16 +293,16 @@ void Foam::fv::solidificationMeltingSource::addSup forAll(cells_, i) { - label cellI = cells_[i]; + label celli = cells_[i]; - scalar Vc = V[cellI]; - scalar alpha1c = alpha1_[cellI]; + scalar Vc = V[celli]; + scalar alpha1c = alpha1_[celli]; scalar S = -Cu_*sqr(1.0 - alpha1c)/(pow3(alpha1c) + q_); vector Sb = rhoRef_*g*beta_*deltaT_[i]; - Sp[cellI] += Vc*S; - Su[cellI] += Vc*Sb; + Sp[celli] += Vc*S; + Su[celli] += Vc*Sb; } } diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C index e635f1864c581404b0b464ca6a21161b77475225..bc72f66b62ab636aec5c3a58471e9a3bd4bc7940 100644 --- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C +++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.C @@ -109,12 +109,12 @@ void Foam::DSMCCloud<ParcelType>::initialise numberDensities /= nParticle_; - forAll(mesh_.cells(), cellI) + forAll(mesh_.cells(), celli) { List<tetIndices> cellTets = polyMeshTetDecomposition::cellTetIndices ( mesh_, - cellI + celli ); forAll(cellTets, tetI) @@ -181,7 +181,7 @@ void Foam::DSMCCloud<ParcelType>::initialise p, U, Ei, - cellI, + celli, cellTetIs.face(), cellTetIs.tetPt(), typeId @@ -229,9 +229,9 @@ void Foam::DSMCCloud<ParcelType>::collisions() label collisions = 0; - forAll(cellOccupancy_, cellI) + forAll(cellOccupancy_, celli) { - const DynamicList<ParcelType*>& cellParcels(cellOccupancy_[cellI]); + const DynamicList<ParcelType*>& cellParcels(cellOccupancy_[celli]); label nC(cellParcels.size()); @@ -249,7 +249,7 @@ void Foam::DSMCCloud<ParcelType>::collisions() // Inverse addressing specifying which subCell a parcel is in List<label> whichSubCell(cellParcels.size()); - const point& cC = mesh_.cellCentres()[cellI]; + const point& cC = mesh_.cellCentres()[celli]; forAll(cellParcels, i) { @@ -265,15 +265,15 @@ void Foam::DSMCCloud<ParcelType>::collisions() // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - scalar sigmaTcRMax = sigmaTcRMax_[cellI]; + scalar sigmaTcRMax = sigmaTcRMax_[celli]; scalar selectedPairs = - collisionSelectionRemainder_[cellI] + collisionSelectionRemainder_[celli] + 0.5*nC*(nC - 1)*nParticle_*sigmaTcRMax*deltaT - /mesh_.cellVolumes()[cellI]; + /mesh_.cellVolumes()[celli]; label nCandidates(selectedPairs); - collisionSelectionRemainder_[cellI] = selectedPairs - nCandidates; + collisionSelectionRemainder_[celli] = selectedPairs - nCandidates; collisionCandidates += nCandidates; for (label c = 0; c < nCandidates; c++) @@ -343,9 +343,9 @@ void Foam::DSMCCloud<ParcelType>::collisions() // initial value in the acceptance-rejection criteria because // the number of collision candidates selected was based on this - if (sigmaTcR > sigmaTcRMax_[cellI]) + if (sigmaTcR > sigmaTcRMax_[celli]) { - sigmaTcRMax_[cellI] = sigmaTcR; + sigmaTcRMax_[celli] = sigmaTcR; } if ((sigmaTcR/sigmaTcRMax) > rndGen_.scalar01()) @@ -425,15 +425,15 @@ void Foam::DSMCCloud<ParcelType>::calculateFields() forAllConstIter(typename DSMCCloud<ParcelType>, *this, iter) { const ParcelType& p = iter(); - const label cellI = p.cell(); - - rhoN[cellI]++; - rhoM[cellI] += constProps(p.typeId()).mass(); - dsmcRhoN[cellI]++; - linearKE[cellI] += 0.5*constProps(p.typeId()).mass()*(p.U() & p.U()); - internalE[cellI] += p.Ei(); - iDof[cellI] += constProps(p.typeId()).internalDegreesOfFreedom(); - momentum[cellI] += constProps(p.typeId()).mass()*p.U(); + const label celli = p.cell(); + + rhoN[celli]++; + rhoM[celli] += constProps(p.typeId()).mass(); + dsmcRhoN[celli]++; + linearKE[celli] += 0.5*constProps(p.typeId()).mass()*(p.U() & p.U()); + internalE[celli] += p.Ei(); + iDof[celli] += constProps(p.typeId()).internalDegreesOfFreedom(); + momentum[celli] += constProps(p.typeId()).mass()*p.U(); } rhoN *= nParticle_/mesh().cellVolumes(); @@ -466,7 +466,7 @@ void Foam::DSMCCloud<ParcelType>::addNewParcel const vector& position, const vector& U, const scalar Ei, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId @@ -478,7 +478,7 @@ void Foam::DSMCCloud<ParcelType>::addNewParcel position, U, Ei, - cellI, + celli, tetFaceI, tetPtI, typeId diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.H b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.H index bdd2f07926db6b216024ff6a081b33c52180187a..67716694fbb62c0ac8c61b6d1c7a82f943ca1f0e 100644 --- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.H +++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloud.H @@ -453,7 +453,7 @@ public: const vector& position, const vector& U, const scalar Ei, - const label cellI, + const label celli, 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 fc540a3d122a7413c9198b557b0c6af12da41ac5..f8402638633ec956324139ce736a79bf4403a8df 100644 --- a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H +++ b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcel.H @@ -181,7 +181,7 @@ public: const vector& position, const vector& U, const scalar Ei, - const label cellI, + const label celli, 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 54de74c96de031c42210bca43e06207a98f367fd..1e3809a6854d409655f7ce755a3c1419b8d34044 100644 --- a/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelI.H +++ b/src/lagrangian/DSMC/parcels/Templates/DSMCParcel/DSMCParcelI.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 @@ -58,13 +58,13 @@ inline Foam::DSMCParcel<ParcelType>::DSMCParcel const vector& position, const vector& U, const scalar Ei, - const label cellI, + const label celli, 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 a2df8051d819bee826e13a7ccb242591b5708cd6..27f508a5fc202627da134e7a5d8ee5fd4f145b44 100644 --- a/src/lagrangian/DSMC/parcels/derived/dsmcParcel/dsmcParcel.C +++ b/src/lagrangian/DSMC/parcels/derived/dsmcParcel/dsmcParcel.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 @@ -42,7 +42,7 @@ Foam::dsmcParcel::dsmcParcel const vector& position, const vector& U, const scalar Ei, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId @@ -54,7 +54,7 @@ Foam::dsmcParcel::dsmcParcel position, U, Ei, - cellI, + celli, tetFaceI, tetPtI, typeId diff --git a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C index 6df7c26b1556b6ceea5619d83d85ab919d84f6fc..97be2a8f6cac1382575039206615167d7da92ec4 100644 --- a/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C +++ b/src/lagrangian/DSMC/submodels/InflowBoundaryModel/FreeStream/FreeStream.C @@ -230,7 +230,7 @@ void Foam::FreeStream<CloudType>::inflow() label globalFaceIndex = pFI + patch.start(); - label cellI = mesh.faceOwner()[globalFaceIndex]; + label celli = mesh.faceOwner()[globalFaceIndex]; const vector& fC = patch.faceCentres()[pFI]; @@ -240,7 +240,7 @@ void Foam::FreeStream<CloudType>::inflow() ( mesh, globalFaceIndex, - cellI + celli ); // Cumulative triangle area fractions @@ -408,7 +408,7 @@ void Foam::FreeStream<CloudType>::inflow() p, U, Ei, - cellI, + celli, globalFaceIndex, faceTetIs.tetPt(), typeId diff --git a/src/lagrangian/basic/Cloud/Cloud.C b/src/lagrangian/basic/Cloud/Cloud.C index 0ea3551bb1a31f11cbc52e036c4a85e103641760..4bbfc9f99fcbf006e00538129037f57e8b1d4425 100644 --- a/src/lagrangian/basic/Cloud/Cloud.C +++ b/src/lagrangian/basic/Cloud/Cloud.C @@ -40,12 +40,12 @@ void Foam::Cloud<ParticleType>::checkPatches() const { const polyBoundaryMesh& pbm = polyMesh_.boundaryMesh(); bool ok = true; - forAll(pbm, patchI) + forAll(pbm, patchi) { - if (isA<cyclicAMIPolyPatch>(pbm[patchI])) + if (isA<cyclicAMIPolyPatch>(pbm[patchi])) { const cyclicAMIPolyPatch& cami = - refCast<const cyclicAMIPolyPatch>(pbm[patchI]); + refCast<const cyclicAMIPolyPatch>(pbm[patchi]); if (cami.owner()) { @@ -73,11 +73,11 @@ void Foam::Cloud<ParticleType>::calcCellWallFaces() const const polyBoundaryMesh& patches = polyMesh_.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - if (isA<wallPolyPatch>(patches[patchI])) + if (isA<wallPolyPatch>(patches[patchi])) { - const polyPatch& patch = patches[patchI]; + const polyPatch& patch = patches[patchi]; const labelList& pFaceCells = patch.faceCells(); @@ -263,27 +263,27 @@ void Foam::Cloud<ParticleType>::move(TrackData& td, const scalar trackTime) // boundary face if (Pstream::parRun() && p.face() >= pMesh().nInternalFaces()) { - label patchI = pbm.whichPatch(p.face()); + label patchi = pbm.whichPatch(p.face()); // ... and the face is on a processor patch // prepare it for transfer - if (procPatchIndices[patchI] != -1) + if (procPatchIndices[patchi] != -1) { label n = neighbourProcIndices [ refCast<const processorPolyPatch> ( - pbm[patchI] + pbm[patchi] ).neighbProcNo() ]; - p.prepareForParallelTransfer(patchI, td); + p.prepareForParallelTransfer(patchi, td); particleTransferLists[n].append(this->remove(&p)); patchIndexTransferLists[n].append ( - procPatchNeighbours[patchI] + procPatchNeighbours[patchi] ); } } @@ -368,9 +368,9 @@ void Foam::Cloud<ParticleType>::move(TrackData& td, const scalar trackTime) { ParticleType& newp = newpIter(); - label patchI = procPatches[receivePatchIndex[pI++]]; + label patchi = procPatches[receivePatchIndex[pI++]]; - newp.correctAfterParallelTransfer(patchI, td); + newp.correctAfterParallelTransfer(patchi, td); addParticle(newParticles.remove(&newp)); } diff --git a/src/lagrangian/basic/InteractionLists/InteractionLists.C b/src/lagrangian/basic/InteractionLists/InteractionLists.C index 4b250dd7b8fa4978978388ff290b691253302827..9f2bff5523ff147ff37199adfc7a814146015f12 100644 --- a/src/lagrangian/basic/InteractionLists/InteractionLists.C +++ b/src/lagrangian/basic/InteractionLists/InteractionLists.C @@ -75,11 +75,11 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() treeBoundBoxList cellBbs(mesh_.nCells()); - forAll(cellBbs, cellI) + forAll(cellBbs, celli) { - cellBbs[cellI] = treeBoundBox + cellBbs[celli] = treeBoundBox ( - mesh_.cells()[cellI].points + mesh_.cells()[celli].points ( mesh_.faces(), mesh_.points() @@ -112,20 +112,20 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() label origProc = extendedProcBbsOrigProc[ePBIRI]; - forAll(cellBbs, cellI) + forAll(cellBbs, celli) { - const treeBoundBox& cellBb = cellBbs[cellI]; + const treeBoundBox& cellBb = cellBbs[celli]; if (cellBb.overlaps(otherExtendedProcBb)) { // This cell is in range of the Bb of the other // processor Bb, and so needs to be referred to it - cellInRangeOfCoupledPatch[cellI] = true; + cellInRangeOfCoupledPatch[celli] = true; cellIAndTToExchange.append ( - globalTransforms.encode(cellI, transformIndex) + globalTransforms.encode(celli, transformIndex) ); cellBbsToExchange.append(cellBb); @@ -148,11 +148,11 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() // a coupled boundary to build an octree limited to these cells. DynamicList<label> coupledPatchRangeCells; - forAll(cellInRangeOfCoupledPatch, cellI) + forAll(cellInRangeOfCoupledPatch, celli) { - if (cellInRangeOfCoupledPatch[cellI]) + if (cellInRangeOfCoupledPatch[celli]) { - coupledPatchRangeCells.append(cellI); + coupledPatchRangeCells.append(celli); } } @@ -304,9 +304,9 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() } } - forAll(rilInverse_, cellI) + forAll(rilInverse_, celli) { - rilInverse_[cellI].transfer(rilInverseTemp[cellI]); + rilInverse_[celli].transfer(rilInverseTemp[celli]); } // Determine which wall faces to refer @@ -318,9 +318,9 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() // Determine the index of all of the wall faces on this processor DynamicList<label> localWallFaces; - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { - const polyPatch& patch = mesh_.boundaryMesh()[patchI]; + const polyPatch& patch = mesh_.boundaryMesh()[patchi]; if (isA<wallPolyPatch>(patch)) { @@ -521,9 +521,9 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() } } - forAll(rwfilInverse_, cellI) + forAll(rwfilInverse_, celli) { - rwfilInverse_[cellI].transfer(rwfilInverseTemp[cellI]); + rwfilInverse_[celli].transfer(rwfilInverseTemp[celli]); } // Refer wall faces to the appropriate processor @@ -542,7 +542,7 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() const face& f = mesh_.faces()[wallFaceIndex]; - label patchI = mesh_.boundaryMesh().patchID() + label patchi = mesh_.boundaryMesh().patchID() [ wallFaceIndex - mesh_.nInternalFaces() ]; @@ -551,7 +551,7 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() ( face(identity(f.size())), transform.invTransformPosition(f.points(mesh_.points())), - patchI + patchi ); } @@ -579,9 +579,9 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() dwfil_.setSize(mesh_.nCells()); - forAll(cellBbs, cellI) + forAll(cellBbs, celli) { - const treeBoundBox& cellBb = cellBbs[cellI]; + const treeBoundBox& cellBb = cellBbs[celli]; treeBoundBox extendedBb ( @@ -607,18 +607,18 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() // The higher index cell is added to the lower index // cell's DIL. A cell is not added to its own DIL. - if (c > cellI) + if (c > celli) { cellDIL.append(c); } } - dil_[cellI].transfer(cellDIL); + dil_[celli].transfer(cellDIL); // Find all wall faces intersecting extendedBb interactingElems = wallFacesTree.findBox(extendedBb); - dwfil_[cellI].setSize(interactingElems.size(), -1); + dwfil_[celli].setSize(interactingElems.size(), -1); forAll(interactingElems, i) { @@ -626,7 +626,7 @@ void Foam::InteractionLists<ParticleType>::buildInteractionLists() label f = wallFacesTree.shapes().faceLabels()[elemI]; - dwfil_[cellI][i] = f; + dwfil_[celli][i] = f; } } } @@ -1022,18 +1022,18 @@ void Foam::InteractionLists<ParticleType>::prepareWallDataToRefer() globalTransforms.transformIndex(wfiat) ); - label patchI = mesh_.boundaryMesh().patchID() + label patchi = mesh_.boundaryMesh().patchID() [ wallFaceIndex - mesh_.nInternalFaces() ]; label patchFaceI = wallFaceIndex - - mesh_.boundaryMesh()[patchI].start(); + - 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 6365eb60cf15800a5e8b209263a8329c1fd9d252..b19baef64d38d4aa94d02257d928c8f418fde239 100644 --- a/src/lagrangian/basic/indexedParticle/indexedParticle.H +++ b/src/lagrangian/basic/indexedParticle/indexedParticle.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 @@ -66,13 +66,13 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label index = 0 ) : - particle(mesh, position, cellI, tetFaceI, tetPtI), + particle(mesh, position, celli, tetFaceI, tetPtI), index_(index) {} @@ -81,11 +81,11 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label index = 0 ) : - particle(mesh, position, cellI), + particle(mesh, position, celli), index_(index) {} diff --git a/src/lagrangian/basic/particle/particle.C b/src/lagrangian/basic/particle/particle.C index 9bf602eaba0ae72b04ed8d8155ed4378114601b1..9f0fc9dbb85a8b56fcf29b7afb4e1ddf180b05f8 100644 --- a/src/lagrangian/basic/particle/particle.C +++ b/src/lagrangian/basic/particle/particle.C @@ -48,15 +48,15 @@ Foam::particle::particle ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ) : mesh_(mesh), position_(position), - cellI_(cellI), - faceI_(-1), + celli_(celli), + facei_(-1), stepFraction_(0.0), tetFaceI_(tetFaceI), tetPtI_(tetPtI), @@ -69,14 +69,14 @@ Foam::particle::particle ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, bool doCellFacePt ) : mesh_(mesh), position_(position), - cellI_(cellI), - faceI_(-1), + celli_(celli), + facei_(-1), stepFraction_(0.0), tetFaceI_(-1), tetPtI_(-1), @@ -94,8 +94,8 @@ Foam::particle::particle(const particle& p) : mesh_(p.mesh_), position_(p.position_), - cellI_(p.cellI_), - faceI_(p.faceI_), + celli_(p.celli_), + facei_(p.facei_), stepFraction_(p.stepFraction_), tetFaceI_(p.tetFaceI_), tetPtI_(p.tetPtI_), @@ -108,8 +108,8 @@ Foam::particle::particle(const particle& p, const polyMesh& mesh) : mesh_(mesh), position_(p.position_), - cellI_(p.cellI_), - faceI_(p.faceI_), + celli_(p.celli_), + facei_(p.facei_), stepFraction_(p.stepFraction_), tetFaceI_(p.tetFaceI_), tetPtI_(p.tetPtI_), diff --git a/src/lagrangian/basic/particle/particle.H b/src/lagrangian/basic/particle/particle.H index 4bbd17bcc4716ed903627c4f2a9da7a22b1e539d..612d08c7164d225a01bc790e5be77b981f3120c5 100644 --- a/src/lagrangian/basic/particle/particle.H +++ b/src/lagrangian/basic/particle/particle.H @@ -141,10 +141,10 @@ protected: vector position_; //- Index of the cell it is in - label cellI_; + label celli_; //- Face index if the particle is on a face otherwise -1 - label faceI_; + label facei_; //- Fraction of time-step completed scalar stepFraction_; @@ -187,7 +187,7 @@ protected: const label triI, const vector& tetArea, const label tetPlaneBasePtI, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const scalar tol @@ -201,7 +201,7 @@ protected: const label triI, const vector& tetArea, const label tetPlaneBasePtI, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const scalar tol @@ -214,7 +214,7 @@ protected: // given cell to find the resulting face and tetPtI inline void crossEdgeConnectedFace ( - const label& cellI, + const label& celli, label& tetFaceI, label& tetPtI, const edge& e @@ -315,7 +315,7 @@ public: //- String representation of properties DefinePropertyList ( - "(Px Py Pz) cellI faceI stepFraction " + "(Px Py Pz) celli facei stepFraction " "tetFaceI tetPtI origProc origId" ); @@ -341,7 +341,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ); @@ -352,7 +352,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, bool doCellFacePt = true ); @@ -470,19 +470,19 @@ public: inline bool onBoundary() const; //- Is this global face an internal face? - inline bool internalFace(const label faceI) const; + inline bool internalFace(const label facei) const; //- Is this global face a boundary face? - inline bool boundaryFace(const label faceI) const; + inline bool boundaryFace(const label facei) const; //- Which patch is particle on - inline label patch(const label faceI) const; + inline label patch(const label facei) const; //- Which face of this patch is this particle on inline label patchFace ( const label patchI, - const label faceI + const label facei ) const; //- Return the fraction of time-step completed @@ -553,7 +553,7 @@ public: void prepareForParallelTransfer(const label patchI, TrackData& td); //- Convert processor patch addressing to the global equivalents - // and set the cellI to the face-neighbour + // and set the celli to the face-neighbour template<class TrackData> void correctAfterParallelTransfer(const label patchI, TrackData& td); diff --git a/src/lagrangian/basic/particle/particleI.H b/src/lagrangian/basic/particle/particleI.H index ca68468eb2286b0ddc9cb87d89201d336695d195..6e3f80e8712f44addfd0bb624a294f9fa9ce44ce 100644 --- a/src/lagrangian/basic/particle/particleI.H +++ b/src/lagrangian/basic/particle/particleI.H @@ -51,7 +51,7 @@ inline void Foam::particle::findTris i, tetAreas[i], tetPlaneBasePtIs[i], - cellI_, + celli_, tetFaceI_, tetPtI_, tol @@ -72,7 +72,7 @@ inline Foam::scalar Foam::particle::tetLambda const label triI, const vector& n, const label tetPlaneBasePtI, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const scalar tol @@ -89,7 +89,7 @@ inline Foam::scalar Foam::particle::tetLambda triI, n, tetPlaneBasePtI, - cellI, + celli, tetFaceI, tetPtI, tol @@ -144,7 +144,7 @@ inline Foam::scalar Foam::particle::movingTetLambda const label triI, const vector& n, const label tetPlaneBasePtI, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const scalar tol @@ -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,7 +323,7 @@ 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_]; @@ -347,7 +347,7 @@ inline void Foam::particle::tetNeighbour(label triI) // Crossing this triangle changes tet to that in the // neighbour cell over tetFaceI - // Modification of cellI_ will happen by other indexing, + // Modification of celli_ will happen by other indexing, // tetFaceI_ and tetPtI don't change. break; @@ -356,7 +356,7 @@ inline void Foam::particle::tetNeighbour(label triI) { crossEdgeConnectedFace ( - cellI_, + celli_, tetFaceI_, tetPtI_, Foam::edge(f[facePtI], f[otherFacePtI]) @@ -376,7 +376,7 @@ inline void Foam::particle::tetNeighbour(label triI) { crossEdgeConnectedFace ( - cellI_, + celli_, tetFaceI_, tetPtI_, Foam::edge(f[tetBasePtI], f[otherFacePtI]) @@ -393,7 +393,7 @@ inline void Foam::particle::tetNeighbour(label triI) { crossEdgeConnectedFace ( - cellI_, + celli_, tetFaceI_, tetPtI_, Foam::edge(f[tetBasePtI], f[facePtI]) @@ -415,7 +415,7 @@ inline void Foam::particle::tetNeighbour(label triI) { crossEdgeConnectedFace ( - cellI_, + celli_, tetFaceI_, tetPtI_, Foam::edge(f[tetBasePtI], f[facePtI]) @@ -432,7 +432,7 @@ inline void Foam::particle::tetNeighbour(label triI) { crossEdgeConnectedFace ( - cellI_, + celli_, tetFaceI_, tetPtI_, Foam::edge(f[tetBasePtI], f[otherFacePtI]) @@ -456,7 +456,7 @@ inline void Foam::particle::tetNeighbour(label triI) inline void Foam::particle::crossEdgeConnectedFace ( - const label& cellI, + const label& celli, label& tetFaceI, label& tetPtI, const edge& e @@ -467,7 +467,7 @@ inline void Foam::particle::crossEdgeConnectedFace const Foam::face& f = pFaces[tetFaceI]; - const Foam::cell& thisCell = pCells[cellI]; + const Foam::cell& thisCell = pCells[celli]; forAll(thisCell, cFI) { @@ -597,13 +597,13 @@ inline Foam::vector& Foam::particle::position() inline Foam::label Foam::particle::cell() const { - return cellI_; + return celli_; } inline Foam::label& Foam::particle::cell() { - return cellI_; + return celli_; } @@ -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_); } @@ -657,29 +657,29 @@ inline Foam::vector Foam::particle::oldNormal() const inline Foam::label Foam::particle::face() const { - return faceI_; + return facei_; } inline Foam::label& Foam::particle::face() { - return faceI_; + return facei_; } inline void Foam::particle::initCellFacePt() { - if (cellI_ == -1) + if (celli_ == -1) { mesh_.findCellFacePt ( position_, - cellI_, + celli_, tetFaceI_, tetPtI_ ); - if (cellI_ == -1) + if (celli_ == -1) { FatalErrorInFunction << "cell, tetFace and tetPt search failure at position " @@ -688,21 +688,21 @@ inline void Foam::particle::initCellFacePt() } else { - mesh_.findTetFacePt(cellI_, position_, tetFaceI_, tetPtI_); + mesh_.findTetFacePt(celli_, position_, tetFaceI_, tetPtI_); if (tetFaceI_ == -1 || tetPtI_ == -1) { - label oldCellI = cellI_; + label oldCellI = celli_; mesh_.findCellFacePt ( position_, - cellI_, + celli_, 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 @@ -737,11 +737,11 @@ 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_; - const point& cC = mesh_.cellCentres()[cellI_]; + const point& cC = mesh_.cellCentres()[celli_]; label trap(1.0/trackingCorrectionTol + 1); @@ -753,7 +753,7 @@ inline void Foam::particle::initCellFacePt() mesh_.findTetFacePt ( - cellI_, + celli_, newPosition, tetFaceI_, tetPtI_ @@ -775,7 +775,7 @@ inline void Foam::particle::initCellFacePt() WarningInFunction << "Particle moved from " << position_ << " to " << newPosition - << " in cell " << cellI_ + << " in cell " << celli_ << " tetFace " << tetFaceI_ << " tetPt " << tetPtI_ << nl << " (A fraction of " @@ -789,13 +789,13 @@ 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_ + << " cell " << celli_ << " tetFace " << tetFaceI_ << " tetPt " << tetPtI_ << nl << " This is a different cell to that which was supplied" @@ -809,7 +809,7 @@ inline void Foam::particle::initCellFacePt() inline bool Foam::particle::onBoundary() const { - return faceI_ != -1 && faceI_ >= mesh_.nInternalFaces(); + return facei_ != -1 && facei_ >= mesh_.nInternalFaces(); } @@ -863,37 +863,37 @@ inline Foam::scalar Foam::particle::currentTime() const } -inline bool Foam::particle::internalFace(const label faceI) const +inline bool Foam::particle::internalFace(const label facei) const { - return mesh_.isInternalFace(faceI); + return mesh_.isInternalFace(facei); } -bool Foam::particle::boundaryFace(const label faceI) const +bool Foam::particle::boundaryFace(const label facei) const { - return !internalFace(faceI); + return !internalFace(facei); } -inline Foam::label Foam::particle::patch(const label faceI) const +inline Foam::label Foam::particle::patch(const label facei) const { - return mesh_.boundaryMesh().whichPatch(faceI); + return mesh_.boundaryMesh().whichPatch(facei); } inline Foam::label Foam::particle::patchFace ( - const label patchI, - const label faceI + const label patchi, + const label facei ) const { - return mesh_.boundaryMesh()[patchI].whichFace(faceI); + return mesh_.boundaryMesh()[patchi].whichFace(facei); } inline Foam::label Foam::particle::faceInterpolation() const { - return faceI_; + return facei_; } diff --git a/src/lagrangian/basic/particle/particleIO.C b/src/lagrangian/basic/particle/particleIO.C index 7d617175cf783a238197648799e6acf9f8af6526..086858eebfb980506e5557ce81ea92a464b9441a 100644 --- a/src/lagrangian/basic/particle/particleIO.C +++ b/src/lagrangian/basic/particle/particleIO.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 @@ -32,7 +32,7 @@ Foam::string Foam::particle::propertyList_ = Foam::particle::propertyList(); const std::size_t Foam::particle::sizeofPosition_ ( - offsetof(particle, faceI_) - offsetof(particle, position_) + offsetof(particle, facei_) - offsetof(particle, position_) ); const std::size_t Foam::particle::sizeofFields_ @@ -47,8 +47,8 @@ Foam::particle::particle(const polyMesh& mesh, Istream& is, bool readFields) : mesh_(mesh), position_(), - cellI_(-1), - faceI_(-1), + celli_(-1), + facei_(-1), stepFraction_(0.0), tetFaceI_(-1), tetPtI_(-1), @@ -57,11 +57,11 @@ Foam::particle::particle(const polyMesh& mesh, Istream& is, bool readFields) { if (is.format() == IOstream::ASCII) { - is >> position_ >> cellI_; + is >> position_ >> celli_; if (readFields) { - is >> faceI_ + is >> facei_ >> stepFraction_ >> tetFaceI_ >> tetPtI_ @@ -90,7 +90,7 @@ void Foam::particle::writePosition(Ostream& os) const { if (os.format() == IOstream::ASCII) { - os << position_ << token::SPACE << cellI_; + os << position_ << token::SPACE << celli_; } else { @@ -107,8 +107,8 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const particle& p) if (os.format() == IOstream::ASCII) { os << p.position_ - << token::SPACE << p.cellI_ - << token::SPACE << p.faceI_ + << token::SPACE << p.celli_ + << token::SPACE << p.facei_ << token::SPACE << p.stepFraction_ << token::SPACE << p.tetFaceI_ << token::SPACE << p.tetPtI_ diff --git a/src/lagrangian/basic/particle/particleTemplates.C b/src/lagrangian/basic/particle/particleTemplates.C index 73b82985cddf6afca6fd40be6fb8a3208e583d90..5e63a15e88f98be0a5f731ce8c8b5c32b3973480 100644 --- a/src/lagrangian/basic/particle/particleTemplates.C +++ b/src/lagrangian/basic/particle/particleTemplates.C @@ -39,29 +39,29 @@ License template<class TrackData> void Foam::particle::prepareForParallelTransfer ( - const label patchI, + const label patchi, TrackData& td ) { // Convert the face index to be local to the processor patch - faceI_ = patchFace(patchI, faceI_); + facei_ = patchFace(patchi, facei_); } template<class TrackData> void Foam::particle::correctAfterParallelTransfer ( - const label patchI, + const label patchi, TrackData& td ) { const coupledPolyPatch& ppp = - refCast<const coupledPolyPatch>(mesh_.boundaryMesh()[patchI]); + refCast<const coupledPolyPatch>(mesh_.boundaryMesh()[patchi]); - cellI_ = ppp.faceCells()[faceI_]; + celli_ = ppp.faceCells()[facei_]; // Have patch transform the position - ppp.transformPosition(position_, faceI_); + ppp.transformPosition(position_, facei_); // Transform the properties if (!ppp.parallel()) @@ -70,7 +70,7 @@ void Foam::particle::correctAfterParallelTransfer ( ppp.forwardT().size() == 1 ? ppp.forwardT()[0] - : ppp.forwardT()[faceI_] + : ppp.forwardT()[facei_] ); transformProperties(T); } @@ -80,12 +80,12 @@ void Foam::particle::correctAfterParallelTransfer ( (ppp.separation().size() == 1) ? ppp.separation()[0] - : ppp.separation()[faceI_] + : ppp.separation()[facei_] ); 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 @@ -114,11 +114,11 @@ void Foam::particle::correctAfterParallelTransfer if (stepFraction_ > (1.0 - SMALL)) { stepFraction_ = 1.0; - faceI_ = -1; + facei_ = -1; } else { - faceI_ += ppp.start(); + facei_ += ppp.start(); } } @@ -187,7 +187,7 @@ void Foam::particle::writeFields(const CloudType& c) template<class TrackData> Foam::label Foam::particle::track(const vector& endPosition, TrackData& td) { - faceI_ = -1; + facei_ = -1; // Tracks to endPosition or stop on boundary while (!onBoundary() && stepFraction_ < 1.0 - SMALL) @@ -195,7 +195,7 @@ Foam::label Foam::particle::track(const vector& endPosition, TrackData& td) stepFraction_ += trackToFace(endPosition, td)*(1.0 - stepFraction_); } - return faceI_; + return facei_; } @@ -216,7 +216,7 @@ Foam::scalar Foam::particle::trackToFace const pointField& pPts = mesh_.points(); const vectorField& pC = mesh_.cellCentres(); - faceI_ = -1; + facei_ = -1; // Pout<< "Particle " << origId_ << " " << origProc_ // << " Tracking from " << position_ @@ -224,7 +224,7 @@ Foam::scalar Foam::particle::trackToFace // << endl; // Pout<< "stepFraction " << stepFraction_ << nl - // << "cellI " << cellI_ << nl + // << "celli " << celli_ << nl // << "tetFaceI " << tetFaceI_ << nl // << "tetPtI " << tetPtI_ // << endl; @@ -291,7 +291,7 @@ Foam::scalar Foam::particle::trackToFace // What tolerance is appropriate the minimum lambda numerator and // denominator for tracking in this cell. scalar lambdaDistanceTolerance = - lambdaDistanceToleranceCoeff*mesh_.cellVolumes()[cellI_]; + lambdaDistanceToleranceCoeff*mesh_.cellVolumes()[celli_]; do { @@ -303,7 +303,7 @@ Foam::scalar Foam::particle::trackToFace const Foam::face& f = pFaces[tetFaceI_]; - bool own = (mesh_.faceOwner()[tetFaceI_] == cellI_); + bool own = (mesh_.faceOwner()[tetFaceI_] == celli_); label tetBasePtI = mesh_.tetBasePtIs()[tetFaceI_]; @@ -328,7 +328,7 @@ Foam::scalar Foam::particle::trackToFace tetPointRef tet ( - pC[cellI_], + pC[celli_], pPts[basePtI], pPts[f[fPtAI]], pPts[f[fPtBI]] @@ -394,7 +394,7 @@ Foam::scalar Foam::particle::trackToFace // Pout<< "tris " << tris << endl; - // Sets a value for lambdaMin and faceI_ if a wall face is hit + // Sets a value for lambdaMin and facei_ if a wall face is hit // by the track. hitWallFaces ( @@ -407,7 +407,7 @@ Foam::scalar Foam::particle::trackToFace // Did not hit any tet tri faces, and no wall face has been // found to hit. - if (tris.empty() && faceI_ < 0) + if (tris.empty() && facei_ < 0) { position_ = endPosition; @@ -428,7 +428,7 @@ Foam::scalar Foam::particle::trackToFace tI, tetAreas[tI], tetPlaneBasePtIs[tI], - cellI_, + celli_, tetFaceI_, tetPtI_, lambdaDistanceTolerance @@ -446,13 +446,13 @@ 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_, + celli_, tetFaceI_, tetBasePtI, fPtAI, @@ -463,12 +463,12 @@ Foam::scalar Foam::particle::trackToFace else if (triI > 0) { // A tri was found to be crossed before a wall face was hit (if any) - faceI_ = -1; + facei_ = -1; } // Pout<< "track loop " << position_ << " " << endPosition << nl - // << " " << cellI_ - // << " " << faceI_ + // << " " << celli_ + // << " " << facei_ // << " " << tetFaceI_ // << " " << tetPtI_ // << " " << triI @@ -522,12 +522,12 @@ Foam::scalar Foam::particle::trackToFace lambdaMin = 0.0; } - } while (faceI_ < 0); + } while (facei_ < 0); particleType& p = static_cast<particleType&>(*this); p.hitFace(td); - if (internalFace(faceI_)) + if (internalFace(facei_)) { // Change tet ownership because a tri face has been crossed, // in general this is: @@ -536,13 +536,13 @@ Foam::scalar Foam::particle::trackToFace // No modifications are required for triI = 0, no call required to // tetNeighbour(0); - if (cellI_ == mesh_.faceOwner()[faceI_]) + if (celli_ == mesh_.faceOwner()[facei_]) { - cellI_ = mesh_.faceNeighbour()[faceI_]; + celli_ = mesh_.faceNeighbour()[facei_]; } - else if (cellI_ == mesh_.faceNeighbour()[faceI_]) + else if (celli_ == mesh_.faceNeighbour()[facei_]) { - cellI_ = mesh_.faceOwner()[faceI_]; + celli_ = mesh_.faceOwner()[facei_]; } else { @@ -552,8 +552,8 @@ Foam::scalar Foam::particle::trackToFace } else { - label origFaceI = faceI_; - label patchI = patch(faceI_); + label origFaceI = facei_; + label patchi = patch(facei_); // No action taken for tetPtI_ for tetFaceI_ here, handled by // patch interaction call or later during processor transfer. @@ -562,21 +562,21 @@ Foam::scalar Foam::particle::trackToFace ( !p.hitPatch ( - mesh_.boundaryMesh()[patchI], + mesh_.boundaryMesh()[patchi], td, - patchI, + patchi, trackFraction, faceHitTetIs ) ) { // Did patch interaction model switch patches? - if (faceI_ != origFaceI) + if (facei_ != origFaceI) { - patchI = patch(faceI_); + patchi = patch(facei_); } - const polyPatch& patch = mesh_.boundaryMesh()[patchI]; + const polyPatch& patch = mesh_.boundaryMesh()[patchi]; if (isA<wedgePolyPatch>(patch)) { @@ -662,9 +662,9 @@ Foam::scalar Foam::particle::trackToFace label fI = faceHitTetIs.face(); - label patchI = patches.patchID()[fI - mesh_.nInternalFaces()]; + label patchi = patches.patchID()[fI - mesh_.nInternalFaces()]; - if (isA<wallPolyPatch>(patches[patchI])) + if (isA<wallPolyPatch>(patches[patchi])) { // In the case of collision with a wall where there is // a non-zero wallImpactDistance, it is possible for @@ -724,7 +724,7 @@ void Foam::particle::hitWallFaces { typedef typename CloudType::particleType particleType; - if (!(cloud.hasWallImpactDistance() && cloud.cellHasWallFaces()[cellI_])) + if (!(cloud.hasWallImpactDistance() && cloud.cellHasWallFaces()[celli_])) { return; } @@ -733,10 +733,10 @@ void Foam::particle::hitWallFaces const faceList& pFaces = mesh_.faces(); - const Foam::cell& thisCell = mesh_.cells()[cellI_]; + const Foam::cell& thisCell = mesh_.cells()[celli_]; scalar lambdaDistanceTolerance = - lambdaDistanceToleranceCoeff*mesh_.cellVolumes()[cellI_]; + lambdaDistanceToleranceCoeff*mesh_.cellVolumes()[celli_]; const polyBoundaryMesh& patches = mesh_.boundaryMesh(); @@ -749,14 +749,14 @@ void Foam::particle::hitWallFaces continue; } - label patchI = patches.patchID()[fI - mesh_.nInternalFaces()]; + label patchi = patches.patchID()[fI - mesh_.nInternalFaces()]; - if (isA<wallPolyPatch>(patches[patchI])) + if (isA<wallPolyPatch>(patches[patchi])) { // Get the decomposition of this wall face const List<tetIndices> faceTetIs = - polyMeshTetDecomposition::faceTetIndices(mesh_, fI, cellI_); + polyMeshTetDecomposition::faceTetIndices(mesh_, fI, celli_); const Foam::face& f = pFaces[fI]; @@ -787,7 +787,7 @@ void Foam::particle::hitWallFaces 0, n, f[tetIs.faceBasePt()], - cellI_, + celli_, fI, tetIs.tetPt(), lambdaDistanceTolerance @@ -814,7 +814,7 @@ void Foam::particle::hitWallFaces 0, n, f[tetIs.faceBasePt()], - cellI_, + celli_, fI, tetIs.tetPt(), lambdaDistanceTolerance @@ -911,7 +911,7 @@ void Foam::particle::hitWallFaces { lambdaMin = lambda; - faceI_ = fI; + facei_ = fI; closestTetIs = tetIs; } @@ -994,17 +994,17 @@ void Foam::particle::hitCyclicPatch TrackData& td ) { - faceI_ = cpp.transformGlobalFace(faceI_); + facei_ = cpp.transformGlobalFace(facei_); - cellI_ = mesh_.faceOwner()[faceI_]; + celli_ = mesh_.faceOwner()[facei_]; - tetFaceI_ = faceI_; + tetFaceI_ = facei_; // See note in correctAfterParallelTransfer for tetPtI_ addressing. tetPtI_ = mesh_.faces()[tetFaceI_].size() - 1 - tetPtI_; const cyclicPolyPatch& receiveCpp = cpp.neighbPatch(); - label patchFacei = receiveCpp.whichFace(faceI_); + label patchFacei = receiveCpp.whichFace(facei_); // Now the particle is on the receiving side @@ -1046,7 +1046,7 @@ 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_); @@ -1060,11 +1060,11 @@ void Foam::particle::hitCyclicAMIPatch } // Convert face index into global numbering - faceI_ = patchFaceI + receiveCpp.start(); + facei_ = patchFaceI + receiveCpp.start(); - cellI_ = mesh_.faceOwner()[faceI_]; + celli_ = mesh_.faceOwner()[facei_]; - tetFaceI_ = faceI_; + tetFaceI_ = facei_; // See note in correctAfterParallelTransfer for tetPtI_ addressing. tetPtI_ = mesh_.faces()[tetFaceI_].size() - 1 - tetPtI_; diff --git a/src/lagrangian/basic/passiveParticle/passiveParticle.H b/src/lagrangian/basic/passiveParticle/passiveParticle.H index 5309722ebfd30f44eed7d6cd4cca96999506bfe5..be3500a18c912a7dc55f093e0147ae4372ac3c18 100644 --- a/src/lagrangian/basic/passiveParticle/passiveParticle.H +++ b/src/lagrangian/basic/passiveParticle/passiveParticle.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 @@ -62,12 +62,12 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, 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 @@ -76,11 +76,11 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, bool doCellFacePt = true ) : - particle(mesh, position, cellI, doCellFacePt) + particle(mesh, position, celli, doCellFacePt) {} //- Construct from Istream diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C index 7f7a9c25fdd2e87f3c65d7b31cd4081edf0cc1ce..e51e59f1d754d9d48539b62ae8c446edb2a6cff7 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.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 @@ -103,7 +103,7 @@ template<class CloudType> Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate ( const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar Tc, @@ -134,7 +134,7 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate const SLGThermo& thermo = this->owner().thermo(); // Local mass fraction of O2 in the carrier phase - const scalar YO2 = thermo.carrier().Y(O2GlobalId_)[cellI]; + const scalar YO2 = thermo.carrier().Y(O2GlobalId_)[celli]; // Change in C mass [kg] scalar dmC = 4.0*mathematical::pi*d*D_*YO2*Tc*rhoc/(Sb_*(T + Tc))*dt; diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H index ea95e7a9fe885235766769822e604f7e7bb6635c..da3186996c63d65b14846d58178545b254f11e4d 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.H @@ -134,7 +134,7 @@ public: virtual scalar calculate ( const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar Tc, diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.C index f474b984d5aebb127722e1944015eb3f22d3bcdb..d198deaf912621d5c45492946bdbde9d0e70855b 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.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 @@ -102,7 +102,7 @@ template<class CloudType> Foam::scalar Foam::COxidationHurtMitchell<CloudType>::calculate ( const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar Tc, @@ -133,7 +133,7 @@ Foam::scalar Foam::COxidationHurtMitchell<CloudType>::calculate const SLGThermo& thermo = this->owner().thermo(); // Local mass fraction of O2 in the carrier phase - const scalar YO2 = thermo.carrier().Y(O2GlobalId_)[cellI]; + const scalar YO2 = thermo.carrier().Y(O2GlobalId_)[celli]; // No combustion if no oxygen present if (YO2 < SMALL) diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.H index c5022db82a3204e75c5249f3b28c99c4bcbb423f..895bd26f7fdb75f3b5bc0e9ea2e2924d8487f412 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.H +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationHurtMitchell/COxidationHurtMitchell.H @@ -147,7 +147,7 @@ public: virtual scalar calculate ( const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar Tc, diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C index 593400284832a8f183a89d312096e739757e9610..1a260dac90e6e7fc3a49cc31cc891730095e1898 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014-2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -115,7 +115,7 @@ template<class CloudType> Foam::scalar Foam::COxidationIntrinsicRate<CloudType>::calculate ( const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar Tc, @@ -146,7 +146,7 @@ Foam::scalar Foam::COxidationIntrinsicRate<CloudType>::calculate const SLGThermo& thermo = this->owner().thermo(); // Local mass fraction of O2 in the carrier phase [] - const scalar YO2 = thermo.carrier().Y(O2GlobalId_)[cellI]; + const scalar YO2 = thermo.carrier().Y(O2GlobalId_)[celli]; // Quick exit if oxidant not present if (YO2 < ROOTVSMALL) diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.H index 7b7ba48292c98403bd5be989b3cd03c861a03e7a..96502ddf90c66dfe33919fb9e650a4c288d30de4 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.H +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationIntrinsicRate/COxidationIntrinsicRate.H @@ -152,7 +152,7 @@ public: virtual scalar calculate ( const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar Tc, diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C index dd7f9fef460af9d9c908a29aa160e62e050e0644..f59317f407f52d2777e9049b9300fd0f1540e7d5 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.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 @@ -100,7 +100,7 @@ template<class CloudType> Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate ( const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar Tc, @@ -131,7 +131,7 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate const SLGThermo& thermo = this->owner().thermo(); // Local mass fraction of O2 in the carrier phase - const scalar YO2 = thermo.carrier().Y(O2GlobalId_)[cellI]; + const scalar YO2 = thermo.carrier().Y(O2GlobalId_)[celli]; // Diffusion rate coefficient const scalar D0 = C1_/d*pow(0.5*(T + Tc), 0.75); diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H index d565d76902bb06ba53be04a8a1f877d0107f6cea..cbd82df4db8ccdab76e2d6655f0580fd4f3c2b30 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.H @@ -139,7 +139,7 @@ public: virtual scalar calculate ( const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar Tc, diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C index 30f9b1bb40e839b062f00ba4eff46190ceea76f6..e0e385828613b6b4816ee7cb28b6470454cbd8b8 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.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 @@ -114,7 +114,7 @@ template<class CloudType> Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate ( const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar Tc, @@ -145,7 +145,7 @@ Foam::scalar Foam::COxidationMurphyShaddix<CloudType>::calculate const SLGThermo& thermo = this->owner().thermo(); // Cell carrier phase O2 species density [kg/m^3] - const scalar rhoO2 = rhoc*thermo.carrier().Y(O2GlobalId_)[cellI]; + const scalar rhoO2 = rhoc*thermo.carrier().Y(O2GlobalId_)[celli]; if (rhoO2 < SMALL) { diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H index 29558edfc36744f55cb167eec12131660c35f806..7794d4163b6859d43019bbb18ba0c256a7f7bf38 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationMurphyShaddix/COxidationMurphyShaddix.H @@ -160,7 +160,7 @@ public: virtual scalar calculate ( const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar Tc, diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index aa72f933dc61fc71f168621a5eb5523ce4b2d34e..d3e0ee40b112722613f056deef8db4c0ba2b3562 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -707,13 +707,13 @@ void Foam::KinematicCloud<CloudType>::patchData vector& Up ) const { - label patchI = pp.index(); + label patchi = pp.index(); 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/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index 48b2a3a5565f793d72078e32249612e7eea797bf..339f49b1bb8a8e7d8eb704c9749019507299f8e5 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -478,9 +478,9 @@ Foam::KinematicCloud<CloudType>::vDotSweep() const forAllConstIter(typename KinematicCloud<CloudType>, *this, iter) { const parcelType& p = iter(); - const label cellI = p.cell(); + const label celli = p.cell(); - vDotSweep[cellI] += p.nParticle()*p.areaP()*mag(p.U() - U_[cellI]); + vDotSweep[celli] += p.nParticle()*p.areaP()*mag(p.U() - U_[celli]); } vDotSweep.internalField() /= mesh_.V(); @@ -517,9 +517,9 @@ Foam::KinematicCloud<CloudType>::theta() const forAllConstIter(typename KinematicCloud<CloudType>, *this, iter) { const parcelType& p = iter(); - const label cellI = p.cell(); + const label celli = p.cell(); - theta[cellI] += p.nParticle()*p.volume(); + theta[celli] += p.nParticle()*p.volume(); } theta.internalField() /= mesh_.V(); @@ -555,9 +555,9 @@ Foam::KinematicCloud<CloudType>::alpha() const forAllConstIter(typename KinematicCloud<CloudType>, *this, iter) { const parcelType& p = iter(); - const label cellI = p.cell(); + const label celli = p.cell(); - alpha[cellI] += p.nParticle()*p.mass(); + alpha[celli] += p.nParticle()*p.mass(); } alpha /= (mesh_.V()*rho_); @@ -592,9 +592,9 @@ Foam::KinematicCloud<CloudType>::rhoEff() const forAllConstIter(typename KinematicCloud<CloudType>, *this, iter) { const parcelType& p = iter(); - const label cellI = p.cell(); + const label celli = p.cell(); - rhoEff[cellI] += p.nParticle()*p.mass(); + rhoEff[celli] += p.nParticle()*p.mass(); } rhoEff /= mesh_.V(); diff --git a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C index f861c8601e4b09def41ce0f27090e577adfe4872..ccf53ffe12feb74b863db69f377398ee3fea92c9 100644 --- a/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/MPPICCloud/MPPICCloud.C @@ -276,13 +276,13 @@ void Foam::MPPICCloud<CloudType>::info() scalar nMin = GREAT; - forAll(this->mesh().cells(), cellI) + forAll(this->mesh().cells(), celli) { - const label n = this->cellOccupancy()[cellI].size(); + const label n = this->cellOccupancy()[celli].size(); if (n > 0) { - const scalar nPack = n*alphaMax/alpha()[cellI]; + const scalar nPack = n*alphaMax/alpha()[celli]; if (nPack < nMin) { diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H index 5bc6051ccc09c96d692379661f2232f86d144701..5c95a482e1e328a47d308b04cd5a4399c575558a 100644 --- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcel.H @@ -169,7 +169,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ); @@ -179,7 +179,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, diff --git a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelI.H b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelI.H index f94242542914d7c793f9a07afb1e4af4cb1c3cc7..fffc5b9a2303032e964c5504a94c0219ea392e99 100644 --- a/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/CollidingParcel/CollidingParcelI.H @@ -64,12 +64,12 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel ( const polyMesh& owner, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ) : - ParcelType(owner, position, cellI, tetFaceI, tetPtI), + ParcelType(owner, position, celli, tetFaceI, tetPtI), f_(Zero), angularMomentum_(Zero), torque_(Zero), @@ -82,7 +82,7 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel ( const polyMesh& owner, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, @@ -100,7 +100,7 @@ inline Foam::CollidingParcel<ParcelType>::CollidingParcel ( owner, position, - cellI, + celli, tetFaceI, tetPtI, typeId, diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C index 3798650fc898f19c362d2d714995e2eeb3a3ef85..7483deca46fcdefb646c1def27b2cfda3d2b155f 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C @@ -42,7 +42,7 @@ void Foam::KinematicParcel<ParcelType>::setCellValues ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { tetIndices tetIs = this->currentTetIndices(); @@ -54,7 +54,7 @@ void Foam::KinematicParcel<ParcelType>::setCellValues if (debug) { WarningInFunction - << "Limiting observed density in cell " << cellI << " to " + << "Limiting observed density in cell " << celli << " to " << td.cloud().constProps().rhoMin() << nl << endl; } @@ -69,7 +69,7 @@ void Foam::KinematicParcel<ParcelType>::setCellValues Uc_ = td.cloud().dispersion().update ( dt, - cellI, + celli, U_, Uc_, UTurb_, @@ -84,10 +84,10 @@ void Foam::KinematicParcel<ParcelType>::cellValueSourceCorrection ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { - Uc_ += td.cloud().UTrans()[cellI]/massCell(cellI); + Uc_ += td.cloud().UTrans()[celli]/massCell(celli); } @@ -97,7 +97,7 @@ void Foam::KinematicParcel<ParcelType>::calc ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { // Define local properties at beginning of time step @@ -126,7 +126,7 @@ void Foam::KinematicParcel<ParcelType>::calc // ~~~~~~ // Calculate new particle velocity - this->U_ = calcVelocity(td, dt, cellI, Re, muc_, mass0, Su, dUTrans, Spu); + this->U_ = calcVelocity(td, dt, celli, Re, muc_, mass0, Su, dUTrans, Spu); // Accumulate carrier phase source terms @@ -134,10 +134,10 @@ void Foam::KinematicParcel<ParcelType>::calc if (td.cloud().solution().coupled()) { // Update momentum transfer - td.cloud().UTrans()[cellI] += np0*dUTrans; + td.cloud().UTrans()[celli] += np0*dUTrans; // Update momentum transfer coefficient - td.cloud().UCoeff()[cellI] += np0*Spu; + td.cloud().UCoeff()[celli] += np0*Spu; } } @@ -148,7 +148,7 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity ( TrackData& td, const scalar dt, - const label cellI, + const label celli, const scalar Re, const scalar mu, const scalar mass, @@ -288,13 +288,13 @@ bool Foam::KinematicParcel<ParcelType>::move scalar dt = min(dtMax, tEnd); // Cache the parcel current cell as this will change if a face is hit - const label cellI = p.cell(); + const label celli = p.cell(); const scalar magU = mag(U_); if (p.active() && tracking && (magU > ROOTVSMALL)) { const scalar d = dt*magU; - const scalar dCorr = min(d, maxCo*cellLengthScale[cellI]); + const scalar dCorr = min(d, maxCo*cellLengthScale[celli]); dt *= dCorr/d *p.trackToFace(p.position() + dCorr*U_/magU, td); @@ -337,14 +337,14 @@ bool Foam::KinematicParcel<ParcelType>::move if ((dt > ROOTVSMALL) && calcParcel) { // Update cell based properties - p.setCellValues(td, dt, cellI); + p.setCellValues(td, dt, celli); if (td.cloud().solution().cellValueSourceCorrection()) { - p.cellValueSourceCorrection(td, dt, cellI); + p.cellValueSourceCorrection(td, dt, celli); } - p.calc(td, dt, cellI); + p.calc(td, dt, celli); } if (p.onBoundary() && td.keepParticle) @@ -357,7 +357,7 @@ bool Foam::KinematicParcel<ParcelType>::move p.age() += dt; - td.cloud().functions().postMove(p, cellI, dt, start, td.keepParticle); + td.cloud().functions().postMove(p, celli, dt, start, td.keepParticle); } return td.keepParticle; diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H index 864bbb1bbd2b18de9f4ba86212bb6e68579c1d2b..136d87d29702f0fae3a9fd0f5c0ca078290a5494 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H @@ -284,7 +284,7 @@ protected: ( TrackData& td, const scalar dt, // timestep - const label cellI, // owner cell + const label celli, // owner cell const scalar Re, // Reynolds number const scalar mu, // local carrier viscosity const scalar mass, // mass @@ -326,7 +326,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ); @@ -336,7 +336,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, @@ -479,7 +479,7 @@ public: inline label faceInterpolation() const; //- Cell owner mass - inline scalar massCell(const label cellI) const; + inline scalar massCell(const label celli) const; //- Particle mass inline scalar mass() const; @@ -540,7 +540,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Correct cell values using latest transfer information @@ -549,7 +549,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Update parcel properties over the time interval @@ -558,7 +558,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H index ca445b3f647c422ddd2553d22175b0c4a80ec13c..d361312eded801370f21f65a87f6a683a00358ea 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H @@ -74,12 +74,12 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel ( const polyMesh& owner, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ) : - ParcelType(owner, position, cellI, tetFaceI, tetPtI), + ParcelType(owner, position, celli, tetFaceI, tetPtI), active_(true), typeId_(-1), nParticle_(0), @@ -101,7 +101,7 @@ inline Foam::KinematicParcel<ParcelType>::KinematicParcel ( const polyMesh& owner, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, @@ -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), @@ -352,10 +352,10 @@ inline Foam::label Foam::KinematicParcel<ParcelType>::faceInterpolation() const template<class ParcelType> inline Foam::scalar Foam::KinematicParcel<ParcelType>::massCell ( - const label cellI + const label celli ) const { - return rhoc_*this->mesh().cellVolumes()[cellI]; + return rhoc_*this->mesh().cellVolumes()[celli]; } diff --git a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H index 38c2ceb4e41bed7f65a2c1ca18094d9313bbdb12..ff3fd6b35f33117e355e18709ac40be590513038 100644 --- a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcel.H @@ -187,7 +187,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ); @@ -197,7 +197,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, diff --git a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelI.H b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelI.H index 1311ee5bab1003a747fc65466e619fa8fb3d7ed2..627c8d21e096f56b454b4a0defcb65aeec743ab8 100644 --- a/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/MPPICParcel/MPPICParcelI.H @@ -30,12 +30,12 @@ inline Foam::MPPICParcel<ParcelType>::MPPICParcel ( const polyMesh& owner, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ) : - ParcelType(owner, position, cellI, tetFaceI, tetPtI), + ParcelType(owner, position, celli, tetFaceI, tetPtI), UCorrect_(Zero) {} @@ -45,7 +45,7 @@ inline Foam::MPPICParcel<ParcelType>::MPPICParcel ( const polyMesh& owner, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, @@ -61,7 +61,7 @@ inline Foam::MPPICParcel<ParcelType>::MPPICParcel ( owner, position, - cellI, + celli, tetFaceI, tetPtI, typeId, diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C index 2e14674bb8099b46333ec59c334f1acf8c3fdf56..3d46dc56dd4d2081248085fb1b7692507cb5862d 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.C @@ -135,10 +135,10 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::setCellValues ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { - ParcelType::setCellValues(td, dt, cellI); + ParcelType::setCellValues(td, dt, celli); } @@ -148,11 +148,11 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::cellValueSourceCorrection ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { // Re-use correction from reacting parcel - ParcelType::cellValueSourceCorrection(td, dt, cellI); + ParcelType::cellValueSourceCorrection(td, dt, celli); } @@ -162,7 +162,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { typedef typename TrackData::cloudType::reactingCloudType reactingCloudType; @@ -189,7 +189,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc // Calc surface values scalar Ts, rhos, mus, Prs, kappas; - this->calcSurfaceValues(td, cellI, T0, Ts, rhos, mus, Prs, kappas); + this->calcSurfaceValues(td, celli, T0, Ts, rhos, mus, Prs, kappas); scalar Res = this->Re(U0, d0, rhos, mus); @@ -238,7 +238,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc ( td, dt, - cellI, + celli, Res, Prs, Ts, @@ -300,7 +300,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc ( td, dt, - cellI, + celli, d0, T0, mass0, @@ -353,12 +353,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc forAll(YGas_, i) { label gid = composition.localToCarrierId(GAS, i); - td.cloud().rhoTrans(gid)[cellI] += dm*YMix[GAS]*YGas_[i]; + td.cloud().rhoTrans(gid)[celli] += dm*YMix[GAS]*YGas_[i]; } forAll(YLiquid_, i) { label gid = composition.localToCarrierId(LIQ, i); - td.cloud().rhoTrans(gid)[cellI] += dm*YMix[LIQ]*YLiquid_[i]; + td.cloud().rhoTrans(gid)[celli] += dm*YMix[LIQ]*YLiquid_[i]; } // No mapping between solid components and carrier phase @@ -366,13 +366,13 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc forAll(YSolid_, i) { label gid = composition.localToCarrierId(SLD, i); - td.cloud().rhoTrans(gid)[cellI] += dm*YMix[SLD]*YSolid_[i]; + td.cloud().rhoTrans(gid)[celli] += dm*YMix[SLD]*YSolid_[i]; } */ - td.cloud().UTrans()[cellI] += dm*U0; + td.cloud().UTrans()[celli] += dm*U0; - td.cloud().hsTrans()[cellI] += dm*HsEff(td, pc, T0, idG, idL, idS); + td.cloud().hsTrans()[celli] += dm*HsEff(td, pc, T0, idG, idL, idS); td.cloud().phaseChange().addToPhaseChangeMass(np0*mass1); } @@ -381,7 +381,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc } // Correct surface values due to emitted species - this->correctSurfaceValues(td, cellI, Ts, Cs, rhos, mus, Prs, kappas); + this->correctSurfaceValues(td, celli, Ts, Cs, rhos, mus, Prs, kappas); Res = this->Re(U0, this->d_, rhos, mus); @@ -397,7 +397,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc ( td, dt, - cellI, + celli, Res, Prs, kappas, @@ -416,7 +416,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc // Calculate new particle velocity this->U_ = - this->calcVelocity(td, dt, cellI, Res, mus, mass1, Su, dUTrans, Spu); + this->calcVelocity(td, dt, celli, Res, mus, mass1, Su, dUTrans, Spu); // 4. Accumulate carrier phase source terms @@ -430,18 +430,18 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc scalar dm = np0*dMassGas[i]; label gid = composition.localToCarrierId(GAS, i); scalar hs = composition.carrier().Hs(gid, pc, T0); - td.cloud().rhoTrans(gid)[cellI] += dm; - td.cloud().UTrans()[cellI] += dm*U0; - td.cloud().hsTrans()[cellI] += dm*hs; + td.cloud().rhoTrans(gid)[celli] += dm; + td.cloud().UTrans()[celli] += dm*U0; + td.cloud().hsTrans()[celli] += dm*hs; } forAll(YLiquid_, i) { scalar dm = np0*dMassLiquid[i]; label gid = composition.localToCarrierId(LIQ, i); scalar hs = composition.carrier().Hs(gid, pc, T0); - td.cloud().rhoTrans(gid)[cellI] += dm; - td.cloud().UTrans()[cellI] += dm*U0; - td.cloud().hsTrans()[cellI] += dm*hs; + td.cloud().rhoTrans(gid)[celli] += dm; + td.cloud().UTrans()[celli] += dm*U0; + td.cloud().hsTrans()[celli] += dm*hs; } // No mapping between solid components and carrier phase @@ -451,9 +451,9 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc scalar dm = np0*dMassSolid[i]; label gid = composition.localToCarrierId(SLD, i); scalar hs = composition.carrier().Hs(gid, pc, T0); - td.cloud().rhoTrans(gid)[cellI] += dm; - td.cloud().UTrans()[cellI] += dm*U0; - td.cloud().hsTrans()[cellI] += dm*hs; + td.cloud().rhoTrans(gid)[celli] += dm; + td.cloud().UTrans()[celli] += dm*U0; + td.cloud().hsTrans()[celli] += dm*hs; } */ @@ -461,27 +461,27 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calc { scalar dm = np0*dMassSRCarrier[i]; scalar hs = composition.carrier().Hs(i, pc, T0); - td.cloud().rhoTrans(i)[cellI] += dm; - td.cloud().UTrans()[cellI] += dm*U0; - td.cloud().hsTrans()[cellI] += dm*hs; + td.cloud().rhoTrans(i)[celli] += dm; + td.cloud().UTrans()[celli] += dm*U0; + td.cloud().hsTrans()[celli] += dm*hs; } // Update momentum transfer - td.cloud().UTrans()[cellI] += np0*dUTrans; - td.cloud().UCoeff()[cellI] += np0*Spu; + td.cloud().UTrans()[celli] += np0*dUTrans; + td.cloud().UCoeff()[celli] += np0*Spu; // Update sensible enthalpy transfer - td.cloud().hsTrans()[cellI] += np0*dhsTrans; - td.cloud().hsCoeff()[cellI] += np0*Sph; + td.cloud().hsTrans()[celli] += np0*dhsTrans; + td.cloud().hsCoeff()[celli] += np0*Sph; // Update radiation fields if (td.cloud().radiation()) { const scalar ap = this->areaP(); const scalar T4 = pow4(T0); - td.cloud().radAreaP()[cellI] += dt*np0*ap; - td.cloud().radT4()[cellI] += dt*np0*T4; - td.cloud().radAreaPT4()[cellI] += dt*np0*ap*T4; + td.cloud().radAreaP()[celli] += dt*np0*ap; + td.cloud().radT4()[celli] += dt*np0*T4; + td.cloud().radAreaPT4()[celli] += dt*np0*ap*T4; } } } @@ -594,7 +594,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions ( TrackData& td, const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar mass, @@ -633,7 +633,7 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::calcSurfaceReactions const scalar hReaction = td.cloud().surfaceReaction().calculate ( dt, - cellI, + celli, d, T, this->Tc_, diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H index b431e368662e87d9d535ec707a92db635c4b8dd8..626a5a3ef31507958eaf561ed499561dd11f29ee 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H @@ -232,7 +232,7 @@ protected: ( TrackData& td, const scalar dt, // timestep - const label cellI, // owner cell + const label celli, // owner cell const scalar d, // diameter const scalar T, // temperature const scalar mass, // mass @@ -276,7 +276,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ); @@ -287,7 +287,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, @@ -401,7 +401,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Correct cell values using latest transfer information @@ -410,7 +410,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Update parcel properties over the time interval @@ -419,7 +419,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H index ee14895298b5878c88437de7cf3edbb62a415b2b..817173566a15d9934adce370010559aa56da9293 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelI.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 @@ -69,12 +69,12 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ) : - ParcelType(mesh, position, cellI, tetFaceI, tetPtI), + ParcelType(mesh, position, celli, tetFaceI, tetPtI), YGas_(0), YLiquid_(0), YSolid_(0), @@ -87,7 +87,7 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, @@ -109,7 +109,7 @@ inline Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel ( mesh, position, - cellI, + celli, tetFaceI, tetPtI, typeId, diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C index 4dac19bec23e7e45553a6ee8855d4e8406022803..a861982cdeca9ec372f6cf0295aec6c7a95f48f4 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.C @@ -39,7 +39,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange ( TrackData& td, const scalar dt, - const label cellI, + const label celli, const scalar Re, const scalar Pr, const scalar Ts, @@ -86,7 +86,7 @@ void Foam::ReactingParcel<ParcelType>::calcPhaseChange phaseChange.calculate ( dt, - cellI, + celli, Re, Pr, d, @@ -206,10 +206,10 @@ void Foam::ReactingParcel<ParcelType>::setCellValues ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { - ParcelType::setCellValues(td, dt, cellI); + ParcelType::setCellValues(td, dt, celli); pc_ = td.pInterp().interpolate ( @@ -222,7 +222,7 @@ void Foam::ReactingParcel<ParcelType>::setCellValues if (debug) { WarningInFunction - << "Limiting observed pressure in cell " << cellI << " to " + << "Limiting observed pressure in cell " << celli << " to " << td.cloud().constProps().pMin() << nl << endl; } @@ -237,14 +237,14 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { scalar addedMass = 0.0; scalar maxMassI = 0.0; forAll(td.cloud().rhoTrans(), i) { - scalar dm = td.cloud().rhoTrans(i)[cellI]; + scalar dm = td.cloud().rhoTrans(i)[celli]; maxMassI = max(maxMassI, mag(dm)); addedMass += dm; } @@ -254,17 +254,17 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection return; } - const scalar massCell = this->massCell(cellI); + const scalar massCell = this->massCell(celli); - this->rhoc_ += addedMass/td.cloud().pMesh().cellVolumes()[cellI]; + this->rhoc_ += addedMass/td.cloud().pMesh().cellVolumes()[celli]; const scalar massCellNew = massCell + addedMass; - this->Uc_ = (this->Uc_*massCell + td.cloud().UTrans()[cellI])/massCellNew; + this->Uc_ = (this->Uc_*massCell + td.cloud().UTrans()[celli])/massCellNew; scalar CpEff = 0.0; forAll(td.cloud().rhoTrans(), i) { - scalar Y = td.cloud().rhoTrans(i)[cellI]/addedMass; + scalar Y = td.cloud().rhoTrans(i)[celli]/addedMass; CpEff += Y*td.cloud().composition().carrier().Cp ( i, @@ -273,17 +273,17 @@ void Foam::ReactingParcel<ParcelType>::cellValueSourceCorrection ); } - const scalar Cpc = td.CpInterp().psi()[cellI]; + const scalar Cpc = td.CpInterp().psi()[celli]; this->Cpc_ = (massCell*Cpc + addedMass*CpEff)/massCellNew; - this->Tc_ += td.cloud().hsTrans()[cellI]/(this->Cpc_*massCellNew); + this->Tc_ += td.cloud().hsTrans()[celli]/(this->Cpc_*massCellNew); if (this->Tc_ < td.cloud().constProps().TMin()) { if (debug) { WarningInFunction - << "Limiting observed temperature in cell " << cellI << " to " + << "Limiting observed temperature in cell " << celli << " to " << td.cloud().constProps().TMin() << nl << endl; } @@ -297,7 +297,7 @@ template<class TrackData> void Foam::ReactingParcel<ParcelType>::correctSurfaceValues ( TrackData& td, - const label cellI, + const label celli, const scalar T, const scalarField& Cs, scalar& rhos, @@ -319,7 +319,7 @@ void Foam::ReactingParcel<ParcelType>::correctSurfaceValues forAll(Xinf, i) { - Xinf[i] = thermo.carrier().Y(i)[cellI]/thermo.carrier().W(i); + Xinf[i] = thermo.carrier().Y(i)[celli]/thermo.carrier().W(i); } Xinf /= sum(Xinf); @@ -390,7 +390,7 @@ void Foam::ReactingParcel<ParcelType>::calc ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { typedef typename TrackData::cloudType::reactingCloudType reactingCloudType; @@ -410,7 +410,7 @@ void Foam::ReactingParcel<ParcelType>::calc // Calc surface values scalar Ts, rhos, mus, Prs, kappas; - this->calcSurfaceValues(td, cellI, T0, Ts, rhos, mus, Prs, kappas); + this->calcSurfaceValues(td, celli, T0, Ts, rhos, mus, Prs, kappas); scalar Res = this->Re(U0, d0, rhos, mus); @@ -459,7 +459,7 @@ void Foam::ReactingParcel<ParcelType>::calc ( td, dt, - cellI, + celli, Res, Prs, Ts, @@ -512,10 +512,10 @@ void Foam::ReactingParcel<ParcelType>::calc label gid = composition.localToCarrierId(0, i); scalar hs = composition.carrier().Hs(gid, pc_, T0); - td.cloud().rhoTrans(gid)[cellI] += dmi; - td.cloud().hsTrans()[cellI] += dmi*hs; + td.cloud().rhoTrans(gid)[celli] += dmi; + td.cloud().hsTrans()[celli] += dmi*hs; } - td.cloud().UTrans()[cellI] += dm*U0; + td.cloud().UTrans()[celli] += dm*U0; td.cloud().phaseChange().addToPhaseChangeMass(np0*mass1); } @@ -524,7 +524,7 @@ void Foam::ReactingParcel<ParcelType>::calc } // Correct surface values due to emitted species - correctSurfaceValues(td, cellI, Ts, Cs, rhos, mus, Prs, kappas); + correctSurfaceValues(td, celli, Ts, Cs, rhos, mus, Prs, kappas); Res = this->Re(U0, this->d_, rhos, mus); @@ -540,7 +540,7 @@ void Foam::ReactingParcel<ParcelType>::calc ( td, dt, - cellI, + celli, Res, Prs, kappas, @@ -558,7 +558,7 @@ void Foam::ReactingParcel<ParcelType>::calc // Calculate new particle velocity this->U_ = - this->calcVelocity(td, dt, cellI, Res, mus, mass1, Su, dUTrans, Spu); + this->calcVelocity(td, dt, celli, Res, mus, mass1, Su, dUTrans, Spu); // 4. Accumulate carrier phase source terms @@ -573,27 +573,27 @@ void Foam::ReactingParcel<ParcelType>::calc label gid = composition.localToCarrierId(0, i); scalar hs = composition.carrier().Hs(gid, pc_, T0); - td.cloud().rhoTrans(gid)[cellI] += dm; - td.cloud().UTrans()[cellI] += dm*U0; - td.cloud().hsTrans()[cellI] += dm*hs; + td.cloud().rhoTrans(gid)[celli] += dm; + td.cloud().UTrans()[celli] += dm*U0; + td.cloud().hsTrans()[celli] += dm*hs; } // Update momentum transfer - td.cloud().UTrans()[cellI] += np0*dUTrans; - td.cloud().UCoeff()[cellI] += np0*Spu; + td.cloud().UTrans()[celli] += np0*dUTrans; + td.cloud().UCoeff()[celli] += np0*Spu; // Update sensible enthalpy transfer - td.cloud().hsTrans()[cellI] += np0*dhsTrans; - td.cloud().hsCoeff()[cellI] += np0*Sph; + td.cloud().hsTrans()[celli] += np0*dhsTrans; + td.cloud().hsCoeff()[celli] += np0*Sph; // Update radiation fields if (td.cloud().radiation()) { const scalar ap = this->areaP(); const scalar T4 = pow4(T0); - td.cloud().radAreaP()[cellI] += dt*np0*ap; - td.cloud().radT4()[cellI] += dt*np0*T4; - td.cloud().radAreaPT4()[cellI] += dt*np0*ap*T4; + td.cloud().radAreaP()[celli] += dt*np0*ap; + td.cloud().radT4()[celli] += dt*np0*T4; + td.cloud().radAreaPT4()[celli] += dt*np0*ap*T4; } } } diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H index a89bc9c4cf7dd193b5d4248821e383227e1e879b..6642d0e8ecc88be8b629f238bf4f0c240b567ced 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H @@ -179,7 +179,7 @@ protected: ( TrackData& td, const scalar dt, // timestep - const label cellI, // owner cell + const label celli, // owner cell const scalar Re, // Reynolds number const scalar Pr, // Prandtl number const scalar Ts, // Surface temperature @@ -230,7 +230,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ); @@ -240,7 +240,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, @@ -345,7 +345,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Correct cell values using latest transfer information @@ -354,7 +354,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Correct surface values due to emitted species @@ -362,7 +362,7 @@ public: void correctSurfaceValues ( TrackData& td, - const label cellI, + const label celli, const scalar T, const scalarField& Cs, scalar& rhos, @@ -377,7 +377,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H index 243488140186f2965a9ee9368a136e80124902a4..bdff05ad6d4c62344fcef67591cd9ca86bc49589 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelI.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 @@ -64,12 +64,12 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, 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) @@ -81,7 +81,7 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, @@ -100,7 +100,7 @@ inline Foam::ReactingParcel<ParcelType>::ReactingParcel ( mesh, position, - cellI, + celli, tetFaceI, tetPtI, typeId, diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C index 8ae9e09d59c0b9c993c57c92355dfaaee04e9f0f..103c97c342554907720215d44c4bbdf1ada66283 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.C @@ -36,10 +36,10 @@ void Foam::ThermoParcel<ParcelType>::setCellValues ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { - ParcelType::setCellValues(td, dt, cellI); + ParcelType::setCellValues(td, dt, celli); tetIndices tetIs = this->currentTetIndices(); @@ -52,7 +52,7 @@ void Foam::ThermoParcel<ParcelType>::setCellValues if (debug) { WarningInFunction - << "Limiting observed temperature in cell " << cellI << " to " + << "Limiting observed temperature in cell " << celli << " to " << td.cloud().constProps().TMin() << nl << endl; } @@ -67,20 +67,20 @@ void Foam::ThermoParcel<ParcelType>::cellValueSourceCorrection ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { - this->Uc_ += td.cloud().UTrans()[cellI]/this->massCell(cellI); + this->Uc_ += td.cloud().UTrans()[celli]/this->massCell(celli); - const scalar CpMean = td.CpInterp().psi()[cellI]; - Tc_ += td.cloud().hsTrans()[cellI]/(CpMean*this->massCell(cellI)); + const scalar CpMean = td.CpInterp().psi()[celli]; + Tc_ += td.cloud().hsTrans()[celli]/(CpMean*this->massCell(celli)); if (Tc_ < td.cloud().constProps().TMin()) { if (debug) { WarningInFunction - << "Limiting observed temperature in cell " << cellI << " to " + << "Limiting observed temperature in cell " << celli << " to " << td.cloud().constProps().TMin() << nl << endl; } @@ -94,7 +94,7 @@ template<class TrackData> void Foam::ThermoParcel<ParcelType>::calcSurfaceValues ( TrackData& td, - const label cellI, + const label celli, const scalar T, scalar& Ts, scalar& rhos, @@ -138,7 +138,7 @@ void Foam::ThermoParcel<ParcelType>::calc ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { // Define local properties at beginning of time step @@ -153,7 +153,7 @@ void Foam::ThermoParcel<ParcelType>::calc // Calc surface values // ~~~~~~~~~~~~~~~~~~~ scalar Ts, rhos, mus, Pr, kappas; - calcSurfaceValues(td, cellI, this->T_, Ts, rhos, mus, Pr, kappas); + calcSurfaceValues(td, celli, this->T_, Ts, rhos, mus, Pr, kappas); // Reynolds number scalar Re = this->Re(this->U_, this->d_, rhos, mus); @@ -193,7 +193,7 @@ void Foam::ThermoParcel<ParcelType>::calc ( td, dt, - cellI, + celli, Re, Pr, kappas, @@ -209,7 +209,7 @@ void Foam::ThermoParcel<ParcelType>::calc // Calculate new particle velocity this->U_ = - this->calcVelocity(td, dt, cellI, Re, mus, mass0, Su, dUTrans, Spu); + this->calcVelocity(td, dt, celli, Re, mus, mass0, Su, dUTrans, Spu); // Accumulate carrier phase source terms @@ -217,25 +217,25 @@ void Foam::ThermoParcel<ParcelType>::calc if (td.cloud().solution().coupled()) { // Update momentum transfer - td.cloud().UTrans()[cellI] += np0*dUTrans; + td.cloud().UTrans()[celli] += np0*dUTrans; // Update momentum transfer coefficient - td.cloud().UCoeff()[cellI] += np0*Spu; + td.cloud().UCoeff()[celli] += np0*Spu; // Update sensible enthalpy transfer - td.cloud().hsTrans()[cellI] += np0*dhsTrans; + td.cloud().hsTrans()[celli] += np0*dhsTrans; // Update sensible enthalpy coefficient - td.cloud().hsCoeff()[cellI] += np0*Sph; + td.cloud().hsCoeff()[celli] += np0*Sph; // Update radiation fields if (td.cloud().radiation()) { const scalar ap = this->areaP(); const scalar T4 = pow4(T0); - td.cloud().radAreaP()[cellI] += dt*np0*ap; - td.cloud().radT4()[cellI] += dt*np0*T4; - td.cloud().radAreaPT4()[cellI] += dt*np0*ap*T4; + td.cloud().radAreaP()[celli] += dt*np0*ap; + td.cloud().radT4()[celli] += dt*np0*T4; + td.cloud().radAreaPT4()[celli] += dt*np0*ap*T4; } } } @@ -247,7 +247,7 @@ Foam::scalar Foam::ThermoParcel<ParcelType>::calcHeatTransfer ( TrackData& td, const scalar dt, - const label cellI, + const label celli, const scalar Re, const scalar Pr, const scalar kappa, diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H index 3ea797ff8d8eeb7451a42103268c77b38b15ca54..93964899474f9491672214f3463f5f841433e44f 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H @@ -251,7 +251,7 @@ protected: ( TrackData& td, const scalar dt, // timestep - const label cellI, // owner cell + const label celli, // owner cell const scalar Re, // Reynolds number const scalar Pr, // Prandtl number - surface const scalar kappa, // Thermal conductivity - surface @@ -286,7 +286,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ); @@ -296,7 +296,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, @@ -396,7 +396,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Correct cell values using latest transfer information @@ -405,7 +405,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Calculate surface thermo properties @@ -413,7 +413,7 @@ public: void calcSurfaceValues ( TrackData& td, - const label cellI, + const label celli, const scalar T, scalar& Ts, scalar& rhos, @@ -428,7 +428,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H index e9281af259faa57a1f75079c1ef4e9815f3c0532..6c09f152400b8889f0aa5ffdd7667b3e6b916f69 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelI.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 @@ -75,12 +75,12 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, 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), @@ -93,7 +93,7 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, @@ -111,7 +111,7 @@ inline Foam::ThermoParcel<ParcelType>::ThermoParcel ( mesh, position, - cellI, + celli, tetFaceI, tetPtI, typeId, diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.H index e05b3ca86a07f4947ae0a45f7153c623b7b2d11b..c041cb809d305d793af3e19fc423d6ecbb502c1e 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObject/CloudFunctionObject.H @@ -148,7 +148,7 @@ public: virtual void postMove ( typename CloudType::parcelType& p, - const label cellI, + const label celli, const scalar dt, const point& position0, bool& keepParticle @@ -168,7 +168,7 @@ public: virtual void postFace ( const typename CloudType::parcelType& p, - const label faceI, + const label facei, bool& keepParticle ); diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C index 18113a3a611f9a2d3cc6d3b52c79ec919ede7323..50df98cb20a84e9ca6edef29735ea6630591cff3 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.C @@ -137,7 +137,7 @@ template<class CloudType> void Foam::CloudFunctionObjectList<CloudType>::postMove ( typename CloudType::parcelType& p, - const label cellI, + const label celli, const scalar dt, const point& position0, bool& keepParticle @@ -145,7 +145,7 @@ void Foam::CloudFunctionObjectList<CloudType>::postMove { forAll(*this, i) { - this->operator[](i).postMove(p, cellI, dt, position0, keepParticle); + this->operator[](i).postMove(p, celli, dt, position0, keepParticle); if (!keepParticle) { @@ -188,13 +188,13 @@ template<class CloudType> void Foam::CloudFunctionObjectList<CloudType>::postFace ( const typename CloudType::parcelType& p, - const label faceI, + const label facei, bool& keepParticle ) { forAll(*this, i) { - this->operator[](i).postFace(p, faceI, keepParticle); + this->operator[](i).postFace(p, facei, keepParticle); if (!keepParticle) { diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.H index 675d1941d3ddb2ec5c5dcc1102eaa0e2769f97b7..2e02d95430b8c83c49abf59088e1ca5a8e7f5ec9 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/CloudFunctionObjectList/CloudFunctionObjectList.H @@ -113,7 +113,7 @@ public: virtual void postMove ( typename CloudType::parcelType& p, - const label cellI, + const label celli, const scalar dt, const point& position0, bool& keepParticle @@ -133,7 +133,7 @@ public: virtual void postFace ( const typename CloudType::parcelType& p, - const label faceI, + const label facei, bool& keepParticle ); }; diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.C index cf67435f104e4746191c444c4d3ea4607a8dc944..c999dc2948736ed5f41b6fa21f87af816bfdb934 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.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 @@ -296,25 +296,25 @@ Foam::FacePostProcessing<CloudType>::FacePostProcessing scalar totArea = 0.0; forAll(fz, j) { - label faceI = fz[j]; - if (faceI < owner.mesh().nInternalFaces()) + label facei = fz[j]; + if (facei < owner.mesh().nInternalFaces()) { totArea += magSf[fz[j]]; } else { - label bFaceI = faceI - owner.mesh().nInternalFaces(); - label patchI = pbm.patchID()[bFaceI]; - const polyPatch& pp = pbm[patchI]; + label bFaceI = facei - owner.mesh().nInternalFaces(); + label patchi = pbm.patchID()[bFaceI]; + const polyPatch& pp = pbm[patchi]; if ( - !magSf.boundaryField()[patchI].coupled() + !magSf.boundaryField()[patchi].coupled() || 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]; } } } @@ -363,7 +363,7 @@ template<class CloudType> void Foam::FacePostProcessing<CloudType>::postFace ( const parcelType& p, - const label faceI, + const label facei, bool& ) { @@ -382,7 +382,7 @@ void Foam::FacePostProcessing<CloudType>::postFace label faceId = -1; forAll(fz, j) { - if (fz[j] == faceI) + if (fz[j] == facei) { faceId = j; break; diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.H index 132509ad66e8d0dbdd092b06700e50e35c06b014..3faa7d8a8df60603073da0f6493f36d572dbfea6 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/FacePostProcessing/FacePostProcessing.H @@ -162,7 +162,7 @@ public: virtual void postFace ( const parcelType& p, - const label faceI, + const label facei, bool& keepParticle ); }; diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C index dff36011869415575a5f6d46dd979f33149743bc..4263956f8a95c7c0868f37701b3a72326f2ff9c2 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.C @@ -132,18 +132,18 @@ void Foam::ParticleCollector<CloudType>::initPolygons faces_.setSize(polygons.size()); faceTris_.setSize(polygons.size()); area_.setSize(polygons.size()); - forAll(faces_, faceI) + forAll(faces_, facei) { - const Field<point>& polyPoints = polygons[faceI]; + const Field<point>& polyPoints = polygons[facei]; face f(identity(polyPoints.size()) + pointOffset); UIndirectList<point>(points_, f) = polyPoints; - area_[faceI] = f.mag(points_); + area_[facei] = f.mag(points_); DynamicList<face> tris; f.triangles(points_, tris); - faceTris_[faceI].transfer(tris); + faceTris_[facei].transfer(tris); - faces_[faceI].transfer(f); + faces_[facei].transfer(f); pointOffset += polyPoints.size(); } @@ -246,10 +246,10 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles() facePts.append(id); } - label faceI = secI + radI*nS; + label facei = secI + radI*nS; - faces_[faceI] = face(facePts); - area_[faceI] = faces_[faceI].mag(points_); + faces_[facei] = face(facePts); + area_[facei] = faces_[facei].mag(points_); } } else @@ -273,10 +273,10 @@ void Foam::ParticleCollector<CloudType>::initConcentricCircles() facePts.append(id); } - label faceI = secI + radI*nS; + label facei = secI + radI*nS; - faces_[faceI] = face(facePts); - area_[faceI] = faces_[faceI].mag(points_); + faces_[facei] = face(facePts); + area_[facei] = faces_[facei].mag(points_); } } } @@ -293,14 +293,14 @@ void Foam::ParticleCollector<CloudType>::collectParcelPolygon label dummyNearType = -1; label dummyNearLabel = -1; - forAll(faces_, faceI) + forAll(faces_, facei) { - const label facePoint0 = faces_[faceI][0]; + const label facePoint0 = faces_[facei][0]; const point& pf = points_[facePoint0]; - const scalar d1 = normal_[faceI] & (p1 - pf); - const scalar d2 = normal_[faceI] & (p2 - pf); + const scalar d1 = normal_[facei] & (p1 - pf); + const scalar d2 = normal_[facei] & (p2 - pf); if (sign(d1) == sign(d2)) { @@ -311,7 +311,7 @@ void Foam::ParticleCollector<CloudType>::collectParcelPolygon // intersection point const point pIntersect = p1 + (d1/(d1 - d2))*(p2 - p1); - const List<face>& tris = faceTris_[faceI]; + const List<face>& tris = faceTris_[facei]; // identify if point is within poly bounds forAll(tris, triI) @@ -326,7 +326,7 @@ void Foam::ParticleCollector<CloudType>::collectParcelPolygon if (t.classify(pIntersect, dummyNearType, dummyNearLabel)) { - hitFaceIDs_.append(faceI); + hitFaceIDs_.append(facei); } } } @@ -398,11 +398,11 @@ void Foam::ParticleCollector<CloudType>::write() const scalar alpha = (totalTime_ - timeElapsed)/totalTime_; const scalar beta = timeElapsed/totalTime_; - forAll(faces_, faceI) + forAll(faces_, facei) { - massFlowRate_[faceI] = - alpha*massFlowRate_[faceI] + beta*mass_[faceI]/timeElapsed; - massTotal_[faceI] += mass_[faceI]; + massFlowRate_[facei] = + alpha*massFlowRate_[facei] + beta*mass_[facei]/timeElapsed; + massTotal_[facei] += mass_[facei]; } const label procI = Pstream::myProcNo(); @@ -418,28 +418,28 @@ void Foam::ParticleCollector<CloudType>::write() scalar sumTotalMass = 0.0; scalar sumAverageMFR = 0.0; - forAll(faces_, faceI) + forAll(faces_, facei) { scalarList allProcMass(Pstream::nProcs()); - allProcMass[procI] = massTotal_[faceI]; + allProcMass[procI] = massTotal_[facei]; Pstream::gatherList(allProcMass); - faceMassTotal[faceI] += sum(allProcMass); + faceMassTotal[facei] += sum(allProcMass); scalarList allProcMassFlowRate(Pstream::nProcs()); - allProcMassFlowRate[procI] = massFlowRate_[faceI]; + allProcMassFlowRate[procI] = massFlowRate_[facei]; Pstream::gatherList(allProcMassFlowRate); - faceMassFlowRate[faceI] += sum(allProcMassFlowRate); + faceMassFlowRate[facei] += sum(allProcMassFlowRate); - sumTotalMass += faceMassTotal[faceI]; - sumAverageMFR += faceMassFlowRate[faceI]; + sumTotalMass += faceMassTotal[facei]; + sumAverageMFR += faceMassFlowRate[facei]; if (outputFilePtr_.valid()) { outputFilePtr_() << time.timeName() - << tab << faceI - << tab << faceMassTotal[faceI] - << tab << faceMassFlowRate[faceI] + << tab << facei + << tab << faceMassTotal[facei] + << tab << faceMassFlowRate[facei] << endl; } } @@ -495,11 +495,11 @@ void Foam::ParticleCollector<CloudType>::write() this->setModelProperty("massFlowRate", faceMassFlowRate); } - forAll(faces_, faceI) + forAll(faces_, facei) { - mass_[faceI] = 0.0; - massTotal_[faceI] = 0.0; - massFlowRate_[faceI] = 0.0; + mass_[facei] = 0.0; + massTotal_[facei] = 0.0; + massFlowRate_[facei] = 0.0; } } @@ -638,7 +638,7 @@ template<class CloudType> void Foam::ParticleCollector<CloudType>::postMove ( parcelType& p, - const label cellI, + const label celli, const scalar dt, const point& position0, bool& keepParticle @@ -674,27 +674,27 @@ void Foam::ParticleCollector<CloudType>::postMove forAll(hitFaceIDs_, i) { - label faceI = hitFaceIDs_[i]; + label facei = hitFaceIDs_[i]; scalar m = p.nParticle()*p.mass(); if (negateParcelsOppositeNormal_) { vector Uhat = p.U(); Uhat /= mag(Uhat) + ROOTVSMALL; - if ((Uhat & normal_[faceI]) < 0) + if ((Uhat & normal_[facei]) < 0) { m *= -1.0; } } // add mass contribution - mass_[faceI] += m; + mass_[facei] += m; if (nSector_ == 1) { - mass_[faceI + 1] += m; - mass_[faceI + 2] += m; - mass_[faceI + 3] += m; + mass_[facei + 1] += m; + mass_[facei + 2] += m; + mass_[facei + 3] += m; } if (removeCollected_) diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.H index 7cce69b9d3f8950c14c8c1a402e1d8587b8e19b3..d14195aa6e94ce8cda791f39c7a2618662599fb6 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleCollector/ParticleCollector.H @@ -287,7 +287,7 @@ public: virtual void postMove ( parcelType& p, - const label cellI, + const label celli, const scalar dt, const point& position0, bool& keepParticle diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C index db126559878b0b46e065572a2c3af72d98a3608e..0bff0a986a44805844c1182f10057ceb4c754861 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleErosion/ParticleErosion.C @@ -167,9 +167,9 @@ void Foam::ParticleErosion<CloudType>::postPatch bool& ) { - const label patchI = pp.index(); + const label patchi = pp.index(); - const label localPatchI = applyToPatch(patchI); + const label localPatchI = applyToPatch(patchi); if (localPatchI != -1) { @@ -197,7 +197,7 @@ 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]; + 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/ParticleTracks/ParticleTracks.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.H index fb4ac9c0608482027ee23340ae60e4642729f737..bf88f780cd0051de9a636af105f295f54ca52b03 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTracks/ParticleTracks.H @@ -148,7 +148,7 @@ public: virtual void postFace ( const parcelType& p, - const label faceI, + const label facei, bool& keepParticle ); }; diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C index b26d7766e5cede66344fe74410290ec4371d2411..cb615dacaf5820752eb127dddaf9bacdc76e1d0c 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -104,15 +104,15 @@ template<class CloudType> void Foam::ParticleTrap<CloudType>::postMove ( parcelType& p, - const label cellI, + const label celli, const scalar, const point&, bool& ) { - if (alphaPtr_->internalField()[cellI] < threshold_) + if (alphaPtr_->internalField()[celli] < threshold_) { - const vector& gradAlpha = gradAlphaPtr_()[cellI]; + const vector& gradAlpha = gradAlphaPtr_()[celli]; vector nHat = gradAlpha/mag(gradAlpha); scalar nHatU = nHat & p.U(); diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.H index 85c55a516a5e7bc376d6d563a850b0c880a158b0..47f815f2d55612dad4739d3aeb7302d47b2b63c8 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ParticleTrap/ParticleTrap.H @@ -131,7 +131,7 @@ public: virtual void postMove ( typename CloudType::parcelType& p, - const label cellI, + const label celli, const scalar dt, const point& position0, bool& keepParticle diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C index b19f347fb54d59f921c40502d66e359e84853b12..a7203cf1f13763daa08ec5bc99daf4e5f33d43c9 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/PatchPostProcessing/PatchPostProcessing.C @@ -158,8 +158,8 @@ Foam::PatchPostProcessing<CloudType>::PatchPostProcessing { forAll(patchIDs_, i) { - const label patchI = patchIDs_[i]; - const word& patchName = owner.mesh().boundaryMesh()[patchI].name(); + const label patchi = patchIDs_[i]; + const word& patchName = owner.mesh().boundaryMesh()[patchi].name(); Info<< "Post-process patch " << patchName << endl; } } @@ -202,8 +202,8 @@ void Foam::PatchPostProcessing<CloudType>::postPatch bool& ) { - const label patchI = pp.index(); - const label localPatchI = applyToPatch(patchI); + const label patchi = pp.index(); + const label localPatchI = applyToPatch(patchi); if (localPatchI != -1 && patchData_[localPatchI].size() < maxStoredParcels_) { diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C index d8ea47cd74b8a5dc28becb69346b95c3f36d2dd2..01ecb354808837bb1874b9e28df0c108d1555dcb 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.C +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.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 @@ -125,7 +125,7 @@ template<class CloudType> void Foam::VoidFraction<CloudType>::postMove ( parcelType& p, - const label cellI, + const label celli, const scalar dt, const point&, bool& @@ -133,7 +133,7 @@ void Foam::VoidFraction<CloudType>::postMove { volScalarField& theta = thetaPtr_(); - theta[cellI] += dt*p.nParticle()*p.volume(); + theta[celli] += dt*p.nParticle()*p.volume(); } diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.H index e42461241890215021f6efd7bf02635f4f503403..0382ed5d2ee51ff025b1a4e2c37bd5eab938a25a 100644 --- a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.H +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/VoidFraction/VoidFraction.H @@ -119,7 +119,7 @@ public: virtual void postMove ( parcelType& p, - const label cellI, + const label celli, const scalar dt, const point& position0, bool& keepParticle diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C index fd21059d900ac92bccd0fd2a884fb1042f31aa90..36c32aaa7aa30bc517732ccb248d568e8bee7c5f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/PairCollision.C @@ -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(); + realFaceI - mesh.boundaryMesh()[patchi].start(); WallSiteData<vector> wSD ( - patchI, - U.boundaryField()[patchI][patchFaceI] + patchi, + U.boundaryField()[patchi][patchFaceI] ); bool particleHit = false; @@ -307,7 +307,7 @@ void Foam::PairCollision<CloudType>::wallInteraction() this->owner().functions().postPatch ( p, - mesh.boundaryMesh()[patchI], + mesh.boundaryMesh()[patchi], 1.0, p.currentTetIndices(), keep diff --git a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C index cbc6db32342cbd5139b4a3c39a90e66fdcd80e0d..d28d6b136f6c782e2ac081128e656766a3a8bea3 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/CollisionModel/PairCollision/WallModel/WallLocalSpringSliderDashpot/WallLocalSpringSliderDashpot.C @@ -214,11 +214,11 @@ Foam::WallLocalSpringSliderDashpot<CloudType>::WallLocalSpringSliderDashpot DynamicList<label> wallPatchIndices; - forAll(bMesh, patchI) + forAll(bMesh, patchi) { - if (isA<wallPolyPatch>(bMesh[patchI])) + if (isA<wallPolyPatch>(bMesh[patchi])) { - wallPatchIndices.append(bMesh[patchI].index()); + wallPatchIndices.append(bMesh[patchi].index()); } } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H index 138bff4396ad32ac87b79149ede409470d0aa4a3..fa22e0d58f984f416e19f0b248c7397bac2a7aa5 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.H @@ -109,7 +109,7 @@ public: virtual vector update ( const scalar dt, - const label cellI, + const label celli, const vector& U, const vector& Uc, vector& UTurb, diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H index 721868f3c4b54363d7c12647db859ee523741798..7b2c09f37e5ee987dbeee7f6c20e31aebb450782 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H @@ -85,7 +85,7 @@ public: virtual vector update ( const scalar dt, - const label cellI, + const label celli, const vector& U, const vector& Uc, vector& UTurb, diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C index 20f3740857a8fb22a721c54c61e8c6e4349fd458..c96e81ca610ad630ec964c7ee89e9790d4c80cb9 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/CellZoneInjection/CellZoneInjection.C @@ -52,10 +52,10 @@ void Foam::CellZoneInjection<CloudType>::setPositions forAll(cellZoneCells, i) { - const label cellI = cellZoneCells[i]; + const label celli = cellZoneCells[i]; // Calc number of particles to add - const scalar newParticles = V[cellI]*numberDensity_; + const scalar newParticles = V[celli]*numberDensity_; newParticlesTotal += newParticles; label addParticles = floor(newParticles); addParticlesTotal += addParticles; @@ -70,14 +70,14 @@ void Foam::CellZoneInjection<CloudType>::setPositions // Construct cell tet indices const List<tetIndices> cellTetIs = - polyMeshTetDecomposition::cellTetIndices(mesh, cellI); + polyMeshTetDecomposition::cellTetIndices(mesh, celli); // Construct cell tet volume fractions scalarList cTetVFrac(cellTetIs.size(), 0.0); for (label tetI = 1; tetI < cellTetIs.size() - 1; tetI++) { cTetVFrac[tetI] = - cTetVFrac[tetI-1] + cellTetIs[tetI].tet(mesh).mag()/V[cellI]; + cTetVFrac[tetI-1] + cellTetIs[tetI].tet(mesh).mag()/V[celli]; } cTetVFrac.last() = 1.0; @@ -96,7 +96,7 @@ void Foam::CellZoneInjection<CloudType>::setPositions } positions.append(cellTetIs[tetI].tet(mesh).randomPoint(rnd)); - injectorCells.append(cellI); + injectorCells.append(celli); injectorTetFaces.append(cellTetIs[tetI].face()); injectorTetPts.append(cellTetIs[tetI].tetPt()); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C index d6b59b9043c26727faf6e27b89198da3373b5e7d..1b1087d4a25bfcf8e80af80e948b173826d11da2 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.C @@ -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 @@ -241,12 +241,12 @@ bool Foam::FieldActivatedInjection<CloudType>::validInjection const label parcelI ) { - const label cellI = injectorCells_[parcelI]; + const label celli = injectorCells_[parcelI]; if ( nParcelsInjected_[parcelI] < nParcelsPerInjector_ - && factor_*referenceField_[cellI] > thresholdField_[cellI] + && factor_*referenceField_[celli] > thresholdField_[celli] ) { nParcelsInjected_[parcelI]++; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H index c5dd277d3f753edcd6e1bb8ee92e19b9b82fee1b..87cc0e84269ff64f8417d60bd7de5e0c6d1ca6f9 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/FieldActivatedInjection/FieldActivatedInjection.H @@ -29,7 +29,7 @@ Description \li for injection to be allowed \verbatim - factor*referenceField[cellI] >= thresholdField[cellI] + factor*referenceField[celli] >= thresholdField[celli] \endverbatim where: - \c referenceField is the field used to supply the look-up values diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 1f5960b75f434a7fa17fa8ee845357dfb92ce40b..693b286ca252ded84341c1e14b3e5f19f41df577 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -91,7 +91,7 @@ bool Foam::InjectionModel<CloudType>::prepareForNextTimeStep template<class CloudType> bool Foam::InjectionModel<CloudType>::findCellAtPosition ( - label& cellI, + label& celli, label& tetFaceI, label& tetPtI, vector& position, @@ -105,14 +105,14 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition this->owner().mesh().findCellFacePt ( position, - cellI, + celli, tetFaceI, tetPtI ); label procI = -1; - if (cellI >= 0) + if (celli >= 0) { procI = Pstream::myProcNo(); } @@ -123,7 +123,7 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition if (procI != Pstream::myProcNo()) { - cellI = -1; + celli = -1; tetFaceI = -1; tetPtI = -1; } @@ -132,13 +132,13 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition // probably on an edge if (procI == -1) { - cellI = this->owner().mesh().findNearestCell(position); + celli = this->owner().mesh().findNearestCell(position); - if (cellI >= 0) + if (celli >= 0) { - position += SMALL*(cellCentres[cellI] - position); + position += SMALL*(cellCentres[celli] - position); - if (this->owner().mesh().pointInCell(position, cellI)) + if (this->owner().mesh().pointInCell(position, celli)) { procI = Pstream::myProcNo(); } @@ -148,7 +148,7 @@ bool Foam::InjectionModel<CloudType>::findCellAtPosition if (procI != Pstream::myProcNo()) { - cellI = -1; + celli = -1; tetFaceI = -1; tetPtI = -1; } @@ -441,7 +441,7 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td) // Determine the injection position and owner cell, // tetFace and tetPt - label cellI = -1; + label celli = -1; label tetFaceI = -1; label tetPtI = -1; @@ -453,12 +453,12 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td) newParcels, timeInj, pos, - cellI, + celli, tetFaceI, tetPtI ); - if (cellI > -1) + if (celli > -1) { // Lagrangian timestep const scalar dt = time - timeInj; @@ -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); @@ -561,7 +561,7 @@ void Foam::InjectionModel<CloudType>::injectSteadyState // Determine the injection position and owner cell, // tetFace and tetPt - label cellI = -1; + label celli = -1; label tetFaceI = -1; label tetPtI = -1; @@ -573,19 +573,19 @@ void Foam::InjectionModel<CloudType>::injectSteadyState newParcels, 0.0, pos, - cellI, + celli, tetFaceI, tetPtI ); - if (cellI > -1) + if (celli > -1) { // Apply corrections to position for 2-D cases meshTools::constrainToMeshCentre(mesh, pos); // 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 e63d7dfb08d56f80d9e639dd83848462463473c9..509f77300ea8e7f2a557458e5aab57e90e711bb9 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H @@ -158,7 +158,7 @@ protected: // ensure that it lies in a cell and not edge/face virtual bool findCellAtPosition ( - label& cellI, + label& celli, label& tetFaceI, label& tetPtI, vector& position, diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C index 0d070691f01d851aef6cee897c64493957ab5494..e48b9a7b5f22654b340b1ace86740004ade13472 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/patchInjectionBase.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 @@ -98,16 +98,16 @@ void Foam::patchInjectionBase::updateMesh(const polyMesh& mesh) // Set zero value at the start of the tri area list triMagSf.append(0.0); - forAll(patch, faceI) + forAll(patch, facei) { - const face& f = patch[faceI]; + const face& f = patch[facei]; tris.clear(); f.triangles(points, tris); forAll(tris, i) { - triToFace.append(faceI); + triToFace.append(facei); triFace.append(tris[i]); triMagSf.append(tris[i].mag(points)); } @@ -193,8 +193,8 @@ void Foam::patchInjectionBase::setPositionAndCell } // Set cellOwner - label faceI = triToFace_[triI]; - cellOwner = cellOwners_[faceI]; + label facei = triToFace_[triI]; + cellOwner = cellOwners_[facei]; // Find random point in triangle const polyPatch& patch = mesh.boundaryMesh()[patchId_]; @@ -206,7 +206,7 @@ void Foam::patchInjectionBase::setPositionAndCell // Position perturbed away from face (into domain) const scalar a = rnd.position(scalar(0.1), scalar(0.5)); const vector& pc = mesh.cellCentres()[cellOwner]; - const vector d = mag(pf - pc)*patchNormal_[faceI]; + const vector d = mag(pf - pc)*patchNormal_[facei]; position = pf - a*d; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C index ed94b26bd420f9a7f74f10eaab31dc8d024983a2..cfca52fd7784736abc5eee7d1debe34c2dc96c4d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C @@ -60,16 +60,16 @@ Foam::LocalInteraction<CloudType>::LocalInteraction } // check that interactions are valid/specified - forAll(patchData_, patchI) + forAll(patchData_, patchi) { const word& interactionTypeName = - patchData_[patchI].interactionTypeName(); + patchData_[patchi].interactionTypeName(); const typename PatchInteractionModel<CloudType>::interactionType& it = this->wordToInteractionType(interactionTypeName); if (it == PatchInteractionModel<CloudType>::itOther) { - const word& patchName = patchData_[patchI].patchName(); + const word& patchName = patchData_[patchi].patchName(); FatalErrorInFunction << "Unknown patch interaction type " << interactionTypeName << " for patch " << patchName @@ -176,9 +176,9 @@ bool Foam::LocalInteraction<CloudType>::correct const tetIndices& tetIs ) { - label patchI = patchData_.applyToPatch(pp.index()); + label patchi = patchData_.applyToPatch(pp.index()); - if (patchI >= 0) + if (patchi >= 0) { vector& U = p.U(); bool& active = p.active(); @@ -186,7 +186,7 @@ bool Foam::LocalInteraction<CloudType>::correct typename PatchInteractionModel<CloudType>::interactionType it = this->wordToInteractionType ( - patchData_[patchI].interactionTypeName() + patchData_[patchi].interactionTypeName() ); switch (it) @@ -198,8 +198,8 @@ bool Foam::LocalInteraction<CloudType>::correct keepParticle = false; active = false; U = Zero; - nEscape_[patchI]++; - massEscape_[patchI] += dm; + nEscape_[patchi]++; + massEscape_[patchi] += dm; if (writeFields_) { label pI = pp.index(); @@ -215,8 +215,8 @@ bool Foam::LocalInteraction<CloudType>::correct keepParticle = true; active = false; U = Zero; - nStick_[patchI]++; - massStick_[patchI] += dm; + nStick_[patchi]++; + massStick_[patchi] += dm; if (writeFields_) { label pI = pp.index(); @@ -243,10 +243,10 @@ bool Foam::LocalInteraction<CloudType>::correct if (Un > 0) { - U -= (1.0 + patchData_[patchI].e())*Un*nw; + U -= (1.0 + patchData_[patchi].e())*Un*nw; } - U -= patchData_[patchI].mu()*Ut; + U -= patchData_[patchi].mu()*Ut; // Return velocity to global space U += Up; @@ -257,9 +257,9 @@ bool Foam::LocalInteraction<CloudType>::correct { FatalErrorInFunction << "Unknown interaction type " - << patchData_[patchI].interactionTypeName() + << patchData_[patchi].interactionTypeName() << "(" << it << ") for patch " - << patchData_[patchI].patchName() + << patchData_[patchi].patchName() << ". Valid selections are:" << this->interactionTypeNames_ << endl << abort(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C index 4c7739a07005218db645881fe0e17786766ddf2a..5a409811535937179811f6c83ecb5c3c19dd5cda 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/patchInteractionDataList.C @@ -67,9 +67,9 @@ Foam::patchInteractionDataList::patchInteractionDataList // Check that all patches are specified DynamicList<word> badPatches; - forAll(bMesh, patchI) + forAll(bMesh, patchi) { - const polyPatch& pp = bMesh[patchI]; + const polyPatch& pp = bMesh[patchi]; if ( !pp.coupled() @@ -109,9 +109,9 @@ Foam::label Foam::patchInteractionDataList::applyToPatch(const label id) const forAll(patchGroupIDs_, groupI) { const labelList& patchIDs = patchGroupIDs_[groupI]; - forAll(patchIDs, patchI) + forAll(patchIDs, patchi) { - if (patchIDs[patchI] == id) + if (patchIDs[patchi] == id) { return groupI; } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C index d2dbb92d6c5a401956d6f49affb97d0b3a9f0135..63bd255e546930a3a21101528b4bab00166b381d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.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 @@ -144,17 +144,17 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td) { if (diameterParcelPatch_[j] > 0) { - const label cellI = injectorCellsPatch[j]; + const label celli = injectorCellsPatch[j]; // The position could bein any tet of the decomposed cell, // so arbitrarily choose the first face of the cell as the // 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]; +// const point& pos = this->owner().mesh().C()[celli]; const scalar offset = max @@ -170,7 +170,7 @@ void Foam::SurfaceFilmModel<CloudType>::inject(TrackData& td) ( this->owner().pMesh(), pos, - cellI, + celli, tetFaceI, tetPtI ); diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C index 2fa9f5b72aa4bf50988971fe21c927826485f5e3..b1df842fbe2735a6b64927df6c211aa37fafbd23 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/AveragingMethod/AveragingMethod.C @@ -198,18 +198,18 @@ bool Foam::AveragingMethod<Type>::write() const ); // tet-volume weighted sums - forAll(mesh_.C(), cellI) + forAll(mesh_.C(), celli) { const List<tetIndices> cellTets = - polyMeshTetDecomposition::cellTetIndices(mesh_, cellI); + polyMeshTetDecomposition::cellTetIndices(mesh_, celli); forAll(cellTets, tetI) { const tetIndices& tetIs = cellTets[tetI]; const scalar v = tetIs.tet(mesh_).mag(); - cellValue[cellI] += v*interpolate(mesh_.C()[cellI], tetIs); - cellGrad[cellI] += v*interpolateGrad(mesh_.C()[cellI], tetIs); + cellValue[celli] += v*interpolate(mesh_.C()[celli], tetIs); + cellGrad[celli] += v*interpolateGrad(mesh_.C()[celli], tetIs); const face& f = mesh_.faces()[tetIs.face()]; labelList vertices(3); diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.C index fe3d4776557300414370de8dd39965b2f2049d86..6277ce3790735551c89442ff14a300893d94cdac 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Dual/Dual.C @@ -59,10 +59,10 @@ Foam::AveragingMethods::Dual<Type>::Dual tetVertices_(3), tetCoordinates_(4) { - forAll(this->mesh_.C(), cellI) + forAll(this->mesh_.C(), celli) { List<tetIndices> cellTets = - polyMeshTetDecomposition::cellTetIndices(this->mesh_, cellI); + polyMeshTetDecomposition::cellTetIndices(this->mesh_, celli); forAll(cellTets, tetI) { const tetIndices& tetIs = cellTets[tetI]; @@ -191,7 +191,7 @@ Foam::AveragingMethods::Dual<Type>::interpolateGrad { tetGeometry(position, tetIs); - const label cellI(tetIs.cell()); + const label celli(tetIs.cell()); const tensor T ( @@ -199,9 +199,9 @@ Foam::AveragingMethods::Dual<Type>::interpolateGrad ( tensor ( - this->mesh_.points()[tetVertices_[0]] - this->mesh_.C()[cellI], - this->mesh_.points()[tetVertices_[1]] - this->mesh_.C()[cellI], - this->mesh_.points()[tetVertices_[2]] - this->mesh_.C()[cellI] + this->mesh_.points()[tetVertices_[0]] - this->mesh_.C()[celli], + this->mesh_.points()[tetVertices_[1]] - this->mesh_.C()[celli], + this->mesh_.points()[tetVertices_[2]] - this->mesh_.C()[celli] ) ) ); @@ -215,7 +215,7 @@ Foam::AveragingMethods::Dual<Type>::interpolateGrad dataDual_[tetVertices_[2]] ); - const Type s(dataCell_[cellI]); + const Type s(dataCell_[celli]); return (T & S) + (t*s); } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.C b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.C index 6fbade1dbf69cb22c54828ca685c5eb478d4502b..34b52197d1cbc48678ef1ad68be9e9927f3e5353 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/AveragingMethods/Moment/Moment.C @@ -60,37 +60,37 @@ Foam::AveragingMethods::Moment<Type>::Moment xQ[2] = vector(c, c, b); xQ[3] = vector(c, c, c); - forAll(mesh.C(), cellI) + forAll(mesh.C(), celli) { const List<tetIndices> cellTets = - polyMeshTetDecomposition::cellTetIndices(mesh, cellI); + polyMeshTetDecomposition::cellTetIndices(mesh, celli); symmTensor A(Zero); forAll(cellTets, tetI) { const tetIndices& tetIs = cellTets[tetI]; - const label faceI = tetIs.face(); - const face& f = mesh.faces()[faceI]; + const label facei = tetIs.face(); + const face& f = mesh.faces()[facei]; const tensor T ( tensor ( - mesh.points()[f[tetIs.faceBasePt()]] - mesh.C()[cellI], - mesh.points()[f[tetIs.facePtA()]] - mesh.C()[cellI], - mesh.points()[f[tetIs.facePtB()]] - mesh.C()[cellI] + mesh.points()[f[tetIs.faceBasePt()]] - mesh.C()[celli], + mesh.points()[f[tetIs.facePtA()]] - mesh.C()[celli], + mesh.points()[f[tetIs.facePtB()]] - mesh.C()[celli] ).T() ); - const vectorField d((T & xQ)/scale_[cellI]); + const vectorField d((T & xQ)/scale_[celli]); - const scalar v(6.0*tetIs.tet(mesh).mag()/mesh.V()[cellI]); + const scalar v(6.0*tetIs.tet(mesh).mag()/mesh.V()[celli]); A += v*sum(wQ*sqr(d)); } - transform_[cellI] = inv(A); + transform_[celli] = inv(A); } } @@ -134,21 +134,21 @@ void Foam::AveragingMethods::Moment<Type>::add const Type& value ) { - const label cellI = tetIs.cell(); + const label celli = tetIs.cell(); - const Type v = value/this->mesh_.V()[cellI]; + const Type v = value/this->mesh_.V()[celli]; const TypeGrad dv = - transform_[cellI] + transform_[celli] & ( v - * (position - this->mesh_.C()[cellI]) - / scale_[cellI] + * (position - this->mesh_.C()[celli]) + / scale_[celli] ); - data_[cellI] += v; - dataX_[cellI] += v + dv.x(); - dataY_[cellI] += v + dv.y(); - dataZ_[cellI] += v + dv.z(); + data_[celli] += v; + dataX_[celli] += v + dv.x(); + dataY_[celli] += v + dv.y(); + dataZ_[celli] += v + dv.z(); } @@ -159,19 +159,19 @@ Type Foam::AveragingMethods::Moment<Type>::interpolate const tetIndices& tetIs ) const { - const label cellI = tetIs.cell(); + const label celli = tetIs.cell(); return - data_[cellI] + data_[celli] + ( TypeGrad ( - dataX_[cellI] - data_[cellI], - dataY_[cellI] - data_[cellI], - dataZ_[cellI] - data_[cellI] + dataX_[celli] - data_[celli], + dataY_[celli] - data_[celli], + dataZ_[celli] - data_[celli] ) - & (position - this->mesh_.C()[cellI]) - / scale_[cellI] + & (position - this->mesh_.C()[celli]) + / scale_[celli] ); } @@ -184,15 +184,15 @@ Foam::AveragingMethods::Moment<Type>::interpolateGrad const tetIndices& tetIs ) const { - const label cellI(tetIs.cell()); + const label celli(tetIs.cell()); return TypeGrad ( - dataX_[cellI] - data_[cellI], - dataY_[cellI] - data_[cellI], - dataZ_[cellI] - data_[cellI] - )/scale_[cellI]; + dataX_[celli] - data_[celli], + dataY_[celli] - data_[celli], + dataZ_[celli] - data_[celli] + )/scale_[celli]; } diff --git a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C index 31065b61911f801c87fa4fb6184c32c1b6462d41..6aaf8024dfde5eaac1b5d168342dc8ceb406d038 100644 --- a/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C +++ b/src/lagrangian/intermediate/submodels/MPPIC/PackingModels/Implicit/Implicit.C @@ -270,11 +270,11 @@ void Foam::PackingModels::Implicit<CloudType>::cacheFields(const bool store) phiCorrect_.ref() -= phiGByA(); } - forAll(phiCorrect_(), faceI) + forAll(phiCorrect_(), facei) { // Current and correction fluxes - const scalar phiCurr = phi[faceI]; - scalar& phiCorr = phiCorrect_.ref()[faceI]; + const scalar phiCurr = phi[facei]; + scalar& phiCorr = phiCorrect_.ref()[facei]; // Don't limit if the correction is in the opposite direction to // the flux. We need all the help we can get in this state. @@ -337,33 +337,33 @@ Foam::vector Foam::PackingModels::Implicit<CloudType>::velocityCorrection const fvMesh& mesh = this->owner().mesh(); // containing tetrahedron and parcel coordinates within - const label cellI = p.cell(); - const label faceI = p.tetFace(); - const tetIndices tetIs(cellI, faceI, p.tetPt(), mesh); + const label celli = p.cell(); + const label facei = p.tetFace(); + const tetIndices tetIs(celli, facei, p.tetPt(), mesh); List<scalar> tetCoordinates(4); tetIs.tet(mesh).barycentric(p.position(), tetCoordinates); // cell velocity - const vector U = uCorrect_()[cellI]; + const vector U = uCorrect_()[celli]; // face geometry - vector nHat = mesh.faces()[faceI].normal(mesh.points()); + vector nHat = mesh.faces()[facei].normal(mesh.points()); const scalar nMag = mag(nHat); nHat /= nMag; // get face flux scalar phi; - const label patchI = mesh.boundaryMesh().whichPatch(faceI); - if (patchI == -1) + const label patchi = mesh.boundaryMesh().whichPatch(facei); + if (patchi == -1) { - phi = phiCorrect_()[faceI]; + phi = phiCorrect_()[facei]; } else { phi = - phiCorrect_().boundaryField()[patchI] + phiCorrect_().boundaryField()[patchi] [ - mesh.boundaryMesh()[patchI].whichFace(faceI) + mesh.boundaryMesh()[patchi].whichFace(facei) ]; } diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C index ad57ba6136e2bf732b374896c575ee77bbcee70c..eef6b78f394541c8707b3d91210687cb050d31a8 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.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 @@ -34,7 +34,7 @@ using namespace Foam::constant::mathematical; template<class CloudType> Foam::tmp<Foam::scalarField> Foam::LiquidEvaporation<CloudType>::calcXc ( - const label cellI + const label celli ) const { scalarField Xc(this->owner().thermo().carrier().Y().size()); @@ -42,7 +42,7 @@ Foam::tmp<Foam::scalarField> Foam::LiquidEvaporation<CloudType>::calcXc forAll(Xc, i) { Xc[i] = - this->owner().thermo().carrier().Y()[i][cellI] + this->owner().thermo().carrier().Y()[i][celli] /this->owner().thermo().carrier().W(i); } @@ -132,7 +132,7 @@ template<class CloudType> void Foam::LiquidEvaporation<CloudType>::calculate ( const scalar dt, - const label cellI, + const label celli, const scalar Re, const scalar Pr, const scalar d, @@ -164,8 +164,8 @@ void Foam::LiquidEvaporation<CloudType>::calculate return; } - // construct carrier phase species volume fractions for cell, cellI - const scalarField Xc(calcXc(cellI)); + // construct carrier phase species volume fractions for cell, celli + const scalarField Xc(calcXc(celli)); // calculate mass transfer of each specie in liquid forAll(activeLiquids_, i) diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H index 8416919bca362670cd3fcea559b8f8fbfb91f9c3..c87842bc4d178975a68e34aebeba03f4105a7e0c 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporation/LiquidEvaporation.H @@ -71,8 +71,8 @@ protected: //- Sherwood number as a function of Reynolds and Schmidt numbers scalar Sh(const scalar Re, const scalar Sc) const; - //- Calculate the carrier phase component volume fractions at cellI - tmp<scalarField> calcXc(const label cellI) const; + //- Calculate the carrier phase component volume fractions at celli + tmp<scalarField> calcXc(const label celli) const; public: @@ -109,7 +109,7 @@ public: virtual void calculate ( const scalar dt, - const label cellI, + const label celli, const scalar Re, const scalar Pr, const scalar d, diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C index 42e04e1c2c119a195815ff489d4955684420187f..da98006d456f21b12b7d3aec7f86bde5f8d4f1d3 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.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 @@ -34,7 +34,7 @@ using namespace Foam::constant::mathematical; template<class CloudType> Foam::tmp<Foam::scalarField> Foam::LiquidEvaporationBoil<CloudType>::calcXc ( - const label cellI + const label celli ) const { scalarField Xc(this->owner().thermo().carrier().Y().size()); @@ -42,7 +42,7 @@ Foam::tmp<Foam::scalarField> Foam::LiquidEvaporationBoil<CloudType>::calcXc forAll(Xc, i) { Xc[i] = - this->owner().thermo().carrier().Y()[i][cellI] + this->owner().thermo().carrier().Y()[i][celli] /this->owner().thermo().carrier().W(i); } @@ -132,7 +132,7 @@ template<class CloudType> void Foam::LiquidEvaporationBoil<CloudType>::calculate ( const scalar dt, - const label cellI, + const label celli, const scalar Re, const scalar Pr, const scalar d, @@ -170,8 +170,8 @@ void Foam::LiquidEvaporationBoil<CloudType>::calculate // vapour density at droplet surface [kg/m3] scalar rhos = ps*liquids_.W(X)/(RR*Ts); - // construct carrier phase species volume fractions for cell, cellI - const scalarField XcMix(calcXc(cellI)); + // construct carrier phase species volume fractions for cell, celli + const scalarField XcMix(calcXc(celli)); // carrier thermo properties scalar Hsc = 0.0; @@ -180,7 +180,7 @@ void Foam::LiquidEvaporationBoil<CloudType>::calculate scalar kappac = 0.0; forAll(this->owner().thermo().carrier().Y(), i) { - scalar Yc = this->owner().thermo().carrier().Y()[i][cellI]; + scalar Yc = this->owner().thermo().carrier().Y()[i][celli]; Hc += Yc*this->owner().thermo().carrier().Ha(i, pc, Tc); Hsc += Yc*this->owner().thermo().carrier().Ha(i, ps, Ts); Cpc += Yc*this->owner().thermo().carrier().Cp(i, ps, Ts); diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.H index b92f44e7ab52e6f0d66423bcbae6801cb6a2180d..ba22975f01d0090108c6c7dc00052b11b781a222 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/LiquidEvaporationBoil/LiquidEvaporationBoil.H @@ -81,8 +81,8 @@ protected: //- Sherwood number as a function of Reynolds and Schmidt numbers scalar Sh(const scalar Re, const scalar Sc) const; - //- Calculate the carrier phase component volume fractions at cellI - tmp<scalarField> calcXc(const label cellI) const; + //- Calculate the carrier phase component volume fractions at celli + tmp<scalarField> calcXc(const label celli) const; public: @@ -119,7 +119,7 @@ public: virtual void calculate ( const scalar dt, - const label cellI, + const label celli, const scalar Re, const scalar Pr, const scalar d, diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.C index 9c9edc532ef61a6c340e2777c8dcfc5926f4d9bc..0ddfae8e6d1a49ba026809959c39d260af68042e 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.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 @@ -68,7 +68,7 @@ template<class CloudType> void Foam::NoPhaseChange<CloudType>::calculate ( const scalar dt, - const label cellI, + const label celli, const scalar Re, const scalar Pr, const scalar d, diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H index 7b1d714c22d6dbf83eeacd3111f88b864949df4d..59c63388149edf9cc380dfa6f54ac7ecced9bf20 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/NoPhaseChange/NoPhaseChange.H @@ -84,7 +84,7 @@ public: virtual void calculate ( const scalar dt, - const label cellI, + const label celli, const scalar Re, const scalar Pr, const scalar d, diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H index 91f45b595f27a109c3417649d1509deb181a1c75..15296287f565a71f7608d39084e65ffcf6e188be 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H @@ -156,7 +156,7 @@ public: virtual void calculate ( const scalar dt, - const label cellI, + const label celli, const scalar Re, const scalar Pr, const scalar d, diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/StochasticCollision/SuppressionCollision/SuppressionCollision.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/StochasticCollision/SuppressionCollision/SuppressionCollision.C index b486fa02b7fec4b07bef3292e7d96384616973d2..c7b49097b90467d722a6e5f101c255b93b6b0c8f 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/StochasticCollision/SuppressionCollision/SuppressionCollision.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/StochasticCollision/SuppressionCollision/SuppressionCollision.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,11 +43,11 @@ void Foam::SuppressionCollision<CloudType>::collide(const scalar dt) forAllIter(typename CloudType, this->owner(), iter) { typename CloudType::parcelType& p = iter(); - label cellI = p.cell(); + label celli = p.cell(); scalar xx = this->owner().rndGen().template sample01<scalar>(); - if (xx < P[cellI]) + if (xx < P[celli]) { p.canCombust() = -1; p.typeId() = max(p.typeId(), suppressedParcelType_); diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H index 36e0c54f739b64d1a8d5d1e2209a5d22264cf552..b446db87bd1441dca87154276590646ff2f038ac 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H @@ -84,7 +84,7 @@ public: virtual scalar calculate ( const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar Tc, diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H index 60f860c33c1b16774931d3ed3105d8eae972085d..e17a50c5eccda5afdef87eae3a26c19f440cd6e0 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H @@ -123,7 +123,7 @@ public: virtual scalar calculate ( const scalar dt, - const label cellI, + const label celli, const scalar d, const scalar T, const scalar Tc, diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C index f5dcf903e1d0e8e09251e9cd5ef2465e40484701..d2c8512fc099918e4e649169dac504cedf5ba7b4 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.C @@ -132,7 +132,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::absorbInteraction regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, const parcelType& p, const polyPatch& pp, - const label faceI, + const label facei, const scalar mass, bool& keepParticle ) @@ -143,10 +143,10 @@ void Foam::ThermoSurfaceFilm<CloudType>::absorbInteraction } // Patch face normal - const vector& nf = pp.faceNormals()[faceI]; + const vector& nf = pp.faceNormals()[facei]; // Patch velocity - const vector& Up = this->owner().U().boundaryField()[pp.index()][faceI]; + const vector& Up = this->owner().U().boundaryField()[pp.index()][facei]; // Relative parcel velocity const vector Urel = p.U() - Up; @@ -160,7 +160,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::absorbInteraction filmModel.addSources ( pp.index(), - faceI, + facei, mass, // mass mass*Ut, // tangential momentum mass*mag(Un), // impingement pressure @@ -178,7 +178,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::bounceInteraction ( parcelType& p, const polyPatch& pp, - const label faceI, + const label facei, bool& keepParticle ) const { @@ -188,10 +188,10 @@ void Foam::ThermoSurfaceFilm<CloudType>::bounceInteraction } // Patch face normal - const vector& nf = pp.faceNormals()[faceI]; + const vector& nf = pp.faceNormals()[facei]; // Patch velocity - const vector& Up = this->owner().U().boundaryField()[pp.index()][faceI]; + const vector& Up = this->owner().U().boundaryField()[pp.index()][facei]; // Relative parcel velocity const vector Urel = p.U() - Up; @@ -209,7 +209,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::drySplashInteraction regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, const parcelType& p, const polyPatch& pp, - const label faceI, + const label facei, bool& keepParticle ) { @@ -221,8 +221,8 @@ void Foam::ThermoSurfaceFilm<CloudType>::drySplashInteraction const liquidProperties& liq = thermo_.liquids().properties()[0]; // Patch face velocity and normal - const vector& Up = this->owner().U().boundaryField()[pp.index()][faceI]; - const vector& nf = pp.faceNormals()[faceI]; + const vector& Up = this->owner().U().boundaryField()[pp.index()][facei]; + const vector& nf = pp.faceNormals()[facei]; // local pressure const scalar pc = thermo_.thermo().p()[p.cell()]; @@ -247,14 +247,14 @@ void Foam::ThermoSurfaceFilm<CloudType>::drySplashInteraction if (We < Wec) // adhesion - assume absorb { - absorbInteraction(filmModel, p, pp, faceI, m, keepParticle); + absorbInteraction(filmModel, p, pp, facei, m, keepParticle); } else // splash { // ratio of incident mass to splashing mass const scalar mRatio = 0.2 + 0.6*rndGen_.sample01<scalar>(); splashInteraction - (filmModel, p, pp, faceI, mRatio, We, Wec, sigma, keepParticle); + (filmModel, p, pp, facei, mRatio, We, Wec, sigma, keepParticle); } } @@ -265,7 +265,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::wetSplashInteraction regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, parcelType& p, const polyPatch& pp, - const label faceI, + const label facei, bool& keepParticle ) { @@ -277,8 +277,8 @@ void Foam::ThermoSurfaceFilm<CloudType>::wetSplashInteraction const liquidProperties& liq = thermo_.liquids().properties()[0]; // Patch face velocity and normal - const vector& Up = this->owner().U().boundaryField()[pp.index()][faceI]; - const vector& nf = pp.faceNormals()[faceI]; + const vector& Up = this->owner().U().boundaryField()[pp.index()][facei]; + const vector& nf = pp.faceNormals()[facei]; // local pressure const scalar pc = thermo_.thermo().p()[p.cell()]; @@ -305,7 +305,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::wetSplashInteraction if (We < 1) // adhesion - assume absorb { - absorbInteraction(filmModel, p, pp, faceI, m, keepParticle); + absorbInteraction(filmModel, p, pp, facei, m, keepParticle); } else if ((We >= 1) && (We < 20)) // bounce { @@ -323,7 +323,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::wetSplashInteraction } else if ((We >= 20) && (We < Wec)) // spread - assume absorb { - absorbInteraction(filmModel, p, pp, faceI, m, keepParticle); + absorbInteraction(filmModel, p, pp, facei, m, keepParticle); } else // splash { @@ -331,7 +331,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::wetSplashInteraction // splash mass can be > incident mass due to film entrainment const scalar mRatio = 0.2 + 0.9*rndGen_.sample01<scalar>(); splashInteraction - (filmModel, p, pp, faceI, mRatio, We, Wec, sigma, keepParticle); + (filmModel, p, pp, facei, mRatio, We, Wec, sigma, keepParticle); } } @@ -342,7 +342,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::splashInteraction regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, const parcelType& p, const polyPatch& pp, - const label faceI, + const label facei, const scalar mRatio, const scalar We, const scalar Wec, @@ -352,8 +352,8 @@ void Foam::ThermoSurfaceFilm<CloudType>::splashInteraction { // Patch face velocity and normal const fvMesh& mesh = this->owner().mesh(); - const vector& Up = this->owner().U().boundaryField()[pp.index()][faceI]; - const vector& nf = pp.faceNormals()[faceI]; + const vector& Up = this->owner().U().boundaryField()[pp.index()][facei]; + const vector& nf = pp.faceNormals()[facei]; // Determine direction vectors tangential to patch normal const vector tanVec1 = tangentVector(nf); @@ -367,7 +367,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::splashInteraction const vector Un = nf*(Urel & nf); const vector Ut = Urel - Un; const vector& posC = mesh.C()[p.cell()]; - const vector& posCf = mesh.Cf().boundaryField()[pp.index()][faceI]; + const vector& posCf = mesh.Cf().boundaryField()[pp.index()][facei]; // total mass of (all) splashed parcels const scalar mSplash = m*mRatio; @@ -412,7 +412,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::splashInteraction // switch to absorb if insufficient energy for splash if (EKs <= 0) { - absorbInteraction(filmModel, p, pp, faceI, m, keepParticle); + absorbInteraction(filmModel, p, pp, facei, m, keepParticle); return; } @@ -467,7 +467,7 @@ void Foam::ThermoSurfaceFilm<CloudType>::splashInteraction // transfer remaining part of parcel to film 0 - splashMass can be -ve // if entraining from the film const scalar mDash = m - mSplash; - absorbInteraction(filmModel, p, pp, faceI, mDash, keepParticle); + absorbInteraction(filmModel, p, pp, facei, mDash, keepParticle); } @@ -567,38 +567,38 @@ bool Foam::ThermoSurfaceFilm<CloudType>::transferParcel ) ); - const label patchI = pp.index(); + const label patchi = pp.index(); - if (filmModel.isRegionPatch(patchI)) + if (filmModel.isRegionPatch(patchi)) { - const label faceI = pp.whichFace(p.face()); + const label facei = pp.whichFace(p.face()); switch (interactionType_) { case itBounce: { - bounceInteraction(p, pp, faceI, keepParticle); + bounceInteraction(p, pp, facei, keepParticle); break; } case itAbsorb: { const scalar m = p.nParticle()*p.mass(); - absorbInteraction(filmModel, p, pp, faceI, m, keepParticle); + absorbInteraction(filmModel, p, pp, facei, m, keepParticle); break; } case itSplashBai: { - bool dry = this->deltaFilmPatch_[patchI][faceI] < deltaWet_; + bool dry = this->deltaFilmPatch_[patchi][facei] < deltaWet_; if (dry) { - drySplashInteraction(filmModel, p, pp, faceI, keepParticle); + drySplashInteraction(filmModel, p, pp, facei, keepParticle); } else { - wetSplashInteraction(filmModel, p, pp, faceI, keepParticle); + wetSplashInteraction(filmModel, p, pp, facei, keepParticle); } break; diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H index b6fb8f1a118a7f390c1b61ed6e0e1472cac16b26..6dd9acc3ab9df4f34cf8d389f4aaa914cdef3139 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/SurfaceFilmModel/ThermoSurfaceFilm/ThermoSurfaceFilm.H @@ -171,7 +171,7 @@ protected: regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, const parcelType& p, const polyPatch& pp, - const label faceI, + const label facei, const scalar mass, bool& keepParticle ); @@ -181,7 +181,7 @@ protected: ( parcelType& p, const polyPatch& pp, - const label faceI, + const label facei, bool& keepParticle ) const; @@ -191,7 +191,7 @@ protected: regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, const parcelType& p, const polyPatch& pp, - const label faceI, + const label facei, bool& keepParticle ); @@ -201,7 +201,7 @@ protected: regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, parcelType& p, const polyPatch& pp, - const label faceI, + const label facei, bool& keepParticle ); @@ -211,7 +211,7 @@ protected: regionModels::surfaceFilmModels::surfaceFilmModel& filmModel, const parcelType& p, const polyPatch& pp, - const label faceI, + const label facei, const scalar mRatio, const scalar We, const scalar Wec, diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H index a3d0682c9d5feed7ff5a6dfde73db2e4ae0c469a..96ebcb757247813610c288c1a69db14df23c8016 100644 --- a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H +++ b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.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 @@ -232,7 +232,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const tensor& Q, diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H index 9430f22e62801ed4154de4a8f165028dc6aeeccb..56958573d9ab5444e27757d89e5e8cbd3c3faecb 100644 --- a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H +++ b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H @@ -221,7 +221,7 @@ inline Foam::molecule::molecule ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const tensor& Q, @@ -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/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C index e4bc84a7dcc14dcd7ddc5b0ac772596a572bbad5..0ec0ec4727d1ea251d00c41f5705ad79ed3330ec 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C @@ -198,11 +198,11 @@ void Foam::moleculeCloud::calculatePairForce() { forAll(realCells, rC) { - List<molecule*> cellI = cellOccupancy_[realCells[rC]]; + List<molecule*> celli = cellOccupancy_[realCells[rC]]; - forAll(cellI, cellIMols) + forAll(celli, cellIMols) { - molI = cellI[cellIMols]; + molI = celli[cellIMols]; evaluatePair(*molI, refMol()); } @@ -395,9 +395,9 @@ void Foam::moleculeCloud::removeHighEnergyOverlaps() forAll(realCells, rC) { - label cellI = realCells[rC]; + label celli = realCells[rC]; - List<molecule*> cellIMols = cellOccupancy_[cellI]; + List<molecule*> cellIMols = cellOccupancy_[celli]; forAll(cellIMols, cIM) { diff --git a/src/lagrangian/solidParticle/solidParticle.C b/src/lagrangian/solidParticle/solidParticle.C index e1dad93d020e66c914d47cb95c9a8e8019706f10..b94e99a5e15e0d87617c9c0884a369e95e2b4d30 100644 --- a/src/lagrangian/solidParticle/solidParticle.C +++ b/src/lagrangian/solidParticle/solidParticle.C @@ -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 @@ -63,14 +63,14 @@ bool Foam::solidParticle::move // remember which cell the parcel is in // since this will change if a face is hit - label cellI = cell(); + label celli = cell(); dt *= trackToFace(position() + dt*U_, td); tEnd -= dt; stepFraction() = 1.0 - tEnd/trackTime; - cellPointWeight cpw(mesh_, position(), cellI, face()); + cellPointWeight cpw(mesh_, position(), celli, face()); scalar rhoc = td.rhoInterp().interpolate(cpw); vector Uc = td.UInterp().interpolate(cpw); scalar nuc = td.nuInterp().interpolate(cpw); diff --git a/src/lagrangian/solidParticle/solidParticle.H b/src/lagrangian/solidParticle/solidParticle.H index 7bbd2dc330898a77381a61c1065afa2a6cb4318a..dc15d37bb0d7a1e3aab129de988854019fd4dc97 100644 --- a/src/lagrangian/solidParticle/solidParticle.H +++ b/src/lagrangian/solidParticle/solidParticle.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 @@ -123,7 +123,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const scalar d, diff --git a/src/lagrangian/solidParticle/solidParticleI.H b/src/lagrangian/solidParticle/solidParticleI.H index 30f64a3ce977abbd4ae8d668abe0207be7abd271..2e0e9e6658f3b460174b4b980a2b76d3b71a53a9 100644 --- a/src/lagrangian/solidParticle/solidParticleI.H +++ b/src/lagrangian/solidParticle/solidParticleI.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 @@ -46,14 +46,14 @@ inline Foam::solidParticle::solidParticle ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, 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/parcels/Templates/SprayParcel/SprayParcel.C b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.C index ae1651e78d5dfe3eaa0881d3ddf69bc03175f70f..0f5dfaf14197e77473636fcb57f979b6e994ac28 100644 --- a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.C +++ b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.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 @@ -35,10 +35,10 @@ void Foam::SprayParcel<ParcelType>::setCellValues ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { - ParcelType::setCellValues(td, dt, cellI); + ParcelType::setCellValues(td, dt, celli); } @@ -48,10 +48,10 @@ void Foam::SprayParcel<ParcelType>::cellValueSourceCorrection ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { - ParcelType::cellValueSourceCorrection(td, dt, cellI); + ParcelType::cellValueSourceCorrection(td, dt, celli); } @@ -61,7 +61,7 @@ void Foam::SprayParcel<ParcelType>::calc ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { typedef typename TrackData::cloudType::reactingCloudType reactingCloudType; @@ -99,7 +99,7 @@ void Foam::SprayParcel<ParcelType>::calc const scalar mass0 = this->mass(); mu_ = composition.liquids().mu(pc0, T0, X0); - ParcelType::calc(td, dt, cellI); + ParcelType::calc(td, dt, celli); if (td.keepParticle) { @@ -126,7 +126,7 @@ void Foam::SprayParcel<ParcelType>::calc if (liquidCore() > 0.5) { - calcAtomization(td, dt, cellI); + calcAtomization(td, dt, celli); // Preserve the total mass/volume by increasing the number of // particles in parcels due to breakup @@ -135,7 +135,7 @@ void Foam::SprayParcel<ParcelType>::calc } else { - calcBreakup(td, dt, cellI); + calcBreakup(td, dt, celli); } } @@ -150,7 +150,7 @@ void Foam::SprayParcel<ParcelType>::calcAtomization ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { typedef typename TrackData::cloudType::reactingCloudType reactingCloudType; @@ -217,7 +217,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup ( TrackData& td, const scalar dt, - const label cellI + const label celli ) { typedef typename TrackData::cloudType cloudType; @@ -306,7 +306,7 @@ void Foam::SprayParcel<ParcelType>::calcBreakup child->injector() = this->injector(); child->tMom() = massChild/(Fcp.Sp() + Fncp.Sp()); child->user() = 0.0; - child->setCellValues(td, dt, cellI); + child->setCellValues(td, dt, celli); td.cloud().addParticle(child); } diff --git a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H index d6d29cd904ba59b10f5cf8bf9886980c1d6d047a..303445401f243e2255b59ab34b6687dce4605192 100644 --- a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H +++ b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcel.H @@ -190,7 +190,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI ); @@ -200,7 +200,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, @@ -374,7 +374,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Correct parcel properties according to atomization model @@ -383,7 +383,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Correct parcel properties according to breakup model @@ -392,7 +392,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Correct cell values using latest transfer information @@ -401,7 +401,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Correct surface values due to emitted species @@ -409,7 +409,7 @@ public: void correctSurfaceValues ( TrackData& td, - const label cellI, + const label celli, const scalar T, const scalarField& Cs, scalar& rhos, @@ -424,7 +424,7 @@ public: ( TrackData& td, const scalar dt, - const label cellI + const label celli ); //- Calculate the chi-factor for flash-boiling for the diff --git a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelI.H b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelI.H index 788b56b032cc7a911e2a77f1fd1996ce70627551..9e37d9e52524a08d7f58c7e611e1c03f62a343ea 100644 --- a/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelI.H +++ b/src/lagrangian/spray/parcels/Templates/SprayParcel/SprayParcelI.H @@ -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 @@ -108,12 +108,12 @@ inline Foam::SprayParcel<ParcelType>::SprayParcel ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, 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), @@ -135,7 +135,7 @@ inline Foam::SprayParcel<ParcelType>::SprayParcel ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label typeId, @@ -163,7 +163,7 @@ inline Foam::SprayParcel<ParcelType>::SprayParcel ( mesh, position, - cellI, + celli, tetFaceI, tetPtI, typeId, diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H index e987e653cfaa0ac41c91986787e23d021e3118da..40b9f4e1b611a9d68b1f09262cb8494b37f9cf4d 100644 --- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H +++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H @@ -105,7 +105,7 @@ public: virtual vector update ( const scalar dt, - const label cellI, + const label celli, const vector& U, const vector& Uc, vector& UTurb, diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C index 8469c76035efdb1c2c88dc1b613f6327856d1345..b1730e4d48c92f5359379f080c4e01487b2dd181 100644 --- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C +++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.C @@ -93,7 +93,7 @@ template<class CloudType> Foam::vector Foam::GradientDispersionRAS<CloudType>::update ( const scalar dt, - const label cellI, + const label celli, const vector& U, const vector& Uc, vector& UTurb, @@ -104,10 +104,10 @@ Foam::vector Foam::GradientDispersionRAS<CloudType>::update const scalar cps = 0.16432; - const scalar k = this->kPtr_->internalField()[cellI]; + const scalar k = this->kPtr_->internalField()[celli]; const scalar epsilon = - this->epsilonPtr_->internalField()[cellI] + ROOTVSMALL; - const vector& gradk = this->gradkPtr_->internalField()[cellI]; + this->epsilonPtr_->internalField()[celli] + ROOTVSMALL; + const vector& gradk = this->gradkPtr_->internalField()[celli]; const scalar UrelMag = mag(U - Uc - UTurb); diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H index 12820a2f6ac82d37ed9bf2d96359ff71840a6fff..64e1a2caf70b8be8599d65e95de5a4a24566a39e 100644 --- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H +++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H @@ -100,7 +100,7 @@ public: virtual vector update ( const scalar dt, - const label cellI, + const label celli, const vector& U, const vector& Uc, vector& UTurb, diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C index e5131b80071272775f1790f4db73b2fe33d1242d..5fe3584f79093c418db6d4550f0171ac45c78b53 100644 --- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C +++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.C @@ -64,7 +64,7 @@ template<class CloudType> Foam::vector Foam::StochasticDispersionRAS<CloudType>::update ( const scalar dt, - const label cellI, + const label celli, const vector& U, const vector& Uc, vector& UTurb, @@ -75,9 +75,9 @@ Foam::vector Foam::StochasticDispersionRAS<CloudType>::update const scalar cps = 0.16432; - const scalar k = this->kPtr_->internalField()[cellI]; + const scalar k = this->kPtr_->internalField()[celli]; const scalar epsilon = - this->epsilonPtr_->internalField()[cellI] + ROOTVSMALL; + this->epsilonPtr_->internalField()[celli] + ROOTVSMALL; const scalar UrelMag = mag(U - Uc - UTurb); diff --git a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H index f031ed799c5eb7578cca30c56c29dc6bc735fca1..87e079874073b40ecc4b504795d8783722ce742b 100644 --- a/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H +++ b/src/lagrangian/turbulence/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H @@ -84,7 +84,7 @@ public: virtual vector update ( const scalar dt, - const label cellI, + const label celli, const vector& U, const vector& Uc, vector& UTurb, diff --git a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C index 390309362895d189ebb7a6ad040e2c79d2818a0b..2bd6824e681df75a9b525bc8adea6537dd4fc640 100644 --- a/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C +++ b/src/lagrangian/turbulence/submodels/Thermodynamic/ParticleForces/BrownianMotion/BrownianMotionForce.C @@ -179,9 +179,9 @@ Foam::forceSuSp Foam::BrownianMotionForce<CloudType>::calcCoupled scalar f = 0.0; if (turbulence_) { - const label cellI = p.cell(); + const label celli = p.cell(); const volScalarField& k = *kPtr_; - const scalar kc = k[cellI]; + const scalar kc = k[celli]; const scalar Dp = sigma*Tc*cc/(3*mathematical::pi*muc*dp); f = eta/mass*sqrt(2.0*sqr(kc)*sqr(Tc)/(Dp*dt)); } diff --git a/src/mesh/blockMesh/blockMesh/blockMesh.C b/src/mesh/blockMesh/blockMesh/blockMesh.C index 615a8d7c55615ae50573a6e0c6f52b402ba259b2..e8e0188fb09db93b287296bcc5cf7b40f434d12b 100644 --- a/src/mesh/blockMesh/blockMesh/blockMesh.C +++ b/src/mesh/blockMesh/blockMesh/blockMesh.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 @@ -98,12 +98,12 @@ Foam::PtrList<Foam::dictionary> Foam::blockMesh::patchDicts() const PtrList<dictionary> patchDicts(patchTopologies.size()); - forAll(patchTopologies, patchI) + forAll(patchTopologies, patchi) { OStringStream os; - patchTopologies[patchI].write(os); + patchTopologies[patchi].write(os); IStringStream is(os.str()); - patchDicts.set(patchI, new dictionary(is)); + patchDicts.set(patchi, new dictionary(is)); } return patchDicts; } diff --git a/src/mesh/blockMesh/blockMesh/blockMeshCheck.C b/src/mesh/blockMesh/blockMesh/blockMeshCheck.C index e153f9d7b7b67d5593531046747b9f9705b831b5..2347e8efd8e86393e536470e1d677c2ad363f725 100644 --- a/src/mesh/blockMesh/blockMesh/blockMeshCheck.C +++ b/src/mesh/blockMesh/blockMesh/blockMeshCheck.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 @@ -190,9 +190,9 @@ bool Foam::blockMesh::patchLabelsOK { bool ok = true; - forAll(patchFaces, faceI) + forAll(patchFaces, facei) { - const labelList& f = patchFaces[faceI]; + const labelList& f = patchFaces[facei]; forAll(f, fp) { @@ -204,7 +204,7 @@ bool Foam::blockMesh::patchLabelsOK << "out-of-range point label " << f[fp] << " (min = 0" << ") on patch " << patchLabel - << ", face " << faceI << endl; + << ", face " << facei << endl; } else if (f[fp] >= points.size()) { @@ -214,7 +214,7 @@ bool Foam::blockMesh::patchLabelsOK << "out-of-range point label " << f[fp] << " (max = " << points.size() - 1 << ") on patch " << patchLabel - << ", face " << faceI << endl; + << ", face " << facei << endl; } } diff --git a/src/mesh/blockMesh/blockMesh/blockMeshCreate.C b/src/mesh/blockMesh/blockMesh/blockMeshCreate.C index 9225c7cb970681bc7054ff08beb19e9bbb8278c8..99a9f1f2f186073024ffc29ba911e579f09c7abb 100644 --- a/src/mesh/blockMesh/blockMesh/blockMeshCreate.C +++ b/src/mesh/blockMesh/blockMesh/blockMeshCreate.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 @@ -272,9 +272,9 @@ void Foam::blockMesh::createPatches() const patches_.clear(); patches_.setSize(topoPatches.size()); - forAll(topoPatches, patchI) + forAll(topoPatches, patchi) { - patches_[patchI] = createPatchFaces(topoPatches[patchI]); + patches_[patchi] = createPatchFaces(topoPatches[patchi]); } } diff --git a/src/mesh/blockMesh/blockMesh/blockMeshTopology.C b/src/mesh/blockMesh/blockMesh/blockMeshTopology.C index 2d476ef2a900e1a52aea8c9a74eb4be38e183d45..54fbdc75c69a1135969de77f9726d6b59a9bc3cb 100644 --- a/src/mesh/blockMesh/blockMesh/blockMeshTopology.C +++ b/src/mesh/blockMesh/blockMesh/blockMeshTopology.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 @@ -202,9 +202,9 @@ bool Foam::blockMesh::readBoundary tmpBlocksPatches.setSize(patchesInfo.size()); patchDicts.setSize(patchesInfo.size()); - forAll(tmpBlocksPatches, patchI) + forAll(tmpBlocksPatches, patchi) { - const entry& patchInfo = patchesInfo[patchI]; + const entry& patchInfo = patchesInfo[patchi]; if (!patchInfo.isDict()) { @@ -213,17 +213,17 @@ bool Foam::blockMesh::readBoundary << " valid dictionary." << exit(FatalIOError); } - patchNames[patchI] = patchInfo.keyword(); + patchNames[patchi] = patchInfo.keyword(); // Construct dictionary - patchDicts.set(patchI, new dictionary(patchInfo.dict())); + patchDicts.set(patchi, new dictionary(patchInfo.dict())); // Read block faces - patchDicts[patchI].lookup("faces") >> tmpBlocksPatches[patchI]; + patchDicts[patchi].lookup("faces") >> tmpBlocksPatches[patchi]; topologyOK = topologyOK && patchLabelsOK ( - patchI, + patchi, blockPointField_, - tmpBlocksPatches[patchI] + tmpBlocksPatches[patchi] ); } @@ -488,36 +488,36 @@ Foam::polyMesh* Foam::blockMesh::createTopology // Add cyclic info (might not be present from older file) - forAll(patchDicts, patchI) + forAll(patchDicts, patchi) { - if (!patchDicts.set(patchI)) + if (!patchDicts.set(patchi)) { - patchDicts.set(patchI, new dictionary()); + patchDicts.set(patchi, new dictionary()); } - dictionary& dict = patchDicts[patchI]; + dictionary& dict = patchDicts[patchi]; // Add but not override type if (!dict.found("type")) { - dict.add("type", patchTypes[patchI], false); + dict.add("type", patchTypes[patchi], false); } - else if (word(dict.lookup("type")) != patchTypes[patchI]) + else if (word(dict.lookup("type")) != patchTypes[patchi]) { IOWarningInFunction ( meshDescription - ) << "For patch " << patchNames[patchI] - << " overriding type '" << patchTypes[patchI] + ) << "For patch " << patchNames[patchi] + << " overriding type '" << patchTypes[patchi] << "' with '" << word(dict.lookup("type")) << "' (read from boundary file)" << endl; } // Override neighbourpatch name - if (nbrPatchNames[patchI] != word::null) + if (nbrPatchNames[patchi] != word::null) { - dict.set("neighbourPatch", nbrPatchNames[patchI]); + dict.set("neighbourPatch", nbrPatchNames[patchi]); } } diff --git a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C index 3b521a75b4da77520f888fbd4e245bc25716935d..88763c45bca3da75d75b681b18c8c246e96ee426 100644 --- a/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C +++ b/src/mesh/snappyHexMesh/externalDisplacementMeshMover/medialAxisMeshMover.C @@ -58,10 +58,10 @@ Foam::labelList Foam::medialAxisMeshMover::getFixedValueBCs ) { DynamicList<label> adaptPatchIDs; - forAll(fld.boundaryField(), patchI) + forAll(fld.boundaryField(), patchi) { const pointPatchField<vector>& patchFld = - fld.boundaryField()[patchI]; + fld.boundaryField()[patchi]; if (isA<valuePointPatchField<vector>>(patchFld)) { @@ -72,7 +72,7 @@ Foam::labelList Foam::medialAxisMeshMover::getFixedValueBCs } else { - adaptPatchIDs.append(patchI); + adaptPatchIDs.append(patchi); } } } @@ -631,17 +631,17 @@ void Foam::medialAxisMeshMover::update(const dictionary& coeffDict) labelHashSet adaptPatches(adaptPatchIDs_); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; const pointPatchVectorField& pvf = - pointDisplacement().boundaryField()[patchI]; + pointDisplacement().boundaryField()[patchi]; if ( !pp.coupled() && !isA<emptyPolyPatch>(pp) - && !adaptPatches.found(patchI) + && !adaptPatches.found(patchi) ) { const labelList& meshPoints = pp.meshPoints(); @@ -1093,15 +1093,15 @@ handleFeatureAngleLayerTerminations boolList extrudedFaces(pp.size(), true); - forAll(pp.localFaces(), faceI) + forAll(pp.localFaces(), facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; forAll(f, fp) { if (extrudeStatus[f[fp]] == snappyLayerDriver::NOEXTRUDE) { - extrudedFaces[faceI] = false; + extrudedFaces[facei] = false; break; } } @@ -1130,9 +1130,9 @@ handleFeatureAngleLayerTerminations edgeFaceExtrude[edgeI].setSize(eFaces.size()); forAll(eFaces, i) { - label faceI = eFaces[i]; - edgeFaceNormals[edgeI][i] = faceNormals[faceI]; - edgeFaceExtrude[edgeI][i] = extrudedFaces[faceI]; + label facei = eFaces[i]; + edgeFaceNormals[edgeI][i] = faceNormals[facei]; + edgeFaceExtrude[edgeI][i] = extrudedFaces[facei]; } } @@ -1282,23 +1282,23 @@ void Foam::medialAxisMeshMover::findIsolatedRegions // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ labelList islandPoint(pp.size(), -1); - forAll(pp, faceI) + forAll(pp, facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; forAll(f, fp) { if (extrudeStatus[f[fp]] != snappyLayerDriver::NOEXTRUDE) { - if (islandPoint[faceI] == -1) + if (islandPoint[facei] == -1) { // First point to extrude - islandPoint[faceI] = f[fp]; + islandPoint[facei] = f[fp]; } - else if (islandPoint[faceI] != -2) + else if (islandPoint[facei] != -2) { // Second or more point to extrude - islandPoint[faceI] = -2; + islandPoint[facei] = -2; } } } @@ -1318,8 +1318,8 @@ void Foam::medialAxisMeshMover::findIsolatedRegions forAll(pFaces, i) { - label faceI = pFaces[i]; - if (islandPoint[faceI] != patchPointI) + label facei = pFaces[i]; + if (islandPoint[facei] != patchPointI) { keptPoints[patchPointI] = true; break; @@ -1335,14 +1335,14 @@ void Foam::medialAxisMeshMover::findIsolatedRegions // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ boolList extrudedFaces(pp.size(), true); - forAll(pp.localFaces(), faceI) + forAll(pp.localFaces(), facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; forAll(f, fp) { if (extrudeStatus[f[fp]] == snappyLayerDriver::NOEXTRUDE) { - extrudedFaces[faceI] = false; + extrudedFaces[facei] = false; break; } } @@ -1356,8 +1356,8 @@ void Foam::medialAxisMeshMover::findIsolatedRegions forAll(pFaces, i) { - label faceI = pFaces[i]; - if (extrudedFaces[faceI]) + label facei = pFaces[i]; + if (extrudedFaces[facei]) { keptPoints[patchPointI] = true; break; @@ -1441,9 +1441,9 @@ void Foam::medialAxisMeshMover::findIsolatedRegions // stop layer growth on isolated faces // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - forAll(pp, faceI) + forAll(pp, facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; bool failed = false; forAll(f, fp) { diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C index 9845e32f4ff3fd915af32286e13476ea8f9c3fed..8cfe8c94ec66e1c39fcca4194ea966f77e911987 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.C @@ -141,9 +141,9 @@ void Foam::meshRefinement::calcNeighbourData labelHashSet addedPatchIDSet(meshedPatches()); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; const labelUList& faceCells = pp.faceCells(); const vectorField::subField faceCentres = pp.faceCentres(); @@ -160,7 +160,7 @@ void Foam::meshRefinement::calcNeighbourData bFaceI++; } } - else if (addedPatchIDSet.found(patchI)) + else if (addedPatchIDSet.found(patchi)) { // Face was introduced from cell-cell intersection. Try to // reconstruct other side cell(centre). Three possibilities: @@ -218,9 +218,9 @@ void Foam::meshRefinement::updateIntersections(const labelList& changedFaces) { label nMasterFaces = 0; - forAll(isMasterFace, faceI) + forAll(isMasterFace, facei) { - if (isMasterFace.get(faceI) == 1) + if (isMasterFace.get(facei) == 1) { nMasterFaces++; } @@ -255,17 +255,17 @@ void Foam::meshRefinement::updateIntersections(const labelList& changedFaces) forAll(changedFaces, i) { - label faceI = changedFaces[i]; - label own = mesh_.faceOwner()[faceI]; + label facei = changedFaces[i]; + label own = mesh_.faceOwner()[facei]; start[i] = cellCentres[own]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - end[i] = cellCentres[mesh_.faceNeighbour()[faceI]]; + end[i] = cellCentres[mesh_.faceNeighbour()[facei]]; } else { - end[i] = neiCc[faceI-mesh_.nInternalFaces()]; + end[i] = neiCc[facei-mesh_.nInternalFaces()]; } } @@ -460,17 +460,17 @@ void Foam::meshRefinement::checkData() pointField start(mesh_.nFaces()); pointField end(mesh_.nFaces()); - forAll(start, faceI) + forAll(start, facei) { - start[faceI] = mesh_.cellCentres()[mesh_.faceOwner()[faceI]]; + start[facei] = mesh_.cellCentres()[mesh_.faceOwner()[facei]]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - end[faceI] = mesh_.cellCentres()[mesh_.faceNeighbour()[faceI]]; + end[facei] = mesh_.cellCentres()[mesh_.faceNeighbour()[facei]]; } else { - end[faceI] = neiCc[faceI-mesh_.nInternalFaces()]; + end[facei] = neiCc[facei-mesh_.nInternalFaces()]; } } @@ -508,37 +508,37 @@ void Foam::meshRefinement::checkData() syncTools::swapBoundaryFaceList(mesh_, neiHit); // Check - forAll(surfaceHit, faceI) + forAll(surfaceHit, facei) { - if (surfaceIndex_[faceI] != surfaceHit[faceI]) + if (surfaceIndex_[facei] != surfaceHit[facei]) { - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { WarningInFunction - << "Internal face:" << faceI - << " fc:" << mesh_.faceCentres()[faceI] - << " cached surfaceIndex_:" << surfaceIndex_[faceI] - << " current:" << surfaceHit[faceI] + << "Internal face:" << facei + << " fc:" << mesh_.faceCentres()[facei] + << " cached surfaceIndex_:" << surfaceIndex_[facei] + << " current:" << surfaceHit[facei] << " ownCc:" - << mesh_.cellCentres()[mesh_.faceOwner()[faceI]] + << mesh_.cellCentres()[mesh_.faceOwner()[facei]] << " neiCc:" - << mesh_.cellCentres()[mesh_.faceNeighbour()[faceI]] + << mesh_.cellCentres()[mesh_.faceNeighbour()[facei]] << endl; } else if ( - surfaceIndex_[faceI] - != neiHit[faceI-mesh_.nInternalFaces()] + surfaceIndex_[facei] + != neiHit[facei-mesh_.nInternalFaces()] ) { WarningInFunction - << "Boundary face:" << faceI - << " fc:" << mesh_.faceCentres()[faceI] - << " cached surfaceIndex_:" << surfaceIndex_[faceI] - << " current:" << surfaceHit[faceI] + << "Boundary face:" << facei + << " fc:" << mesh_.faceCentres()[facei] + << " cached surfaceIndex_:" << surfaceIndex_[facei] + << " current:" << surfaceHit[facei] << " ownCc:" - << mesh_.cellCentres()[mesh_.faceOwner()[faceI]] - << " end:" << end[faceI] + << mesh_.cellCentres()[mesh_.faceOwner()[facei]] + << " end:" << end[facei] << endl; } } @@ -681,8 +681,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitFaces forAll(splitFaces, i) { - label faceI = splitFaces[i]; - const face& f = mesh_.faces()[faceI]; + label facei = splitFaces[i]; + const face& f = mesh_.faces()[facei]; // Split as start and end index in face @@ -716,28 +716,28 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitFaces // Determine face properties - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; label nei = -1; - label patchI = -1; - if (faceI >= mesh_.nInternalFaces()) + label patchi = -1; + if (facei >= mesh_.nInternalFaces()) { - patchI = mesh_.boundaryMesh().whichPatch(faceI); + patchi = mesh_.boundaryMesh().whichPatch(facei); } else { - nei = mesh_.faceNeighbour()[faceI]; + nei = mesh_.faceNeighbour()[facei]; } - label zoneI = mesh_.faceZones().whichZone(faceI); + label zoneI = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; if (zoneI != -1) { const faceZone& fz = mesh_.faceZones()[zoneI]; - zoneFlip = fz.flipMap()[fz.whichFace(faceI)]; + zoneFlip = fz.flipMap()[fz.whichFace(facei)]; } -Pout<< "face:" << faceI << " verts:" << f +Pout<< "face:" << facei << " verts:" << f << " split into f0:" << f0 << " f1:" << f1 << endl; @@ -745,11 +745,11 @@ Pout<< "face:" << faceI << " verts:" << f meshMod.modifyFace ( f0, // modified face - faceI, // label of face + facei, // label of face own, // owner nei, // neighbour false, // face flip - patchI, // patch for face + patchi, // patch for face zoneI, // zone for face zoneFlip // face flip in zone ); @@ -760,9 +760,9 @@ Pout<< "face:" << faceI << " verts:" << f nei, // neighbour -1, // master point -1, // master edge - faceI, // master face + facei, // master face false, // face flip - patchI, // patch for face + patchi, // patch for face zoneI, // zone for face zoneFlip // face flip in zone ); @@ -797,13 +797,13 @@ Pout<< "face:" << faceI << " verts:" << f // Add added faces (every splitFaces becomes two faces) label sz = newSplitFaces.size(); newSplitFaces.setSize(2*sz); - forAll(map().faceMap(), faceI) + 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; + newSplitFaces[sz++] = facei; } } @@ -825,27 +825,27 @@ Pout<< "face:" << faceI << " verts:" << f //{ // const polyBoundaryMesh& patches = mesh_.boundaryMesh(); // -// forAll(patches, patchI) +// forAll(patches, patchi) // { -// const polyPatch& pp = patches[patchI]; +// const polyPatch& pp = patches[patchi]; // // if (isA<processorPolyPatch>(pp)) // { // forAll(pp, i) // { -// label faceI = pp.start()+i; +// label facei = pp.start()+i; // -// if (!blockedFace[faceI]) +// if (!blockedFace[facei]) // { // // Only if there is a connection to the neighbour // // will there be a multi-domain region; if not through // // this face then through another. // -// label cellI = mesh_.faceOwner()[faceI]; -// label globalCellI = globalCells.toGlobal(cellI); +// label celli = mesh_.faceOwner()[facei]; +// label globalCellI = globalCells.toGlobal(celli); // // Map<label>::iterator iter = -// regionToMaster.find(globalRegion[cellI]); +// regionToMaster.find(globalRegion[celli]); // // if (iter != regionToMaster.end()) // { @@ -856,7 +856,7 @@ Pout<< "face:" << faceI << " verts:" << f // { // regionToMaster.insert // ( -// globalRegion[cellI], +// globalRegion[celli], // globalCellI // ); // } @@ -887,24 +887,24 @@ Pout<< "face:" << faceI << " verts:" << f // DynamicList<point> localCc(globalRegion.size()/2); // DynamicList<scalar> localWts(globalRegion.size()/2); // -// forAll(globalRegion, cellI) +// forAll(globalRegion, celli) // { // Map<label>::const_iterator fndMaster = -// coupledRegionToMaster.find(globalRegion[cellI]); +// coupledRegionToMaster.find(globalRegion[celli]); // // if (fndMaster != coupledRegionToMaster.end()) // { // // Multi-processor region. -// if (globalCells.toGlobal(cellI) == fndMaster()) +// if (globalCells.toGlobal(celli) == fndMaster()) // { // // I am master. Allocate region for me. // globalToLocalRegion.insert // ( -// globalRegion[cellI], +// globalRegion[celli], // localCc.size() // ); -// localCc.append(mesh_.cellCentres()[cellI]); -// localWts.append(cellWeights[cellI]); +// localCc.append(mesh_.cellCentres()[celli]); +// localWts.append(cellWeights[celli]); // } // } // else @@ -914,13 +914,13 @@ Pout<< "face:" << faceI << " verts:" << f // ( // globalToLocalRegion.insert // ( -// globalRegion[cellI], +// globalRegion[celli], // localCc.size() // ) // ) // { -// localCc.append(mesh_.cellCentres()[cellI]); -// localWts.append(cellWeights[cellI]); +// localCc.append(mesh_.cellCentres()[celli]); +// localWts.append(cellWeights[celli]); // } // } // } @@ -1038,10 +1038,10 @@ Pout<< "face:" << faceI << " verts:" << f // // // Add all local connectivity to regionRegions; add all non-local // // to the transferlists. -// for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) +// for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) // { -// label ownRegion = globalRegion[mesh_.faceOwner()[faceI]]; -// label neiRegion = globalRegion[mesh_.faceNeighbour()[faceI]]; +// label ownRegion = globalRegion[mesh_.faceOwner()[facei]]; +// label neiRegion = globalRegion[mesh_.faceNeighbour()[facei]]; // // if (ownRegion != neiRegion) // { @@ -1213,9 +1213,9 @@ Foam::label Foam::meshRefinement::countHits() const label nHits = 0; - forAll(surfaceIndex_, faceI) + forAll(surfaceIndex_, facei) { - if (surfaceIndex_[faceI] >= 0 && isMasterFace.get(faceI) == 1) + if (surfaceIndex_[facei] >= 0 && isMasterFace.get(facei) == 1) { nHits++; } @@ -1346,21 +1346,21 @@ Foam::label Foam::meshRefinement::countHits() const // // Determine destination for all cells // labelList distribution(mesh_.nCells()); // -// forAll(globalRegion, cellI) +// forAll(globalRegion, celli) // { // Map<label>::const_iterator fndRegion = -// regionToDist.find(globalRegion[cellI]); +// regionToDist.find(globalRegion[celli]); // // if (fndRegion != regionToDist.end()) // { -// distribution[cellI] = fndRegion(); +// distribution[celli] = fndRegion(); // } // else // { // // region is local to the processor. -// label localRegionI = globalToLocalRegion[globalRegion[cellI]]; +// label localRegionI = globalToLocalRegion[globalRegion[celli]]; // -// distribution[cellI] = regionDistribution[localRegionI]; +// distribution[celli] = regionDistribution[localRegionI]; // } // } // @@ -1444,16 +1444,16 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance forAll(fZone, i) { - label faceI = fZone[i]; - if (blockedFace[faceI]) + label facei = fZone[i]; + if (blockedFace[facei]) { if ( - mesh_.isInternalFace(faceI) - || pbm[pbm.whichPatch(faceI)].coupled() + mesh_.isInternalFace(facei) + || pbm[pbm.whichPatch(facei)].coupled() ) { - blockedFace[faceI] = false; + blockedFace[facei] = false; nUnblocked++; } } @@ -1487,13 +1487,13 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance selectSeparatedCoupledFaces(separatedCoupledFace); label nSeparated = 0; - forAll(separatedCoupledFace, faceI) + forAll(separatedCoupledFace, facei) { - if (separatedCoupledFace[faceI]) + if (separatedCoupledFace[facei]) { - if (blockedFace[faceI]) + if (blockedFace[facei]) { - blockedFace[faceI] = false; + blockedFace[facei] = false; nSeparated++; } } @@ -1536,11 +1536,11 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance couples.setSize(nBnd); label nCpl = 0; - forAll(coupledFace, faceI) + forAll(coupledFace, facei) { - if (coupledFace[faceI] != -1 && faceI < coupledFace[faceI]) + if (coupledFace[facei] != -1 && facei < coupledFace[facei]) { - couples[nCpl++] = labelPair(faceI, coupledFace[faceI]); + couples[nCpl++] = labelPair(facei, coupledFace[facei]); } } couples.setSize(nCpl); @@ -1653,9 +1653,9 @@ Foam::labelList Foam::meshRefinement::intersectedFaces() const { label nBoundaryFaces = 0; - forAll(surfaceIndex_, faceI) + forAll(surfaceIndex_, facei) { - if (surfaceIndex_[faceI] != -1) + if (surfaceIndex_[facei] != -1) { nBoundaryFaces++; } @@ -1664,11 +1664,11 @@ Foam::labelList Foam::meshRefinement::intersectedFaces() const labelList surfaceFaces(nBoundaryFaces); nBoundaryFaces = 0; - forAll(surfaceIndex_, faceI) + forAll(surfaceIndex_, facei) { - if (surfaceIndex_[faceI] != -1) + if (surfaceIndex_[facei] != -1) { - surfaceFaces[nBoundaryFaces++] = faceI; + surfaceFaces[nBoundaryFaces++] = facei; } } return surfaceFaces; @@ -1684,11 +1684,11 @@ Foam::labelList Foam::meshRefinement::intersectedPoints() const PackedBoolList isBoundaryPoint(mesh_.nPoints()); label nBoundaryPoints = 0; - forAll(surfaceIndex_, faceI) + forAll(surfaceIndex_, facei) { - if (surfaceIndex_[faceI] != -1) + if (surfaceIndex_[facei] != -1) { - const face& f = faces[faceI]; + const face& f = faces[facei]; forAll(f, fp) { @@ -1704,17 +1704,17 @@ Foam::labelList Foam::meshRefinement::intersectedPoints() const //labelList adaptPatchIDs(meshedPatches()); //forAll(adaptPatchIDs, i) //{ - // label patchI = adaptPatchIDs[i]; + // label patchi = adaptPatchIDs[i]; // - // if (patchI != -1) + // if (patchi != -1) // { - // const polyPatch& pp = mesh_.boundaryMesh()[patchI]; + // const polyPatch& pp = mesh_.boundaryMesh()[patchi]; // - // label faceI = pp.start(); + // label facei = pp.start(); // // forAll(pp, i) // { - // const face& f = faces[faceI]; + // const face& f = faces[facei]; // // forAll(f, fp) // { @@ -1722,7 +1722,7 @@ Foam::labelList Foam::meshRefinement::intersectedPoints() const // nBoundaryPoints++; // } // } - // faceI++; + // facei++; // } // } //} @@ -1812,15 +1812,15 @@ Foam::tmp<Foam::pointVectorField> Foam::meshRefinement::makeDisplacementField fixedValuePointPatchVectorField::typeName; } - forAll(pointPatches, patchI) + forAll(pointPatches, patchi) { - if (isA<processorPointPatch>(pointPatches[patchI])) + if (isA<processorPointPatch>(pointPatches[patchi])) { - patchFieldTypes[patchI] = calculatedPointPatchVectorField::typeName; + patchFieldTypes[patchi] = calculatedPointPatchVectorField::typeName; } - else if (isA<cyclicPointPatch>(pointPatches[patchI])) + else if (isA<cyclicPointPatch>(pointPatches[patchi])) { - patchFieldTypes[patchI] = cyclicSlipPointPatchVectorField::typeName; + patchFieldTypes[patchi] = cyclicSlipPointPatchVectorField::typeName; } } @@ -2005,13 +2005,13 @@ Foam::label Foam::meshRefinement::appendPatch const_cast<polyBoundaryMesh&>(mesh.boundaryMesh()); fvBoundaryMesh& fvPatches = const_cast<fvBoundaryMesh&>(mesh.boundary()); - label patchI = polyPatches.size(); + label patchi = polyPatches.size(); // Add polyPatch at the end - polyPatches.setSize(patchI+1); + polyPatches.setSize(patchi+1); polyPatches.set ( - patchI, + patchi, polyPatch::New ( patchName, @@ -2020,13 +2020,13 @@ Foam::label Foam::meshRefinement::appendPatch polyPatches ) ); - fvPatches.setSize(patchI+1); + fvPatches.setSize(patchi+1); fvPatches.set ( - patchI, + patchi, fvPatch::New ( - polyPatches[patchI], // point to newly added polyPatch + polyPatches[patchi], // point to newly added polyPatch mesh.boundary() ) ); @@ -2084,7 +2084,7 @@ Foam::label Foam::meshRefinement::appendPatch mesh, calculatedFvPatchField<tensor>::typeName ); - return patchI; + return patchi; } @@ -2100,24 +2100,24 @@ Foam::label Foam::meshRefinement::addPatch const_cast<polyBoundaryMesh&>(mesh.boundaryMesh()); fvBoundaryMesh& fvPatches = const_cast<fvBoundaryMesh&>(mesh.boundary()); - const label patchI = polyPatches.findPatchID(patchName); - if (patchI != -1) + const label patchi = polyPatches.findPatchID(patchName); + if (patchi != -1) { // Already there - return patchI; + return patchi; } label insertPatchI = polyPatches.size(); label startFaceI = mesh.nFaces(); - forAll(polyPatches, patchI) + forAll(polyPatches, patchi) { - const polyPatch& pp = polyPatches[patchI]; + const polyPatch& pp = polyPatches[patchi]; if (isA<processorPolyPatch>(pp)) { - insertPatchI = patchI; + insertPatchI = patchi; startFaceI = pp.start(); break; } @@ -2183,7 +2183,7 @@ Foam::label Foam::meshRefinement::addMeshedPatch else { // Add patch - label patchI = addPatch(mesh_, name, patchInfo); + label patchi = addPatch(mesh_, name, patchInfo); // dictionary patchDict(patchInfo); // patchDict.set("nFaces", 0); @@ -2198,7 +2198,7 @@ Foam::label Foam::meshRefinement::addMeshedPatch // mesh_.boundaryMesh() // ) // ); -// label patchI = fvMeshTools::addPatch +// label patchi = fvMeshTools::addPatch // ( // mesh_, // ppPtr(), @@ -2210,7 +2210,7 @@ Foam::label Foam::meshRefinement::addMeshedPatch // Store meshedPatches_.append(name); - return patchI; + return patchi; } } @@ -2222,18 +2222,18 @@ Foam::labelList Foam::meshRefinement::meshedPatches() const DynamicList<label> patchIDs(meshedPatches_.size()); forAll(meshedPatches_, i) { - label patchI = patches.findPatchID(meshedPatches_[i]); + label patchi = patches.findPatchID(meshedPatches_[i]); - if (patchI == -1) + if (patchi == -1) { FatalErrorInFunction << "Problem : did not find patch " << meshedPatches_[i] << endl << "Valid patches are " << patches.names() << abort(FatalError); } - if (!polyPatch::constraintType(patches[patchI].type())) + if (!polyPatch::constraintType(patches[patchi].type())) { - patchIDs.append(patchI); + patchIDs.append(patchi); } } @@ -2245,14 +2245,14 @@ void Foam::meshRefinement::selectSeparatedCoupledFaces(boolList& selected) const { const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { // Check all coupled. Avoid using .coupled() so we also pick up AMI. - if (isA<coupledPolyPatch>(patches[patchI])) + if (isA<coupledPolyPatch>(patches[patchi])) { const coupledPolyPatch& cpp = refCast<const coupledPolyPatch> ( - patches[patchI] + patches[patchi] ); if (cpp.separated() || !cpp.parallel()) @@ -2276,20 +2276,20 @@ Foam::label Foam::meshRefinement::findRegion ) { label regionI = -1; - label cellI = mesh.findCell(p); - if (cellI != -1) + label celli = mesh.findCell(p); + if (celli != -1) { - regionI = cellToRegion[cellI]; + regionI = cellToRegion[celli]; } reduce(regionI, maxOp<label>()); if (regionI == -1) { // See if we can perturb a bit - cellI = mesh.findCell(p+perturbVec); - if (cellI != -1) + celli = mesh.findCell(p+perturbVec); + if (celli != -1) { - regionI = cellToRegion[cellI]; + regionI = cellToRegion[celli]; } reduce(regionI, maxOp<label>()); } @@ -2337,11 +2337,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMeshRegions // Get cells to remove DynamicList<label> cellsToRemove(mesh_.nCells()); - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - if (cellRegion[cellI] != regionI) + if (cellRegion[celli] != regionI) { - cellsToRemove.append(cellI); + cellsToRemove.append(celli); } } cellsToRemove.shrink(); @@ -2522,13 +2522,13 @@ void Foam::meshRefinement::updateMesh // keep master only labelList newFaceData(map.faceMap().size(), -1); - forAll(newFaceData, faceI) + 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); @@ -2542,15 +2542,15 @@ void Foam::meshRefinement::updateMesh // These get marked with -1 in reverseFaceMap labelList reverseFaceMap(map.reverseFaceMap()); - forAll(map.faceMap(), faceI) + forAll(map.faceMap(), facei) { - label oldFaceI = map.faceMap()[faceI]; + label oldFaceI = map.faceMap()[facei]; if (oldFaceI >= 0) { - if (reverseFaceMap[oldFaceI] != faceI) + if (reverseFaceMap[oldFaceI] != facei) { - // faceI is slave face. Mark old face. + // facei is slave face. Mark old face. reverseFaceMap[oldFaceI] = -1; } } @@ -2558,15 +2558,15 @@ void Foam::meshRefinement::updateMesh // 2. Map only faces with intact reverseFaceMap labelList newFaceData(map.faceMap().size(), -1); - forAll(newFaceData, faceI) + forAll(newFaceData, facei) { - label oldFaceI = map.faceMap()[faceI]; + label oldFaceI = map.faceMap()[facei]; if (oldFaceI >= 0) { - if (reverseFaceMap[oldFaceI] == faceI) + if (reverseFaceMap[oldFaceI] == facei) { - newFaceData[faceI] = data[oldFaceI]; + newFaceData[facei] = data[oldFaceI]; } } } @@ -2738,9 +2738,9 @@ const labelList nCells(gMax(cellLevel)+1, 0); - forAll(cellLevel, cellI) + forAll(cellLevel, celli) { - nCells[cellLevel[cellI]]++; + nCells[cellLevel[celli]]++; } Pstream::listCombineGather(nCells, plusEqOp<label>()); @@ -2791,9 +2791,9 @@ void Foam::meshRefinement::dumpRefinementLevel() const const labelList& cellLevel = meshCutter_.cellLevel(); - forAll(volRefLevel, cellI) + forAll(volRefLevel, celli) { - volRefLevel[cellI] = cellLevel[cellI]; + volRefLevel[celli] = cellLevel[celli]; } volRefLevel.write(); @@ -2858,16 +2858,16 @@ void Foam::meshRefinement::dumpIntersections(const fileName& prefix) const forAll(intersectionFaces, i) { - label faceI = intersectionFaces[i]; - start[i] = cellCentres[mesh_.faceOwner()[faceI]]; + label facei = intersectionFaces[i]; + start[i] = cellCentres[mesh_.faceOwner()[facei]]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - end[i] = cellCentres[mesh_.faceNeighbour()[faceI]]; + end[i] = cellCentres[mesh_.faceNeighbour()[facei]]; } else { - end[i] = neiCc[faceI-mesh_.nInternalFaces()]; + end[i] = neiCc[facei-mesh_.nInternalFaces()]; } } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H index 2d0d76b2f8928bbe956613746d3335232319039d..5d38ccdebc82dee357a780ce95632e2e2bfb2a47 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinement.H @@ -337,7 +337,7 @@ private: const vector& surfaceLocation, const vector& surfaceNormal, - const label cellI, + const label celli, label& cellMaxLevel, vector& cellMaxLocation, @@ -384,7 +384,7 @@ private: // Returns label of added face. label createBaffle ( - const label faceI, + const label facei, const label ownPatch, const label neiPatch, polyTopoChange& meshMod @@ -396,7 +396,7 @@ private: // markFacesOnProblemCells void markBoundaryFace ( - const label faceI, + const label facei, boolList& isBoundaryFace, boolList& isBoundaryEdge, boolList& isBoundaryPoint @@ -423,14 +423,14 @@ private: const pointField& neiCc, const scalar minFaceArea, const scalar maxNonOrtho, - const label faceI + const label facei ) const; bool isCollapsedCell ( const pointField&, const scalar volFraction, - const label cellI + const label celli ) const; //- Returns list with for every internal face -1 or the patch diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C index b637a0f6d4e7063c8fa8ef7af247c380257517e6..3ad7c9e8a8fef81cd1c11dd83f663a4d340d587c 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementBaffles.C @@ -53,20 +53,20 @@ License Foam::label Foam::meshRefinement::createBaffle ( - const label faceI, + const label facei, const label ownPatch, const label neiPatch, polyTopoChange& meshMod ) const { - const face& f = mesh_.faces()[faceI]; - label zoneID = mesh_.faceZones().whichZone(faceI); + const face& f = mesh_.faces()[facei]; + label zoneID = mesh_.faceZones().whichZone(facei); bool zoneFlip = false; if (zoneID >= 0) { const faceZone& fZone = mesh_.faceZones()[zoneID]; - zoneFlip = fZone.flipMap()[fZone.whichFace(faceI)]; + zoneFlip = fZone.flipMap()[fZone.whichFace(facei)]; } meshMod.setAction @@ -74,8 +74,8 @@ Foam::label Foam::meshRefinement::createBaffle polyModifyFace ( f, // modified face - faceI, // label of face - mesh_.faceOwner()[faceI], // owner + facei, // label of face + mesh_.faceOwner()[facei], // owner -1, // neighbour false, // face flip ownPatch, // patch for face @@ -88,13 +88,13 @@ Foam::label Foam::meshRefinement::createBaffle label dupFaceI = -1; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { if (neiPatch == -1) { FatalErrorInFunction - << "No neighbour patch for internal face " << faceI - << " fc:" << mesh_.faceCentres()[faceI] + << "No neighbour patch for internal face " << facei + << " fc:" << mesh_.faceCentres()[facei] << " ownPatch:" << ownPatch << abort(FatalError); } @@ -109,11 +109,11 @@ Foam::label Foam::meshRefinement::createBaffle polyAddFace ( f.reverseFace(), // modified face - mesh_.faceNeighbour()[faceI],// owner + mesh_.faceNeighbour()[facei],// owner -1, // neighbour -1, // masterPointID -1, // masterEdgeID - faceI, // masterFaceID, + facei, // masterFaceID, true, // face flip neiPatch, // patch for face zoneID, // zone for face @@ -178,19 +178,19 @@ void Foam::meshRefinement::getBafflePatches forAll(testFaces, i) { - label faceI = testFaces[i]; + label facei = testFaces[i]; - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { start[i] = cellCentres[own]; - end[i] = cellCentres[mesh_.faceNeighbour()[faceI]]; + end[i] = cellCentres[mesh_.faceNeighbour()[facei]]; } else { start[i] = cellCentres[own]; - end[i] = neiCc[faceI-mesh_.nInternalFaces()]; + end[i] = neiCc[facei-mesh_.nInternalFaces()]; } } @@ -227,7 +227,7 @@ void Foam::meshRefinement::getBafflePatches forAll(testFaces, i) { - label faceI = testFaces[i]; + label facei = testFaces[i]; if (hit1[i].hit() && hit2[i].hit()) { @@ -247,16 +247,16 @@ void Foam::meshRefinement::getBafflePatches } // Pick up the patches - ownPatch[faceI] = globalToMasterPatch + ownPatch[facei] = globalToMasterPatch [ surfaces_.globalRegion(surface1[i], region1[i]) ]; - neiPatch[faceI] = globalToMasterPatch + neiPatch[facei] = globalToMasterPatch [ surfaces_.globalRegion(surface2[i], region2[i]) ]; - if (ownPatch[faceI] == -1 || neiPatch[faceI] == -1) + if (ownPatch[facei] == -1 || neiPatch[facei] == -1) { FatalErrorInFunction << "problem." << abort(FatalError); @@ -315,9 +315,9 @@ Foam::Map<Foam::labelPair> Foam::meshRefinement::getZoneBafflePatches forAll(fZone, i) { - label faceI = fZone[i]; + label facei = fZone[i]; - if (allowBoundary || mesh_.isInternalFace(faceI)) + if (allowBoundary || mesh_.isInternalFace(facei)) { labelPair patches = zPatches; if (fZone.flipMap()[i]) @@ -325,11 +325,11 @@ Foam::Map<Foam::labelPair> Foam::meshRefinement::getZoneBafflePatches patches = reverse(patches); } - if (!bafflePatch.insert(faceI, patches)) + if (!bafflePatch.insert(facei, patches)) { FatalErrorInFunction - << "Face " << faceI - << " fc:" << mesh_.faceCentres()[faceI] + << "Face " << facei + << " fc:" << mesh_.faceCentres()[facei] << " in zone " << fZone.name() << " is in multiple zones!" << abort(FatalError); @@ -369,22 +369,22 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles labelList syncedNeiPatch(neiPatch); syncTools::syncFaceList(mesh_, syncedNeiPatch, maxEqOp<label>()); - forAll(syncedOwnPatch, faceI) + forAll(syncedOwnPatch, facei) { if ( - (ownPatch[faceI] == -1 && syncedOwnPatch[faceI] != -1) - || (neiPatch[faceI] == -1 && syncedNeiPatch[faceI] != -1) + (ownPatch[facei] == -1 && syncedOwnPatch[facei] != -1) + || (neiPatch[facei] == -1 && syncedNeiPatch[facei] != -1) ) { FatalErrorInFunction - << "Non synchronised at face:" << faceI - << " on patch:" << mesh_.boundaryMesh().whichPatch(faceI) - << " fc:" << mesh_.faceCentres()[faceI] << endl - << "ownPatch:" << ownPatch[faceI] - << " syncedOwnPatch:" << syncedOwnPatch[faceI] - << " neiPatch:" << neiPatch[faceI] - << " syncedNeiPatch:" << syncedNeiPatch[faceI] + << "Non synchronised at face:" << facei + << " on patch:" << mesh_.boundaryMesh().whichPatch(facei) + << " fc:" << mesh_.faceCentres()[facei] << endl + << "ownPatch:" << ownPatch[facei] + << " syncedOwnPatch:" << syncedOwnPatch[facei] + << " neiPatch:" << neiPatch[facei] + << " syncedNeiPatch:" << syncedNeiPatch[facei] << abort(FatalError); } } @@ -395,17 +395,17 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles label nBaffles = 0; - forAll(ownPatch, faceI) + forAll(ownPatch, facei) { - if (ownPatch[faceI] != -1) + if (ownPatch[facei] != -1) { // Create baffle or repatch face. Return label of inserted baffle // face. createBaffle ( - faceI, - ownPatch[faceI], // owner side patch - neiPatch[faceI], // neighbour side patch + facei, + ownPatch[facei], // owner side patch + neiPatch[facei], // neighbour side patch meshMod ); nBaffles++; @@ -443,11 +443,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles // Pick up owner side of baffle 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]]; + const cell& ownFaces = mesh_.cells()[mesh_.faceOwner()[facei]]; forAll(ownFaces, i) { @@ -456,13 +456,13 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createBaffles } } // Pick up neighbour side of baffle (added faces) - forAll(faceMap, faceI) + 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]]; + const cell& ownFaces = mesh_.cells()[mesh_.faceOwner()[facei]]; forAll(ownFaces, i) { @@ -484,21 +484,21 @@ void Foam::meshRefinement::checkZoneFaces() const const polyBoundaryMesh& pbm = mesh_.boundaryMesh(); - forAll(pbm, patchI) + forAll(pbm, patchi) { - const polyPatch& pp = pbm[patchI]; + const polyPatch& pp = pbm[patchi]; if (isA<processorPolyPatch>(pp)) { forAll(pp, i) { - label faceI = pp.start()+i; - label zoneI = fZones.whichZone(faceI); + label facei = pp.start()+i; + label zoneI = fZones.whichZone(facei); if (zoneI != -1) { FatalErrorInFunction - << "face:" << faceI << " on patch " << pp.name() + << "face:" << facei << " on patch " << pp.name() << " is in zone " << fZones[zoneI].name() << exit(FatalError); } @@ -565,9 +565,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createZoneBaffles const labelList& faceMap = map().faceMap(); const labelList& reverseFaceMap = map().reverseFaceMap(); - forAll(faceMap, faceI) + 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 @@ -578,9 +578,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::createZoneBaffles if (iter != faceToPatch.end()) { label masterFaceI = reverseFaceMap[oldFaceI]; - if (faceI != masterFaceI) + if (facei != masterFaceI) { - baffles[baffleI++] = labelPair(masterFaceI, faceI); + baffles[baffleI++] = labelPair(masterFaceI, facei); } } } @@ -652,24 +652,24 @@ Foam::List<Foam::labelPair> Foam::meshRefinement::freeStandingBaffles const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; // Count number of boundary faces. Discard coupled boundary faces. if (!pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - const labelList& fEdges = mesh_.faceEdges(faceI); + const labelList& fEdges = mesh_.faceEdges(facei); forAll(fEdges, fEdgeI) { nBafflesPerEdge[fEdges[fEdgeI]]++; } - faceI++; + facei++; } } } @@ -1027,15 +1027,15 @@ void Foam::meshRefinement::findCellZoneGeometric insideSurfaces ); - forAll(insideSurfaces, cellI) + forAll(insideSurfaces, celli) { - if (cellToZone[cellI] == -2) + if (cellToZone[celli] == -2) { - label surfI = insideSurfaces[cellI]; + label surfI = insideSurfaces[celli]; if (surfI != -1) { - cellToZone[cellI] = surfaceToCellZone[surfI]; + cellToZone[celli] = surfaceToCellZone[surfI]; } } } @@ -1049,13 +1049,13 @@ void Foam::meshRefinement::findCellZoneGeometric // Count points to test. label nCandidates = 0; - forAll(namedSurfaceIndex, faceI) + forAll(namedSurfaceIndex, facei) { - label surfI = namedSurfaceIndex[faceI]; + label surfI = namedSurfaceIndex[facei]; if (surfI != -1) { - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { nCandidates += 2; } @@ -1069,18 +1069,18 @@ void Foam::meshRefinement::findCellZoneGeometric // Collect points. pointField candidatePoints(nCandidates); nCandidates = 0; - forAll(namedSurfaceIndex, faceI) + forAll(namedSurfaceIndex, facei) { - label surfI = namedSurfaceIndex[faceI]; + label surfI = namedSurfaceIndex[facei]; if (surfI != -1) { - label own = faceOwner[faceI]; + label own = faceOwner[facei]; const point& ownCc = cellCentres[own]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = faceNeighbour[faceI]; + label nei = faceNeighbour[facei]; const point& neiCc = cellCentres[nei]; // Perturbed cc const vector d = 1e-4*(neiCc - ownCc); @@ -1089,8 +1089,8 @@ void Foam::meshRefinement::findCellZoneGeometric } else { - //const point& neiFc = mesh_.faceCentres()[faceI]; - const point& neiFc = neiCc[faceI-mesh_.nInternalFaces()]; + //const point& neiFc = mesh_.faceCentres()[facei]; + const point& neiFc = neiCc[facei-mesh_.nInternalFaces()]; // Perturbed cc const vector d = 1e-4*(neiFc - ownCc); @@ -1113,15 +1113,15 @@ void Foam::meshRefinement::findCellZoneGeometric // 3. Update zone information nCandidates = 0; - forAll(namedSurfaceIndex, faceI) + forAll(namedSurfaceIndex, facei) { - label surfI = namedSurfaceIndex[faceI]; + label surfI = namedSurfaceIndex[facei]; if (surfI != -1) { - label own = faceOwner[faceI]; + label own = faceOwner[facei]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { label ownSurfI = insideSurfaces[nCandidates++]; if (ownSurfI != -1) @@ -1132,7 +1132,7 @@ void Foam::meshRefinement::findCellZoneGeometric label neiSurfI = insideSurfaces[nCandidates++]; if (neiSurfI != -1) { - label nei = faceNeighbour[faceI]; + label nei = faceNeighbour[facei]; cellToZone[nei] = surfaceToCellZone[neiSurfI]; } @@ -1153,15 +1153,15 @@ void Foam::meshRefinement::findCellZoneGeometric // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // for if any cells were not completely covered. - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label ownZone = cellToZone[mesh_.faceOwner()[faceI]]; - label neiZone = cellToZone[mesh_.faceNeighbour()[faceI]]; + label ownZone = cellToZone[mesh_.faceOwner()[facei]]; + label neiZone = cellToZone[mesh_.faceNeighbour()[facei]]; - if (namedSurfaceIndex[faceI] == -1 && (ownZone != neiZone)) + if (namedSurfaceIndex[facei] == -1 && (ownZone != neiZone)) { // Give face the zone of max cell zone - namedSurfaceIndex[faceI] = findIndex + namedSurfaceIndex[facei] = findIndex ( surfaceToCellZone, max(ownZone, neiZone) @@ -1172,38 +1172,38 @@ void Foam::meshRefinement::findCellZoneGeometric labelList neiCellZone(mesh_.nFaces()-mesh_.nInternalFaces()); const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start()+i; - label ownZone = cellToZone[mesh_.faceOwner()[faceI]]; - neiCellZone[faceI-mesh_.nInternalFaces()] = ownZone; + label facei = pp.start()+i; + label ownZone = cellToZone[mesh_.faceOwner()[facei]]; + neiCellZone[facei-mesh_.nInternalFaces()] = ownZone; } } } syncTools::swapBoundaryFaceList(mesh_, neiCellZone); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start()+i; - label ownZone = cellToZone[mesh_.faceOwner()[faceI]]; - label neiZone = neiCellZone[faceI-mesh_.nInternalFaces()]; + label facei = pp.start()+i; + label ownZone = cellToZone[mesh_.faceOwner()[facei]]; + label neiZone = neiCellZone[facei-mesh_.nInternalFaces()]; - if (namedSurfaceIndex[faceI] == -1 && (ownZone != neiZone)) + if (namedSurfaceIndex[facei] == -1 && (ownZone != neiZone)) { // Give face the max cell zone - namedSurfaceIndex[faceI] = findIndex + namedSurfaceIndex[facei] = findIndex ( surfaceToCellZone, max(ownZone, neiZone) @@ -1231,15 +1231,15 @@ void Foam::meshRefinement::findCellZoneInsideWalk boolList blockedFace(mesh_.nFaces()); //selectSeparatedCoupledFaces(blockedFace); - forAll(namedSurfaceIndex, faceI) + forAll(namedSurfaceIndex, facei) { - if (namedSurfaceIndex[faceI] == -1) + if (namedSurfaceIndex[facei] == -1) { - blockedFace[faceI] = false; + blockedFace[facei] = false; } else { - blockedFace[faceI] = true; + blockedFace[facei] = true; } } // No need to sync since namedSurfaceIndex already is synced @@ -1289,22 +1289,22 @@ void Foam::meshRefinement::findCellZoneInsideWalk } // Set all cells with this region - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - if (cellRegion[cellI] == keepRegionI) + if (cellRegion[celli] == keepRegionI) { - if (cellToZone[cellI] == -2) + if (cellToZone[celli] == -2) { - cellToZone[cellI] = surfaceToCellZone[surfI]; + cellToZone[celli] = surfaceToCellZone[surfI]; } - else if (cellToZone[cellI] != surfaceToCellZone[surfI]) + else if (cellToZone[celli] != surfaceToCellZone[surfI]) { WarningInFunction - << "Cell " << cellI - << " at " << mesh_.cellCentres()[cellI] + << "Cell " << celli + << " at " << mesh_.cellCentres()[celli] << " is inside surface " << surfaces_.names()[surfI] << " but already marked as being in zone " - << cellToZone[cellI] << endl + << cellToZone[celli] << endl << "This can happen if your surfaces are not" << " (sufficiently) closed." << endl; @@ -1389,15 +1389,15 @@ void Foam::meshRefinement::findCellZoneTopo // Analyse regions. Reuse regionsplit boolList blockedFace(mesh_.nFaces()); - forAll(namedSurfaceIndex, faceI) + forAll(namedSurfaceIndex, facei) { - if (namedSurfaceIndex[faceI] == -1) + if (namedSurfaceIndex[facei] == -1) { - blockedFace[faceI] = false; + blockedFace[facei] = false; } else { - blockedFace[faceI] = true; + blockedFace[facei] = true; } } // No need to sync since namedSurfaceIndex already is synced @@ -1415,11 +1415,11 @@ void Foam::meshRefinement::findCellZoneTopo // See which cells already are set in the cellToZone (from geometric // searching) and use these to take over their zones. // Note: could be improved to count number of cells per region. - forAll(cellToZone, cellI) + forAll(cellToZone, celli) { - if (cellToZone[cellI] != -2) + if (cellToZone[celli] != -2) { - regionToCellZone[cellRegion[cellI]] = cellToZone[cellI]; + regionToCellZone[cellRegion[celli]] = cellToZone[celli]; } } @@ -1472,9 +1472,9 @@ void Foam::meshRefinement::findCellZoneTopo // Internal faces - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label surfI = namedSurfaceIndex[faceI]; + label surfI = namedSurfaceIndex[facei]; // Connected even if no cellZone defined for surface if (surfI != -1) @@ -1484,8 +1484,8 @@ void Foam::meshRefinement::findCellZoneTopo bool changedCell = calcRegionToZone ( surfaceToCellZone[surfI], - cellRegion[mesh_.faceOwner()[faceI]], - cellRegion[mesh_.faceNeighbour()[faceI]], + cellRegion[mesh_.faceOwner()[facei]], + cellRegion[mesh_.faceNeighbour()[facei]], regionToCellZone ); @@ -1499,17 +1499,17 @@ void Foam::meshRefinement::findCellZoneTopo // Get coupled neighbour cellRegion labelList neiCellRegion(mesh_.nFaces()-mesh_.nInternalFaces()); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start()+i; - neiCellRegion[faceI-mesh_.nInternalFaces()] = - cellRegion[mesh_.faceOwner()[faceI]]; + label facei = pp.start()+i; + neiCellRegion[facei-mesh_.nInternalFaces()] = + cellRegion[mesh_.faceOwner()[facei]]; } } } @@ -1517,17 +1517,17 @@ void Foam::meshRefinement::findCellZoneTopo // Calculate region to zone from cellRegions on either side of coupled // face. - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start()+i; + label facei = pp.start()+i; - label surfI = namedSurfaceIndex[faceI]; + label surfI = namedSurfaceIndex[facei]; // Connected even if no cellZone defined for surface if (surfI != -1) @@ -1535,8 +1535,8 @@ void Foam::meshRefinement::findCellZoneTopo bool changedCell = calcRegionToZone ( surfaceToCellZone[surfI], - cellRegion[mesh_.faceOwner()[faceI]], - neiCellRegion[faceI-mesh_.nInternalFaces()], + cellRegion[mesh_.faceOwner()[facei]], + neiCellRegion[facei-mesh_.nInternalFaces()], regionToCellZone ); @@ -1576,9 +1576,9 @@ void Foam::meshRefinement::findCellZoneTopo } // Rework into cellToZone - forAll(cellToZone, cellI) + forAll(cellToZone, celli) { - cellToZone[cellI] = regionToCellZone[cellRegion[cellI]]; + cellToZone[celli] = regionToCellZone[cellRegion[celli]]; } } @@ -1592,20 +1592,20 @@ void Foam::meshRefinement::makeConsistentFaceIndex const labelList& faceOwner = mesh_.faceOwner(); const labelList& faceNeighbour = mesh_.faceNeighbour(); - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label ownZone = cellToZone[faceOwner[faceI]]; - label neiZone = cellToZone[faceNeighbour[faceI]]; + label ownZone = cellToZone[faceOwner[facei]]; + label neiZone = cellToZone[faceNeighbour[facei]]; - if (ownZone == neiZone && namedSurfaceIndex[faceI] != -1) + if (ownZone == neiZone && namedSurfaceIndex[facei] != -1) { - namedSurfaceIndex[faceI] = -1; + namedSurfaceIndex[facei] = -1; } - else if (ownZone != neiZone && namedSurfaceIndex[faceI] == -1) + else if (ownZone != neiZone && namedSurfaceIndex[facei] == -1) { FatalErrorInFunction - << "Different cell zones on either side of face " << faceI - << " at " << mesh_.faceCentres()[faceI] + << "Different cell zones on either side of face " << facei + << " at " << mesh_.faceCentres()[facei] << " but face not marked with a surface." << abort(FatalError); } @@ -1615,45 +1615,45 @@ void Foam::meshRefinement::makeConsistentFaceIndex // Get coupled neighbour cellZone labelList neiCellZone(mesh_.nFaces()-mesh_.nInternalFaces()); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start()+i; - neiCellZone[faceI-mesh_.nInternalFaces()] = - cellToZone[mesh_.faceOwner()[faceI]]; + label facei = pp.start()+i; + neiCellZone[facei-mesh_.nInternalFaces()] = + cellToZone[mesh_.faceOwner()[facei]]; } } } syncTools::swapBoundaryFaceList(mesh_, neiCellZone); // Use coupled cellZone to do check - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start()+i; + label facei = pp.start()+i; - label ownZone = cellToZone[faceOwner[faceI]]; - label neiZone = neiCellZone[faceI-mesh_.nInternalFaces()]; + label ownZone = cellToZone[faceOwner[facei]]; + label neiZone = neiCellZone[facei-mesh_.nInternalFaces()]; - if (ownZone == neiZone && namedSurfaceIndex[faceI] != -1) + if (ownZone == neiZone && namedSurfaceIndex[facei] != -1) { - namedSurfaceIndex[faceI] = -1; + namedSurfaceIndex[facei] = -1; } - else if (ownZone != neiZone && namedSurfaceIndex[faceI] == -1) + else if (ownZone != neiZone && namedSurfaceIndex[facei] == -1) { FatalErrorInFunction << "Different cell zones on either side of face " - << faceI << " at " << mesh_.faceCentres()[faceI] + << facei << " at " << mesh_.faceCentres()[facei] << " but face not marked with a surface." << abort(FatalError); } @@ -1664,8 +1664,8 @@ void Foam::meshRefinement::makeConsistentFaceIndex // Unzonify boundary faces forAll(pp, i) { - label faceI = pp.start()+i; - namedSurfaceIndex[faceI] = -1; + label facei = pp.start()+i; + namedSurfaceIndex[facei] = -1; } } } @@ -1711,11 +1711,11 @@ void Foam::meshRefinement::handleSnapProblems { faceSet problemFaces(mesh_, "problemFaces", mesh_.nFaces()/100); - forAll(facePatch, faceI) + forAll(facePatch, facei) { - if (facePatch[faceI] != -1) + if (facePatch[facei] != -1) { - problemFaces.insert(faceI); + problemFaces.insert(facei); } } problemFaces.instance() = timeName(); @@ -1788,34 +1788,34 @@ Foam::labelList Foam::meshRefinement::freeStandingBaffleFaces DynamicList<label> faceLabels(mesh_.nFaces()/100); - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - if (faceToZone[faceI] != -1) + if (faceToZone[facei] != -1) { // Free standing baffle? - label ownZone = cellToZone[faceOwner[faceI]]; - label neiZone = cellToZone[faceNeighbour[faceI]]; + label ownZone = cellToZone[faceOwner[facei]]; + label neiZone = cellToZone[faceNeighbour[facei]]; if (ownZone == neiZone) { - faceLabels.append(faceI); + faceLabels.append(facei); } } } - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; forAll(pp, i) { - label faceI = pp.start()+i; - if (faceToZone[faceI] != -1) + label facei = pp.start()+i; + if (faceToZone[facei] != -1) { // Free standing baffle? - label ownZone = cellToZone[faceOwner[faceI]]; - label neiZone = neiCellZone[faceI-mesh_.nInternalFaces()]; + label ownZone = cellToZone[faceOwner[facei]]; + label neiZone = neiCellZone[facei-mesh_.nInternalFaces()]; if (ownZone == neiZone) { - faceLabels.append(faceI); + faceLabels.append(facei); } } } @@ -1835,13 +1835,13 @@ void Foam::meshRefinement::calcPatchNumMasterFaces nMasterFacesPerEdge.setSize(patch.nEdges()); nMasterFacesPerEdge = 0; - forAll(patch.addressing(), faceI) + forAll(patch.addressing(), facei) { - const label meshFaceI = patch.addressing()[faceI]; + const label meshFaceI = patch.addressing()[facei]; if (isMasterFace[meshFaceI]) { - const labelList& fEdges = patch.faceEdges()[faceI]; + const labelList& fEdges = patch.faceEdges()[facei]; forAll(fEdges, fEdgeI) { nMasterFacesPerEdge[fEdges[fEdgeI]]++; @@ -1904,7 +1904,7 @@ Foam::label Foam::meshRefinement::markPatchZones const globalIndex globalFaces(patch.size()); - label faceI = 0; + label facei = 0; label currentZoneI = 0; @@ -1912,11 +1912,11 @@ Foam::label Foam::meshRefinement::markPatchZones { // Pick an unset face label globalSeed = labelMax; - for (; faceI < allFaceInfo.size(); faceI++) + for (; facei < allFaceInfo.size(); facei++) { - if (!allFaceInfo[faceI].valid(dummyTrackData)) + if (!allFaceInfo[facei].valid(dummyTrackData)) { - globalSeed = globalFaces.toGlobal(faceI); + globalSeed = globalFaces.toGlobal(facei); break; } } @@ -1999,16 +1999,16 @@ Foam::label Foam::meshRefinement::markPatchZones faceToZone.setSize(patch.size()); - forAll(allFaceInfo, faceI) + forAll(allFaceInfo, facei) { - if (!allFaceInfo[faceI].valid(dummyTrackData)) + if (!allFaceInfo[facei].valid(dummyTrackData)) { FatalErrorInFunction - << "Problem: unvisited face " << faceI - << " at " << patch.faceCentres()[faceI] + << "Problem: unvisited face " << facei + << " at " << patch.faceCentres()[facei] << exit(FatalError); } - faceToZone[faceI] = allFaceInfo[faceI].region(); + faceToZone[facei] = allFaceInfo[facei].region(); } return currentZoneI; @@ -2037,20 +2037,20 @@ void Foam::meshRefinement::consistentOrientation { label nProtected = 0; - forAll(patch.addressing(), faceI) + 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() + patchi != -1 + && bm[patchi].coupled() && !isMasterFace[meshFaceI] ) { // Slave side. Mark so doesn't get visited. - allFaceInfo[faceI] = orientedSurface::NOFLIP; + allFaceInfo[facei] = orientedSurface::NOFLIP; nProtected++; } } @@ -2094,11 +2094,11 @@ void Foam::meshRefinement::consistentOrientation { // Pick an unset face label globalSeed = labelMax; - forAll(allFaceInfo, faceI) + forAll(allFaceInfo, facei) { - if (allFaceInfo[faceI] == orientedSurface::UNVISITED) + if (allFaceInfo[facei] == orientedSurface::UNVISITED) { - globalSeed = globalFaces.toGlobal(faceI); + globalSeed = globalFaces.toGlobal(facei); break; } } @@ -2206,12 +2206,12 @@ void Foam::meshRefinement::consistentOrientation forAll(patch.addressing(), i) { const label meshFaceI = patch.addressing()[i]; - const label patchI = bm.whichPatch(meshFaceI); + const label patchi = bm.whichPatch(meshFaceI); if ( - patchI != -1 - && bm[patchI].coupled() + patchi != -1 + && bm[patchi].coupled() && !isMasterFace[meshFaceI] ) { @@ -2242,22 +2242,22 @@ void Foam::meshRefinement::consistentOrientation meshFlipMap.setSize(mesh_.nFaces()); meshFlipMap = false; - forAll(allFaceInfo, faceI) + forAll(allFaceInfo, facei) { - label meshFaceI = patch.addressing()[faceI]; + label meshFaceI = patch.addressing()[facei]; - if (allFaceInfo[faceI] == orientedSurface::NOFLIP) + if (allFaceInfo[facei] == orientedSurface::NOFLIP) { meshFlipMap[meshFaceI] = false; } - else if (allFaceInfo[faceI] == orientedSurface::FLIP) + else if (allFaceInfo[facei] == orientedSurface::FLIP) { meshFlipMap[meshFaceI] = true; } else { FatalErrorInFunction - << "Problem : unvisited face " << faceI + << "Problem : unvisited face " << facei << " centre:" << mesh_.faceCentres()[meshFaceI] << abort(FatalError); } @@ -2487,11 +2487,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh // Analyse regions. Reuse regionsplit boolList blockedFace(mesh_.nFaces(), false); - forAll(ownPatch, faceI) + forAll(ownPatch, facei) { - if (ownPatch[faceI] != -1 || neiPatch[faceI] != -1) + if (ownPatch[facei] != -1 || neiPatch[facei] != -1) { - blockedFace[faceI] = true; + blockedFace[facei] = true; } } syncTools::syncFaceList(mesh_, blockedFace, orEqOp<bool>()); @@ -2545,12 +2545,12 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh labelList pointBaffle(mesh_.nPoints(), -1); - forAll(faceNeighbour, faceI) + forAll(faceNeighbour, facei) { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; - label ownRegion = cellRegion[faceOwner[faceI]]; - label neiRegion = cellRegion[faceNeighbour[faceI]]; + label ownRegion = cellRegion[faceOwner[facei]]; + label neiRegion = cellRegion[faceNeighbour[facei]]; if (ownRegion == keepRegionI && neiRegion != keepRegionI) { @@ -2559,15 +2559,15 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh // happen for boundary faces? forAll(f, fp) { - pointBaffle[f[fp]] = max(defaultPatch, ownPatch[faceI]); + pointBaffle[f[fp]] = max(defaultPatch, ownPatch[facei]); } } else if (ownRegion != keepRegionI && neiRegion == keepRegionI) { - label newPatchI = neiPatch[faceI]; + label newPatchI = neiPatch[facei]; if (newPatchI == -1) { - newPatchI = max(defaultPatch, ownPatch[faceI]); + newPatchI = max(defaultPatch, ownPatch[facei]); } forAll(f, fp) { @@ -2577,20 +2577,20 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh } for ( - label faceI = mesh_.nInternalFaces(); - faceI < mesh_.nFaces(); - faceI++ + label facei = mesh_.nInternalFaces(); + facei < mesh_.nFaces(); + facei++ ) { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; - label ownRegion = cellRegion[faceOwner[faceI]]; + label ownRegion = cellRegion[faceOwner[facei]]; if (ownRegion == keepRegionI) { forAll(f, fp) { - pointBaffle[f[fp]] = max(defaultPatch, ownPatch[faceI]); + pointBaffle[f[fp]] = max(defaultPatch, ownPatch[facei]); } } } @@ -2617,11 +2617,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh forAll(pFaces, pFaceI) { - label faceI = pFaces[pFaceI]; + label facei = pFaces[pFaceI]; - if (ownPatch[faceI] == -1) + if (ownPatch[facei] == -1) { - ownPatch[faceI] = pointBaffle[pointI]; + ownPatch[facei] = pointBaffle[pointI]; } } } @@ -2633,11 +2633,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh labelList newOwnPatch(ownPatch); - forAll(ownPatch, faceI) + forAll(ownPatch, facei) { - if (ownPatch[faceI] != -1) + if (ownPatch[facei] != -1) { - label own = faceOwner[faceI]; + label own = faceOwner[facei]; if (cellRegion[own] != keepRegionI) { @@ -2648,13 +2648,13 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh { if (ownPatch[ownFaces[j]] == -1) { - newOwnPatch[ownFaces[j]] = ownPatch[faceI]; + newOwnPatch[ownFaces[j]] = ownPatch[facei]; } } } - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = faceNeighbour[faceI]; + label nei = faceNeighbour[facei]; if (cellRegion[nei] != keepRegionI) { @@ -2665,7 +2665,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh { if (ownPatch[neiFaces[j]] == -1) { - newOwnPatch[neiFaces[j]] = ownPatch[faceI]; + newOwnPatch[neiFaces[j]] = ownPatch[facei]; } } } @@ -2685,11 +2685,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh // Get cells to remove DynamicList<label> cellsToRemove(mesh_.nCells()); - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - if (cellRegion[cellI] != keepRegionI) + if (cellRegion[celli] != keepRegionI) { - cellsToRemove.append(cellI); + cellsToRemove.append(celli); } } cellsToRemove.shrink(); @@ -2712,17 +2712,17 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh forAll(exposedFaces, i) { - label faceI = exposedFaces[i]; + label facei = exposedFaces[i]; - if (ownPatch[faceI] != -1) + if (ownPatch[facei] != -1) { - exposedPatches[i] = ownPatch[faceI]; + exposedPatches[i] = ownPatch[facei]; } else { WarningInFunction - << "For exposed face " << faceI - << " fc:" << mesh_.faceCentres()[faceI] + << "For exposed face " << facei + << " fc:" << mesh_.faceCentres()[facei] << " found no patch." << endl << " Taking patch " << defaultPatch << " instead." << endl; @@ -2882,17 +2882,17 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify forAll(testFaces, i) { - label faceI = testFaces[i]; + label facei = testFaces[i]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - start[i] = cellCentres[faceOwner[faceI]]; - end[i] = cellCentres[faceNeighbour[faceI]]; + start[i] = cellCentres[faceOwner[facei]]; + end[i] = cellCentres[faceNeighbour[facei]]; } else { - start[i] = cellCentres[faceOwner[faceI]]; - end[i] = neiCc[faceI-mesh_.nInternalFaces()]; + start[i] = cellCentres[faceOwner[facei]]; + end[i] = neiCc[facei-mesh_.nInternalFaces()]; } } @@ -2938,8 +2938,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify forAll(testFaces, i) { - label faceI = testFaces[i]; - const vector& area = mesh_.faceAreas()[faceI]; + label facei = testFaces[i]; + const vector& area = mesh_.faceAreas()[facei]; if (surface1[i] != -1) { @@ -2953,21 +2953,21 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify ) ) { - namedSurfaceIndex[faceI] = surface2[i]; - posOrientation[faceI] = ((area&normal2[i]) > 0); + namedSurfaceIndex[facei] = surface2[i]; + posOrientation[facei] = ((area&normal2[i]) > 0); nSurfFaces[surface2[i]]++; } else { - namedSurfaceIndex[faceI] = surface1[i]; - posOrientation[faceI] = ((area&normal1[i]) > 0); + namedSurfaceIndex[facei] = surface1[i]; + posOrientation[facei] = ((area&normal1[i]) > 0); nSurfFaces[surface1[i]]++; } } else if (surface2[i] != -1) { - namedSurfaceIndex[faceI] = surface2[i]; - posOrientation[faceI] = ((area&normal2[i]) > 0); + namedSurfaceIndex[facei] = surface2[i]; + posOrientation[facei] = ((area&normal2[i]) > 0); nSurfFaces[surface2[i]]++; } } @@ -3104,12 +3104,12 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify // Convert namedSurfaceIndex (index of named surfaces) to // actual faceZone index - forAll(namedSurfaceIndex, faceI) + forAll(namedSurfaceIndex, facei) { - label surfI = namedSurfaceIndex[faceI]; + label surfI = namedSurfaceIndex[facei]; if (surfI != -1) { - faceToZone[faceI] = surfaceToFaceZone[surfI]; + faceToZone[facei] = surfaceToFaceZone[surfI]; } } @@ -3122,9 +3122,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify // Get coupled neighbour cellZone. Set to -1 on non-coupled patches. labelList neiCellZone; syncTools::swapBoundaryCellList(mesh_, cellToZone, neiCellZone); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (!pp.coupled()) { @@ -3220,9 +3220,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify // Count per region the number of orientations (taking the new // flipMap into account) - forAll(patch.addressing(), faceI) + forAll(patch.addressing(), facei) { - label meshFaceI = patch.addressing()[faceI]; + label meshFaceI = patch.addressing()[facei]; if (isMasterFace[meshFaceI]) { @@ -3236,7 +3236,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify n = -1; } - nPosOrientation.find(faceToConnectedZone[faceI])() += n; + nPosOrientation.find(faceToConnectedZone[facei])() += n; } } Pstream::mapCombineGather(nPosOrientation, plusEqOp<label>()); @@ -3275,9 +3275,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify // Put the faces into the correct zone // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label faceZoneI = faceToZone[faceI]; + label faceZoneI = faceToZone[facei]; if (faceZoneI != -1) { @@ -3285,15 +3285,15 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify // Note: logic to use flipMap should be consistent with logic // to pick up the freeStandingBaffleFaces! - label ownZone = cellToZone[faceOwner[faceI]]; - label neiZone = cellToZone[faceNeighbour[faceI]]; + label ownZone = cellToZone[faceOwner[facei]]; + label neiZone = cellToZone[faceNeighbour[facei]]; bool flip; if (ownZone == neiZone) { // free-standing face. Use geometrically derived orientation - flip = meshFlipMap[faceI]; + flip = meshFlipMap[facei]; } else { @@ -3308,10 +3308,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify ( polyModifyFace ( - mesh_.faces()[faceI], // modified face - faceI, // label of face - faceOwner[faceI], // owner - faceNeighbour[faceI], // neighbour + mesh_.faces()[facei], // modified face + facei, // label of face + faceOwner[facei], // owner + faceNeighbour[facei], // neighbour false, // face flip -1, // patch for face false, // remove from zone @@ -3324,27 +3324,27 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify // Set owner as no-flip - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - label faceZoneI = faceToZone[faceI]; + label faceZoneI = faceToZone[facei]; if (faceZoneI != -1) { - label ownZone = cellToZone[faceOwner[faceI]]; - label neiZone = neiCellZone[faceI-mesh_.nInternalFaces()]; + label ownZone = cellToZone[faceOwner[facei]]; + label neiZone = neiCellZone[facei-mesh_.nInternalFaces()]; bool flip; if (ownZone == neiZone) { // free-standing face. Use geometrically derived orientation - flip = meshFlipMap[faceI]; + flip = meshFlipMap[facei]; } else { @@ -3359,19 +3359,19 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify ( polyModifyFace ( - mesh_.faces()[faceI], // modified face - faceI, // label of face - faceOwner[faceI], // owner + mesh_.faces()[facei], // modified face + facei, // label of face + faceOwner[facei], // owner -1, // neighbour false, // face flip - patchI, // patch for face + patchi, // patch for face false, // remove from zone faceZoneI, // zone for face flip // face flip in zone ) ); } - faceI++; + facei++; } } @@ -3379,9 +3379,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify // Put the cells into the correct zone // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - forAll(cellToZone, cellI) + forAll(cellToZone, celli) { - label zoneI = cellToZone[cellI]; + label zoneI = cellToZone[celli]; if (zoneI >= 0) { @@ -3389,7 +3389,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify ( polyModifyCell ( - cellI, + celli, false, // removeFromZone zoneI ) diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C index 3f4880f03a5ae817149856fc5117a81395eda8b5..5b6b239ce8c99bce5de7cce9f3ee70e960f82b8e 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementMerge.C @@ -52,9 +52,9 @@ License // // forAll(patchIDs, i) // { -// label patchI = patchIDs[i]; +// label patchi = patchIDs[i]; // -// const polyPatch& patch = patches[patchI]; +// const polyPatch& patch = patches[patchi]; // // if (!patch.coupled()) // { @@ -122,10 +122,10 @@ License // { // label oldMasterI = mergeSets[setI][0]; // -// label faceI = map().reverseFaceMap()[oldMasterI]; +// label facei = map().reverseFaceMap()[oldMasterI]; // -// // faceI is always uncoupled boundary face -// const cell& cFaces = mesh_.cells()[mesh_.faceOwner()[faceI]]; +// // facei is always uncoupled boundary face +// const cell& cFaces = mesh_.cells()[mesh_.faceOwner()[facei]]; // // forAll(cFaces, i) // { @@ -169,15 +169,15 @@ License // { // const faceList& faces = mesh_.faces(); // -// forAll(faces, faceI) +// forAll(faces, facei) // { -// const face& f = faces[faceI]; +// const face& f = faces[facei]; // // forAll(f, fp) // { // if (pointCanBeDeleted[f[fp]]) // { -// retestOldFaces.insert(faceI); +// retestOldFaces.insert(facei); // break; // } // } @@ -218,18 +218,18 @@ License // // forAllConstIter(labelHashSet, retestOldFaces, iter) // { -// label faceI = map().reverseFaceMap()[iter.key()]; +// label facei = map().reverseFaceMap()[iter.key()]; // -// const cell& ownFaces = cells[mesh_.faceOwner()[faceI]]; +// const cell& ownFaces = cells[mesh_.faceOwner()[facei]]; // // forAll(ownFaces, i) // { // retestFaces.insert(ownFaces[i]); // } // -// if (mesh_.isInternalFace(faceI)) +// if (mesh_.isInternalFace(facei)) // { -// const cell& neiFaces = cells[mesh_.faceNeighbour()[faceI]]; +// const cell& neiFaces = cells[mesh_.faceNeighbour()[facei]]; // // forAll(neiFaces, i) // { @@ -264,9 +264,9 @@ Foam::label Foam::meshRefinement::mergePatchFacesUndo forAll(patchIDs, i) { - label patchI = patchIDs[i]; + label patchi = patchIDs[i]; - const polyPatch& patch = patches[patchI]; + const polyPatch& patch = patches[patchi]; if (!patch.coupled()) { @@ -661,10 +661,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::doRemovePoints labelHashSet retestFaces(pointRemover.savedFaceLabels().size()); forAll(pointRemover.savedFaceLabels(), i) { - label faceI = pointRemover.savedFaceLabels()[i]; - if (faceI >= 0) + label facei = pointRemover.savedFaceLabels()[i]; + if (facei >= 0) { - retestFaces.insert(faceI); + retestFaces.insert(facei); } } updateMesh(map, growFaceCellFace(retestFaces)); @@ -732,10 +732,10 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::doRestorePoints labelHashSet retestFaces(2*facesToRestore.size()); forAll(facesToRestore, i) { - label faceI = map().reverseFaceMap()[facesToRestore[i]]; - if (faceI >= 0) + label facei = map().reverseFaceMap()[facesToRestore[i]]; + if (facei >= 0) { - retestFaces.insert(faceI); + retestFaces.insert(facei); } } updateMesh(map, growFaceCellFace(retestFaces)); @@ -765,11 +765,11 @@ Foam::labelList Foam::meshRefinement::collectFaces forAll(candidateFaces, i) { - label faceI = candidateFaces[i]; + label facei = candidateFaces[i]; - if (set.found(faceI)) + if (set.found(facei)) { - selected[faceI] = true; + selected[facei] = true; } } syncTools::syncFaceList @@ -795,9 +795,9 @@ Foam::labelList Foam::meshRefinement::growFaceCellFace forAllConstIter(faceSet, set, iter) { - label faceI = iter.key(); + label facei = iter.key(); - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; const cell& ownFaces = mesh_.cells()[own]; forAll(ownFaces, ownFaceI) @@ -805,9 +805,9 @@ Foam::labelList Foam::meshRefinement::growFaceCellFace selected[ownFaces[ownFaceI]] = true; } - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nbr = mesh_.faceNeighbour()[faceI]; + label nbr = mesh_.faceNeighbour()[facei]; const cell& nbrFaces = mesh_.cells()[nbr]; forAll(nbrFaces, nbrFaceI) diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C index df8ec3d5547f650363f797da0d77c37b57e8c12e..df4654334a7be5dbf4ed227e19cb40ca2542c840 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementProblemCells.C @@ -47,22 +47,22 @@ License void Foam::meshRefinement::markBoundaryFace ( - const label faceI, + const label facei, boolList& isBoundaryFace, boolList& isBoundaryEdge, boolList& isBoundaryPoint ) const { - isBoundaryFace[faceI] = true; + isBoundaryFace[facei] = true; - const labelList& fEdges = mesh_.faceEdges(faceI); + const labelList& fEdges = mesh_.faceEdges(facei); forAll(fEdges, fp) { isBoundaryEdge[fEdges[fp]] = true; } - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; forAll(f, fp) { @@ -241,9 +241,9 @@ Foam::Map<Foam::label> Foam::meshRefinement::findEdgeConnectedProblemCells forAll(candidateFaces, i) { - label faceI = candidateFaces[i]; + label facei = candidateFaces[i]; - vector n = mesh_.faceAreas()[faceI]; + vector n = mesh_.faceAreas()[facei]; n /= mag(n); label region = surfaces_.globalRegion @@ -258,10 +258,10 @@ Foam::Map<Foam::label> Foam::meshRefinement::findEdgeConnectedProblemCells { if (mag(n & nearestNormal[i]) < Foam::sin(angle)) { - perpFaces.insert(faceI); + perpFaces.insert(facei); candidateCells.insert ( - mesh_.faceOwner()[faceI], + mesh_.faceOwner()[facei], globalToPatch[region] ); } @@ -289,14 +289,14 @@ bool Foam::meshRefinement::isCollapsedFace const pointField& neiCc, const scalar minFaceArea, const scalar maxNonOrtho, - const label faceI + const label facei ) const { // Severe nonorthogonality threshold const scalar severeNonorthogonalityThreshold = ::cos(degToRad(maxNonOrtho)); - vector s = mesh_.faces()[faceI].normal(points); + vector s = mesh_.faces()[facei].normal(points); scalar magS = mag(s); // Check face area @@ -306,11 +306,11 @@ bool Foam::meshRefinement::isCollapsedFace } // Check orthogonality - const point& ownCc = mesh_.cellCentres()[mesh_.faceOwner()[faceI]]; + const point& ownCc = mesh_.cellCentres()[mesh_.faceOwner()[facei]]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; vector d = mesh_.cellCentres()[nei] - ownCc; scalar dDotS = (d & s)/(mag(d)*magS + VSMALL); @@ -326,11 +326,11 @@ bool Foam::meshRefinement::isCollapsedFace } else { - label patchI = mesh_.boundaryMesh().whichPatch(faceI); + label patchi = mesh_.boundaryMesh().whichPatch(facei); - if (mesh_.boundaryMesh()[patchI].coupled()) + if (mesh_.boundaryMesh()[patchi].coupled()) { - vector d = neiCc[faceI-mesh_.nInternalFaces()] - ownCc; + vector d = neiCc[facei-mesh_.nInternalFaces()] - ownCc; scalar dDotS = (d & s)/(mag(d)*magS + VSMALL); @@ -358,12 +358,12 @@ bool Foam::meshRefinement::isCollapsedCell ( const pointField& points, const scalar volFraction, - const label cellI + const label celli ) const { - scalar vol = mesh_.cells()[cellI].mag(points, mesh_.faces()); + scalar vol = mesh_.cells()[celli].mag(points, mesh_.faces()); - if (vol/mesh_.cellVolumes()[cellI] < volFraction) + if (vol/mesh_.cellVolumes()[celli] < volFraction) { return true; } @@ -406,13 +406,13 @@ Foam::labelList Foam::meshRefinement::nearestPatch nFaces = 0; forAll(adaptPatchIDs, i) { - label patchI = adaptPatchIDs[i]; - const polyPatch& pp = patches[patchI]; + label patchi = adaptPatchIDs[i]; + const polyPatch& pp = patches[patchi]; forAll(pp, i) { patchFaces[nFaces] = pp.start()+i; - patchData[nFaces] = topoDistanceData(patchI, 0); + patchData[nFaces] = topoDistanceData(patchi, 0); nFaces++; } } @@ -431,15 +431,15 @@ Foam::labelList Foam::meshRefinement::nearestPatch // And extract bool haveWarned = false; - forAll(faceData, faceI) + forAll(faceData, facei) { - if (!faceData[faceI].valid(deltaCalc.data())) + if (!faceData[facei].valid(deltaCalc.data())) { if (!haveWarned) { WarningInFunction - << "Did not visit some faces, e.g. face " << faceI - << " at " << mesh_.faceCentres()[faceI] << endl + << "Did not visit some faces, e.g. face " << facei + << " at " << mesh_.faceCentres()[facei] << endl << "Assigning these cells to patch " << adaptPatchIDs[0] << endl; @@ -448,7 +448,7 @@ Foam::labelList Foam::meshRefinement::nearestPatch } else { - nearestAdaptPatch[faceI] = faceData[faceI].data(); + nearestAdaptPatch[facei] = faceData[facei].data(); } } } @@ -495,19 +495,19 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells { const polyPatch& pp = patches[adaptPatchIDs[i]]; - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, j) { markBoundaryFace ( - faceI, + facei, isBoundaryFace, isBoundaryEdge, isBoundaryPoint ); - faceI++; + facei++; } } @@ -557,17 +557,17 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (facePatch[faceI] == -1 && mesh_.isInternalFace(faceI)) + if (facePatch[facei] == -1 && mesh_.isInternalFace(facei)) { - facePatch[faceI] = nearestAdaptPatch[faceI]; + facePatch[facei] = nearestAdaptPatch[facei]; nBaffleFaces++; // Mark face as a 'boundary' markBoundaryFace ( - faceI, + facei, isBoundaryFace, isBoundaryEdge, isBoundaryPoint @@ -719,9 +719,9 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells DynamicList<label> dynFEdges; DynamicList<label> dynCPoints; - forAll(cellLevel, cellI) + forAll(cellLevel, celli) { - const labelList& cPoints = mesh_.cellPoints(cellI, dynCPoints); + const labelList& cPoints = mesh_.cellPoints(celli, dynCPoints); // Get number of anchor points (pointLevel <= cellLevel) @@ -733,7 +733,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells { label pointI = cPoints[i]; - if (pointLevel[pointI] <= cellLevel[cellI]) + if (pointLevel[pointI] <= cellLevel[celli]) { // Anchor point if (isBoundaryPoint[pointI]) @@ -754,7 +754,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells if (nBoundaryAnchors == 8) { - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; // Count boundary faces. label nBfaces = 0; @@ -777,16 +777,16 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells if ( checkCollapse - && !isCollapsedCell(newPoints, volFraction, cellI) + && !isCollapsedCell(newPoints, volFraction, celli) ) { nPrevented++; //Pout<< "Preventing baffling/removal of 8 anchor point" // << " cell " - // << cellI << " at " << mesh_.cellCentres()[cellI] + // << celli << " at " << mesh_.cellCentres()[celli] // << " since new volume " - // << mesh_.cells()[cellI].mag(newPoints, mesh_.faces()) - // << " old volume " << mesh_.cellVolumes()[cellI] + // << mesh_.cells()[celli].mag(newPoints, mesh_.faces()) + // << " old volume " << mesh_.cellVolumes()[celli] // << endl; } else @@ -794,21 +794,21 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells // Block all faces of cell forAll(cFaces, cf) { - label faceI = cFaces[cf]; + label facei = cFaces[cf]; if ( - facePatch[faceI] == -1 - && mesh_.isInternalFace(faceI) + facePatch[facei] == -1 + && mesh_.isInternalFace(facei) ) { - facePatch[faceI] = nearestAdaptPatch[faceI]; + facePatch[facei] = nearestAdaptPatch[facei]; nBaffleFaces++; // Mark face as a 'boundary' markBoundaryFace ( - faceI, + facei, isBoundaryFace, isBoundaryEdge, isBoundaryPoint @@ -821,7 +821,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells else if (nBoundaryAnchors == 7) { // Mark the cell. Store the (single!) non-boundary anchor point. - hasSevenBoundaryAnchorPoints.set(cellI, 1u); + hasSevenBoundaryAnchorPoints.set(celli, 1u); nonBoundaryAnchors.insert(nonBoundaryAnchor); } } @@ -855,47 +855,47 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells // Point in danger of being what? Remove all 7-cells. forAll(pCells, i) { - label cellI = pCells[i]; + label celli = pCells[i]; - if (hasSevenBoundaryAnchorPoints.get(cellI) == 1u) + if (hasSevenBoundaryAnchorPoints.get(celli) == 1u) { if ( checkCollapse - && !isCollapsedCell(newPoints, volFraction, cellI) + && !isCollapsedCell(newPoints, volFraction, celli) ) { nPrevented++; //Pout<< "Preventing baffling of 7 anchor cell " - // << cellI - // << " at " << mesh_.cellCentres()[cellI] + // << celli + // << " at " << mesh_.cellCentres()[celli] // << " since new volume " - // << mesh_.cells()[cellI].mag + // << mesh_.cells()[celli].mag // (newPoints, mesh_.faces()) - // << " old volume " << mesh_.cellVolumes()[cellI] + // << " old volume " << mesh_.cellVolumes()[celli] // << endl; } else { - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; forAll(cFaces, cf) { - label faceI = cFaces[cf]; + label facei = cFaces[cf]; if ( - facePatch[faceI] == -1 - && mesh_.isInternalFace(faceI) + facePatch[facei] == -1 + && mesh_.isInternalFace(facei) ) { - facePatch[faceI] = nearestAdaptPatch[faceI]; + facePatch[facei] = nearestAdaptPatch[facei]; nBaffleFaces++; // Mark face as a 'boundary' markBoundaryFace ( - faceI, + facei, isBoundaryFace, isBoundaryEdge, isBoundaryPoint @@ -937,11 +937,11 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells // Find faces with all edges on the boundary and make them baffles - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - if (facePatch[faceI] == -1) + if (facePatch[facei] == -1) { - const labelList& fEdges = mesh_.faceEdges(faceI, dynFEdges); + const labelList& fEdges = mesh_.faceEdges(facei, dynFEdges); label nFaceBoundaryEdges = 0; forAll(fEdges, fe) @@ -963,20 +963,20 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells neiCc, minArea, maxNonOrtho, - faceI + facei ) ) { nPrevented++; //Pout<< "Preventing baffling (to avoid collapse) of face " - // << faceI + // << facei // << " with all boundary edges " - // << " at " << mesh_.faceCentres()[faceI] + // << " at " << mesh_.faceCentres()[facei] // << endl; } else { - facePatch[faceI] = nearestAdaptPatch[faceI]; + facePatch[facei] = nearestAdaptPatch[facei]; nBaffleFaces++; // Do NOT update boundary data since this would grow blocked @@ -986,19 +986,19 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells } } - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - if (facePatch[faceI] == -1) + if (facePatch[facei] == -1) { - const labelList& fEdges = mesh_.faceEdges(faceI, dynFEdges); + const labelList& fEdges = mesh_.faceEdges(facei, dynFEdges); label nFaceBoundaryEdges = 0; forAll(fEdges, fe) @@ -1020,21 +1020,21 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells neiCc, minArea, maxNonOrtho, - faceI + facei ) ) { nPrevented++; //Pout<< "Preventing baffling of coupled face " - // << faceI + // << facei // << " with all boundary edges " - // << " at " << mesh_.faceCentres()[faceI] + // << " at " << mesh_.faceCentres()[facei] // << endl; } else { - facePatch[faceI] = nearestAdaptPatch[faceI]; - if (isMasterFace[faceI]) + facePatch[facei] = nearestAdaptPatch[facei]; + if (isMasterFace[facei]) { nBaffleFaces++; } @@ -1045,7 +1045,7 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells } } - faceI++; + facei++; } } } @@ -1297,15 +1297,15 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCellsGeometric forAllConstIter(faceSet, wrongFaces, iter) { - label patchI = mesh_.boundaryMesh().whichPatch(iter.key()); + label patchi = mesh_.boundaryMesh().whichPatch(iter.key()); - if (patchI == -1 || mesh_.boundaryMesh()[patchI].coupled()) + if (patchi == -1 || mesh_.boundaryMesh()[patchi].coupled()) { facePatch[iter.key()] = nearestAdaptPatch[iter.key()]; nBaffleFaces++; //Pout<< " " << iter.key() - // //<< " on patch " << mesh_.boundaryMesh()[patchI].name() + // //<< " on patch " << mesh_.boundaryMesh()[patchi].name() // << " is destined for patch " << facePatch[iter.key()] // << endl; } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C index 707e5ce42647ae09ecbb444693f74d6317e26712..968394d258ec8951871a19b776bf012592277f8c 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementRefine.C @@ -154,10 +154,10 @@ Foam::labelList Foam::meshRefinement::getChangedFaces // 1. Internal faces - for (label faceI = 0; faceI < nInternalFaces; faceI++) + for (label facei = 0; facei < nInternalFaces; facei++) { - label oldOwn = map.cellMap()[faceOwner[faceI]]; - label oldNei = map.cellMap()[faceNeighbour[faceI]]; + label oldOwn = map.cellMap()[faceOwner[facei]]; + label oldNei = map.cellMap()[faceNeighbour[facei]]; if ( @@ -171,7 +171,7 @@ Foam::labelList Foam::meshRefinement::getChangedFaces } else { - refinedInternalFace.set(faceI, 1u); + refinedInternalFace.set(facei, 1u); } } @@ -180,15 +180,15 @@ Foam::labelList Foam::meshRefinement::getChangedFaces boolList refinedBoundaryFace(mesh.nFaces()-nInternalFaces, false); - forAll(mesh.boundaryMesh(), patchI) + forAll(mesh.boundaryMesh(), patchi) { - const polyPatch& pp = mesh.boundaryMesh()[patchI]; + const polyPatch& pp = mesh.boundaryMesh()[patchi]; - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - label oldOwn = map.cellMap()[faceOwner[faceI]]; + label oldOwn = map.cellMap()[faceOwner[facei]]; if (oldOwn >= 0 && oldRefineCell.get(oldOwn) == 0u) { @@ -196,9 +196,9 @@ Foam::labelList Foam::meshRefinement::getChangedFaces } else { - refinedBoundaryFace[faceI-nInternalFaces] = true; + refinedBoundaryFace[facei-nInternalFaces] = true; } - faceI++; + facei++; } } @@ -216,16 +216,16 @@ Foam::labelList Foam::meshRefinement::getChangedFaces // - refinedBoundaryFace boolList changedFace(mesh.nFaces(), false); - forAll(refinedInternalFace, faceI) + forAll(refinedInternalFace, facei) { - if (refinedInternalFace.get(faceI) == 1u) + if (refinedInternalFace.get(facei) == 1u) { - const cell& ownFaces = cells[faceOwner[faceI]]; + const cell& ownFaces = cells[faceOwner[facei]]; forAll(ownFaces, ownI) { changedFace[ownFaces[ownI]] = true; } - const cell& neiFaces = cells[faceNeighbour[faceI]]; + const cell& neiFaces = cells[faceNeighbour[facei]]; forAll(neiFaces, neiI) { changedFace[neiFaces[neiI]] = true; @@ -261,9 +261,9 @@ Foam::labelList Foam::meshRefinement::getChangedFaces // Count changed master faces. nMasterChanged = 0; - forAll(changedFace, faceI) + forAll(changedFace, facei) { - if (changedFace[faceI] && isMasterFace[faceI]) + if (changedFace[facei] && isMasterFace[facei]) { nMasterChanged++; } @@ -350,7 +350,7 @@ void Foam::meshRefinement::markFeatureCellLevel { const point& keepPoint = keepPoints[i]; - label cellI = -1; + label celli = -1; label tetFaceI = -1; label tetPtI = -1; @@ -360,10 +360,10 @@ 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) + if (celli != -1) { // I am the processor that holds the keepPoint @@ -404,7 +404,7 @@ void Foam::meshRefinement::markFeatureCellLevel ( mesh_, keepPoint, - cellI, + celli, tetFaceI, tetPtI, featureMesh.points()[pointI], // endpos @@ -449,7 +449,7 @@ void Foam::meshRefinement::markFeatureCellLevel ( mesh_, keepPoint, - cellI, + celli, tetFaceI, tetPtI, featureMesh.points()[pointI], // endpos @@ -637,13 +637,13 @@ void Foam::meshRefinement::markFeatureCellLevel //if (debug&meshRefinement::FEATURESEEDS) //{ - // forAll(maxFeatureLevel, cellI) + // forAll(maxFeatureLevel, celli) // { - // if (maxFeatureLevel[cellI] != -1) + // if (maxFeatureLevel[celli] != -1) // { - // Pout<< "Feature went through cell:" << cellI - // << " coord:" << mesh_.cellCentres()[cellI] - // << " leve:" << maxFeatureLevel[cellI] + // Pout<< "Feature went through cell:" << celli + // << " coord:" << mesh_.cellCentres()[celli] + // << " leve:" << maxFeatureLevel[celli] // << endl; // } // } @@ -672,9 +672,9 @@ Foam::label Foam::meshRefinement::markFeatureRefinement label oldNRefine = nRefine; - forAll(maxFeatureLevel, cellI) + forAll(maxFeatureLevel, celli) { - if (maxFeatureLevel[cellI] > cellLevel[cellI]) + if (maxFeatureLevel[celli] > cellLevel[celli]) { // Mark if @@ -683,7 +683,7 @@ Foam::label Foam::meshRefinement::markFeatureRefinement ( 0, // surface (n/a) nAllowRefine, - refineCell[cellI], + refineCell[celli], nRefine ) ) @@ -732,12 +732,12 @@ Foam::label Foam::meshRefinement::markInternalDistanceToFeatureRefinement labelList testLevels(cellLevel.size()-nRefine); label testI = 0; - forAll(cellLevel, cellI) + forAll(cellLevel, celli) { - if (refineCell[cellI] == -1) + if (refineCell[celli] == -1) { - testCc[testI] = cellCentres[cellI]; - testLevels[testI] = cellLevel[cellI]; + testCc[testI] = cellCentres[celli]; + testLevels[testI] = cellLevel[celli]; testI++; } } @@ -749,9 +749,9 @@ Foam::label Foam::meshRefinement::markInternalDistanceToFeatureRefinement // Mark for refinement. Note that we didn't store the original cellID so // now just reloop in same order. testI = 0; - forAll(cellLevel, cellI) + forAll(cellLevel, celli) { - if (refineCell[cellI] == -1) + if (refineCell[celli] == -1) { if (maxLevel[testI] > testLevels[testI]) { @@ -759,7 +759,7 @@ Foam::label Foam::meshRefinement::markInternalDistanceToFeatureRefinement ( maxLevel[testI], // mark with any positive value nAllowRefine, - refineCell[cellI], + refineCell[celli], nRefine ); @@ -810,12 +810,12 @@ Foam::label Foam::meshRefinement::markInternalRefinement labelList testLevels(cellLevel.size()-nRefine); label testI = 0; - forAll(cellLevel, cellI) + forAll(cellLevel, celli) { - if (refineCell[cellI] == -1) + if (refineCell[celli] == -1) { - testCc[testI] = cellCentres[cellI]; - testLevels[testI] = cellLevel[cellI]; + testCc[testI] = cellCentres[celli]; + testLevels[testI] = cellLevel[celli]; testI++; } } @@ -827,9 +827,9 @@ Foam::label Foam::meshRefinement::markInternalRefinement // Mark for refinement. Note that we didn't store the original cellID so // now just reloop in same order. testI = 0; - forAll(cellLevel, cellI) + forAll(cellLevel, celli) { - if (refineCell[cellI] == -1) + if (refineCell[celli] == -1) { if (maxLevel[testI] > testLevels[testI]) { @@ -837,7 +837,7 @@ Foam::label Foam::meshRefinement::markInternalRefinement ( maxLevel[testI], // mark with any positive value nAllowRefine, - refineCell[cellI], + refineCell[celli], nRefine ); @@ -880,26 +880,26 @@ Foam::labelList Foam::meshRefinement::getRefineCandidateFaces label nTest = 0; - forAll(surfaceIndex_, faceI) + forAll(surfaceIndex_, facei) { - if (surfaceIndex_[faceI] != -1) + if (surfaceIndex_[facei] != -1) { - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; if (refineCell[own] == -1 || refineCell[nei] == -1) { - testFaces[nTest++] = faceI; + testFaces[nTest++] = facei; } } else { if (refineCell[own] == -1) { - testFaces[nTest++] = faceI; + testFaces[nTest++] = facei; } } } @@ -943,13 +943,13 @@ Foam::label Foam::meshRefinement::markSurfaceRefinement forAll(testFaces, i) { - label faceI = testFaces[i]; + label facei = testFaces[i]; - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; start[i] = cellCentres[own]; end[i] = cellCentres[nei]; @@ -957,7 +957,7 @@ Foam::label Foam::meshRefinement::markSurfaceRefinement } else { - label bFaceI = faceI - mesh_.nInternalFaces(); + label bFaceI = facei - mesh_.nInternalFaces(); start[i] = cellCentres[own]; end[i] = neiCc[bFaceI]; @@ -994,7 +994,7 @@ Foam::label Foam::meshRefinement::markSurfaceRefinement forAll(testFaces, i) { - label faceI = testFaces[i]; + label facei = testFaces[i]; label surfI = surfaceHit[i]; @@ -1006,7 +1006,7 @@ Foam::label Foam::meshRefinement::markSurfaceRefinement // do the check with the surfaceMinLevel whilst intersecting the // surfaces? - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; if (surfaceMinLevel[i] > cellLevel[own]) { @@ -1026,9 +1026,9 @@ Foam::label Foam::meshRefinement::markSurfaceRefinement } } - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; if (surfaceMinLevel[i] > cellLevel[nei]) { // Neighbour needs refining @@ -1131,13 +1131,13 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement forAll(testFaces, i) { - label faceI = testFaces[i]; + label facei = testFaces[i]; - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; start[i] = cellCentres[own]; end[i] = cellCentres[nei]; @@ -1145,12 +1145,12 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement } else { - label bFaceI = faceI - mesh_.nInternalFaces(); + label bFaceI = facei - mesh_.nInternalFaces(); start[i] = cellCentres[own]; end[i] = neiCc[bFaceI]; - if (!isMasterFace[faceI]) + if (!isMasterFace[facei]) { Swap(start[i], end[i]); } @@ -1215,8 +1215,8 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement // Convert face-wise data to cell. forAll(testFaces, i) { - label faceI = testFaces[i]; - label own = mesh_.faceOwner()[faceI]; + label facei = testFaces[i]; + label own = mesh_.faceOwner()[facei]; const vectorList& fNormals = surfaceNormal[i]; const labelList& fLevels = surfaceLevel[i]; @@ -1229,9 +1229,9 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement cellSurfNormals[own].append(fNormals[hitI]); } - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; if (fLevels[hitI] > cellLevel[nei]) { cellSurfLevels[nei].append(fLevels[hitI]); @@ -1249,9 +1249,9 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement { label nSet = 0; label nNormals = 9; - forAll(cellSurfNormals, cellI) + forAll(cellSurfNormals, celli) { - const vectorList& normals = cellSurfNormals[cellI]; + const vectorList& normals = cellSurfNormals[celli]; if (normals.size()) { nSet++; @@ -1277,13 +1277,13 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement for ( - label cellI = 0; - !reachedLimit && cellI < cellSurfNormals.size(); - cellI++ + label celli = 0; + !reachedLimit && celli < cellSurfNormals.size(); + celli++ ) { - const vectorList& normals = cellSurfNormals[cellI]; - const labelList& levels = cellSurfLevels[cellI]; + const vectorList& normals = cellSurfNormals[celli]; + const labelList& levels = cellSurfLevels[celli]; // n^2 comparison of all normals in a cell for (label i = 0; !reachedLimit && i < normals.size(); i++) @@ -1294,7 +1294,7 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement { label maxLevel = max(levels[i], levels[j]); - if (cellLevel[cellI] < maxLevel) + if (cellLevel[celli] < maxLevel) { if ( @@ -1302,7 +1302,7 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement ( maxLevel, nAllowRefine, - refineCell[cellI], + refineCell[celli], nRefine ) ) @@ -1332,13 +1332,13 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement // Internal faces for ( - label faceI = 0; - !reachedLimit && faceI < mesh_.nInternalFaces(); - faceI++ + label facei = 0; + !reachedLimit && facei < mesh_.nInternalFaces(); + facei++ ) { - label own = mesh_.faceOwner()[faceI]; - label nei = mesh_.faceNeighbour()[faceI]; + label own = mesh_.faceOwner()[facei]; + label nei = mesh_.faceNeighbour()[facei]; const vectorList& ownNormals = cellSurfNormals[own]; const labelList& ownLevels = cellSurfLevels[own]; @@ -1430,13 +1430,13 @@ Foam::label Foam::meshRefinement::markSurfaceCurvatureRefinement // Boundary faces for ( - label faceI = mesh_.nInternalFaces(); - !reachedLimit && faceI < mesh_.nFaces(); - faceI++ + label facei = mesh_.nInternalFaces(); + !reachedLimit && facei < mesh_.nFaces(); + facei++ ) { - label own = mesh_.faceOwner()[faceI]; - label bFaceI = faceI - mesh_.nInternalFaces(); + label own = mesh_.faceOwner()[facei]; + label bFaceI = facei - mesh_.nInternalFaces(); const vectorList& ownNormals = cellSurfNormals[own]; const labelList& ownLevels = cellSurfLevels[own]; @@ -1632,7 +1632,7 @@ bool Foam::meshRefinement::checkProximity const vector& surfaceLocation, // current intersection location const vector& surfaceNormal, // current intersection normal - const label cellI, + const label celli, label& cellMaxLevel, // cached max surface level for this cell vector& cellMaxLocation, // cached surface normal for this cell @@ -1645,7 +1645,7 @@ bool Foam::meshRefinement::checkProximity const labelList& cellLevel = meshCutter_.cellLevel(); // Test if surface applicable - if (surfaceLevel > cellLevel[cellI]) + if (surfaceLevel > cellLevel[celli]) { if (cellMaxLevel == -1) { @@ -1694,7 +1694,7 @@ bool Foam::meshRefinement::checkProximity ( surfaceLevel, // mark with any non-neg number. nAllowRefine, - refineCell[cellI], + refineCell[celli], nRefine ); } @@ -1740,13 +1740,13 @@ Foam::label Foam::meshRefinement::markProximityRefinement forAll(testFaces, i) { - label faceI = testFaces[i]; + label facei = testFaces[i]; - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; start[i] = cellCentres[own]; end[i] = cellCentres[nei]; @@ -1754,7 +1754,7 @@ Foam::label Foam::meshRefinement::markProximityRefinement } else { - label bFaceI = faceI - mesh_.nInternalFaces(); + label bFaceI = facei - mesh_.nInternalFaces(); start[i] = cellCentres[own]; end[i] = neiCc[bFaceI]; @@ -1821,8 +1821,8 @@ Foam::label Foam::meshRefinement::markProximityRefinement forAll(testFaces, i) { - label faceI = testFaces[i]; - label own = mesh_.faceOwner()[faceI]; + label facei = testFaces[i]; + label own = mesh_.faceOwner()[facei]; const labelList& fLevels = surfaceLevel[i]; const vectorList& fPoints = surfaceLocation[i]; @@ -1849,9 +1849,9 @@ Foam::label Foam::meshRefinement::markProximityRefinement ); } - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; forAll(fLevels, hitI) { @@ -1884,10 +1884,10 @@ Foam::label Foam::meshRefinement::markProximityRefinement pointField neiBndMaxLocation(mesh_.nFaces()-mesh_.nInternalFaces()); vectorField neiBndMaxNormal(mesh_.nFaces()-mesh_.nInternalFaces()); - for (label faceI = mesh_.nInternalFaces(); faceI < mesh_.nFaces(); faceI++) + for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++) { - label bFaceI = faceI-mesh_.nInternalFaces(); - label own = mesh_.faceOwner()[faceI]; + label bFaceI = facei-mesh_.nInternalFaces(); + label own = mesh_.faceOwner()[facei]; neiBndMaxLevel[bFaceI] = cellMaxLevel[own]; neiBndMaxLocation[bFaceI] = cellMaxLocation[own]; @@ -1900,10 +1900,10 @@ Foam::label Foam::meshRefinement::markProximityRefinement // Loop over all faces. Could only be checkFaces.. except if they're coupled // Internal faces - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label own = mesh_.faceOwner()[faceI]; - label nei = mesh_.faceNeighbour()[faceI]; + label own = mesh_.faceOwner()[facei]; + label nei = mesh_.faceNeighbour()[facei]; if (cellMaxLevel[own] != -1 && cellMaxLevel[nei] != -1) { @@ -1970,10 +1970,10 @@ Foam::label Foam::meshRefinement::markProximityRefinement } } // Boundary faces - for (label faceI = mesh_.nInternalFaces(); faceI < mesh_.nFaces(); faceI++) + for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++) { - label own = mesh_.faceOwner()[faceI]; - label bFaceI = faceI - mesh_.nInternalFaces(); + label own = mesh_.faceOwner()[facei]; + label bFaceI = facei - mesh_.nInternalFaces(); if (cellLevel[own] < cellMaxLevel[own] && neiBndMaxLevel[bFaceI] != -1) { @@ -2223,11 +2223,11 @@ Foam::labelList Foam::meshRefinement::refineCandidates cellsToRefine.setSize(nRefine); nRefine = 0; - forAll(refineCell, cellI) + forAll(refineCell, celli) { - if (refineCell[cellI] != -1) + if (refineCell[celli] != -1) { - cellsToRefine[nRefine++] = cellI; + cellsToRefine[nRefine++] = celli; } } } diff --git a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C index f4a9adbc713090c6bfa66daf612d03aef9cd429f..dc6232a5501d07dfa569b272bd8b054f5d18fa6b 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C +++ b/src/mesh/snappyHexMesh/meshRefinement/meshRefinementTemplates.C @@ -119,9 +119,9 @@ void Foam::meshRefinement::testSyncBoundaryFaceList const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; label bFaceI = pp.start() - mesh_.nInternalFaces(); @@ -132,13 +132,13 @@ void Foam::meshRefinement::testSyncBoundaryFaceList if (mag(data - syncData) > tol) { - label faceI = pp.start()+i; + label facei = pp.start()+i; FatalErrorInFunction << msg << "patchFace:" << i - << " face:" << faceI - << " fc:" << mesh_.faceCentres()[faceI] + << " face:" << facei + << " fc:" << mesh_.faceCentres()[facei] << " patch:" << pp.name() << " faceData:" << data << " syncedFaceData:" << syncData diff --git a/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientation.H b/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientation.H index e86eae1c03fc001e9d1dca76ef1ae82b987befef..b43951d8086f1ecfc6bd410a7ad2a58a846e2461 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientation.H +++ b/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientation.H @@ -103,7 +103,7 @@ public: const polyMesh& mesh, const indirectPrimitivePatch& patch, const label edgeI, - const label faceI, + const label facei, const patchFaceOrientation& faceInfo, const scalar tol, TrackingData& td @@ -127,7 +127,7 @@ public: ( const polyMesh& mesh, const indirectPrimitivePatch& patch, - const label faceI, + const label facei, const label edgeI, const patchFaceOrientation& edgeInfo, const scalar tol, diff --git a/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientationI.H b/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientationI.H index f8a4429a4964085475917c4e221ba3b74161729b..8a98d2ae3f0bfb81afd76ac595b822179a5a7060 100644 --- a/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientationI.H +++ b/src/mesh/snappyHexMesh/meshRefinement/patchFaceOrientationI.H @@ -90,7 +90,7 @@ inline bool Foam::patchFaceOrientation::updateEdge const polyMesh& mesh, const indirectPrimitivePatch& patch, const label edgeI, - const label faceI, + const label facei, const patchFaceOrientation& faceInfo, const scalar tol, TrackingData& td @@ -101,7 +101,7 @@ inline bool Foam::patchFaceOrientation::updateEdge return false; } - const face& f = patch.localFaces()[faceI]; + const face& f = patch.localFaces()[facei]; const edge& e = patch.edges()[edgeI]; //Pout<< "Updating edge:" << edgeI << " verts:" << e << nl @@ -156,7 +156,7 @@ inline bool Foam::patchFaceOrientation::updateFace ( const polyMesh& mesh, const indirectPrimitivePatch& patch, - const label faceI, + const label facei, const label edgeI, const patchFaceOrientation& edgeInfo, const scalar tol, @@ -169,11 +169,11 @@ inline bool Foam::patchFaceOrientation::updateFace } // Transfer flip to face - const face& f = patch.localFaces()[faceI]; + const face& f = patch.localFaces()[facei]; const edge& e = patch.edges()[edgeI]; - //Pout<< "Updating face:" << faceI << nl + //Pout<< "Updating face:" << facei << nl // << " verts:" << f << nl // << " with edge:" << edgeI << nl // << " start:" << patch.localPoints()[e[0]] << nl diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C index d2b12b8780c3161ad68ff200b671c3dc50b1f2a6..d400072afcaf7e45ed786ad83b969e0185c0cc8a 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/layerParameters/layerParameters.C @@ -272,11 +272,11 @@ Foam::layerParameters::layerParameters { const dictionary& layerDict = iter().dict(); - forAllConstIter(labelHashSet, patchIDs, patchIter) + forAllConstIter(labelHashSet, patchIDs, patchiter) { - label patchI = patchIter.key(); + label patchi = patchiter.key(); - numLayers_[patchI] = + numLayers_[patchi] = readLabel(layerDict.lookup("nSurfaceLayers")); switch (layerSpec_) @@ -285,12 +285,12 @@ Foam::layerParameters::layerParameters layerDict.readIfPresent ( "firstLayerThickness", - firstLayerThickness_[patchI] + firstLayerThickness_[patchi] ); layerDict.readIfPresent ( "thickness", - thickness_[patchI] + thickness_[patchi] ); break; @@ -298,12 +298,12 @@ Foam::layerParameters::layerParameters layerDict.readIfPresent ( "firstLayerThickness", - firstLayerThickness_[patchI] + firstLayerThickness_[patchi] ); layerDict.readIfPresent ( "expansionRatio", - expansionRatio_[patchI] + expansionRatio_[patchi] ); break; @@ -311,12 +311,12 @@ Foam::layerParameters::layerParameters layerDict.readIfPresent ( "finalLayerThickness", - finalLayerThickness_[patchI] + finalLayerThickness_[patchi] ); layerDict.readIfPresent ( "thickness", - thickness_[patchI] + thickness_[patchi] ); break; @@ -324,12 +324,12 @@ Foam::layerParameters::layerParameters layerDict.readIfPresent ( "finalLayerThickness", - finalLayerThickness_[patchI] + finalLayerThickness_[patchi] ); layerDict.readIfPresent ( "expansionRatio", - expansionRatio_[patchI] + expansionRatio_[patchi] ); break; @@ -337,12 +337,12 @@ Foam::layerParameters::layerParameters layerDict.readIfPresent ( "thickness", - thickness_[patchI] + thickness_[patchi] ); layerDict.readIfPresent ( "expansionRatio", - expansionRatio_[patchI] + expansionRatio_[patchi] ); break; @@ -357,7 +357,7 @@ Foam::layerParameters::layerParameters layerDict.readIfPresent ( "minThickness", - minThickness_[patchI] + minThickness_[patchi] ); } } diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C index 2e07edce69e19ff90ec34cd279e5aeae24dd08fd..0c239dcf977b81e58999c8c49e0b0b8404518a10 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.C @@ -114,16 +114,16 @@ Foam::tmp<Foam::scalarField> Foam::snappyLayerDriver::avgPointData tmp<scalarField> tfaceFld(new scalarField(pp.size(), 0.0)); scalarField& faceFld = tfaceFld.ref(); - forAll(pp.localFaces(), faceI) + forAll(pp.localFaces(), facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; if (f.size()) { forAll(f, fp) { - faceFld[faceI] += pointFld[f[fp]]; + faceFld[facei] += pointFld[f[fp]]; } - faceFld[faceI] /= f.size(); + faceFld[facei] /= f.size(); } } return tfaceFld; @@ -168,9 +168,9 @@ void Foam::snappyLayerDriver::checkMeshManifold() const // Get all outside faces labelList outsideFaces(mesh.nFaces() - mesh.nInternalFaces()); - for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++) + for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++) { - outsideFaces[faceI - mesh.nInternalFaces()] = faceI; + outsideFaces[facei - mesh.nInternalFaces()] = facei; } pointSet nonManifoldPoints @@ -529,13 +529,13 @@ void Foam::snappyLayerDriver::handleWarpedFaces if (f.size() > 3) { - label faceI = pp.addressing()[i]; + label facei = pp.addressing()[i]; - label ownLevel = cellLevel[mesh.faceOwner()[faceI]]; + label ownLevel = cellLevel[mesh.faceOwner()[facei]]; scalar edgeLen = edge0Len/(1<<ownLevel); // Normal distance to face centre plane - const point& fc = mesh.faceCentres()[faceI]; + const point& fc = mesh.faceCentres()[facei]; const vector& fn = pp.faceNormals()[i]; scalarField vProj(f.size()); @@ -604,13 +604,13 @@ void Foam::snappyLayerDriver::handleWarpedFaces // // forAll(pFaces, i) // { -// label cellI = mesh.faceOwner()[pp.addressing()[pFaces[i]]]; +// label celli = mesh.faceOwner()[pp.addressing()[pFaces[i]]]; // -// if (!pointCells.insert(cellI)) +// if (!pointCells.insert(celli)) // { // // Second or more occurrence of cell so cell has two or more // // pp faces connected to this point. -// multiPatchCells.insert(cellI); +// multiPatchCells.insert(celli); // } // } // } @@ -648,10 +648,10 @@ void Foam::snappyLayerDriver::handleWarpedFaces // // forAll(pFaces, i) // { -// label cellI = +// label celli = // mesh.faceOwner()[pp.addressing()[pFaces[i]]]; // -// if (multiPatchCells.found(cellI)) +// if (multiPatchCells.found(celli)) // { // if // ( @@ -702,11 +702,11 @@ void Foam::snappyLayerDriver::setNumLayers forAll(patchIDs, i) { - label patchI = patchIDs[i]; + label patchi = patchIDs[i]; - const labelList& meshPoints = mesh.boundaryMesh()[patchI].meshPoints(); + const labelList& meshPoints = mesh.boundaryMesh()[patchi].meshPoints(); - label wantedLayers = patchToNLayers[patchI]; + label wantedLayers = patchToNLayers[patchi]; forAll(meshPoints, patchPointI) { @@ -777,9 +777,9 @@ void Foam::snappyLayerDriver::setNumLayers // Calculate number of cells to create nAddedCells = 0; - forAll(pp.localFaces(), faceI) + forAll(pp.localFaces(), facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; // Get max of extrusion per point label nCells = 0; @@ -818,35 +818,35 @@ Foam::snappyLayerDriver::makeLayerDisplacementField slipPointPatchVectorField::typeName ); wordList actualPatchTypes(patchFieldTypes.size()); - forAll(pointPatches, patchI) + forAll(pointPatches, patchi) { - actualPatchTypes[patchI] = pointPatches[patchI].type(); + actualPatchTypes[patchi] = pointPatches[patchi].type(); } - forAll(numLayers, patchI) + forAll(numLayers, patchi) { // 0 layers: do not allow slip so fixedValue 0 // >0 layers: fixedValue which gets adapted - if (numLayers[patchI] == 0) + if (numLayers[patchi] == 0) { - patchFieldTypes[patchI] = + patchFieldTypes[patchi] = zeroFixedValuePointPatchVectorField::typeName; } - else if (numLayers[patchI] > 0) + else if (numLayers[patchi] > 0) { - patchFieldTypes[patchI] = fixedValuePointPatchVectorField::typeName; + patchFieldTypes[patchi] = fixedValuePointPatchVectorField::typeName; } } - forAll(pointPatches, patchI) + forAll(pointPatches, patchi) { - if (isA<processorPointPatch>(pointPatches[patchI])) + if (isA<processorPointPatch>(pointPatches[patchi])) { - patchFieldTypes[patchI] = calculatedPointPatchVectorField::typeName; + patchFieldTypes[patchi] = calculatedPointPatchVectorField::typeName; } - else if (isA<cyclicPointPatch>(pointPatches[patchI])) + else if (isA<cyclicPointPatch>(pointPatches[patchi])) { - patchFieldTypes[patchI] = cyclicSlipPointPatchVectorField::typeName; + patchFieldTypes[patchi] = cyclicSlipPointPatchVectorField::typeName; } } @@ -893,9 +893,9 @@ void Foam::snappyLayerDriver::growNoExtrusion label nGrown = 0; - forAll(localFaces, faceI) + forAll(localFaces, facei) { - const face& f = localFaces[faceI]; + const face& f = localFaces[facei]; bool hasSqueeze = false; forAll(f, fp) @@ -1015,9 +1015,9 @@ void Foam::snappyLayerDriver::determineSidePatches // so prepare to renumber sidePatchID Map<label> wantedToAddedPatch; - for (label patchI = nOldPatches; patchI < nPatches; patchI++) + for (label patchi = nOldPatches; patchi < nPatches; patchi++) { - label nbrProcI = patchToNbrProc[patchI]; + label nbrProcI = patchToNbrProc[patchi]; word name ( processorPolyPatch::newName(Pstream::myProcNo(), nbrProcI) @@ -1037,14 +1037,14 @@ void Foam::snappyLayerDriver::determineSidePatches name, patchDict ); - wantedToAddedPatch.insert(patchI, procPatchI); + wantedToAddedPatch.insert(patchi, procPatchI); } // Renumber sidePatchID forAll(sidePatchID, i) { - label patchI = sidePatchID[i]; - Map<label>::const_iterator fnd = wantedToAddedPatch.find(patchI); + label patchi = sidePatchID[i]; + Map<label>::const_iterator fnd = wantedToAddedPatch.find(patchi); if (fnd != wantedToAddedPatch.end()) { sidePatchID[i] = fnd(); @@ -1089,9 +1089,9 @@ void Foam::snappyLayerDriver::calculateLayerThickness forAll(patchIDs, i) { - label patchI = patchIDs[i]; + label patchi = patchIDs[i]; - const labelList& meshPoints = patches[patchI].meshPoints(); + const labelList& meshPoints = patches[patchi].meshPoints(); forAll(meshPoints, patchPointI) { @@ -1100,27 +1100,27 @@ void Foam::snappyLayerDriver::calculateLayerThickness firstLayerThickness[ppPointI] = min ( firstLayerThickness[ppPointI], - layerParams.firstLayerThickness()[patchI] + layerParams.firstLayerThickness()[patchi] ); finalLayerThickness[ppPointI] = min ( finalLayerThickness[ppPointI], - layerParams.finalLayerThickness()[patchI] + layerParams.finalLayerThickness()[patchi] ); totalThickness[ppPointI] = min ( totalThickness[ppPointI], - layerParams.thickness()[patchI] + layerParams.thickness()[patchi] ); expRatio[ppPointI] = min ( expRatio[ppPointI], - layerParams.expansionRatio()[patchI] + layerParams.expansionRatio()[patchi] ); minThickness[ppPointI] = min ( minThickness[ppPointI], - layerParams.minThickness()[patchI] + layerParams.minThickness()[patchi] ); } } @@ -1268,8 +1268,8 @@ void Foam::snappyLayerDriver::calculateLayerThickness label maxPatchNameLen = 0; forAll(patchIDs, i) { - label patchI = patchIDs[i]; - word patchName = patches[patchI].name(); + label patchi = patchIDs[i]; + word patchName = patches[patchi].name(); maxPatchNameLen = max(maxPatchNameLen, label(patchName.size())); } @@ -1286,9 +1286,9 @@ void Foam::snappyLayerDriver::calculateLayerThickness forAll(patchIDs, i) { - label patchI = patchIDs[i]; + label patchi = patchIDs[i]; - const labelList& meshPoints = patches[patchI].meshPoints(); + const labelList& meshPoints = patches[patchi].meshPoints(); scalar sumThickness = 0; scalar sumNearWallThickness = 0; @@ -1331,10 +1331,10 @@ void Foam::snappyLayerDriver::calculateLayerThickness } Info<< setf(ios_base::left) << setw(maxPatchNameLen) - << patches[patchI].name() << setprecision(3) + << patches[patchi].name() << setprecision(3) << " " << setw(8) - << returnReduce(patches[patchI].size(), sumOp<scalar>()) - << " " << setw(6) << layerParams.numLayers()[patchI] + << returnReduce(patches[patchi].size(), sumOp<scalar>()) + << " " << setw(6) << layerParams.numLayers()[patchi] << " " << setw(8) << avgNearWallThickness << " " << setw(8) << avgThickness << endl; @@ -1636,14 +1636,14 @@ void Foam::snappyLayerDriver::getVertexString ( const indirectPrimitivePatch& pp, const labelListList& globalEdgeFaces, - const label faceI, + const label facei, const label edgeI, const label myGlobFaceI, const label nbrGlobFaceI, DynamicList<label>& vertices ) const { - const labelList& fEdges = pp.faceEdges()[faceI]; + const labelList& fEdges = pp.faceEdges()[facei]; label fp = findIndex(fEdges, edgeI); if (fp == -1) @@ -1694,7 +1694,7 @@ void Foam::snappyLayerDriver::getVertexString endFp = nextFp; } - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; vertices.clear(); fp = startFp; while (fp != endFp) @@ -1731,17 +1731,17 @@ Foam::label Foam::snappyLayerDriver::truncateDisplacement forAllConstIter(faceSet, illegalPatchFaces, iter) { - label faceI = iter.key(); + label facei = iter.key(); - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { FatalErrorInFunction << "Faceset " << illegalPatchFaces.name() - << " contains internal face " << faceI << nl + << " contains internal face " << facei << nl << "It should only contain patch faces" << abort(FatalError); } - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, fp) @@ -2144,12 +2144,12 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation { forAll(pointFaces[patchPointI], pointFaceI) { - label faceI = pointFaces[patchPointI][pointFaceI]; + label facei = pointFaces[patchPointI][pointFaceI]; if ( - nPatchFaceLayers[faceI] != -1 - && maxLevel[faceI] > 0 + nPatchFaceLayers[facei] != -1 + && maxLevel[facei] > 0 ) { foundNeighbour[patchPointI] = true; @@ -2173,15 +2173,15 @@ void Foam::snappyLayerDriver::setupLayerInfoTruncation { forAll(pointFaces[patchPointI], pointFaceI) { - label faceI = pointFaces[patchPointI][pointFaceI]; + label facei = pointFaces[patchPointI][pointFaceI]; if ( - nPatchFaceLayers[faceI] == -1 - && maxLevel[faceI] > 0 - && ilevel < maxLevel[faceI] + nPatchFaceLayers[facei] == -1 + && maxLevel[facei] > 0 + && ilevel < maxLevel[facei] ) { - tempCounter[faceI] = ilevel; + tempCounter[facei] = ilevel; } } } @@ -2492,8 +2492,8 @@ void Foam::snappyLayerDriver::printLayerData label maxPatchNameLen = 0; forAll(patchIDs, i) { - label patchI = patchIDs[i]; - word patchName = pbm[patchI].name(); + label patchi = patchIDs[i]; + word patchName = pbm[patchi].name(); maxPatchNameLen = max(maxPatchNameLen, label(patchName.size())); } @@ -2508,8 +2508,8 @@ void Foam::snappyLayerDriver::printLayerData forAll(patchIDs, i) { - label patchI = patchIDs[i]; - const polyPatch& pp = pbm[patchI]; + label patchi = patchIDs[i]; + const polyPatch& pp = pbm[patchi]; label sumSize = pp.size(); @@ -2522,11 +2522,11 @@ void Foam::snappyLayerDriver::printLayerData } // Thickness - scalarField::subField patchWanted = pbm[patchI].patchSlice + scalarField::subField patchWanted = pbm[patchi].patchSlice ( faceWantedThickness ); - scalarField::subField patchReal = pbm[patchI].patchSlice + scalarField::subField patchReal = pbm[patchi].patchSlice ( faceRealThickness ); @@ -2559,7 +2559,7 @@ void Foam::snappyLayerDriver::printLayerData } Info<< setf(ios_base::left) << setw(maxPatchNameLen) - << pbm[patchI].name() << setprecision(3) + << pbm[patchi].name() << setprecision(3) << " " << setw(8) << sumSize << " " << setw(8) << avgLayers << " " << setw(8) << avgReal @@ -2585,19 +2585,19 @@ bool Foam::snappyLayerDriver::writeLayerData { { label nAdded = 0; - forAll(cellNLayers, cellI) + forAll(cellNLayers, celli) { - if (cellNLayers[cellI] > 0) + if (cellNLayers[celli] > 0) { nAdded++; } } cellSet addedCellSet(mesh, "addedCells", nAdded); - forAll(cellNLayers, cellI) + forAll(cellNLayers, celli) { - if (cellNLayers[cellI] > 0) + if (cellNLayers[celli] > 0) { - addedCellSet.insert(cellI); + addedCellSet.insert(celli); } } addedCellSet.instance() = meshRefiner_.timeName(); @@ -2610,20 +2610,20 @@ bool Foam::snappyLayerDriver::writeLayerData } { label nAdded = 0; - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - if (faceRealThickness[faceI] > 0) + if (faceRealThickness[facei] > 0) { nAdded++; } } faceSet layerFacesSet(mesh, "layerFaces", nAdded); - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - if (faceRealThickness[faceI] > 0) + if (faceRealThickness[facei] > 0) { - layerFacesSet.insert(faceI); + layerFacesSet.insert(facei); } } layerFacesSet.instance() = meshRefiner_.timeName(); @@ -2663,15 +2663,15 @@ bool Foam::snappyLayerDriver::writeLayerData forAll(patchIDs, i) { - label patchI = patchIDs[i]; - const polyPatch& pp = pbm[patchI]; + label patchi = patchIDs[i]; + const polyPatch& pp = pbm[patchi]; const labelList& faceCells = pp.faceCells(); scalarField pfld(faceCells.size()); forAll(faceCells, i) { pfld[i] = cellNLayers[faceCells[i]]; } - fldBf[patchI] == pfld; + fldBf[patchi] == pfld; } Info<< indent << fld.name() << " : actual number of layers" << endl; @@ -2702,8 +2702,8 @@ bool Foam::snappyLayerDriver::writeLayerData forAll(patchIDs, i) { - label patchI = patchIDs[i]; - fldBf[patchI] == pbm[patchI].patchSlice + label patchi = patchIDs[i]; + fldBf[patchi] == pbm[patchi].patchSlice ( faceRealThickness ); @@ -2737,13 +2737,13 @@ bool Foam::snappyLayerDriver::writeLayerData forAll(patchIDs, i) { - label patchI = patchIDs[i]; + label patchi = patchIDs[i]; - scalarField::subField patchWanted = pbm[patchI].patchSlice + scalarField::subField patchWanted = pbm[patchi].patchSlice ( faceWantedThickness ); - scalarField::subField patchReal = pbm[patchI].patchSlice + scalarField::subField patchReal = pbm[patchi].patchSlice ( faceRealThickness ); @@ -2758,7 +2758,7 @@ bool Foam::snappyLayerDriver::writeLayerData } } - fldBf[patchI] == pfld; + fldBf[patchi] == pfld; } Info<< indent << fld.name() << " : overall layer thickness (fraction" @@ -3391,9 +3391,9 @@ void Foam::snappyLayerDriver::addLayers // Count number of added cells label nAddedCells = 0; - forAll(cellNLayers, cellI) + forAll(cellNLayers, celli) { - if (cellNLayers[cellI] > 0) + if (cellNLayers[celli] > 0) { nAddedCells++; } @@ -3407,11 +3407,11 @@ void Foam::snappyLayerDriver::addLayers newMesh.write(); cellSet addedCellSet(newMesh, "addedCells", nAddedCells); - forAll(cellNLayers, cellI) + forAll(cellNLayers, celli) { - if (cellNLayers[cellI] > 0) + if (cellNLayers[celli] > 0) { - addedCellSet.insert(cellI); + addedCellSet.insert(celli); } } addedCellSet.instance() = meshRefiner_.timeName(); @@ -3421,11 +3421,11 @@ void Foam::snappyLayerDriver::addLayers addedCellSet.write(); faceSet layerFacesSet(newMesh, "layerFaces", newMesh.nFaces()/100); - for (label faceI = 0; faceI < newMesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < newMesh.nInternalFaces(); facei++) { - if (faceRealThickness[faceI] > 0) + if (faceRealThickness[facei] > 0) { - layerFacesSet.insert(faceI); + layerFacesSet.insert(facei); } } layerFacesSet.instance() = meshRefiner_.timeName(); @@ -3624,16 +3624,16 @@ void Foam::snappyLayerDriver::doLayers // Patches that need to get a layer DynamicList<label> patchIDs(numLayers.size()); label nFacesWithLayers = 0; - forAll(numLayers, patchI) + forAll(numLayers, patchi) { - if (numLayers[patchI] > 0) + if (numLayers[patchi] > 0) { - const polyPatch& pp = mesh.boundaryMesh()[patchI]; + const polyPatch& pp = mesh.boundaryMesh()[patchi]; if (!pp.coupled()) { - patchIDs.append(patchI); - nFacesWithLayers += mesh.boundaryMesh()[patchI].size(); + patchIDs.append(patchi); + nFacesWithLayers += mesh.boundaryMesh()[patchi].size(); } else { @@ -3678,14 +3678,14 @@ void Foam::snappyLayerDriver::doLayers << endl; scalarField cellWeights(mesh.nCells(), 1); - forAll(numLayers, patchI) + forAll(numLayers, patchi) { - if (numLayers[patchI] > 0) + if (numLayers[patchi] > 0) { - const polyPatch& pp = mesh.boundaryMesh()[patchI]; + const polyPatch& pp = mesh.boundaryMesh()[patchi]; forAll(pp.faceCells(), i) { - cellWeights[pp.faceCells()[i]] += numLayers[patchI]; + cellWeights[pp.faceCells()[i]] += numLayers[patchi]; } } } diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.H index 1f3aca40fcb5975bc9f96dfc5f94ba3709b6ed84..c822a9d95744d58aec8f3ab27d1d8a3028102974 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.H +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriver.H @@ -298,7 +298,7 @@ private: ( const indirectPrimitivePatch& pp, const labelListList& globalEdgeFaces, - const label faceI, + const label facei, const label edgeI, const label myGlobFaceI, const label nbrGlobFaceI, diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriverShrink.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriverShrink.C index 5af612eda6dcc282000aaf4121449eefaf510a3b..4cc0e830bb7100a70c3bddb4bfa3bfdd7bbdf404 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriverShrink.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyLayerDriverShrink.C @@ -508,15 +508,15 @@ void Foam::snappyLayerDriver::handleFeatureAngleLayerTerminations boolList extrudedFaces(pp.size(), true); - forAll(pp.localFaces(), faceI) + forAll(pp.localFaces(), facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; forAll(f, fp) { if (extrudeStatus[f[fp]] == NOEXTRUDE) { - extrudedFaces[faceI] = false; + extrudedFaces[facei] = false; break; } } @@ -546,9 +546,9 @@ void Foam::snappyLayerDriver::handleFeatureAngleLayerTerminations edgeFaceExtrude[edgeI].setSize(eFaces.size()); forAll(eFaces, i) { - label faceI = eFaces[i]; - edgeFaceNormals[edgeI][i] = faceNormals[faceI]; - edgeFaceExtrude[edgeI][i] = extrudedFaces[faceI]; + label facei = eFaces[i]; + edgeFaceNormals[edgeI][i] = faceNormals[facei]; + edgeFaceExtrude[edgeI][i] = extrudedFaces[facei]; } } @@ -692,14 +692,14 @@ void Foam::snappyLayerDriver::findIsolatedRegions // faces are not grown // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ boolList extrudedFaces(pp.size(), true); - forAll(pp.localFaces(), faceI) + forAll(pp.localFaces(), facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; forAll(f, fp) { if (extrudeStatus[f[fp]] == NOEXTRUDE) { - extrudedFaces[faceI] = false; + extrudedFaces[facei] = false; break; } } @@ -714,8 +714,8 @@ void Foam::snappyLayerDriver::findIsolatedRegions forAll(pFaces, i) { - label faceI = pFaces[i]; - if (extrudedFaces[faceI]) + label facei = pFaces[i]; + if (extrudedFaces[facei]) { keptPoints[patchPointI] = true; break; @@ -801,9 +801,9 @@ void Foam::snappyLayerDriver::findIsolatedRegions // stop layer growth on isolated faces // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - forAll(pp, faceI) + forAll(pp, facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; bool failed = false; forAll(f, fp) { @@ -1114,17 +1114,17 @@ void Foam::snappyLayerDriver::medialAxisSmoothingInfo labelHashSet adaptPatches(meshMover.adaptPatchIDs()); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; const pointPatchVectorField& pvf = - meshMover.displacement().boundaryField()[patchI]; + meshMover.displacement().boundaryField()[patchi]; if ( !pp.coupled() && !isA<emptyPolyPatch>(pp) - && !adaptPatches.found(patchI) + && !adaptPatches.found(patchi) ) { const labelList& meshPoints = pp.meshPoints(); diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C index a020a2a86a0aae55d8eec21f8a161db2fc2d10a6..0770feb788bdc388915a8e43b26c78ee272a83a0 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappyRefineDriver.C @@ -378,10 +378,10 @@ Foam::label Foam::snappyRefineDriver::gapOnlyRefine boolList newIsCandidateCell(isCandidateCell); // Internal faces - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - label own = mesh.faceOwner()[faceI]; - label nei = mesh.faceNeighbour()[faceI]; + label own = mesh.faceOwner()[facei]; + label nei = mesh.faceNeighbour()[facei]; if (isCandidateCell[own] != isCandidateCell[nei]) { @@ -402,13 +402,13 @@ Foam::label Foam::snappyRefineDriver::gapOnlyRefine // Boundary faces for ( - label faceI = mesh.nInternalFaces(); - faceI < mesh.nFaces(); - faceI++ + label facei = mesh.nInternalFaces(); + facei < mesh.nFaces(); + facei++ ) { - label own = mesh.faceOwner()[faceI]; - label bFaceI = faceI-mesh.nInternalFaces(); + label own = mesh.faceOwner()[facei]; + label bFaceI = facei-mesh.nInternalFaces(); if (isCandidateCell[own] != neiIsCandidateCell[bFaceI]) { @@ -420,20 +420,20 @@ Foam::label Foam::snappyRefineDriver::gapOnlyRefine } label n = 0; - forAll(isCandidateCell, cellI) + forAll(isCandidateCell, celli) { - if (isCandidateCell[cellI]) + if (isCandidateCell[celli]) { n++; } } candidateCells.setSize(n); n = 0; - forAll(isCandidateCell, cellI) + forAll(isCandidateCell, celli) { - if (isCandidateCell[cellI]) + if (isCandidateCell[celli]) { - candidateCells[n++] = cellI; + candidateCells[n++] = celli; } } } @@ -553,9 +553,9 @@ Foam::label Foam::snappyRefineDriver::danglingCellRefine { cellSet candidateCellSet(mesh, "candidateCells", cells.size()/1000); - forAll(cells, cellI) + forAll(cells, celli) { - const cell& cFaces = cells[cellI]; + const cell& cFaces = cells[celli]; label nIntFaces = 0; forAll(cFaces, i) @@ -567,8 +567,8 @@ Foam::label Foam::snappyRefineDriver::danglingCellRefine } else { - label patchI = pbm.patchID()[bFaceI]; - if (pbm[patchI].coupled()) + label patchi = pbm.patchID()[bFaceI]; + if (pbm[patchi].coupled()) { nIntFaces++; } @@ -577,7 +577,7 @@ Foam::label Foam::snappyRefineDriver::danglingCellRefine if (nIntFaces == nFaces) { - candidateCellSet.insert(cellI); + candidateCellSet.insert(celli); } } diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C index c4215b1f4606ae2de9a5c40b9c3c2db9cdfa4876..47981c1ab747f871b4d139acb52fbb5bc8a25fd2 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.C @@ -198,11 +198,11 @@ Foam::pointField Foam::snappySnapDriver::smoothPatchDisplacement forAll(pFaces, pfI) { - label faceI = pFaces[pfI]; + label facei = pFaces[pfI]; - if (isMasterFace.get(pp.addressing()[faceI])) + if (isMasterFace.get(pp.addressing()[facei])) { - avgBoundary[patchPointI] += pp[faceI].centre(points); + avgBoundary[patchPointI] += pp[facei].centre(points); nBoundary[patchPointI]++; } } @@ -243,10 +243,10 @@ Foam::pointField Foam::snappySnapDriver::smoothPatchDisplacement // Note: no use of pointFaces const faceList& faces = mesh.faces(); - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - const face& f = faces[faceI]; - const point& fc = mesh.faceCentres()[faceI]; + const face& f = faces[facei]; + const point& fc = mesh.faceCentres()[facei]; forAll(f, fp) { @@ -258,16 +258,16 @@ Foam::pointField Foam::snappySnapDriver::smoothPatchDisplacement // Count coupled faces as internal ones (but only once) const polyBoundaryMesh& patches = mesh.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { if ( - patches[patchI].coupled() - && refCast<const coupledPolyPatch>(patches[patchI]).owner() + patches[patchi].coupled() + && refCast<const coupledPolyPatch>(patches[patchi]).owner() ) { const coupledPolyPatch& pp = - refCast<const coupledPolyPatch>(patches[patchI]); + refCast<const coupledPolyPatch>(patches[patchi]); const vectorField::subField faceCentres = pp.faceCentres(); @@ -327,21 +327,21 @@ Foam::pointField Foam::snappySnapDriver::smoothPatchDisplacement // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ labelList anyCell(mesh.nPoints(), -1); - forAll(mesh.faceNeighbour(), faceI) + forAll(mesh.faceNeighbour(), facei) { - label own = mesh.faceOwner()[faceI]; - const face& f = mesh.faces()[faceI]; + label own = mesh.faceOwner()[facei]; + const face& f = mesh.faces()[facei]; forAll(f, fp) { anyCell[f[fp]] = own; } } - for (label faceI = mesh.nInternalFaces(); faceI < mesh.nFaces(); faceI++) + for (label facei = mesh.nInternalFaces(); facei < mesh.nFaces(); facei++) { - label own = mesh.faceOwner()[faceI]; + label own = mesh.faceOwner()[facei]; - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, fp) { @@ -740,9 +740,9 @@ void Foam::snappySnapDriver::preSmoothPatch { Info<< "Smoothing iteration " << smoothIter << endl; checkFaces.setSize(mesh.nFaces()); - forAll(checkFaces, faceI) + forAll(checkFaces, facei) { - checkFaces[faceI] = faceI; + checkFaces[facei] = facei; } pointField patchDisp(smoothPatchDisplacement(meshMover, baffles)); @@ -883,8 +883,8 @@ Foam::tmp<Foam::pointField> Foam::snappySnapDriver::avgCellCentres forAll(pFaces, pfI) { - label faceI = pFaces[pfI]; - label meshFaceI = pp.addressing()[faceI]; + label facei = pFaces[pfI]; + label meshFaceI = pp.addressing()[facei]; label own = mesh.faceOwner()[meshFaceI]; avgBoundary[pointI] += mesh.cellCentres()[own]; @@ -1874,14 +1874,14 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurface //// //// forAll(meshMover.adaptPatchIDs(), i) //// { -//// label patchI = meshMover.adaptPatchIDs()[i]; -//// const labelList& meshPoints = pbm[patchI].meshPoints(); +//// label patchi = meshMover.adaptPatchIDs()[i]; +//// const labelList& meshPoints = pbm[patchi].meshPoints(); //// //// forAll(meshPoints, meshPointI) //// { //// label meshPointI = meshPoints[meshPointI]; -//// minPatch[meshPointI] = min(minPatch[meshPointI], patchI); -//// maxPatch[meshPointI] = max(maxPatch[meshPointI], patchI); +//// minPatch[meshPointI] = min(minPatch[meshPointI], patchi); +//// maxPatch[meshPointI] = max(maxPatch[meshPointI], patchi); //// } //// } //// @@ -2232,11 +2232,11 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::snappySnapDriver::repatchToSurface PackedBoolList isZonedFace(mesh.nFaces()); { // 1. Preserve faces in preserveFaces list - forAll(preserveFaces, faceI) + forAll(preserveFaces, facei) { - if (preserveFaces[faceI] != -1) + if (preserveFaces[facei] != -1) { - isZonedFace.set(faceI, 1); + isZonedFace.set(facei, 1); } } @@ -2279,15 +2279,15 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::snappySnapDriver::repatchToSurface const faceList& localFaces = pp.localFaces(); - forAll(localFaces, faceI) + forAll(localFaces, facei) { - const face& f = localFaces[faceI]; + const face& f = localFaces[facei]; forAll(f, fp) { - faceSnapDist[faceI] = max + faceSnapDist[facei] = max ( - faceSnapDist[faceI], + faceSnapDist[facei], snapDist[f[fp]] ); } @@ -2311,9 +2311,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::snappySnapDriver::repatchToSurface // Get patch forAll(pp, i) { - label faceI = pp.addressing()[i]; + label facei = pp.addressing()[i]; - if (hitSurface[i] != -1 && !isZonedFace.get(faceI)) + if (hitSurface[i] != -1 && !isZonedFace.get(facei)) { closestPatch[i] = globalToMasterPatch_ [ @@ -2336,26 +2336,26 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::snappySnapDriver::repatchToSurface const polyBoundaryMesh& patches = mesh.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; forAll(pp, i) { - ownPatch[pp.start()+i] = patchI; - neiPatch[pp.start()+i] = patchI; + ownPatch[pp.start()+i] = patchi; + neiPatch[pp.start()+i] = patchi; } } label nChanged = 0; forAll(closestPatch, i) { - label faceI = pp.addressing()[i]; + label facei = pp.addressing()[i]; - if (closestPatch[i] != -1 && closestPatch[i] != ownPatch[faceI]) + if (closestPatch[i] != -1 && closestPatch[i] != ownPatch[facei]) { - ownPatch[faceI] = closestPatch[i]; - neiPatch[faceI] = closestPatch[i]; + ownPatch[facei] = closestPatch[i]; + neiPatch[facei] = closestPatch[i]; nChanged++; } } @@ -2393,9 +2393,9 @@ void Foam::snappySnapDriver::detectWarpedFaces face f0(4); face f1(4); - forAll(localFaces, faceI) + forAll(localFaces, facei) { - const face& f = localFaces[faceI]; + const face& f = localFaces[facei]; if (f.size() >= 4) { @@ -2454,7 +2454,7 @@ void Foam::snappySnapDriver::detectWarpedFaces if (minCos < featureCos) { - splitFaces.append(bFaces[faceI]); + splitFaces.append(bFaces[facei]); splits.append(minDiag); } } @@ -2575,8 +2575,8 @@ void Foam::snappySnapDriver::doSnap const faceZone& fZone = fZones[zoneI]; forAll(fZone, i) { - label faceI = fZone[i]; - filterFace[faceI] = zoneI; + label facei = fZone[i]; + filterFace[facei] = zoneI; nFilterFaces++; } @@ -2584,12 +2584,12 @@ void Foam::snappySnapDriver::doSnap { forAll(fZone, i) { - label faceI = fZone[i]; + label facei = fZone[i]; // Allow combining patch faces across this face - duplicateFace[faceI] = -1; + duplicateFace[facei] = -1; - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, fp) { if (!duplicatePoint[f[fp]]) @@ -2877,7 +2877,7 @@ void Foam::snappySnapDriver::doSnap // DynamicList<label> splitFaces(bFaces.size()); // DynamicList<labelPair> splits(bFaces.size()); // - // forAll(bFaces, faceI) + // forAll(bFaces, facei) // { // const labelPair split // ( @@ -2886,13 +2886,13 @@ void Foam::snappySnapDriver::doSnap // ppPtr(), // patchAttraction, // patchConstraints, - // faceI + // facei // ) // ); // // if (split != labelPair(-1, -1)) // { - // splitFaces.append(bFaces[faceI]); + // splitFaces.append(bFaces[facei]); // splits.append(split); // } // } @@ -3176,11 +3176,11 @@ void Foam::snappySnapDriver::doSnap if (mapPtr.valid()) { - forAll(duplicateFace, faceI) + forAll(duplicateFace, facei) { - if (duplicateFace[faceI] != -1) + if (duplicateFace[facei] != -1) { - duplicateFace[faceI] = mapPtr().reverseFaceMap()[faceI]; + duplicateFace[facei] = mapPtr().reverseFaceMap()[facei]; } } } diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.H b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.H index 7d98b35a7d68c54d7b4367ad1d643bff0cc2ed72..d79f1fa5a8bee7865a6cdfe7edf6dc4fb8944d09 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.H +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriver.H @@ -242,7 +242,7 @@ class snappySnapDriver const indirectPrimitivePatch& pp, const vectorField& patchAttraction, const List<pointConstraint>& patchConstraints, - const label faceI + const label facei ) const; //- Avoid attraction across face diagonal since would diff --git a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C index b101e3ae97ad568d7d661e4b1995daad3456c681..89353844f2778ec09be490d4c88bf3123288dbf5 100644 --- a/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C +++ b/src/mesh/snappyHexMesh/snappyHexMeshDriver/snappySnapDriverFeature.C @@ -319,10 +319,10 @@ void Foam::snappySnapDriver::calcNearestFace { if (hitInfo[hitI].hit()) { - label faceI = ppFaces[hitI]; - faceDisp[faceI] = hitInfo[hitI].hitPoint() - fc[hitI]; - faceSurfaceNormal[faceI] = hitNormal[hitI]; - faceSurfaceGlobalRegion[faceI] = surfaces.globalRegion + label facei = ppFaces[hitI]; + faceDisp[facei] = hitInfo[hitI].hitPoint() - fc[hitI]; + faceSurfaceNormal[facei] = hitNormal[hitI]; + faceSurfaceGlobalRegion[facei] = surfaces.globalRegion ( hitSurface[hitI], hitRegion[hitI] @@ -383,10 +383,10 @@ void Foam::snappySnapDriver::calcNearestFace { if (hitInfo[hitI].hit()) { - label faceI = ppFaces[hitI]; - faceDisp[faceI] = hitInfo[hitI].hitPoint() - fc[hitI]; - faceSurfaceNormal[faceI] = hitNormal[hitI]; - faceSurfaceGlobalRegion[faceI] = surfaces.globalRegion + label facei = ppFaces[hitI]; + faceDisp[facei] = hitInfo[hitI].hitPoint() - fc[hitI]; + faceSurfaceNormal[facei] = hitNormal[hitI]; + faceSurfaceGlobalRegion[facei] = surfaces.globalRegion ( hitSurface[hitI], hitRegion[hitI] @@ -408,12 +408,12 @@ void Foam::snappySnapDriver::calcNearestFace faceRotation.setSize(pp.size()); faceRotation = Zero; - forAll(faceRotation, faceI) + forAll(faceRotation, facei) { // Note: extend to >180 degrees checking - faceRotation[faceI] = - pp.faceNormals()[faceI] - ^ faceSurfaceNormal[faceI]; + faceRotation[facei] = + pp.faceNormals()[facei] + ^ faceSurfaceNormal[facei]; } if (debug&meshRefinement::ATTRACTION) @@ -474,8 +474,8 @@ void Foam::snappySnapDriver::calcNearestFacePointProperties label nFaces = 0; forAll(pFaces, i) { - label faceI = pFaces[i]; - if (isMasterFace[faceI] && faceSurfaceGlobalRegion[faceI] != -1) + label facei = pFaces[i]; + if (isMasterFace[facei] && faceSurfaceGlobalRegion[facei] != -1) { nFaces++; } @@ -494,14 +494,14 @@ void Foam::snappySnapDriver::calcNearestFacePointProperties nFaces = 0; forAll(pFaces, i) { - label faceI = pFaces[i]; - label globalRegionI = faceSurfaceGlobalRegion[faceI]; + label facei = pFaces[i]; + label globalRegionI = faceSurfaceGlobalRegion[facei]; - if (isMasterFace[faceI] && globalRegionI != -1) + if (isMasterFace[facei] && globalRegionI != -1) { - pNormals[nFaces] = faceSurfaceNormal[faceI]; - pDisp[nFaces] = faceDisp[faceI]; - pFc[nFaces] = pp.faceCentres()[faceI]; + pNormals[nFaces] = faceSurfaceNormal[facei]; + pDisp[nFaces] = faceDisp[facei]; + pFc[nFaces] = pp.faceCentres()[facei]; pFid[nFaces] = globalToMasterPatch_[globalRegionI]; nFaces++; } @@ -521,9 +521,9 @@ void Foam::snappySnapDriver::calcNearestFacePointProperties labelList patchID(pbm.patchID()); // Unmark all non-coupled boundary faces - forAll(pbm, patchI) + forAll(pbm, patchi) { - const polyPatch& pp = pbm[patchI]; + const polyPatch& pp = pbm[patchi]; if (pp.coupled() || isA<emptyPolyPatch>(pp)) { @@ -562,15 +562,15 @@ void Foam::snappySnapDriver::calcNearestFacePointProperties label meshFaceI = pFaces[i]; if (!mesh.isInternalFace(meshFaceI)) { - label patchI = patchID[meshFaceI-mesh.nInternalFaces()]; + label patchi = patchID[meshFaceI-mesh.nInternalFaces()]; - if (patchI != -1) + if (patchi != -1) { vector fn = mesh.faceAreas()[meshFaceI]; pNormals.append(fn/mag(fn)); pDisp.append(mesh.faceCentres()[meshFaceI]-pt); pFc.append(mesh.faceCentres()[meshFaceI]); - pFid.append(patchI); + pFid.append(patchi); } } } @@ -1371,9 +1371,9 @@ void Foam::snappySnapDriver::releasePointsNextToMultiPatch // 3. Knock out any attraction on faces with multi-patch points label nChanged = 0; - forAll(pp.localFaces(), faceI) + forAll(pp.localFaces(), facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; label nMultiPatchPoints = 0; forAll(f, fp) @@ -1427,10 +1427,10 @@ Foam::labelPair Foam::snappySnapDriver::findDiagonalAttraction const indirectPrimitivePatch& pp, const vectorField& patchAttraction, const List<pointConstraint>& patchConstraints, - const label faceI + const label facei ) const { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; // For now just detect any attraction. Improve this to look at // actual attraction position and orientation @@ -1497,16 +1497,16 @@ void Foam::snappySnapDriver::avoidDiagonalAttraction List<pointConstraint>& patchConstraints ) const { - forAll(pp.localFaces(), faceI) + forAll(pp.localFaces(), facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; labelPair diag = findDiagonalAttraction ( pp, patchAttraction, patchConstraints, - faceI + facei ); if (diag[0] != -1 && diag[1] != -1) @@ -2210,8 +2210,8 @@ void Foam::snappySnapDriver::determineBaffleFeatures eFc.setSize(eFaces.size()); forAll(eFaces, i) { - label faceI = eFaces[i]; - eFc[i] = pp.faceNormals()[faceI]; + label facei = eFaces[i]; + eFc[i] = pp.faceNormals()[facei]; } } @@ -2512,9 +2512,9 @@ void Foam::snappySnapDriver::reverseAttractMeshPoints { boolList newIsFeatureEdgeOrPoint(isFeatureEdgeOrPoint); - forAll(pp.localFaces(), faceI) + forAll(pp.localFaces(), facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; forAll(f, fp) { @@ -2962,9 +2962,9 @@ void Foam::snappySnapDriver::preventFaceSqueeze { pointField points; face singleF; - forAll(pp.localFaces(), faceI) + forAll(pp.localFaces(), facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; if (f.size() != points.size()) { @@ -3066,12 +3066,12 @@ Foam::vectorField Foam::snappySnapDriver::calcNearestSurfaceFeature // Calculate attraction distance per face (from the attraction distance // per point) scalarField faceSnapDist(pp.size(), -GREAT); - forAll(pp.localFaces(), faceI) + forAll(pp.localFaces(), facei) { - const face& f = pp.localFaces()[faceI]; + const face& f = pp.localFaces()[facei]; forAll(f, fp) { - faceSnapDist[faceI] = max(faceSnapDist[faceI], snapDist[f[fp]]); + faceSnapDist[facei] = max(faceSnapDist[facei], snapDist[f[fp]]); } } diff --git a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C index 686593e3b5db610fad71321ce9a9a7cf7440c4d0..fba90bed0e88562dd0b33f1d5c74d469f050070a 100644 --- a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C +++ b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.C @@ -32,7 +32,7 @@ Foam::trackedParticle::trackedParticle ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const point& end, @@ -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 6c357b095afe8e8c9a6fd7cee90d533859bfda76..06a96b162a401d4e92b0038d18aaca6c681f850d 100644 --- a/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H +++ b/src/mesh/snappyHexMesh/trackedParticle/trackedParticle.H @@ -113,7 +113,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const point& end, @@ -277,7 +277,7 @@ public: ); //- Convert processor patch addressing to the global equivalents - // and set the cellI to the face-neighbour + // and set the celli to the face-neighbour void correctAfterParallelTransfer(const label, trackingData&); diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C index 1c55843ee2e14776f41ae50edb24cd9502447034..e09eb873a10b003dc6f465180932643617df8397 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C @@ -184,13 +184,13 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights wghtSum.setSize(wght.size(), 0.0); label nLowWeight = 0; - forAll(wght, faceI) + forAll(wght, facei) { - scalarList& w = wght[faceI]; + scalarList& w = wght[facei]; if (w.size()) { - scalar denom = patchAreas[faceI]; + scalar denom = patchAreas[facei]; scalar s = sum(w); scalar t = s/denom; @@ -205,7 +205,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights w[i] /= denom; } - wghtSum[faceI] = t; + wghtSum[facei] = t; if (t < lowWeightTol) { @@ -214,7 +214,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights } else { - wghtSum[faceI] = 0; + wghtSum[facei] = 0; } } @@ -282,10 +282,10 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate // Agglomerate face areas { srcMagSf.setSize(sourceRestrictAddressing.size(), 0.0); - forAll(sourceRestrictAddressing, faceI) + forAll(sourceRestrictAddressing, facei) { - label coarseFaceI = sourceRestrictAddressing[faceI]; - srcMagSf[coarseFaceI] += fineSrcMagSf[faceI]; + label coarseFaceI = sourceRestrictAddressing[facei]; + srcMagSf[coarseFaceI] += fineSrcMagSf[facei]; } } @@ -418,15 +418,15 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate srcAddress.setSize(sourceCoarseSize); srcWeights.setSize(sourceCoarseSize); - forAll(fineSrcAddress, faceI) + forAll(fineSrcAddress, facei) { - // All the elements contributing to faceI. Are slots in + // All the elements contributing to facei. Are slots in // mapDistribute'd data. - const labelList& elems = fineSrcAddress[faceI]; - const scalarList& weights = fineSrcWeights[faceI]; - const scalar fineArea = fineSrcMagSf[faceI]; + const labelList& elems = fineSrcAddress[facei]; + 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]; @@ -464,15 +464,15 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::agglomerate srcAddress.setSize(sourceCoarseSize); srcWeights.setSize(sourceCoarseSize); - forAll(fineSrcAddress, faceI) + forAll(fineSrcAddress, facei) { - // All the elements contributing to faceI. Are slots in + // All the elements contributing to facei. Are slots in // mapDistribute'd data. - const labelList& elems = fineSrcAddress[faceI]; - const scalarList& weights = fineSrcWeights[faceI]; - const scalar fineArea = fineSrcMagSf[faceI]; + const labelList& elems = fineSrcAddress[facei]; + 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]; @@ -867,14 +867,14 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update // Calculate face areas srcMagSf_.setSize(srcPatch.size()); - forAll(srcMagSf_, faceI) + forAll(srcMagSf_, facei) { - srcMagSf_[faceI] = srcPatch[faceI].mag(srcPatch.points()); + srcMagSf_[facei] = srcPatch[facei].mag(srcPatch.points()); } tgtMagSf_.setSize(tgtPatch.size()); - forAll(tgtMagSf_, faceI) + forAll(tgtMagSf_, facei) { - tgtMagSf_[faceI] = tgtPatch[faceI].mag(tgtPatch.points()); + tgtMagSf_[facei] = tgtPatch[facei].mag(tgtPatch.points()); } // Calculate if patches present on multiple processors @@ -1143,40 +1143,40 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToTarget List<Type> work(fld); map.distribute(work); - forAll(result, faceI) + forAll(result, facei) { - if (tgtWeightsSum_[faceI] < lowWeightCorrection_) + if (tgtWeightsSum_[facei] < lowWeightCorrection_) { - result[faceI] = defaultValues[faceI]; + result[facei] = defaultValues[facei]; } else { - const labelList& faces = tgtAddress_[faceI]; - const scalarList& weights = tgtWeights_[faceI]; + const labelList& faces = tgtAddress_[facei]; + const scalarList& weights = tgtWeights_[facei]; forAll(faces, i) { - cop(result[faceI], faceI, work[faces[i]], weights[i]); + cop(result[facei], facei, work[faces[i]], weights[i]); } } } } else { - forAll(result, faceI) + forAll(result, facei) { - if (tgtWeightsSum_[faceI] < lowWeightCorrection_) + if (tgtWeightsSum_[facei] < lowWeightCorrection_) { - result[faceI] = defaultValues[faceI]; + result[facei] = defaultValues[facei]; } else { - const labelList& faces = tgtAddress_[faceI]; - const scalarList& weights = tgtWeights_[faceI]; + const labelList& faces = tgtAddress_[facei]; + const scalarList& weights = tgtWeights_[facei]; forAll(faces, i) { - cop(result[faceI], faceI, fld[faces[i]], weights[i]); + cop(result[facei], facei, fld[faces[i]], weights[i]); } } } @@ -1228,40 +1228,40 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::interpolateToSource List<Type> work(fld); map.distribute(work); - forAll(result, faceI) + forAll(result, facei) { - if (srcWeightsSum_[faceI] < lowWeightCorrection_) + if (srcWeightsSum_[facei] < lowWeightCorrection_) { - result[faceI] = defaultValues[faceI]; + result[facei] = defaultValues[facei]; } else { - const labelList& faces = srcAddress_[faceI]; - const scalarList& weights = srcWeights_[faceI]; + const labelList& faces = srcAddress_[facei]; + const scalarList& weights = srcWeights_[facei]; forAll(faces, i) { - cop(result[faceI], faceI, work[faces[i]], weights[i]); + cop(result[facei], facei, work[faces[i]], weights[i]); } } } } else { - forAll(result, faceI) + forAll(result, facei) { - if (srcWeightsSum_[faceI] < lowWeightCorrection_) + if (srcWeightsSum_[facei] < lowWeightCorrection_) { - result[faceI] = defaultValues[faceI]; + result[facei] = defaultValues[facei]; } else { - const labelList& faces = srcAddress_[faceI]; - const scalarList& weights = srcWeights_[faceI]; + const labelList& faces = srcAddress_[facei]; + const scalarList& weights = srcWeights_[facei]; forAll(faces, i) { - cop(result[faceI], faceI, fld[faces[i]], weights[i]); + cop(result[facei], facei, fld[faces[i]], weights[i]); } } } diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C index df6b45268cb248ece9108bebb45d1e376bfea506..f082e4f102a0f28226e3e4cb511d28d6fd683e2e 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C @@ -389,11 +389,11 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap // Work array - whether processor bb overlaps the face bounds boolList procBbOverlaps(Pstream::nProcs()); - forAll(faces, faceI) + forAll(faces, facei) { - if (faces[faceI].size()) + if (faces[facei].size()) { - treeBoundBox faceBb(points, faces[faceI]); + treeBoundBox faceBb(points, faces[facei]); // Find the processor this face overlaps calcOverlappingProcs(procBb, faceBb, procBbOverlaps); @@ -402,7 +402,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::calcProcMap { if (procBbOverlaps[procI]) { - dynSendMap[procI].append(faceI); + dynSendMap[procI].append(facei); } } } diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.C index 8eb4aaeeca7b5be8864b823659fa38b2bb4928c5..a10c303178f6bf75f033bbfd7712227ac4906ae2 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.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 @@ -109,12 +109,12 @@ bool Foam::AMIMethod<SourcePatch, TargetPatch>::initialise srcFaceI = 0; tgtFaceI = 0; bool foundFace = false; - forAll(srcPatch_, faceI) + forAll(srcPatch_, facei) { - tgtFaceI = findTargetFace(faceI); + tgtFaceI = findTargetFace(facei); if (tgtFaceI >= 0) { - srcFaceI = faceI; + srcFaceI = facei; foundFace = true; break; } @@ -259,13 +259,13 @@ Foam::label Foam::AMIMethod<SourcePatch, TargetPatch>::findTargetFace template<class SourcePatch, class TargetPatch> void Foam::AMIMethod<SourcePatch, TargetPatch>::appendNbrFaces ( - const label faceI, + const label facei, const TargetPatch& patch, const DynamicList<label>& visitedFaces, DynamicList<label>& faceIDs ) const { - const labelList& nbrFaces = patch.faceFaces()[faceI]; + const labelList& nbrFaces = patch.faceFaces()[facei]; // filter out faces already visited from face neighbours forAll(nbrFaces, i) @@ -296,7 +296,7 @@ void Foam::AMIMethod<SourcePatch, TargetPatch>::appendNbrFaces // prevent addition of face if it is not on the same plane-ish if (valid) { - const vector& n1 = patch.faceNormals()[faceI]; + const vector& n1 = patch.faceNormals()[facei]; const vector& n2 = patch.faceNormals()[nbrFaceI]; scalar cosI = n1 & n2; diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H index 706d19b0b5bf629e411e0a6f64089964fed34fe2..892390c72d85689bc6a62739f80d94f2d3e1909e 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H @@ -143,10 +143,10 @@ protected: //- Find face on target patch that overlaps source face label findTargetFace(const label srcFaceI) const; - //- Add faces neighbouring faceI to the ID list + //- Add faces neighbouring facei to the ID list void appendNbrFaces ( - const label faceI, + const label facei, const TargetPatch& patch, const DynamicList<label>& visitedFaces, DynamicList<label>& faceIDs diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C index e3fe92160dba0a49d999417c3c193b15b946d386..c31e8fcfc9028f19260173a82cd4b4e22841d50c 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C @@ -164,20 +164,20 @@ void Foam::directAMI<SourcePatch, TargetPatch>::restartAdvancingFront label& tgtFaceI ) const { - forAll(mapFlag, faceI) + forAll(mapFlag, facei) { - if (mapFlag[faceI] == 0) + if (mapFlag[facei] == 0) { - tgtFaceI = this->findTargetFace(faceI); + tgtFaceI = this->findTargetFace(facei); if (tgtFaceI < 0) { - mapFlag[faceI] = -1; - nonOverlapFaces.append(faceI); + mapFlag[facei] = -1; + nonOverlapFaces.append(facei); } else { - srcFaceI = faceI; + srcFaceI = facei; break; } } diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C index 976430e9300d3a87e9abb8a2cb866093734c08c6..f0a63cbcff77a051db14e0629abaccaa2dc9c4f3 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C @@ -234,20 +234,20 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces { // try to use existing seed bool foundNextSeed = false; - for (label faceI = startSeedI; faceI < mapFlag.size(); faceI++) + for (label facei = startSeedI; facei < mapFlag.size(); facei++) { - if (mapFlag[faceI]) + if (mapFlag[facei]) { if (!foundNextSeed) { - startSeedI = faceI; + startSeedI = facei; foundNextSeed = true; } - if (seedFaces[faceI] != -1) + if (seedFaces[facei] != -1) { - srcFaceI = faceI; - tgtFaceI = seedFaces[faceI]; + srcFaceI = facei; + tgtFaceI = seedFaces[facei]; return; } @@ -262,17 +262,17 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::setNextFaces } foundNextSeed = false; - for (label faceI = startSeedI; faceI < mapFlag.size(); faceI++) + for (label facei = startSeedI; facei < mapFlag.size(); facei++) { - if (mapFlag[faceI]) + if (mapFlag[facei]) { if (!foundNextSeed) { - startSeedI = faceI + 1; + startSeedI = facei + 1; foundNextSeed = true; } - srcFaceI = faceI; + srcFaceI = facei; tgtFaceI = this->findTargetFace(srcFaceI); if (tgtFaceI >= 0) diff --git a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C index 030434a7d32a6827583f6ecc5a2c5c19bf155d42..cefbb07236d54b21cd1c458f3ce023a9eb0be9c4 100644 --- a/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C +++ b/src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C @@ -87,22 +87,22 @@ void Foam::mapNearestAMI<SourcePatch, TargetPatch>::setNextNearestFaces forAll(srcNbr, i) { - label faceI = srcNbr[i]; - if (mapFlag[faceI]) + label facei = srcNbr[i]; + if (mapFlag[facei]) { - srcFaceI = faceI; - startSeedI = faceI + 1; + srcFaceI = facei; + startSeedI = facei + 1; return; } } - forAll(mapFlag, faceI) + forAll(mapFlag, facei) { - if (mapFlag[faceI]) + if (mapFlag[facei]) { - srcFaceI = faceI; - tgtFaceI = this->findTargetFace(faceI); + srcFaceI = facei; + tgtFaceI = this->findTargetFace(facei); if (tgtFaceI == -1) { diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatch/cyclicACMIPointPatch.H b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatch/cyclicACMIPointPatch.H index 1ed4f26cdb355932a92d624b98f67c6e9115481f..9994fdf308dc90b629dea5dd83ff4dac824efb1a 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatch/cyclicACMIPointPatch.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPointPatch/cyclicACMIPointPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,8 +134,8 @@ public: //- Return neighbour point patch const cyclicACMIPointPatch& neighbPatch() const { - label patchI = cyclicACMIPolyPatch_.neighbPatchID(); - const pointPatch& pp = this->boundaryMesh()[patchI]; + label patchi = cyclicACMIPolyPatch_.neighbPatchID(); + const pointPatch& pp = this->boundaryMesh()[patchi]; return refCast<const cyclicACMIPointPatch>(pp); } diff --git a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C index 1da23843a4f101d8025ed57ec99a643252ce5899..382faaff23c0e496adb58922916f04c315b93e28 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicACMI/cyclicACMIPolyPatch/cyclicACMIPolyPatch.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 @@ -82,10 +82,10 @@ void Foam::cyclicACMIPolyPatch::resetAMI vectorField::subField Sf = faceAreas(); vectorField::subField noSf = nonOverlapPatch.faceAreas(); - forAll(Sf, faceI) + forAll(Sf, facei) { - Sf[faceI] = faceAreas0_[faceI]; - noSf[faceI] = faceAreas0_[faceI]; + Sf[facei] = faceAreas0_[facei]; + noSf[facei] = faceAreas0_[facei]; } // Calculate the AMI using partial face-area-weighted @@ -100,10 +100,10 @@ void Foam::cyclicACMIPolyPatch::resetAMI tgtMask_ = min(scalar(1) - tolerance_, max(tolerance_, AMI().tgtWeightsSum())); - forAll(Sf, faceI) + forAll(Sf, facei) { - Sf[faceI] *= srcMask_[faceI]; - noSf[faceI] *= 1.0 - srcMask_[faceI]; + Sf[facei] *= srcMask_[facei]; + noSf[facei] *= 1.0 - srcMask_[facei]; } setNeighbourFaceAreas(); @@ -127,10 +127,10 @@ void Foam::cyclicACMIPolyPatch::setNeighbourFaceAreas() const vectorField::subField Sf = cp.faceAreas(); vectorField::subField noSf = pp.faceAreas(); - forAll(Sf, faceI) + forAll(Sf, facei) { - Sf[faceI] = tgtMask_[faceI]*faceAreas0[faceI]; - noSf[faceI] = (1.0 - tgtMask_[faceI])*faceAreas0[faceI]; + Sf[facei] = tgtMask_[facei]*faceAreas0[facei]; + noSf[facei] = (1.0 - tgtMask_[facei])*faceAreas0[facei]; } } else @@ -400,9 +400,9 @@ Foam::label Foam::cyclicACMIPolyPatch::nonOverlapPatchID() const const scalarField magSf(mag(faceAreas())); const scalarField noMagSf(mag(noPp.faceAreas())); - forAll(magSf, faceI) + forAll(magSf, facei) { - scalar ratio = mag(magSf[faceI]/(noMagSf[faceI] + ROOTVSMALL)); + scalar ratio = mag(magSf[facei]/(noMagSf[facei] + ROOTVSMALL)); if (ratio - 1 > tolerance_) { diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.H b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.H index 6641d0d1e291236da3c55ad5153c3af68fce938f..eeb26ebe2618957d0ccd89f23ec08be612f4fcb7 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.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 @@ -127,8 +127,8 @@ public: //- Return neighbour point patch const cyclicAMIPointPatch& neighbPatch() const { - label patchI = cyclicAMIPolyPatch_.neighbPatchID(); - const pointPatch& pp = this->boundaryMesh()[patchI]; + label patchi = cyclicAMIPolyPatch_.neighbPatchID(); + const pointPatch& pp = this->boundaryMesh()[patchi]; return refCast<const cyclicAMIPointPatch>(pp); } diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index d795579e8293089a129a7ebbbf11fb0c0f3ed84e..d4b659c7240ce236d9cfb7dfb9a96c3e878c0e6a 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -52,18 +52,18 @@ Foam::vector Foam::cyclicAMIPolyPatch::findFaceNormalMaxRadius const scalarField magRadSqr(magSqr(n)); - label faceI = findMax(magRadSqr); + label facei = findMax(magRadSqr); if (debug) { Info<< "findFaceMaxRadius(const pointField&) : patch: " << name() << nl - << " rotFace = " << faceI << nl - << " point = " << faceCentres[faceI] << nl - << " distance = " << Foam::sqrt(magRadSqr[faceI]) + << " rotFace = " << facei << nl + << " point = " << faceCentres[facei] << nl + << " distance = " << Foam::sqrt(magRadSqr[facei]) << endl; } - return n[faceI]; + return n[facei]; } @@ -845,7 +845,7 @@ void Foam::cyclicAMIPolyPatch::transformPosition(pointField& l) const void Foam::cyclicAMIPolyPatch::transformPosition ( point& l, - const label faceI + const label facei ) const { if (!parallel()) @@ -854,7 +854,7 @@ void Foam::cyclicAMIPolyPatch::transformPosition ( forwardT().size() == 1 ? forwardT()[0] - : forwardT()[faceI] + : forwardT()[facei] ); if (transform() == ROTATIONAL) @@ -872,7 +872,7 @@ void Foam::cyclicAMIPolyPatch::transformPosition ( separation().size() == 1 ? separation()[0] - : separation()[faceI] + : separation()[facei] ); l -= s; @@ -883,7 +883,7 @@ void Foam::cyclicAMIPolyPatch::transformPosition void Foam::cyclicAMIPolyPatch::reverseTransformPosition ( point& l, - const label faceI + const label facei ) const { if (!parallel()) @@ -892,7 +892,7 @@ void Foam::cyclicAMIPolyPatch::reverseTransformPosition ( reverseT().size() == 1 ? reverseT()[0] - : reverseT()[faceI] + : reverseT()[facei] ); if (transform() == ROTATIONAL) @@ -910,7 +910,7 @@ void Foam::cyclicAMIPolyPatch::reverseTransformPosition ( separation().size() == 1 ? separation()[0] - : separation()[faceI] + : separation()[facei] ); l += s; @@ -921,7 +921,7 @@ void Foam::cyclicAMIPolyPatch::reverseTransformPosition void Foam::cyclicAMIPolyPatch::reverseTransformDirection ( vector& d, - const label faceI + const label facei ) const { if (!parallel()) @@ -930,7 +930,7 @@ void Foam::cyclicAMIPolyPatch::reverseTransformDirection ( reverseT().size() == 1 ? reverseT()[0] - : reverseT()[faceI] + : reverseT()[facei] ); d = Foam::transform(T, d); @@ -988,16 +988,16 @@ bool Foam::cyclicAMIPolyPatch::order Foam::label Foam::cyclicAMIPolyPatch::pointFace ( - const label faceI, + const label facei, const vector& n, point& p ) const { point prt(p); - reverseTransformPosition(prt, faceI); + reverseTransformPosition(prt, facei); vector nrt(n); - reverseTransformDirection(nrt, faceI); + reverseTransformDirection(nrt, facei); label nbrFaceI = -1; @@ -1008,7 +1008,7 @@ Foam::label Foam::cyclicAMIPolyPatch::pointFace *this, neighbPatch(), nrt, - faceI, + facei, prt ); } @@ -1019,7 +1019,7 @@ Foam::label Foam::cyclicAMIPolyPatch::pointFace neighbPatch(), *this, nrt, - faceI, + facei, prt ); } diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H index 7ae90c77745873a9d455b8115e05f5391df844d3..f89bdfa1cbc22c929b9e0b603d5ca879e9302186 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H @@ -326,21 +326,21 @@ public: virtual void transformPosition ( point& l, - const label faceI + const label facei ) const; //- Transform a patch-based position from this side to nbr side virtual void reverseTransformPosition ( point& l, - const label faceI + const label facei ) const; //- Transform a patch-based direction from this side to nbr side virtual void reverseTransformDirection ( vector& d, - const label faceI + const label facei ) const; @@ -410,7 +410,7 @@ public: // following trajectory vector n label pointFace ( - const label faceI, + const label facei, const vector& n, point& p ) const; diff --git a/src/meshTools/algorithms/MeshWave/FaceCellWave.C b/src/meshTools/algorithms/MeshWave/FaceCellWave.C index 4988fcfb175e5aefe523cffbaad0f4bda6f4876b..f3b3bca11b74e62d50c7cb5a4d41e6b6fc2cae48 100644 --- a/src/meshTools/algorithms/MeshWave/FaceCellWave.C +++ b/src/meshTools/algorithms/MeshWave/FaceCellWave.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 @@ -73,7 +73,7 @@ namespace Foam void operator() ( Type& x, - const label faceI, + const label facei, const Type& y, const scalar weight ) const @@ -83,11 +83,11 @@ namespace Foam 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 ( @@ -106,7 +106,7 @@ namespace Foam // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -// Update info for cellI, at position pt, with information from +// Update info for celli, at position pt, with information from // neighbouring face/cell. // Updates: // - changedCell_, changedCells_, nChangedCells_, @@ -114,7 +114,7 @@ namespace Foam template<class Type, class TrackingData> bool Foam::FaceCellWave<Type, TrackingData>::updateCell ( - const label cellI, + const label celli, const label neighbourFaceI, const Type& neighbourInfo, const scalar tol, @@ -129,7 +129,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell cellInfo.updateCell ( mesh_, - cellI, + celli, neighbourFaceI, neighbourInfo, tol, @@ -138,10 +138,10 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell if (propagate) { - if (!changedCell_[cellI]) + if (!changedCell_[celli]) { - changedCell_[cellI] = true; - changedCells_[nChangedCells_++] = cellI; + changedCell_[celli] = true; + changedCells_[nChangedCells_++] = celli; } } @@ -154,7 +154,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell } -// Update info for faceI, at position pt, with information from +// Update info for facei, at position pt, with information from // neighbouring face/cell. // Updates: // - changedFace_, changedFaces_, nChangedFaces_, @@ -162,7 +162,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell template<class Type, class TrackingData> bool Foam::FaceCellWave<Type, TrackingData>::updateFace ( - const label faceI, + const label facei, const label neighbourCellI, const Type& neighbourInfo, const scalar tol, @@ -177,7 +177,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace faceInfo.updateFace ( mesh_, - faceI, + facei, neighbourCellI, neighbourInfo, tol, @@ -186,10 +186,10 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace if (propagate) { - if (!changedFace_[faceI]) + if (!changedFace_[facei]) { - changedFace_[faceI] = true; - changedFaces_[nChangedFaces_++] = faceI; + changedFace_[facei] = true; + changedFaces_[nChangedFaces_++] = facei; } } @@ -202,7 +202,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace } -// Update info for faceI, at position pt, with information from +// Update info for facei, at position pt, with information from // same face. // Updates: // - changedFace_, changedFaces_, nChangedFaces_, @@ -210,7 +210,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace template<class Type, class TrackingData> bool Foam::FaceCellWave<Type, TrackingData>::updateFace ( - const label faceI, + const label facei, const Type& neighbourInfo, const scalar tol, Type& faceInfo @@ -224,7 +224,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace faceInfo.updateFace ( mesh_, - faceI, + facei, neighbourInfo, tol, td_ @@ -232,10 +232,10 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace if (propagate) { - if (!changedFace_[faceI]) + if (!changedFace_[facei]) { - changedFace_[faceI] = true; - changedFaces_[nChangedFaces_++] = faceI; + changedFace_[facei] = true; + changedFaces_[nChangedFaces_++] = facei; } } @@ -298,9 +298,9 @@ template<class Type, class TrackingData> template<class PatchType> bool Foam::FaceCellWave<Type, TrackingData>::hasPatch() const { - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { - if (isA<PatchType>(mesh_.boundaryMesh()[patchI])) + if (isA<PatchType>(mesh_.boundaryMesh()[patchi])) { return true; } @@ -319,23 +319,23 @@ void Foam::FaceCellWave<Type, TrackingData>::setFaceInfo { forAll(changedFaces, changedFaceI) { - label faceI = changedFaces[changedFaceI]; + label facei = changedFaces[changedFaceI]; - bool wasValid = allFaceInfo_[faceI].valid(td_); + bool wasValid = allFaceInfo_[facei].valid(td_); - // Copy info for faceI - allFaceInfo_[faceI] = changedFacesInfo[changedFaceI]; + // Copy info for facei + allFaceInfo_[facei] = changedFacesInfo[changedFaceI]; // Maintain count of unset faces - if (!wasValid && allFaceInfo_[faceI].valid(td_)) + if (!wasValid && allFaceInfo_[facei].valid(td_)) { --nUnvisitedFaces_; } - // Mark faceI as changed, both on list and on face itself. + // Mark facei as changed, both on list and on face itself. - changedFace_[faceI] = true; - changedFaces_[nChangedFaces_++] = faceI; + changedFace_[facei] = true; + changedFaces_[nChangedFaces_++] = facei; } } @@ -462,16 +462,16 @@ void Foam::FaceCellWave<Type, TrackingData>::transform { const tensor& T = rotTensor[0]; - for (label faceI = 0; faceI < nFaces; faceI++) + for (label facei = 0; facei < nFaces; facei++) { - faceInfo[faceI].transform(mesh_, T, td_); + faceInfo[facei].transform(mesh_, T, td_); } } else { - for (label faceI = 0; faceI < nFaces; faceI++) + for (label facei = 0; facei < nFaces; facei++) { - faceInfo[faceI].transform(mesh_, rotTensor[faceI], td_); + faceInfo[facei].transform(mesh_, rotTensor[facei], td_); } } } @@ -487,9 +487,9 @@ void Foam::FaceCellWave<Type, TrackingData>::offset labelList& faces ) { - for (label faceI = 0; faceI < nFaces; faceI++) + for (label facei = 0; facei < nFaces; facei++) { - faces[faceI] += cycOffset; + faces[facei] += cycOffset; } } @@ -509,10 +509,10 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches() forAll(procPatches, i) { - label patchI = procPatches[i]; + label patchi = procPatches[i]; const processorPolyPatch& procPatch = - refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]); + refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchi]); // Allocate buffers label nSendFaces; @@ -540,7 +540,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches() if (debug & 2) { - Pout<< " Processor patch " << patchI << ' ' << procPatch.name() + Pout<< " Processor patch " << patchi << ' ' << procPatch.name() << " communicating with " << procPatch.neighbProcNo() << " Sending:" << nSendFaces << endl; @@ -559,10 +559,10 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches() forAll(procPatches, i) { - label patchI = procPatches[i]; + label patchi = procPatches[i]; const processorPolyPatch& procPatch = - refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]); + refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchi]); // Allocate buffers labelList receiveFaces; @@ -575,7 +575,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches() if (debug & 2) { - Pout<< " Processor patch " << patchI << ' ' << procPatch.name() + Pout<< " Processor patch " << patchi << ' ' << procPatch.name() << " communicating with " << procPatch.neighbProcNo() << " Receiving:" << receiveFaces.size() << endl; @@ -617,9 +617,9 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches() template<class Type, class TrackingData> void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches() { - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { - const polyPatch& patch = mesh_.boundaryMesh()[patchI]; + const polyPatch& patch = mesh_.boundaryMesh()[patchi]; if (isA<cyclicPolyPatch>(patch)) { @@ -666,7 +666,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches() if (debug & 2) { - Pout<< " Cyclic patch " << patchI << ' ' << cycPatch.name() + Pout<< " Cyclic patch " << patchi << ' ' << cycPatch.name() << " Changed : " << nReceiveFaces << endl; } @@ -702,9 +702,9 @@ void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches() template<class Type, class TrackingData> void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches() { - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { - const polyPatch& patch = mesh_.boundaryMesh()[patchI]; + const polyPatch& patch = mesh_.boundaryMesh()[patchi]; if (isA<cyclicAMIPolyPatch>(patch)) { @@ -951,30 +951,30 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell() changedFaceI++ ) { - label faceI = changedFaces_[changedFaceI]; - if (!changedFace_[faceI]) + label facei = changedFaces_[changedFaceI]; + if (!changedFace_[facei]) { FatalErrorInFunction - << "Face " << faceI + << "Face " << facei << " not marked as having been changed" << abort(FatalError); } - const Type& neighbourWallInfo = allFaceInfo_[faceI]; + const Type& neighbourWallInfo = allFaceInfo_[facei]; // Evaluate all connected cells // Owner - label cellI = owner[faceI]; - Type& currentWallInfo = allCellInfo_[cellI]; + label celli = owner[facei]; + Type& currentWallInfo = allCellInfo_[celli]; if (!currentWallInfo.equal(neighbourWallInfo, td_)) { updateCell ( - cellI, - faceI, + celli, + facei, neighbourWallInfo, propagationTol_, currentWallInfo @@ -982,17 +982,17 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell() } // Neighbour. - if (faceI < nInternalFaces) + if (facei < nInternalFaces) { - cellI = neighbour[faceI]; - Type& currentWallInfo2 = allCellInfo_[cellI]; + celli = neighbour[facei]; + Type& currentWallInfo2 = allCellInfo_[celli]; if (!currentWallInfo2.equal(neighbourWallInfo, td_)) { updateCell ( - cellI, - faceI, + celli, + facei, neighbourWallInfo, propagationTol_, currentWallInfo2 @@ -1001,7 +1001,7 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell() } // Reset status of face - changedFace_[faceI] = false; + changedFace_[facei] = false; } // Handled all changed faces by now @@ -1034,30 +1034,30 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::cellToFace() changedCellI++ ) { - label cellI = changedCells_[changedCellI]; - if (!changedCell_[cellI]) + label celli = changedCells_[changedCellI]; + if (!changedCell_[celli]) { FatalErrorInFunction - << "Cell " << cellI << " not marked as having been changed" + << "Cell " << celli << " not marked as having been changed" << abort(FatalError); } - const Type& neighbourWallInfo = allCellInfo_[cellI]; + const Type& neighbourWallInfo = allCellInfo_[celli]; // Evaluate all connected faces - const labelList& faceLabels = cells[cellI]; + const labelList& faceLabels = cells[celli]; forAll(faceLabels, faceLabelI) { - label faceI = faceLabels[faceLabelI]; - Type& currentWallInfo = allFaceInfo_[faceI]; + label facei = faceLabels[faceLabelI]; + Type& currentWallInfo = allFaceInfo_[facei]; if (!currentWallInfo.equal(neighbourWallInfo, td_)) { updateFace ( - faceI, - cellI, + facei, + celli, neighbourWallInfo, propagationTol_, currentWallInfo @@ -1066,7 +1066,7 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::cellToFace() } // Reset status of cell - changedCell_[cellI] = false; + changedCell_[celli] = false; } // Handled all changed cells by now diff --git a/src/meshTools/algorithms/MeshWave/FaceCellWave.H b/src/meshTools/algorithms/MeshWave/FaceCellWave.H index d9afeed1ada7ee1c5e0e8180b75b57bd94623bfb..cbb5b5c4433861cfd9b43871eb7064f65697c53e 100644 --- a/src/meshTools/algorithms/MeshWave/FaceCellWave.H +++ b/src/meshTools/algorithms/MeshWave/FaceCellWave.H @@ -131,7 +131,7 @@ class FaceCellWave // statistics. bool updateCell ( - const label cellI, + const label celli, const label neighbourFaceI, const Type& neighbourInfo, const scalar tol, @@ -142,7 +142,7 @@ class FaceCellWave // statistics. bool updateFace ( - const label faceI, + const label facei, const label neighbourCellI, const Type& neighbourInfo, const scalar tol, @@ -153,7 +153,7 @@ class FaceCellWave // statistics. bool updateFace ( - const label faceI, + const label facei, const Type& neighbourInfo, const scalar tol, Type& faceInfo diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.C b/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.C index 4435571b91e857ea065cda21194dca3f12624649..7f4780faeb10beb67b4093e8a5d05c2633a003c2 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.C +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.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 @@ -106,7 +106,7 @@ updateEdge } -// Update info for faceI, at position pt, with information from +// Update info for facei, at position pt, with information from // neighbouring edge. // Updates: // - changedFace_, changedFaces_, @@ -120,7 +120,7 @@ template bool Foam::PatchEdgeFaceWave<PrimitivePatchType, Type, TrackingData>:: updateFace ( - const label faceI, + const label facei, const label neighbourEdgeI, const Type& neighbourInfo, Type& faceInfo @@ -135,7 +135,7 @@ updateFace ( mesh_, patch_, - faceI, + facei, neighbourEdgeI, neighbourInfo, propagationTol_, @@ -144,10 +144,10 @@ updateFace if (propagate) { - if (!changedFace_[faceI]) + if (!changedFace_[facei]) { - changedFace_[faceI] = true; - changedFaces_.append(faceI); + changedFace_[facei] = true; + changedFaces_.append(facei); } } @@ -495,21 +495,21 @@ faceToEdge() forAll(changedFaces_, changedFaceI) { - label faceI = changedFaces_[changedFaceI]; + label facei = changedFaces_[changedFaceI]; - if (!changedFace_[faceI]) + if (!changedFace_[facei]) { FatalErrorInFunction - << "face " << faceI + << "face " << facei << " not marked as having been changed" << nl << "This might be caused by multiple occurences of the same" << " seed edge." << abort(FatalError); } - const Type& neighbourWallInfo = allFaceInfo_[faceI]; + const Type& neighbourWallInfo = allFaceInfo_[facei]; // Evaluate all connected edges - const labelList& fEdges = patch_.faceEdges()[faceI]; + const labelList& fEdges = patch_.faceEdges()[facei]; forAll(fEdges, fEdgeI) { @@ -522,7 +522,7 @@ faceToEdge() updateEdge ( edgeI, - faceI, + facei, neighbourWallInfo, currentWallInfo ); @@ -578,15 +578,15 @@ edgeToFace() const labelList& eFaces = edgeFaces[edgeI]; forAll(eFaces, eFaceI) { - label faceI = eFaces[eFaceI]; + label facei = eFaces[eFaceI]; - Type& currentWallInfo = allFaceInfo_[faceI]; + Type& currentWallInfo = allFaceInfo_[facei]; if (!currentWallInfo.equal(neighbourWallInfo, td_)) { updateFace ( - faceI, + facei, edgeI, neighbourWallInfo, currentWallInfo diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.H b/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.H index 943e22519879e7ebbfee5345efae5e7907254786..5bb841f4a5e83765458e3058dc8257f87b429e40 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/PatchEdgeFaceWave.H @@ -142,7 +142,7 @@ class PatchEdgeFaceWave // statistics. bool updateFace ( - const label faceI, + const label facei, const label neighbourEdgeI, const Type& neighbourInfo, Type& faceInfo diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H index 5ac9f32c5057a6486364ee2543c9816e38c438ed..ab17ddc63513783bfd6d085b5ab1e4e00c9d8dc0 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfo.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 @@ -139,7 +139,7 @@ public: const polyMesh& mesh, const primitivePatch& patch, const label edgeI, - const label faceI, + const label facei, const patchEdgeFaceInfo& faceInfo, const scalar tol, TrackingData& td @@ -163,7 +163,7 @@ public: ( const polyMesh& mesh, const primitivePatch& patch, - const label faceI, + const label facei, const label edgeI, const patchEdgeFaceInfo& edgeInfo, const scalar tol, diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfoI.H b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfoI.H index 433fbfc207953088f37844a72386c13ad2106cec..be99c29713bccb7b2821e99cddec7a78f7290f40 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfoI.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceInfoI.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 @@ -186,7 +186,7 @@ inline bool Foam::patchEdgeFaceInfo::updateEdge const polyMesh& mesh, const primitivePatch& patch, const label edgeI, - const label faceI, + const label facei, const patchEdgeFaceInfo& faceInfo, const scalar tol, TrackingData& td @@ -223,14 +223,14 @@ inline bool Foam::patchEdgeFaceInfo::updateFace ( const polyMesh& mesh, const primitivePatch& patch, - const label faceI, + const label facei, const label edgeI, const patchEdgeFaceInfo& edgeInfo, const scalar tol, TrackingData& td ) { - return update(patch.faceCentres()[faceI], edgeInfo, tol, td); + return update(patch.faceCentres()[facei], edgeInfo, tol, td); } diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegion.H b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegion.H index 48ced2899bf1c7c616fc6f6cd228e97d83661342..65f6760caeda909459c46f6a48642c784dde562c 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegion.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegion.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -120,7 +120,7 @@ public: const polyMesh& mesh, const indirectPrimitivePatch& patch, const label edgeI, - const label faceI, + const label facei, const patchEdgeFaceRegion& faceInfo, const scalar tol, TrackingData& td @@ -144,7 +144,7 @@ public: ( const polyMesh& mesh, const indirectPrimitivePatch& patch, - const label faceI, + const label facei, const label edgeI, const patchEdgeFaceRegion& edgeInfo, const scalar tol, diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegionI.H b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegionI.H index e66ed6481321c3b729a59700395c51fb34bf2ed2..190688872d8162be984472b03b8a043819db7155 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegionI.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegionI.H @@ -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 @@ -122,7 +122,7 @@ inline bool Foam::patchEdgeFaceRegion::updateEdge const polyMesh& mesh, const indirectPrimitivePatch& patch, const label edgeI, - const label faceI, + const label facei, const patchEdgeFaceRegion& faceInfo, const scalar tol, TrackingData& td @@ -152,7 +152,7 @@ inline bool Foam::patchEdgeFaceRegion::updateFace ( const polyMesh& mesh, const indirectPrimitivePatch& patch, - const label faceI, + const label facei, const label edgeI, const patchEdgeFaceRegion& edgeInfo, const scalar tol, diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegions.H b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegions.H index 5dd12902408c99c2a33590c3ad2f3019ddf9b052..5d4ec162839c2f7c13568d0fded929f714600f85 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegions.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegions.H @@ -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 @@ -108,7 +108,7 @@ public: const polyMesh& mesh, const Patch& patch, const label edgeI, - const label faceI, + const label facei, const patchEdgeFaceRegions& faceInfo, const scalar tol, TrackingData& td @@ -132,7 +132,7 @@ public: ( const polyMesh& mesh, const Patch& patch, - const label faceI, + const label facei, const label edgeI, const patchEdgeFaceRegions& edgeInfo, const scalar tol, diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegionsI.H b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegionsI.H index a3c373bbb9f6b469ee585f2cde84e6e22b368a33..422b0b2e9e2bd4996704e15795c12e781ebbea56 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegionsI.H +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchEdgeFaceRegionsI.H @@ -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 @@ -85,16 +85,16 @@ inline bool Foam::patchEdgeFaceRegions::updateEdge const polyMesh& mesh, const Patch& patch, const label edgeI, - const label faceI, + const label facei, const patchEdgeFaceRegions& faceInfo, const scalar tol, TrackingData& td ) { - const face& f = patch.localFaces()[faceI]; + const face& f = patch.localFaces()[facei]; const edge& e = patch.edges()[edgeI]; - label index = findIndex(patch.faceEdges()[faceI], edgeI); + label index = findIndex(patch.faceEdges()[facei], edgeI); bool sameOrientation = (f[index] == e.start()); // Get information in edge-order @@ -188,18 +188,18 @@ inline bool Foam::patchEdgeFaceRegions::updateFace ( const polyMesh& mesh, const Patch& patch, - const label faceI, + const label facei, const label edgeI, const patchEdgeFaceRegions& edgeInfo, const scalar tol, TrackingData& td ) { - const face& f = patch.localFaces()[faceI]; + const face& f = patch.localFaces()[facei]; const edge& e = patch.edges()[edgeI]; // Find starting point of edge on face. - label index0 = findIndex(patch.faceEdges()[faceI], edgeI); + label index0 = findIndex(patch.faceEdges()[facei], edgeI); label index1 = f.fcIndex(index0); bool sameOrientation = (f[index0] == e.start()); diff --git a/src/meshTools/algorithms/PatchEdgeFaceWave/patchPatchDist.C b/src/meshTools/algorithms/PatchEdgeFaceWave/patchPatchDist.C index 6dc94b6c535fd8f2e5938fdc3323f87af7a70732..56849388d8c13970d5b8a46b8727b7959c6f52ae 100644 --- a/src/meshTools/algorithms/PatchEdgeFaceWave/patchPatchDist.C +++ b/src/meshTools/algorithms/PatchEdgeFaceWave/patchPatchDist.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 @@ -156,11 +156,11 @@ void Foam::patchPatchDist::correct() // Extract into *this setSize(patch_.size()); nUnset_ = 0; - forAll(allFaceInfo, faceI) + forAll(allFaceInfo, facei) { - if (allFaceInfo[faceI].valid(calc.data())) + if (allFaceInfo[facei].valid(calc.data())) { - operator[](faceI) = Foam::sqrt(allFaceInfo[faceI].distSqr()); + operator[](facei) = Foam::sqrt(allFaceInfo[facei].distSqr()); } else { diff --git a/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C b/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C index 3bd86cdfe3285a1355c49e357576720a56c230c3..b391e37fb4fda221a6abc52b20e25250cf0cdc37 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C +++ b/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.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 @@ -294,9 +294,9 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::countPatchType() const { label nPatches = 0; - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { - if (isA<PatchType>(mesh_.boundaryMesh()[patchI])) + if (isA<PatchType>(mesh_.boundaryMesh()[patchi])) { nPatches++; } @@ -319,9 +319,9 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches() forAll(mesh_.globalData().processorPatches(), i) { - label patchI = mesh_.globalData().processorPatches()[i]; + label patchi = mesh_.globalData().processorPatches()[i]; const processorPolyPatch& procPatch = - refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]); + refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchi]); patchInfo.clear(); patchInfo.reserve(procPatch.nPoints()); @@ -348,7 +348,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches() //if (debug) //{ - // Pout<< "Processor patch " << patchI << ' ' << procPatch.name() + // Pout<< "Processor patch " << patchi << ' ' << procPatch.name() // << " communicating with " << procPatch.neighbProcNo() // << " Sending:" << patchInfo.size() << endl; //} @@ -366,9 +366,9 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches() forAll(mesh_.globalData().processorPatches(), i) { - label patchI = mesh_.globalData().processorPatches()[i]; + label patchi = mesh_.globalData().processorPatches()[i]; const processorPolyPatch& procPatch = - refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchI]); + refCast<const processorPolyPatch>(mesh_.boundaryMesh()[patchi]); List<Type> patchInfo; labelList patchPoints; @@ -380,7 +380,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches() //if (debug) //{ - // Pout<< "Processor patch " << patchI << ' ' << procPatch.name() + // Pout<< "Processor patch " << patchi << ' ' << procPatch.name() // << " communicating with " << procPatch.neighbProcNo() // << " Received:" << patchInfo.size() << endl; //} @@ -428,9 +428,9 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleCyclicPatches() DynamicList<label> nbrPoints; DynamicList<label> thisPoints; - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { - const polyPatch& patch = mesh_.boundaryMesh()[patchI]; + const polyPatch& patch = mesh_.boundaryMesh()[patchi]; if (isA<cyclicPolyPatch>(patch)) { @@ -479,7 +479,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleCyclicPatches() //if (debug) //{ - // Pout<< "Cyclic patch " << patchI << ' ' << patch.name() + // Pout<< "Cyclic patch " << patchi << ' ' << patch.name() // << " Changed : " << nbrInfo.size() // << endl; //} diff --git a/src/meshTools/cellClassification/cellClassification.C b/src/meshTools/cellClassification/cellClassification.C index 066062c24fdbbdfcc5a8915246029518f220e5dc..2df5dd90cd5433ad3167f3cf399b2c94292b0413 100644 --- a/src/meshTools/cellClassification/cellClassification.C +++ b/src/meshTools/cellClassification/cellClassification.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,11 +107,11 @@ Foam::boolList Foam::cellClassification::markFaces forAll(myFaces, myFaceI) { - label faceI = myFaces[myFaceI]; + label facei = myFaces[myFaceI]; - if (!cutFace[faceI]) + if (!cutFace[facei]) { - cutFace[faceI] = true; + cutFace[facei] = true; nCutFaces++; } @@ -133,11 +133,11 @@ Foam::boolList Foam::cellClassification::markFaces label allFaceI = 0; - forAll(cutFace, faceI) + forAll(cutFace, facei) { - if (!cutFace[faceI]) + if (!cutFace[facei]) { - allFaces[allFaceI++] = faceI; + allFaces[allFaceI++] = facei; } } @@ -208,11 +208,11 @@ Foam::boolList Foam::cellClassification::markFaces } else { - label faceI = faceTree.shapes().faceLabels()[pHit.index()]; + label facei = faceTree.shapes().faceLabels()[pHit.index()]; - if (!cutFace[faceI]) + if (!cutFace[facei]) { - cutFace[faceI] = true; + cutFace[facei] = true; nAddFaces++; } @@ -258,16 +258,16 @@ void Foam::cellClassification::markCells List<cellInfo> cellInfoList(mesh_.nCells()); // Mark cut cells first - forAll(piercedFace, faceI) + forAll(piercedFace, facei) { - if (piercedFace[faceI]) + if (piercedFace[facei]) { - cellInfoList[mesh_.faceOwner()[faceI]] = + cellInfoList[mesh_.faceOwner()[facei]] = cellInfo(cellClassification::CUT); - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - cellInfoList[mesh_.faceNeighbour()[faceI]] = + cellInfoList[mesh_.faceNeighbour()[facei]] = cellInfo(cellClassification::CUT); } } @@ -283,9 +283,9 @@ void Foam::cellClassification::markCells forAll(outsidePts, outsidePtI) { // Use linear search for points. - label cellI = queryMesh.findCell(outsidePts[outsidePtI], -1, false); + label celli = queryMesh.findCell(outsidePts[outsidePtI], -1, false); - if (returnReduce(cellI, maxOp<label>()) == -1) + if (returnReduce(celli, maxOp<label>()) == -1) { FatalErrorInFunction << "outsidePoint " << outsidePts[outsidePtI] @@ -294,12 +294,12 @@ void Foam::cellClassification::markCells << exit(FatalError); } - if (cellI >= 0) + if (celli >= 0) { - cellInfoList[cellI] = cellInfo(cellClassification::OUTSIDE); + cellInfoList[celli] = cellInfo(cellClassification::OUTSIDE); - // Mark faces of cellI - const labelList& myFaces = mesh_.cells()[cellI]; + // Mark faces of celli + const labelList& myFaces = mesh_.cells()[celli]; forAll(myFaces, myFaceI) { outsideFacesMap.insert(myFaces[myFaceI]); @@ -332,15 +332,15 @@ void Foam::cellClassification::markCells // Get information out of cellInfoList const List<cellInfo>& allInfo = cellInfoCalc.allCellInfo(); - forAll(allInfo, cellI) + forAll(allInfo, celli) { - label t = allInfo[cellI].type(); + label t = allInfo[celli].type(); if (t == cellClassification::NOTSET) { t = cellClassification::INSIDE; } - operator[](cellI) = t; + operator[](celli) = t; } } @@ -398,12 +398,12 @@ void Foam::cellClassification::classifyPoints bool Foam::cellClassification::usesMixedPointsOnly ( const List<pointStatus>& pointSide, - const label cellI + const label celli ) const { const faceList& faces = mesh_.faces(); - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; forAll(cFaces, cFaceI) { @@ -440,33 +440,33 @@ void Foam::cellClassification::getMeshOutside // Get faces on interface between meshType and non-meshType - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - label ownType = operator[](own[faceI]); - label nbrType = operator[](nbr[faceI]); + label ownType = operator[](own[facei]); + label nbrType = operator[](nbr[facei]); if (ownType == meshType && nbrType != meshType) { - outsideFaces[outsideI] = faces[faceI]; - outsideOwner[outsideI] = own[faceI]; // meshType cell + outsideFaces[outsideI] = faces[facei]; + outsideOwner[outsideI] = own[facei]; // meshType cell outsideI++; } else if (ownType != meshType && nbrType == meshType) { - outsideFaces[outsideI] = faces[faceI]; - outsideOwner[outsideI] = nbr[faceI]; // meshType cell + outsideFaces[outsideI] = faces[facei]; + outsideOwner[outsideI] = nbr[facei]; // meshType cell outsideI++; } } // Get faces on outside of real mesh with cells of meshType. - for (label faceI = mesh_.nInternalFaces(); faceI < mesh_.nFaces(); faceI++) + for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++) { - if (operator[](own[faceI]) == meshType) + if (operator[](own[facei]) == meshType) { - outsideFaces[outsideI] = faces[faceI]; - outsideOwner[outsideI] = own[faceI]; // meshType cell + outsideFaces[outsideI] = faces[facei]; + outsideOwner[outsideI] = own[facei]; // meshType cell outsideI++; } } @@ -541,17 +541,17 @@ Foam::label Foam::cellClassification::trimCutCells labelList newCellType(*this); // // Split types into outside and rest -// forAll(*this, cellI) +// forAll(*this, celli) // { -// label type = operator[](cellI); +// label type = operator[](celli); // // if (type == meshType) // { -// newCellType[cellI] = type; +// newCellType[celli] = type; // } // else // { -// newCellType[cellI] = fillType; +// newCellType[celli] = fillType; // } // } @@ -597,15 +597,15 @@ Foam::label Foam::cellClassification::trimCutCells label nChanged = 0; - forAll(newCellType, cellI) + forAll(newCellType, celli) { - if (operator[](cellI) == cellClassification::CUT) + if (operator[](celli) == cellClassification::CUT) { - if (newCellType[cellI] != meshType) + if (newCellType[celli] != meshType) { // Cell was cutCell but further than nLayers away from // meshType. Convert to fillType. - operator[](cellI) = fillType; + operator[](celli) = fillType; nChanged++; } } @@ -701,13 +701,13 @@ Foam::label Foam::cellClassification::fillHangingCells forAll(pCells, i) { - label cellI = pCells[i]; + label celli = pCells[i]; - if (operator[](cellI) == meshType) + if (operator[](celli) == meshType) { - if (usesMixedPointsOnly(pointSide, cellI)) + if (usesMixedPointsOnly(pointSide, celli)) { - operator[](cellI) = fillType; + operator[](celli) = fillType; nChanged++; } diff --git a/src/meshTools/cellClassification/cellClassification.H b/src/meshTools/cellClassification/cellClassification.H index b040819fb2330ec5a0a73adde4c20a7d1e7ab5a0..f544d0de162a02269b1c8fb3a0d660db7746ebd9 100644 --- a/src/meshTools/cellClassification/cellClassification.H +++ b/src/meshTools/cellClassification/cellClassification.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 @@ -183,7 +183,7 @@ private: bool usesMixedPointsOnly ( const List<pointStatus>&, - const label cellI + const label celli ) const; //- Get faces (and its 'owner') inbetween cells of differing type diff --git a/src/meshTools/cellDist/cellDistFuncs.C b/src/meshTools/cellDist/cellDistFuncs.C index fb8300842adb9bb5e0eee7c77f8f0e32e41d62f9..0f4bff324e6041b532de60466159a00f7bb5678c 100644 --- a/src/meshTools/cellDist/cellDistFuncs.C +++ b/src/meshTools/cellDist/cellDistFuncs.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 @@ -110,7 +110,7 @@ Foam::scalar Foam::cellDistFuncs::smallestDist } -// Get point neighbours of faceI (including faceI). Returns number of faces. +// Get point neighbours of facei (including facei). Returns number of faces. // Note: does not allocate storage but does use linear search to determine // uniqueness. For polygonal faces this might be quite inefficient. Foam::label Foam::cellDistFuncs::getPointNeighbours @@ -151,12 +151,12 @@ Foam::label Foam::cellDistFuncs::getPointNeighbours forAll(pointNbs, nbI) { - label faceI = pointNbs[nbI]; + label facei = pointNbs[nbI]; - // Check for faceI in edge-neighbours part of neighbours - if (findIndex(nEdgeNbs, neighbours, faceI) == -1) + // Check for facei in edge-neighbours part of neighbours + if (findIndex(nEdgeNbs, neighbours, facei) == -1) { - neighbours[nNeighbours++] = faceI; + neighbours[nNeighbours++] = facei; } } } @@ -232,11 +232,11 @@ Foam::label Foam::cellDistFuncs::maxPatchSize { label maxSize = 0; - forAll(mesh().boundaryMesh(), patchI) + forAll(mesh().boundaryMesh(), patchi) { - if (patchIDs.found(patchI)) + if (patchIDs.found(patchi)) { - const polyPatch& patch = mesh().boundaryMesh()[patchI]; + const polyPatch& patch = mesh().boundaryMesh()[patchi]; maxSize = Foam::max(maxSize, patch.size()); } @@ -254,11 +254,11 @@ const { label sum = 0; - forAll(mesh().boundaryMesh(), patchI) + forAll(mesh().boundaryMesh(), patchi) { - if (patchIDs.found(patchI)) + if (patchIDs.found(patchi)) { - const polyPatch& patch = mesh().boundaryMesh()[patchI]; + const polyPatch& patch = mesh().boundaryMesh()[patchi]; sum += patch.size(); } @@ -285,11 +285,11 @@ void Foam::cellDistFuncs::correctBoundaryFaceCells const vectorField& cellCentres = mesh().cellCentres(); const labelList& faceOwner = mesh().faceOwner(); - forAll(mesh().boundaryMesh(), patchI) + forAll(mesh().boundaryMesh(), patchi) { - if (patchIDs.found(patchI)) + if (patchIDs.found(patchi)) { - const polyPatch& patch = mesh().boundaryMesh()[patchI]; + const polyPatch& patch = mesh().boundaryMesh()[patchi]; // Check cells with face on wall forAll(patch, patchFaceI) @@ -301,13 +301,13 @@ void Foam::cellDistFuncs::correctBoundaryFaceCells neighbours ); - label cellI = faceOwner[patch.start() + patchFaceI]; + label celli = faceOwner[patch.start() + patchFaceI]; label minFaceI = -1; - wallDistCorrected[cellI] = smallestDist + wallDistCorrected[celli] = smallestDist ( - cellCentres[cellI], + cellCentres[celli], patch, nNeighbours, neighbours, @@ -315,7 +315,7 @@ void Foam::cellDistFuncs::correctBoundaryFaceCells ); // Store wallCell and its nearest neighbour - nearestFace.insert(cellI, minFaceI); + nearestFace.insert(celli, minFaceI); } } } @@ -335,11 +335,11 @@ void Foam::cellDistFuncs::correctBoundaryPointCells const vectorField& cellCentres = mesh().cellCentres(); - forAll(mesh().boundaryMesh(), patchI) + forAll(mesh().boundaryMesh(), patchi) { - if (patchIDs.found(patchI)) + if (patchIDs.found(patchi)) { - const polyPatch& patch = mesh().boundaryMesh()[patchI]; + const polyPatch& patch = mesh().boundaryMesh()[patchi]; const labelList& meshPoints = patch.meshPoints(); const labelListList& pointFaces = patch.pointFaces(); @@ -352,17 +352,17 @@ void Foam::cellDistFuncs::correctBoundaryPointCells forAll(neighbours, neighbourI) { - label cellI = neighbours[neighbourI]; + label celli = neighbours[neighbourI]; - if (!nearestFace.found(cellI)) + if (!nearestFace.found(celli)) { const labelList& wallFaces = pointFaces[meshPointI]; label minFaceI = -1; - wallDistCorrected[cellI] = smallestDist + wallDistCorrected[celli] = smallestDist ( - cellCentres[cellI], + cellCentres[celli], patch, wallFaces.size(), wallFaces, @@ -370,7 +370,7 @@ void Foam::cellDistFuncs::correctBoundaryPointCells ); // Store wallCell and its nearest neighbour - nearestFace.insert(cellI, minFaceI); + nearestFace.insert(celli, minFaceI); } } } diff --git a/src/meshTools/cellDist/cellDistFuncsTemplates.C b/src/meshTools/cellDist/cellDistFuncsTemplates.C index 176f81e5d6971b7effaa715e0f19cc8376c8af91..ad8b7c070efbb4e053e332f9f8a0394c74f7ad42 100644 --- a/src/meshTools/cellDist/cellDistFuncsTemplates.C +++ b/src/meshTools/cellDist/cellDistFuncsTemplates.C @@ -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 @@ -37,11 +37,11 @@ Foam::labelHashSet Foam::cellDistFuncs::getPatchIDs() const labelHashSet patchIDs(bMesh.size()); - forAll(bMesh, patchI) + forAll(bMesh, patchi) { - if (isA<Type>(bMesh[patchI])) + if (isA<Type>(bMesh[patchi])) { - patchIDs.insert(patchI); + patchIDs.insert(patchi); } } return patchIDs; diff --git a/src/meshTools/cellDist/patchWave/patchDataWave.C b/src/meshTools/cellDist/patchWave/patchDataWave.C index 3acd17dc4391af24477a58299d918cb9ebb2b256..b66e99b632be8963c28bc49523b2e41985ef80b3 100644 --- a/src/meshTools/cellDist/patchWave/patchDataWave.C +++ b/src/meshTools/cellDist/patchWave/patchDataWave.C @@ -40,13 +40,13 @@ void Foam::patchDataWave<TransferType>::setChangedFaces label nChangedFaces = 0; - forAll(mesh.boundaryMesh(), patchI) + forAll(mesh.boundaryMesh(), patchi) { - if (patchIDs.found(patchI)) + if (patchIDs.found(patchi)) { - const polyPatch& patch = mesh.boundaryMesh()[patchI]; + const polyPatch& patch = mesh.boundaryMesh()[patchi]; - const Field<Type>& patchField = initialPatchValuePtrs_[patchI]; + const Field<Type>& patchField = initialPatchValuePtrs_[patchi]; forAll(patch.faceCentres(), patchFaceI) { @@ -86,48 +86,48 @@ Foam::label Foam::patchDataWave<TransferType>::getValues // Copy cell values distance_.setSize(cellInfo.size()); - forAll(cellInfo, cellI) + forAll(cellInfo, celli) { - const TransferType & wpn = cellInfo[cellI]; + const TransferType & wpn = cellInfo[celli]; scalar dist = wpn.distSqr(); - if (cellInfo[cellI].valid(waveInfo.data())) + if (cellInfo[celli].valid(waveInfo.data())) { - distance_[cellI] = Foam::sqrt(dist); + distance_[celli] = Foam::sqrt(dist); - cellData_[cellI] = cellInfo[cellI].data(); + cellData_[celli] = cellInfo[celli].data(); } else { // Illegal/unset value. What to do with data? // Note: mag for now. Should maybe be member of TransferType? - distance_[cellI] = mag(dist); + distance_[celli] = mag(dist); - //cellData_[cellI] = point::max; - cellData_[cellI] = cellInfo[cellI].data(); + //cellData_[celli] = point::max; + cellData_[celli] = cellInfo[celli].data(); nIllegal++; } } // Copy boundary values - forAll(patchDistance_, patchI) + forAll(patchDistance_, patchi) { - const polyPatch& patch = mesh.boundaryMesh()[patchI]; + const polyPatch& patch = mesh.boundaryMesh()[patchi]; // Allocate storage for patchDistance scalarField* patchFieldPtr = new scalarField(patch.size()); - patchDistance_.set(patchI, patchFieldPtr); + patchDistance_.set(patchi, patchFieldPtr); scalarField& patchField = *patchFieldPtr; // Allocate storage for patchData Field<Type>* patchDataFieldPtr = new Field<Type>(patch.size()); - patchData_.set(patchI, patchDataFieldPtr); + patchData_.set(patchi, patchDataFieldPtr); Field<Type>& patchDataField = *patchDataFieldPtr; @@ -265,11 +265,11 @@ void Foam::patchDataWave<TransferType>::correct() forAll(wallCells, wallCellI) { - label cellI = wallCells[wallCellI]; + label celli = wallCells[wallCellI]; - label faceI = nearestFace[cellI]; + label facei = nearestFace[celli]; - cellData_[cellI] = faceInfo[faceI].data(); + cellData_[celli] = faceInfo[facei].data(); } } } diff --git a/src/meshTools/cellDist/patchWave/patchWave.C b/src/meshTools/cellDist/patchWave/patchWave.C index fd05d0e728493bb19d44eddc8e9f871255bef945..1185e376ac539263c2431e0d1e0f79901151f351 100644 --- a/src/meshTools/cellDist/patchWave/patchWave.C +++ b/src/meshTools/cellDist/patchWave/patchWave.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 @@ -41,11 +41,11 @@ void Foam::patchWave::setChangedFaces label nChangedFaces = 0; - forAll(mesh.boundaryMesh(), patchI) + forAll(mesh.boundaryMesh(), patchi) { - if (patchIDs.found(patchI)) + if (patchIDs.found(patchi)) { - const polyPatch& patch = mesh.boundaryMesh()[patchI]; + const polyPatch& patch = mesh.boundaryMesh()[patchi]; forAll(patch.faceCentres(), patchFaceI) { @@ -77,31 +77,31 @@ Foam::label Foam::patchWave::getValues(const MeshWave<wallPoint>& waveInfo) // Copy cell values distance_.setSize(cellInfo.size()); - forAll(cellInfo, cellI) + forAll(cellInfo, celli) { - scalar dist = cellInfo[cellI].distSqr(); + scalar dist = cellInfo[celli].distSqr(); - if (cellInfo[cellI].valid(waveInfo.data())) + if (cellInfo[celli].valid(waveInfo.data())) { - distance_[cellI] = Foam::sqrt(dist); + distance_[celli] = Foam::sqrt(dist); } else { - distance_[cellI] = dist; + distance_[celli] = dist; nIllegal++; } } // Copy boundary values - forAll(patchDistance_, patchI) + forAll(patchDistance_, patchi) { - const polyPatch& patch = mesh().boundaryMesh()[patchI]; + const polyPatch& patch = mesh().boundaryMesh()[patchi]; // Allocate storage for patchDistance scalarField* patchDistPtr = new scalarField(patch.size()); - patchDistance_.set(patchI, patchDistPtr); + patchDistance_.set(patchi, patchDistPtr); scalarField& patchField = *patchDistPtr; diff --git a/src/meshTools/cellDist/wallPoint/wallPointData.H b/src/meshTools/cellDist/wallPoint/wallPointData.H index 96c4e3b97e6311a8c374c2a4d7b699dc9751d294..864d099180c227ff5bf6de2edc2d42f39c28d4cf 100644 --- a/src/meshTools/cellDist/wallPoint/wallPointData.H +++ b/src/meshTools/cellDist/wallPoint/wallPointData.H @@ -113,7 +113,7 @@ public: // Needed by meshWave //- Influence of neighbouring face. - // Calls update(...) with cellCentre of cellI + // Calls update(...) with cellCentre of celli template<class TrackingData> inline bool updateCell ( @@ -126,7 +126,7 @@ public: ); //- Influence of neighbouring cell. - // Calls update(...) with faceCentre of faceI + // Calls update(...) with faceCentre of facei template<class TrackingData> inline bool updateFace ( @@ -140,7 +140,7 @@ public: //- Influence of different value on same face. // Merge new and old info. - // Calls update(...) with faceCentre of faceI + // Calls update(...) with faceCentre of facei template<class TrackingData> inline bool updateFace ( diff --git a/src/meshTools/cellFeatures/cellFeatures.C b/src/meshTools/cellFeatures/cellFeatures.C index 660ba7d3fb1ac809a944d4ca2b5b881105bdc8ad..ba4df33514e6ded7a7121cd557ebc25364d2f5fc 100644 --- a/src/meshTools/cellFeatures/cellFeatures.C +++ b/src/meshTools/cellFeatures/cellFeatures.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 @@ -36,12 +36,12 @@ License // Return true if edge start and end are on increasing face vertices. (edge is // guaranteed to be on face) -bool Foam::cellFeatures::faceAlignedEdge(const label faceI, const label edgeI) +bool Foam::cellFeatures::faceAlignedEdge(const label facei, const label edgeI) const { const edge& e = mesh_.edges()[edgeI]; - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; forAll(f, fp) { @@ -55,7 +55,7 @@ bool Foam::cellFeatures::faceAlignedEdge(const label faceI, const label edgeI) FatalErrorInFunction << "Can not find edge " << mesh_.edges()[edgeI] - << " on face " << faceI << abort(FatalError); + << " on face " << facei << abort(FatalError); return false; } @@ -85,12 +85,12 @@ Foam::label Foam::cellFeatures::nextEdge forAll(eFaces, eFaceI) { - label faceI = eFaces[eFaceI]; + label facei = eFaces[eFaceI]; if ( - meshTools::faceOnCell(mesh_, cellI_, faceI) - && (toSuperFace[faceI] == superFaceI) + meshTools::faceOnCell(mesh_, celli_, facei) + && (toSuperFace[facei] == superFaceI) ) { return edgeI; @@ -120,7 +120,7 @@ bool Foam::cellFeatures::isCellFeatureEdge label face0; label face1; - meshTools::getEdgeFaces(mesh_, cellI_, edgeI, face0, face1); + meshTools::getEdgeFaces(mesh_, celli_, edgeI, face0, face1); // Check the angle between them by comparing the face normals. @@ -178,16 +178,16 @@ bool Foam::cellFeatures::isCellFeatureEdge // edges. void Foam::cellFeatures::walkSuperFace ( - const label faceI, + const label facei, const label superFaceI, Map<label>& toSuperFace ) const { - if (!toSuperFace.found(faceI)) + if (!toSuperFace.found(facei)) { - toSuperFace.insert(faceI, superFaceI); + toSuperFace.insert(facei, superFaceI); - const labelList& fEdges = mesh_.faceEdges()[faceI]; + const labelList& fEdges = mesh_.faceEdges()[facei]; forAll(fEdges, fEdgeI) { @@ -197,9 +197,9 @@ void Foam::cellFeatures::walkSuperFace { label face0; label face1; - meshTools::getEdgeFaces(mesh_, cellI_, edgeI, face0, face1); + meshTools::getEdgeFaces(mesh_, celli_, edgeI, face0, face1); - if (face0 == faceI) + if (face0 == facei) { face0 = face1; } @@ -220,7 +220,7 @@ void Foam::cellFeatures::calcSuperFaces() const { // Determine superfaces by edge walking across non-feature edges - const labelList& cFaces = mesh_.cells()[cellI_]; + const labelList& cFaces = mesh_.cells()[celli_]; // Mapping from old to super face: // <not found> : not visited @@ -231,13 +231,13 @@ void Foam::cellFeatures::calcSuperFaces() const forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - if (!toSuperFace.found(faceI)) + if (!toSuperFace.found(facei)) { walkSuperFace ( - faceI, + facei, superFaceI, toSuperFace ); @@ -251,9 +251,9 @@ void Foam::cellFeatures::calcSuperFaces() const forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - faceMap_[toSuperFace[faceI]].append(faceI); + faceMap_[toSuperFace[facei]].append(facei); } forAll(faceMap_, superI) @@ -270,9 +270,9 @@ void Foam::cellFeatures::calcSuperFaces() const forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - label superFaceI = toSuperFace[faceI]; + label superFaceI = toSuperFace[facei]; if (faces[superFaceI].empty()) { @@ -281,7 +281,7 @@ void Foam::cellFeatures::calcSuperFaces() const // Find starting feature edge on face. label startEdgeI = -1; - const labelList& fEdges = mesh_.faceEdges()[faceI]; + const labelList& fEdges = mesh_.faceEdges()[facei]; forAll(fEdges, fEdgeI) { @@ -300,15 +300,15 @@ void Foam::cellFeatures::calcSuperFaces() const { // Walk point-edge-point along feature edges - DynamicList<label> superFace(10*mesh_.faces()[faceI].size()); + DynamicList<label> superFace(10*mesh_.faces()[facei].size()); const edge& e = mesh_.edges()[startEdgeI]; // Walk either start-end or end-start depending on orientation - // of face. SuperFace will have cellI as owner. + // of face. SuperFace will have celli as owner. bool flipOrientation = - (mesh_.faceOwner()[faceI] == cellI_) - ^ (faceAlignedEdge(faceI, startEdgeI)); + (mesh_.faceOwner()[facei] == celli_) + ^ (faceAlignedEdge(facei, startEdgeI)); label startVertI = -1; @@ -356,7 +356,7 @@ void Foam::cellFeatures::calcSuperFaces() const { WarningInFunction << " Can not collapse faces " << faceMap_[superFaceI] - << " into one big face on cell " << cellI_ << endl + << " into one big face on cell " << celli_ << endl << "Try decreasing minCos:" << minCos_ << endl; } else @@ -376,17 +376,17 @@ Foam::cellFeatures::cellFeatures ( const primitiveMesh& mesh, const scalar minCos, - const label cellI + const label celli ) : mesh_(mesh), minCos_(minCos), - cellI_(cellI), - featureEdge_(10*mesh.cellEdges()[cellI].size()), + celli_(celli), + featureEdge_(10*mesh.cellEdges()[celli].size()), facesPtr_(NULL), faceMap_(0) { - const labelList& cEdges = mesh_.cellEdges()[cellI_]; + const labelList& cEdges = mesh_.cellEdges()[celli_]; forAll(cEdges, cEdgeI) { @@ -478,19 +478,19 @@ bool Foam::cellFeatures::isFeaturePoint(const label edge0, const label edge1) } -bool Foam::cellFeatures::isFeatureVertex(const label faceI, const label vertI) +bool Foam::cellFeatures::isFeatureVertex(const label facei, const label vertI) const { if ( - (faceI < 0) - || (faceI >= mesh_.nFaces()) + (facei < 0) + || (facei >= mesh_.nFaces()) || (vertI < 0) || (vertI >= mesh_.nPoints()) ) { FatalErrorInFunction - << "Illegal face " << faceI << " or vertex " << vertI + << "Illegal face " << facei << " or vertex " << vertI << abort(FatalError); } @@ -503,7 +503,7 @@ bool Foam::cellFeatures::isFeatureVertex(const label faceI, const label vertI) { label edgeI = pEdges[pEdgeI]; - if (meshTools::edgeOnFace(mesh_, faceI, edgeI)) + if (meshTools::edgeOnFace(mesh_, facei, edgeI)) { if (edge0 == -1) { @@ -523,7 +523,7 @@ bool Foam::cellFeatures::isFeatureVertex(const label faceI, const label vertI) { FatalErrorInFunction << "Did not find two edges sharing vertex " << vertI - << " on face " << faceI << " vertices:" << mesh_.faces()[faceI] + << " on face " << facei << " vertices:" << mesh_.faces()[facei] << abort(FatalError); } diff --git a/src/meshTools/cellFeatures/cellFeatures.H b/src/meshTools/cellFeatures/cellFeatures.H index fb8a523c4d9353736c11c1974613927206b7461f..6ba4fcbd586a40fc547c3f9515d72ff12c91c02c 100644 --- a/src/meshTools/cellFeatures/cellFeatures.H +++ b/src/meshTools/cellFeatures/cellFeatures.H @@ -69,7 +69,7 @@ class cellFeatures // same face before edge/point is 'feature'. scalar minCos_; - label cellI_; + label celli_; //- Feature edges labelHashSet featureEdge_; @@ -97,7 +97,7 @@ class cellFeatures void walkSuperFace ( - const label faceI, + const label facei, const label superFaceI, Map<label>& toSuperFace ) const; @@ -120,7 +120,7 @@ public: ( const primitiveMesh&, const scalar minCos, // angle to use for feature recognition. - const label cellI + const label celli ); @@ -171,9 +171,9 @@ public: // from one face but not from another. bool isFeaturePoint(const label edge0, const label edge1) const; - //- Is vertexI on faceI used by two edges that form feature + //- Is vertexI on facei used by two edges that form feature // point - bool isFeatureVertex(const label faceI, const label vertI) const; + bool isFeatureVertex(const label facei, const label vertI) const; }; diff --git a/src/meshTools/cellQuality/cellQuality.C b/src/meshTools/cellQuality/cellQuality.C index c1165ee375b147b981c720da5821a7ff2b258020..b0cf297010c4953b745f89c9bec1341383875cbe 100644 --- a/src/meshTools/cellQuality/cellQuality.C +++ b/src/meshTools/cellQuality/cellQuality.C @@ -57,41 +57,41 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::nonOrthogonality() const const labelList& own = mesh_.faceOwner(); const labelList& nei = mesh_.faceNeighbour(); - forAll(nei, faceI) + forAll(nei, facei) { - vector d = centres[nei[faceI]] - centres[own[faceI]]; - vector s = areas[faceI]; + vector d = centres[nei[facei]] - centres[own[facei]]; + vector s = areas[facei]; scalar magS = mag(s); scalar cosDDotS = radToDeg(Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL)))); - result[own[faceI]] = max(cosDDotS, result[own[faceI]]); + result[own[facei]] = max(cosDDotS, result[own[facei]]); - result[nei[faceI]] = max(cosDDotS, result[nei[faceI]]); + result[nei[facei]] = max(cosDDotS, result[nei[facei]]); } - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { const labelUList& faceCells = - mesh_.boundaryMesh()[patchI].faceCells(); + mesh_.boundaryMesh()[patchi].faceCells(); const vectorField::subField faceCentres = - mesh_.boundaryMesh()[patchI].faceCentres(); + mesh_.boundaryMesh()[patchi].faceCentres(); const vectorField::subField faceAreas = - mesh_.boundaryMesh()[patchI].faceAreas(); + mesh_.boundaryMesh()[patchi].faceAreas(); - forAll(faceCentres, faceI) + forAll(faceCentres, facei) { - vector d = faceCentres[faceI] - centres[faceCells[faceI]]; - vector s = faceAreas[faceI]; + vector d = faceCentres[facei] - centres[faceCells[facei]]; + vector s = faceAreas[facei]; scalar magS = mag(s); scalar cosDDotS = radToDeg(Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL)))); - result[faceCells[faceI]] = max(cosDDotS, result[faceCells[faceI]]); + result[faceCells[facei]] = max(cosDDotS, result[faceCells[facei]]); } } @@ -119,58 +119,58 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::skewness() const const labelList& own = mesh_.faceOwner(); const labelList& nei = mesh_.faceNeighbour(); - forAll(nei, faceI) + forAll(nei, facei) { scalar dOwn = mag ( - (faceCtrs[faceI] - cellCtrs[own[faceI]]) & areas[faceI] - )/mag(areas[faceI]); + (faceCtrs[facei] - cellCtrs[own[facei]]) & areas[facei] + )/mag(areas[facei]); scalar dNei = mag ( - (cellCtrs[nei[faceI]] - faceCtrs[faceI]) & areas[faceI] - )/mag(areas[faceI]); + (cellCtrs[nei[facei]] - faceCtrs[facei]) & areas[facei] + )/mag(areas[facei]); point faceIntersection = - cellCtrs[own[faceI]] - + (dOwn/(dOwn+dNei))*(cellCtrs[nei[faceI]] - cellCtrs[own[faceI]]); + cellCtrs[own[facei]] + + (dOwn/(dOwn+dNei))*(cellCtrs[nei[facei]] - cellCtrs[own[facei]]); scalar skewness = - mag(faceCtrs[faceI] - faceIntersection) - /(mag(cellCtrs[nei[faceI]] - cellCtrs[own[faceI]]) + VSMALL); + mag(faceCtrs[facei] - faceIntersection) + /(mag(cellCtrs[nei[facei]] - cellCtrs[own[facei]]) + VSMALL); - result[own[faceI]] = max(skewness, result[own[faceI]]); + result[own[facei]] = max(skewness, result[own[facei]]); - result[nei[faceI]] = max(skewness, result[nei[faceI]]); + result[nei[facei]] = max(skewness, result[nei[facei]]); } - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { const labelUList& faceCells = - mesh_.boundaryMesh()[patchI].faceCells(); + mesh_.boundaryMesh()[patchi].faceCells(); const vectorField::subField faceCentres = - mesh_.boundaryMesh()[patchI].faceCentres(); + mesh_.boundaryMesh()[patchi].faceCentres(); const vectorField::subField faceAreas = - mesh_.boundaryMesh()[patchI].faceAreas(); + mesh_.boundaryMesh()[patchi].faceAreas(); - forAll(faceCentres, faceI) + forAll(faceCentres, facei) { - vector n = faceAreas[faceI]/mag(faceAreas[faceI]); + vector n = faceAreas[facei]/mag(faceAreas[facei]); point faceIntersection = - cellCtrs[faceCells[faceI]] - + ((faceCentres[faceI] - cellCtrs[faceCells[faceI]])&n)*n; + cellCtrs[faceCells[facei]] + + ((faceCentres[facei] - cellCtrs[faceCells[facei]])&n)*n; scalar skewness = - mag(faceCentres[faceI] - faceIntersection) + mag(faceCentres[facei] - faceIntersection) /( - mag(faceCentres[faceI] - cellCtrs[faceCells[faceI]]) + mag(faceCentres[facei] - cellCtrs[faceCells[facei]]) + VSMALL ); - result[faceCells[faceI]] = max(skewness, result[faceCells[faceI]]); + result[faceCells[facei]] = max(skewness, result[faceCells[facei]]); } } @@ -196,35 +196,35 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceNonOrthogonality() const const labelList& own = mesh_.faceOwner(); const labelList& nei = mesh_.faceNeighbour(); - forAll(nei, faceI) + forAll(nei, facei) { - vector d = centres[nei[faceI]] - centres[own[faceI]]; - vector s = areas[faceI]; + vector d = centres[nei[facei]] - centres[own[facei]]; + vector s = areas[facei]; scalar magS = mag(s); scalar cosDDotS = radToDeg(Foam::acos(min(1.0, (d & s)/(mag(d)*magS + VSMALL)))); - result[faceI] = cosDDotS; + result[facei] = cosDDotS; } label globalFaceI = mesh_.nInternalFaces(); - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { const labelUList& faceCells = - mesh_.boundaryMesh()[patchI].faceCells(); + mesh_.boundaryMesh()[patchi].faceCells(); const vectorField::subField faceCentres = - mesh_.boundaryMesh()[patchI].faceCentres(); + mesh_.boundaryMesh()[patchi].faceCentres(); const vectorField::subField faceAreas = - mesh_.boundaryMesh()[patchI].faceAreas(); + mesh_.boundaryMesh()[patchi].faceAreas(); - forAll(faceCentres, faceI) + forAll(faceCentres, facei) { - vector d = faceCentres[faceI] - centres[faceCells[faceI]]; - vector s = faceAreas[faceI]; + vector d = faceCentres[facei] - centres[faceCells[facei]]; + vector s = faceAreas[facei]; scalar magS = mag(s); scalar cosDDotS = @@ -257,53 +257,53 @@ Foam::tmp<Foam::scalarField> Foam::cellQuality::faceSkewness() const const labelList& own = mesh_.faceOwner(); const labelList& nei = mesh_.faceNeighbour(); - forAll(nei, faceI) + forAll(nei, facei) { scalar dOwn = mag ( - (faceCtrs[faceI] - cellCtrs[own[faceI]]) & areas[faceI] - )/mag(areas[faceI]); + (faceCtrs[facei] - cellCtrs[own[facei]]) & areas[facei] + )/mag(areas[facei]); scalar dNei = mag ( - (cellCtrs[nei[faceI]] - faceCtrs[faceI]) & areas[faceI] - )/mag(areas[faceI]); + (cellCtrs[nei[facei]] - faceCtrs[facei]) & areas[facei] + )/mag(areas[facei]); point faceIntersection = - cellCtrs[own[faceI]] - + (dOwn/(dOwn+dNei))*(cellCtrs[nei[faceI]] - cellCtrs[own[faceI]]); + cellCtrs[own[facei]] + + (dOwn/(dOwn+dNei))*(cellCtrs[nei[facei]] - cellCtrs[own[facei]]); - result[faceI] = - mag(faceCtrs[faceI] - faceIntersection) - /(mag(cellCtrs[nei[faceI]] - cellCtrs[own[faceI]]) + VSMALL); + result[facei] = + mag(faceCtrs[facei] - faceIntersection) + /(mag(cellCtrs[nei[facei]] - cellCtrs[own[facei]]) + VSMALL); } label globalFaceI = mesh_.nInternalFaces(); - forAll(mesh_.boundaryMesh(), patchI) + forAll(mesh_.boundaryMesh(), patchi) { const labelUList& faceCells = - mesh_.boundaryMesh()[patchI].faceCells(); + mesh_.boundaryMesh()[patchi].faceCells(); const vectorField::subField faceCentres = - mesh_.boundaryMesh()[patchI].faceCentres(); + mesh_.boundaryMesh()[patchi].faceCentres(); const vectorField::subField faceAreas = - mesh_.boundaryMesh()[patchI].faceAreas(); + mesh_.boundaryMesh()[patchi].faceAreas(); - forAll(faceCentres, faceI) + forAll(faceCentres, facei) { - vector n = faceAreas[faceI]/mag(faceAreas[faceI]); + vector n = faceAreas[facei]/mag(faceAreas[facei]); point faceIntersection = - cellCtrs[faceCells[faceI]] - + ((faceCentres[faceI] - cellCtrs[faceCells[faceI]])&n)*n; + cellCtrs[faceCells[facei]] + + ((faceCentres[facei] - cellCtrs[faceCells[facei]])&n)*n; result[globalFaceI++] = - mag(faceCentres[faceI] - faceIntersection) + mag(faceCentres[facei] - faceIntersection) /( - mag(faceCentres[faceI] - cellCtrs[faceCells[faceI]]) + mag(faceCentres[facei] - cellCtrs[faceCells[facei]]) + VSMALL ); } diff --git a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C index 25cbcc4a47deeceea9034da2c96daf8b6446c244..58870f5758e13dcc1b263fe0f35efbb5bfce093b 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/cylindrical.C @@ -67,8 +67,8 @@ void Foam::cylindrical::init tensorField& R = Rptr_(); forAll(cells, i) { - label cellI = cells[i]; - vector dir = cc[cellI] - origin_; + label celli = cells[i]; + vector dir = cc[celli] - origin_; dir /= mag(dir) + VSMALL; R[i] = axesRotation(e3_, dir).R(); @@ -79,12 +79,12 @@ void Foam::cylindrical::init Rptr_.reset(new tensorField(mesh.nCells())); tensorField& R = Rptr_(); - forAll(cc, cellI) + forAll(cc, celli) { - vector dir = cc[cellI] - origin_; + vector dir = cc[celli] - origin_; dir /= mag(dir) + VSMALL; - R[cellI] = axesRotation(e3_, dir).R(); + R[celli] = axesRotation(e3_, dir).R(); } } } @@ -194,11 +194,11 @@ void Foam::cylindrical::updateCells forAll(cells, i) { - label cellI = cells[i]; - vector dir = cc[cellI] - origin_; + label celli = cells[i]; + vector dir = cc[celli] - origin_; dir /= mag(dir) + VSMALL; - R[cellI] = axesRotation(e3_, dir).R(); + R[celli] = axesRotation(e3_, dir).R(); } } @@ -307,8 +307,8 @@ Foam::tmp<Foam::tensorField> Foam::cylindrical::transformTensor tensorField& t = tt.ref(); forAll(cellMap, i) { - const label cellI = cellMap[i]; - t[i] = R[cellI] & tf[i] & Rtr[cellI]; + const label celli = cellMap[i]; + t[i] = R[celli] & tf[i] & Rtr[celli]; } return tt; diff --git a/src/meshTools/edgeFaceCirculator/edgeFaceCirculator.H b/src/meshTools/edgeFaceCirculator/edgeFaceCirculator.H index 970c2d96c2005ec2a50426e220aa97ebdaadc2c2..8aa85d978b9a715356ebd48d1e2e16567b9785dc 100644 --- a/src/meshTools/edgeFaceCirculator/edgeFaceCirculator.H +++ b/src/meshTools/edgeFaceCirculator/edgeFaceCirculator.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 @@ -120,11 +120,11 @@ class edgeFaceCirculator inline void setEnd(); //- Check and set faceLabel_ and ownerSide_ - inline void setFace(const label faceI, const label cellI); + inline void setFace(const label facei, const label celli); //- Set faceLabel_ to be the other face on the cell that uses the // edge. - inline void otherFace(const label cellI); + inline void otherFace(const label celli); public: diff --git a/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H b/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H index a5c8a99c7dd693ea9f605599ba794acb5e60647e..f63bca13f3357acfc83a77bdccd2c05c682e922a 100644 --- a/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.H +++ b/src/meshTools/edgeFaceCirculator/edgeFaceCirculatorI.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,29 +36,29 @@ void Foam::edgeFaceCirculator::setEnd() void Foam::edgeFaceCirculator::setFace ( - const label faceI, - const label cellI + const label facei, + const label celli ) { - faceLabel_ = faceI; + faceLabel_ = facei; - if (!isBoundaryEdge_ && !mesh_.isInternalFace(faceI)) + if (!isBoundaryEdge_ && !mesh_.isInternalFace(facei)) { FatalErrorInFunction << "Edge is not defined as boundary edge but still walked to" - << " boundary face:" << faceI << " on cell:" << cellI + << " boundary face:" << facei << " on cell:" << celli << abort(FatalError); } } -void Foam::edgeFaceCirculator::otherFace(const label cellI) +void Foam::edgeFaceCirculator::otherFace(const label celli) { const face& f = mesh_.faces()[faceLabel_]; label v0 = f[index_]; label v1 = f.nextLabel(index_); - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; forAll(cFaces, i) { @@ -71,7 +71,7 @@ void Foam::edgeFaceCirculator::otherFace(const label cellI) if (fp >= 0) { index_ = fp; - setFace(faceB, cellI); + setFace(faceB, celli); return; } } @@ -220,17 +220,17 @@ void Foam::edgeFaceCirculator::setCanonical() { if (ownerSide_) { - label cellI = mesh_.faceNeighbour()[faceLabel_]; - otherFace(cellI); + label celli = mesh_.faceNeighbour()[faceLabel_]; + otherFace(celli); // Maintain reverse direction of walking - ownerSide_ = (mesh_.faceOwner()[faceLabel_] == cellI); + ownerSide_ = (mesh_.faceOwner()[faceLabel_] == celli); } else { - label cellI = mesh_.faceOwner()[faceLabel_]; - otherFace(cellI); + label celli = mesh_.faceOwner()[faceLabel_]; + otherFace(celli); // Maintain reverse direction of walking - ownerSide_ = (mesh_.faceOwner()[faceLabel_] == cellI); + ownerSide_ = (mesh_.faceOwner()[faceLabel_] == celli); } } else if (ownerSide_) @@ -239,10 +239,10 @@ void Foam::edgeFaceCirculator::setCanonical() } else { - label cellI = mesh_.faceOwner()[faceLabel_]; - otherFace(cellI); + label celli = mesh_.faceOwner()[faceLabel_]; + otherFace(celli); // Maintain reverse direction of walking - ownerSide_ = (mesh_.faceOwner()[faceLabel_] == cellI); + ownerSide_ = (mesh_.faceOwner()[faceLabel_] == celli); } i++; @@ -360,10 +360,10 @@ Foam::edgeFaceCirculator::operator++() else if (ownerSide_) { // Step to owner - label cellI = mesh_.faceOwner()[faceLabel_]; - otherFace(cellI); + label celli = mesh_.faceOwner()[faceLabel_]; + otherFace(celli); // Maintain direction of walking - ownerSide_ = (mesh_.faceOwner()[faceLabel_] != cellI); + ownerSide_ = (mesh_.faceOwner()[faceLabel_] != celli); // Check for internal edge : ends on starting face. if (!isBoundaryEdge_ && faceLabel_ == startFaceLabel_) @@ -374,10 +374,10 @@ Foam::edgeFaceCirculator::operator++() else if (mesh_.isInternalFace(faceLabel_)) { // Step to neighbour - label cellI = mesh_.faceNeighbour()[faceLabel_]; - otherFace(cellI); + label celli = mesh_.faceNeighbour()[faceLabel_]; + otherFace(celli); // Maintain direction of walking - ownerSide_ = (mesh_.faceOwner()[faceLabel_] != cellI); + ownerSide_ = (mesh_.faceOwner()[faceLabel_] != celli); // Check for internal edge : ends on starting face. if (!isBoundaryEdge_ && faceLabel_ == startFaceLabel_) diff --git a/src/meshTools/indexedOctree/treeDataFace.C b/src/meshTools/indexedOctree/treeDataFace.C index ff831965add55d9e58342e7648ee7e19b60f731c..471740a9245dbb838769856b3cb2d3730809df84 100644 --- a/src/meshTools/indexedOctree/treeDataFace.C +++ b/src/meshTools/indexedOctree/treeDataFace.C @@ -39,11 +39,11 @@ namespace Foam // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -Foam::treeBoundBox Foam::treeDataFace::calcBb(const label faceI) const +Foam::treeBoundBox Foam::treeDataFace::calcBb(const label facei) const { const pointField& points = mesh_.points(); - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; treeBoundBox bb(points[f[0]], points[f[0]]); @@ -207,12 +207,12 @@ Foam::volumeType Foam::treeDataFace::getVolumeType // Get actual intersection point on face - label faceI = faceLabels_[info.index()]; + label facei = faceLabels_[info.index()]; if (debug & 2) { Pout<< "getSampleType : sample:" << sample - << " nearest face:" << faceI; + << " nearest face:" << facei; } const pointField& points = mesh_.points(); @@ -220,9 +220,9 @@ Foam::volumeType Foam::treeDataFace::getVolumeType // Retest to classify where on face info is. Note: could be improved. We // already have point. - const face& f = mesh_.faces()[faceI]; - const vector& area = mesh_.faceAreas()[faceI]; - const point& fc = mesh_.faceCentres()[faceI]; + const face& f = mesh_.faces()[facei]; + const vector& area = mesh_.faceAreas()[facei]; + const point& fc = mesh_.faceCentres()[facei]; pointHit curHit = f.nearestPoint(sample, points); const point& curPt = curHit.rawPoint(); @@ -312,7 +312,7 @@ Foam::volumeType Foam::treeDataFace::getVolumeType // 3] Get the 'real' edge the face intersection is on // - const labelList& myEdges = mesh_.faceEdges()[faceI]; + const labelList& myEdges = mesh_.faceEdges()[facei]; forAll(myEdges, myEdgeI) { @@ -413,7 +413,7 @@ Foam::volumeType Foam::treeDataFace::getVolumeType if (debug & 2) { Pout<< "Did not find sample " << sample - << " anywhere related to nearest face " << faceI << endl + << " anywhere related to nearest face " << facei << endl << "Face:"; forAll(f, fp) @@ -459,9 +459,9 @@ bool Foam::treeDataFace::overlaps // 2. Check if one or more face points inside - label faceI = faceLabels_[index]; + label facei = faceLabels_[index]; - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; if (cubeBb.containsAny(points, f)) { return true; @@ -469,7 +469,7 @@ bool Foam::treeDataFace::overlaps // 3. Difficult case: all points are outside but connecting edges might // go through cube. Use triangle-bounding box intersection. - const point& fc = mesh_.faceCentres()[faceI]; + const point& fc = mesh_.faceCentres()[facei]; forAll(f, fp) { @@ -558,15 +558,15 @@ bool Foam::treeDataFace::findIntersectOp::operator() } } - const label faceI = shape.faceLabels_[index]; + const label facei = shape.faceLabels_[index]; const vector dir(end - start); - pointHit inter = shape.mesh_.faces()[faceI].intersection + pointHit inter = shape.mesh_.faces()[facei].intersection ( start, dir, - shape.mesh_.faceCentres()[faceI], + shape.mesh_.faceCentres()[facei], shape.mesh_.points(), intersection::HALF_RAY ); diff --git a/src/meshTools/indexedOctree/treeDataFace.H b/src/meshTools/indexedOctree/treeDataFace.H index 44a735d8c59b8e41246d4cbf845232e7a8a5ce90..d6f38a03a5fddc0e5a26168dcc6cdb3b1a45dd0f 100644 --- a/src/meshTools/indexedOctree/treeDataFace.H +++ b/src/meshTools/indexedOctree/treeDataFace.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 @@ -85,7 +85,7 @@ class treeDataFace // Private Member Functions //- Calculate face bounding box - treeBoundBox calcBb(const label cellI) const; + treeBoundBox calcBb(const label celli) const; //- Initialise all member data void update(); diff --git a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C index 30265ba8ed850c08d9bc6919c00e03444455f26a..00ad228c03fdd77b0196f5a4c5b8143f8cbed844 100644 --- a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C +++ b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C @@ -175,16 +175,16 @@ Foam::volumeType Foam::treeDataPrimitivePatch<PatchType>::getVolumeType } // Get actual intersection point on face - label faceI = info.index(); + label facei = info.index(); if (debug & 2) { Pout<< "getSampleType : sample:" << sample - << " nearest face:" << faceI; + << " nearest face:" << facei; } const pointField& points = patch_.localPoints(); - const typename PatchType::FaceType& f = patch_.localFaces()[faceI]; + const typename PatchType::FaceType& f = patch_.localFaces()[facei]; // Retest to classify where on face info is. Note: could be improved. We // already have point. @@ -269,7 +269,7 @@ Foam::volumeType Foam::treeDataPrimitivePatch<PatchType>::getVolumeType // 3] Get the 'real' edge the face intersection is on // - const labelList& fEdges = patch_.faceEdges()[faceI]; + const labelList& fEdges = patch_.faceEdges()[facei]; forAll(fEdges, fEdgeI) { @@ -359,7 +359,7 @@ Foam::volumeType Foam::treeDataPrimitivePatch<PatchType>::getVolumeType if (debug & 2) { Pout<< "Did not find sample " << sample - << " anywhere related to nearest face " << faceI << endl + << " anywhere related to nearest face " << facei << endl << "Face:"; forAll(f, fp) diff --git a/src/meshTools/indexedOctree/treeDataTriSurface.C b/src/meshTools/indexedOctree/treeDataTriSurface.C index f88465d65082c56eedcee78fcfb8fc1ed989402c..da376e50220dd50f3e975dbe5d2faafdbe83b76d 100644 --- a/src/meshTools/indexedOctree/treeDataTriSurface.C +++ b/src/meshTools/indexedOctree/treeDataTriSurface.C @@ -46,13 +46,13 @@ Foam::volumeType Foam::treeDataPrimitivePatch<Foam::triSurface>::getVolumeType } // Get actual intersection point on face - label faceI = info.index(); + label facei = info.index(); triSurfaceTools::sideType t = triSurfaceTools::surfaceSide ( patch_, sample, - faceI + facei ); if (t == triSurfaceTools::UNKNOWN) diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C index c42a97c0dd5edb6291abf855d184659e4bd31653..11b059870e07672712dc5d132442aae88a6b34c1 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.C @@ -101,12 +101,12 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::facePoints tmp<pointField> tfacePoints(new pointField(patch_.size())); pointField& facePoints = tfacePoints.ref(); - forAll(pp, faceI) + forAll(pp, facei) { - facePoints[faceI] = facePoint + facePoints[facei] = facePoint ( mesh, - pp.start()+faceI, + pp.start()+facei, polyMesh::FACE_DIAG_TRIS ).rawPoint(); } @@ -220,22 +220,22 @@ void Foam::mappedPatchBase::findSamples { const point& sample = samples[sampleI]; - label cellI = tree.findInside(sample); + label celli = tree.findInside(sample); - if (cellI == -1) + if (celli == -1) { nearest[sampleI].second().first() = Foam::sqr(GREAT); nearest[sampleI].second().second() = Pstream::myProcNo(); } else { - const point& cc = mesh.cellCentres()[cellI]; + const point& cc = mesh.cellCentres()[celli]; nearest[sampleI].first() = pointIndexHit ( true, cc, - cellI + celli ); nearest[sampleI].second().first() = magSqr(cc-sample); nearest[sampleI].second().second() = Pstream::myProcNo(); @@ -433,22 +433,22 @@ void Foam::mappedPatchBase::findSamples { const point& sample = samples[sampleI]; - label faceI = meshSearchEngine.findNearestFace(sample); + label facei = meshSearchEngine.findNearestFace(sample); - if (faceI == -1) + if (facei == -1) { nearest[sampleI].second().first() = Foam::sqr(GREAT); nearest[sampleI].second().second() = Pstream::myProcNo(); } else { - const point& fc = mesh.faceCentres()[faceI]; + const point& fc = mesh.faceCentres()[facei]; nearest[sampleI].first() = pointIndexHit ( true, fc, - faceI + facei ); nearest[sampleI].second().first() = magSqr(fc-sample); nearest[sampleI].second().second() = Pstream::myProcNo(); @@ -738,29 +738,29 @@ void Foam::mappedPatchBase::calcMapping() const forAll(map, i) { - label faceI = map[i]; + label facei = map[i]; - if (used[faceI] == 0) + if (used[facei] == 0) { - used[faceI] = 1; + used[facei] = 1; } else { FatalErrorInFunction << "On patch " << patch_.name() - << " patchface " << faceI + << " patchface " << facei << " is assigned to more than once." << abort(FatalError); } } } - forAll(used, faceI) + forAll(used, facei) { - if (used[faceI] == 0) + if (used[facei] == 0) { FatalErrorInFunction << "On patch " << patch_.name() - << " patchface " << faceI + << " patchface " << facei << " is never assigned to." << abort(FatalError); } @@ -1246,9 +1246,9 @@ const Foam::polyPatch& Foam::mappedPatchBase::samplePolyPatch() const { const polyMesh& nbrMesh = sampleMesh(); - const label patchI = nbrMesh.boundaryMesh().findPatchID(samplePatch()); + const label patchi = nbrMesh.boundaryMesh().findPatchID(samplePatch()); - if (patchI == -1) + if (patchi == -1) { FatalErrorInFunction << "Cannot find patch " << samplePatch() @@ -1257,7 +1257,7 @@ const Foam::polyPatch& Foam::mappedPatchBase::samplePolyPatch() const << exit(FatalError); } - return nbrMesh.boundaryMesh()[patchI]; + return nbrMesh.boundaryMesh()[patchi]; } @@ -1305,11 +1305,11 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::samplePoints() const Foam::pointIndexHit Foam::mappedPatchBase::facePoint ( const polyMesh& mesh, - const label faceI, + const label facei, const polyMesh::cellDecomposition decompMode ) { - const point& fc = mesh.faceCentres()[faceI]; + const point& fc = mesh.faceCentres()[facei]; switch (decompMode) { @@ -1318,7 +1318,7 @@ Foam::pointIndexHit Foam::mappedPatchBase::facePoint { // For both decompositions the face centre is guaranteed to be // on the face - return pointIndexHit(true, fc, faceI); + return pointIndexHit(true, fc, facei); } break; @@ -1330,7 +1330,7 @@ Foam::pointIndexHit Foam::mappedPatchBase::facePoint // cell-centre with face-diagonal-decomposition triangles. const pointField& p = mesh.points(); - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; if (f.size() <= 3) { @@ -1338,11 +1338,11 @@ Foam::pointIndexHit Foam::mappedPatchBase::facePoint return pointIndexHit(true, fc, 0); } - label cellI = mesh.faceOwner()[faceI]; - const point& cc = mesh.cellCentres()[cellI]; + label celli = mesh.faceOwner()[facei]; + const point& cc = mesh.cellCentres()[celli]; vector d = fc-cc; - const label fp0 = mesh.tetBasePtIs()[faceI]; + const label fp0 = mesh.tetBasePtIs()[facei]; const point& basePoint = p[f[fp0]]; label fp = f.fcIndex(fp0); diff --git a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H index a9419bb8f5c59900dc5f57998ce647e5e9d8cf98..38ef08c3b220b498fbf4e0283854854bb7371a3e 100644 --- a/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H +++ b/src/meshTools/mappedPatches/mappedPolyPatch/mappedPatchBase.H @@ -414,7 +414,7 @@ public: static pointIndexHit facePoint ( const polyMesh&, - const label faceI, + const label facei, const polyMesh::cellDecomposition ); diff --git a/src/meshTools/meshSearch/meshSearch.C b/src/meshTools/meshSearch/meshSearch.C index ac56d0474ddb7ce8a5a5350e7693dff4325032d6..614c660a48e3325320ea24263476520de86a723f 100644 --- a/src/meshTools/meshSearch/meshSearch.C +++ b/src/meshTools/meshSearch/meshSearch.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 @@ -297,14 +297,14 @@ Foam::label Foam::meshSearch::findCellLinear(const point& location) const bool cellFound = false; label n = 0; - label cellI = -1; + label celli = -1; while ((!cellFound) && (n < mesh_.nCells())) { if (mesh_.pointInCell(location, n, cellDecompMode_)) { cellFound = true; - cellI = n; + celli = n; } else { @@ -313,7 +313,7 @@ Foam::label Foam::meshSearch::findCellLinear(const point& location) const } if (cellFound) { - return cellI; + return celli; } else { @@ -354,29 +354,29 @@ Foam::label Foam::meshSearch::findCellWalk forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label cellI = mesh_.faceOwner()[faceI]; - if (cellI == curCellI) + label celli = mesh_.faceOwner()[facei]; + if (celli == curCellI) { - cellI = mesh_.faceNeighbour()[faceI]; + celli = mesh_.faceNeighbour()[facei]; } // Check if this is the correct cell - if (mesh_.pointInCell(location, cellI, cellDecompMode_)) + if (mesh_.pointInCell(location, celli, cellDecompMode_)) { - return cellI; + return celli; } // Also calculate the nearest cell - scalar distSqr = magSqr(mesh_.cellCentres()[cellI] - location); + scalar distSqr = magSqr(mesh_.cellCentres()[celli] - location); if (distSqr < nearestDistSqr) { nearestDistSqr = distSqr; - nearestCellI = cellI; + nearestCellI = celli; } } } @@ -440,15 +440,15 @@ Foam::label Foam::meshSearch::findNearestBoundaryFaceWalk forAll(neighbours, nI) { - label faceI = neighbours[nI]; + label facei = neighbours[nI]; if ( - (faceI >= mesh_.nInternalFaces()) - && (faceI != lastFaceI) + (facei >= mesh_.nInternalFaces()) + && (facei != lastFaceI) ) { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; pointHit curHit = f.nearestPoint ( @@ -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 } } @@ -644,18 +644,18 @@ const //// Works by checking if there is a face inbetween the point and the cell //// centre. //// Check for internal uses proper face decomposition or just average normal. -//bool Foam::meshSearch::pointInCell(const point& p, label cellI) const +//bool Foam::meshSearch::pointInCell(const point& p, label celli) const //{ // if (faceDecomp_) // { -// const point& ctr = mesh_.cellCentres()[cellI]; +// const point& ctr = mesh_.cellCentres()[celli]; // // vector dir(p - ctr); // scalar magDir = mag(dir); // // // Check if any faces are hit by ray from cell centre to p. // // If none -> p is in cell. -// const labelList& cFaces = mesh_.cells()[cellI]; +// const labelList& cFaces = mesh_.cells()[celli]; // // // Make sure half_ray does not pick up any faces on the wrong // // side of the ray. @@ -663,9 +663,9 @@ const // // forAll(cFaces, i) // { -// label faceI = cFaces[i]; +// label facei = cFaces[i]; // -// pointHit inter = mesh_.faces()[faceI].ray +// pointHit inter = mesh_.faces()[facei].ray // ( // ctr, // dir, @@ -695,7 +695,7 @@ const // } // else // { -// const labelList& f = mesh_.cells()[cellI]; +// const labelList& f = mesh_.cells()[celli]; // const labelList& owner = mesh_.faceOwner(); // const vectorField& cf = mesh_.faceCentres(); // const vectorField& Sf = mesh_.faceAreas(); @@ -705,7 +705,7 @@ const // label nFace = f[facei]; // vector proj = p - cf[nFace]; // vector normal = Sf[nFace]; -// if (owner[nFace] == cellI) +// if (owner[nFace] == celli) // { // if ((normal & proj) > 0) // { @@ -840,12 +840,12 @@ Foam::label Foam::meshSearch::findNearestBoundaryFace for ( - label faceI = mesh_.nInternalFaces(); - faceI < mesh_.nFaces(); - faceI++ + label facei = mesh_.nInternalFaces(); + facei < mesh_.nFaces(); + facei++ ) { - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; pointHit curHit = f.nearestPoint @@ -857,7 +857,7 @@ Foam::label Foam::meshSearch::findNearestBoundaryFace if (curHit.distance() < minDist) { minDist = curHit.distance(); - minFaceI = faceI; + minFaceI = facei; } } return minFaceI; diff --git a/src/meshTools/meshStructure/meshStructure.C b/src/meshTools/meshStructure/meshStructure.C index d16495d6efd6bddffa3a5fb3c5e612408e243183..62eeefbdc88066cf378683664f75ec7092916c38 100644 --- a/src/meshTools/meshStructure/meshStructure.C +++ b/src/meshTools/meshStructure/meshStructure.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -43,10 +43,10 @@ bool Foam::meshStructure::isStructuredCell ( const polyMesh& mesh, const label layerI, - const label cellI + const label celli ) const { - const cell& cFaces = mesh.cells()[cellI]; + const cell& cFaces = mesh.cells()[celli]; // Count number of side faces label nSide = 0; @@ -142,10 +142,10 @@ void Foam::meshStructure::correct cellToPatchFaceAddressing_.setSize(mesh.nCells()); cellLayer_.setSize(mesh.nCells()); - forAll(cellToPatchFaceAddressing_, cellI) + forAll(cellToPatchFaceAddressing_, celli) { - cellToPatchFaceAddressing_[cellI] = cellData[cellI].data(); - cellLayer_[cellI] = cellData[cellI].distance(); + cellToPatchFaceAddressing_[celli] = cellData[celli].data(); + cellLayer_[celli] = cellData[celli].distance(); } @@ -158,43 +158,43 @@ void Foam::meshStructure::correct faceToPatchEdgeAddressing_ = labelMin; faceLayer_.setSize(mesh.nFaces()); - forAll(faceToPatchFaceAddressing_, faceI) + forAll(faceToPatchFaceAddressing_, facei) { - label own = mesh.faceOwner()[faceI]; - label patchFaceI = faceData[faceI].data(); - label patchDist = faceData[faceI].distance(); + label own = mesh.faceOwner()[facei]; + label patchFaceI = faceData[facei].data(); + label patchDist = faceData[facei].distance(); - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - label nei = mesh.faceNeighbour()[faceI]; + label nei = mesh.faceNeighbour()[facei]; if (cellData[own].distance() == cellData[nei].distance()) { // side face - faceToPatchFaceAddressing_[faceI] = 0; - faceLayer_[faceI] = cellData[own].distance(); + faceToPatchFaceAddressing_[facei] = 0; + faceLayer_[facei] = cellData[own].distance(); } else if (cellData[own].distance() < cellData[nei].distance()) { // unturned face - faceToPatchFaceAddressing_[faceI] = patchFaceI+1; - faceToPatchEdgeAddressing_[faceI] = -1; - faceLayer_[faceI] = patchDist; + faceToPatchFaceAddressing_[facei] = patchFaceI+1; + faceToPatchEdgeAddressing_[facei] = -1; + faceLayer_[facei] = patchDist; } else { // turned face - faceToPatchFaceAddressing_[faceI] = -(patchFaceI+1); - faceToPatchEdgeAddressing_[faceI] = -1; - faceLayer_[faceI] = patchDist; + faceToPatchFaceAddressing_[facei] = -(patchFaceI+1); + faceToPatchEdgeAddressing_[facei] = -1; + faceLayer_[facei] = patchDist; } } else if (patchDist == cellData[own].distance()) { // starting face - faceToPatchFaceAddressing_[faceI] = -(patchFaceI+1); - faceToPatchEdgeAddressing_[faceI] = -1; - faceLayer_[faceI] = patchDist; + faceToPatchFaceAddressing_[facei] = -(patchFaceI+1); + faceToPatchEdgeAddressing_[facei] = -1; + faceLayer_[facei] = patchDist; } else { @@ -261,14 +261,14 @@ void Foam::meshStructure::correct } // Look up on faces - forAll(faceToPatchEdgeAddressing_, faceI) + forAll(faceToPatchEdgeAddressing_, facei) { - if (faceToPatchEdgeAddressing_[faceI] == labelMin) + if (faceToPatchEdgeAddressing_[facei] == labelMin) { // Face not yet done. Check if all points on same level // or if not see what edge it originates from - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; label levelI = pointLayer_[f[0]]; for (label fp = 1; fp < f.size(); fp++) @@ -283,19 +283,19 @@ void Foam::meshStructure::correct if (levelI != -1) { // All same level - //Pout<< "Horizontal boundary face " << faceI - // << " at:" << mesh.faceCentres()[faceI] - // << " data:" << faceData[faceI] + //Pout<< "Horizontal boundary face " << facei + // << " at:" << mesh.faceCentres()[facei] + // << " data:" << faceData[facei] // << " pointDatas:" // << UIndirectList<pointTopoDistanceData>(pointData, f) // << endl; - label patchFaceI = faceData[faceI].data(); - label patchDist = faceData[faceI].distance(); + label patchFaceI = faceData[facei].data(); + label patchDist = faceData[facei].distance(); - faceToPatchEdgeAddressing_[faceI] = -1; - faceToPatchFaceAddressing_[faceI] = patchFaceI+1; - faceLayer_[faceI] = patchDist; + faceToPatchEdgeAddressing_[facei] = -1; + faceToPatchFaceAddressing_[facei] = patchFaceI+1; + faceLayer_[facei] = patchDist; } else { @@ -317,10 +317,10 @@ void Foam::meshStructure::correct ); if (fnd != pointsToEdge.end()) { - faceToPatchEdgeAddressing_[faceI] = fnd(); - faceToPatchFaceAddressing_[faceI] = 0; - label own = mesh.faceOwner()[faceI]; - faceLayer_[faceI] = cellData[own].distance(); + faceToPatchEdgeAddressing_[facei] = fnd(); + faceToPatchFaceAddressing_[facei] = 0; + label own = mesh.faceOwner()[facei]; + faceLayer_[facei] = cellData[own].distance(); // Note: could test whether the other edges on the // face are consistent @@ -346,13 +346,13 @@ void Foam::meshStructure::correct forAll(lCells, lCellI) { - label cellI = lCells[lCellI]; + label celli = lCells[lCellI]; structured_ = isStructuredCell ( mesh, layerI, - cellI + celli ); if (!structured_) diff --git a/src/meshTools/meshStructure/meshStructure.H b/src/meshTools/meshStructure/meshStructure.H index 24bbbc875eda17838a7c82cbd9e88655a79b8220..dcf75a381ce74ef0e86248c9e29bd286f2f4a2de 100644 --- a/src/meshTools/meshStructure/meshStructure.H +++ b/src/meshTools/meshStructure/meshStructure.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -88,7 +88,7 @@ class meshStructure ( const polyMesh& mesh, const label layerI, - const label cellI + const label celli ) const; //- Calculate all maps. diff --git a/src/meshTools/meshTools/meshTools.C b/src/meshTools/meshTools/meshTools.C index 9eac2eeb9920924d0e8a98f1ef4c5e65f8834cc1..1f0ffec6c55bfda792cad4ac486daded5b80e8af 100644 --- a/src/meshTools/meshTools/meshTools.C +++ b/src/meshTools/meshTools/meshTools.C @@ -284,39 +284,39 @@ void Foam::meshTools::writeOBJ bool Foam::meshTools::edgeOnCell ( const primitiveMesh& mesh, - const label cellI, + const label celli, const label edgeI ) { - return findIndex(mesh.edgeCells(edgeI), cellI) != -1; + return findIndex(mesh.edgeCells(edgeI), celli) != -1; } bool Foam::meshTools::edgeOnFace ( const primitiveMesh& mesh, - const label faceI, + const label facei, const label edgeI ) { - return findIndex(mesh.faceEdges(faceI), edgeI) != -1; + return findIndex(mesh.faceEdges(facei), edgeI) != -1; } -// Return true if faceI part of cellI +// Return true if facei part of celli bool Foam::meshTools::faceOnCell ( const primitiveMesh& mesh, - const label cellI, - const label faceI + const label celli, + const label facei ) { - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { if ( - (mesh.faceOwner()[faceI] == cellI) - || (mesh.faceNeighbour()[faceI] == cellI) + (mesh.faceOwner()[facei] == celli) + || (mesh.faceNeighbour()[facei] == celli) ) { return true; @@ -324,7 +324,7 @@ bool Foam::meshTools::faceOnCell } else { - if (mesh.faceOwner()[faceI] == cellI) + if (mesh.faceOwner()[facei] == celli) { return true; } @@ -426,18 +426,18 @@ Foam::label Foam::meshTools::getSharedFace forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; if ( - mesh.isInternalFace(faceI) + mesh.isInternalFace(facei) && ( - mesh.faceOwner()[faceI] == cell1I - || mesh.faceNeighbour()[faceI] == cell1I + mesh.faceOwner()[facei] == cell1I + || mesh.faceNeighbour()[facei] == cell1I ) ) { - return faceI; + return facei; } } @@ -453,11 +453,11 @@ Foam::label Foam::meshTools::getSharedFace } -// Get the two faces on cellI using edgeI. +// Get the two faces on celli using edgeI. void Foam::meshTools::getEdgeFaces ( const primitiveMesh& mesh, - const label cellI, + const label celli, const label edgeI, label& face0, label& face1 @@ -470,17 +470,17 @@ void Foam::meshTools::getEdgeFaces forAll(eFaces, eFaceI) { - label faceI = eFaces[eFaceI]; + label facei = eFaces[eFaceI]; - if (faceOnCell(mesh, cellI, faceI)) + if (faceOnCell(mesh, celli, facei)) { if (face0 == -1) { - face0 = faceI; + face0 = facei; } else { - face1 = faceI; + face1 = facei; return; } @@ -491,7 +491,7 @@ void Foam::meshTools::getEdgeFaces { FatalErrorInFunction << "Can not find faces using edge " << mesh.edges()[edgeI] - << " on cell " << cellI << abort(FatalError); + << " on cell " << celli << abort(FatalError); } } @@ -535,17 +535,17 @@ Foam::label Foam::meshTools::otherEdge Foam::label Foam::meshTools::otherFace ( const primitiveMesh& mesh, - const label cellI, - const label faceI, + const label celli, + const label facei, const label edgeI ) { label face0; label face1; - getEdgeFaces(mesh, cellI, edgeI, face0, face1); + getEdgeFaces(mesh, celli, edgeI, face0, face1); - if (face0 == faceI) + if (face0 == facei) { return face1; } @@ -561,21 +561,21 @@ Foam::label Foam::meshTools::otherCell ( const primitiveMesh& mesh, const label otherCellI, - const label faceI + const label facei ) { - if (!mesh.isInternalFace(faceI)) + if (!mesh.isInternalFace(facei)) { FatalErrorInFunction - << "Face " << faceI << " is not internal" + << "Face " << facei << " is not internal" << abort(FatalError); } - label newCellI = mesh.faceOwner()[faceI]; + label newCellI = mesh.faceOwner()[facei]; if (newCellI == otherCellI) { - newCellI = mesh.faceNeighbour()[faceI]; + newCellI = mesh.faceNeighbour()[facei]; } return newCellI; } @@ -586,13 +586,13 @@ Foam::label Foam::meshTools::otherCell Foam::label Foam::meshTools::walkFace ( const primitiveMesh& mesh, - const label faceI, + const label facei, const label startEdgeI, const label startVertI, const label nEdges ) { - const labelList& fEdges = mesh.faceEdges(faceI); + const labelList& fEdges = mesh.faceEdges(facei); label edgeI = startEdgeI; @@ -720,7 +720,7 @@ void Foam::meshTools::constrainDirection void Foam::meshTools::getParallelEdges ( const primitiveMesh& mesh, - const label cellI, + const label celli, const label e0, label& e1, label& e2, @@ -728,32 +728,32 @@ void Foam::meshTools::getParallelEdges ) { // Go to any face using e0 - label faceI = meshTools::otherFace(mesh, cellI, -1, e0); + label facei = meshTools::otherFace(mesh, celli, -1, e0); // Opposite edge on face - e1 = meshTools::walkFace(mesh, faceI, e0, mesh.edges()[e0].end(), 2); + e1 = meshTools::walkFace(mesh, facei, e0, mesh.edges()[e0].end(), 2); - faceI = meshTools::otherFace(mesh, cellI, faceI, e1); + facei = meshTools::otherFace(mesh, celli, facei, e1); - e2 = meshTools::walkFace(mesh, faceI, e1, mesh.edges()[e1].end(), 2); + e2 = meshTools::walkFace(mesh, facei, e1, mesh.edges()[e1].end(), 2); - faceI = meshTools::otherFace(mesh, cellI, faceI, e2); + facei = meshTools::otherFace(mesh, celli, facei, e2); - e3 = meshTools::walkFace(mesh, faceI, e2, mesh.edges()[e2].end(), 2); + e3 = meshTools::walkFace(mesh, facei, e2, mesh.edges()[e2].end(), 2); } Foam::vector Foam::meshTools::edgeToCutDir ( const primitiveMesh& mesh, - const label cellI, + const label celli, const label startEdgeI ) { - if (!hexMatcher().isA(mesh, cellI)) + if (!hexMatcher().isA(mesh, celli)) { FatalErrorInFunction - << "Not a hex : cell:" << cellI << abort(FatalError); + << "Not a hex : cell:" << celli << abort(FatalError); } @@ -761,12 +761,12 @@ Foam::vector Foam::meshTools::edgeToCutDir label edgeI = startEdgeI; - label faceI = -1; + label facei = -1; for (label i = 0; i < 3; i++) { // Step to next face, next edge - faceI = meshTools::otherFace(mesh, cellI, faceI, edgeI); + facei = meshTools::otherFace(mesh, celli, facei, edgeI); vector eVec(normEdgeVec(mesh, edgeI)); @@ -781,7 +781,7 @@ Foam::vector Foam::meshTools::edgeToCutDir label vertI = mesh.edges()[edgeI].end(); - edgeI = meshTools::walkFace(mesh, faceI, edgeI, vertI, 2); + edgeI = meshTools::walkFace(mesh, facei, edgeI, vertI, 2); } avgVec /= mag(avgVec) + VSMALL; @@ -794,17 +794,17 @@ Foam::vector Foam::meshTools::edgeToCutDir Foam::label Foam::meshTools::cutDirToEdge ( const primitiveMesh& mesh, - const label cellI, + const label celli, const vector& cutDir ) { - if (!hexMatcher().isA(mesh, cellI)) + if (!hexMatcher().isA(mesh, celli)) { FatalErrorInFunction - << "Not a hex : cell:" << cellI << abort(FatalError); + << "Not a hex : cell:" << celli << abort(FatalError); } - const labelList& cEdges = mesh.cellEdges()[cellI]; + const labelList& cEdges = mesh.cellEdges()[celli]; labelHashSet doneEdges(2*cEdges.size()); @@ -819,7 +819,7 @@ Foam::label Foam::meshTools::cutDirToEdge if (!doneEdges.found(e0)) { - vector avgDir(edgeToCutDir(mesh, cellI, e0)); + vector avgDir(edgeToCutDir(mesh, celli, e0)); scalar cosAngle = mag(avgDir & cutDir); @@ -831,7 +831,7 @@ Foam::label Foam::meshTools::cutDirToEdge // Mark off edges in cEdges. label e1, e2, e3; - getParallelEdges(mesh, cellI, e0, e1, e2, e3); + getParallelEdges(mesh, celli, e0, e1, e2, e3); doneEdges.insert(e0); doneEdges.insert(e1); @@ -846,7 +846,7 @@ Foam::label Foam::meshTools::cutDirToEdge if (!doneEdges.found(cEdges[cEdgeI])) { FatalErrorInFunction - << "Cell:" << cellI << " edges:" << cEdges << endl + << "Cell:" << celli << " edges:" << cEdges << endl << "Edge:" << cEdges[cEdgeI] << " not yet handled" << abort(FatalError); } @@ -856,7 +856,7 @@ Foam::label Foam::meshTools::cutDirToEdge { FatalErrorInFunction << "Problem : did not find edge aligned with " << cutDir - << " on cell " << cellI << abort(FatalError); + << " on cell " << celli << abort(FatalError); } return maxEdgeI; diff --git a/src/meshTools/meshTools/meshTools.H b/src/meshTools/meshTools/meshTools.H index 2974f959633dea16ed0503005f1f19d8a822475c..7d402f5332e1600503040cfd1748dd0af63a394b 100644 --- a/src/meshTools/meshTools/meshTools.H +++ b/src/meshTools/meshTools/meshTools.H @@ -171,7 +171,7 @@ namespace meshTools bool edgeOnCell ( const primitiveMesh&, - const label cellI, + const label celli, const label edgeI ); @@ -179,7 +179,7 @@ namespace meshTools bool edgeOnFace ( const primitiveMesh&, - const label faceI, + const label facei, const label edgeI ); @@ -187,8 +187,8 @@ namespace meshTools bool faceOnCell ( const primitiveMesh&, - const label cellI, - const label faceI + const label celli, + const label facei ); //- Return edge among candidates that uses the two vertices. @@ -228,7 +228,7 @@ namespace meshTools void getEdgeFaces ( const primitiveMesh&, - const label cellI, + const label celli, const label edgeI, label& face0, label& face1 @@ -244,13 +244,13 @@ namespace meshTools const label vertI ); - //- Return face on cell using edgeI but not faceI. Throws error + //- Return face on cell using edgeI but not facei. Throws error // if none found. label otherFace ( const primitiveMesh&, - const label cellI, - const label faceI, + const label celli, + const label facei, const label edgeI ); @@ -259,8 +259,8 @@ namespace meshTools label otherCell ( const primitiveMesh&, - const label cellI, - const label faceI + const label celli, + const label facei ); //- Returns label of edge nEdges away from startEdge (in the direction @@ -268,7 +268,7 @@ namespace meshTools label walkFace ( const primitiveMesh&, - const label faceI, + const label facei, const label startEdgeI, const label startVertI, const label nEdges @@ -310,7 +310,7 @@ namespace meshTools void getParallelEdges ( const primitiveMesh&, - const label cellI, + const label celli, const label e0, label&, label&, @@ -322,7 +322,7 @@ namespace meshTools vector edgeToCutDir ( const primitiveMesh&, - const label cellI, + const label celli, const label edgeI ); @@ -331,7 +331,7 @@ namespace meshTools label cutDirToEdge ( const primitiveMesh&, - const label cellI, + const label celli, const vector& cutDir ); diff --git a/src/meshTools/momentOfInertia/momentOfInertia.C b/src/meshTools/momentOfInertia/momentOfInertia.C index 98b44ac3400170c533e6d5bb41d9882e96749b6d..0ef4c275c19db42f38c1fc41f286396b593ba18c 100644 --- a/src/meshTools/momentOfInertia/momentOfInertia.C +++ b/src/meshTools/momentOfInertia/momentOfInertia.C @@ -320,13 +320,13 @@ Foam::tmp<Foam::tensorField> Foam::momentOfInertia::meshInertia Foam::tensor Foam::momentOfInertia::meshInertia ( const polyMesh& mesh, - label cellI + label celli ) { List<tetIndices> cellTets = polyMeshTetDecomposition::cellTetIndices ( mesh, - cellI + celli ); triFaceList faces(cellTets.size()); diff --git a/src/meshTools/momentOfInertia/momentOfInertia.H b/src/meshTools/momentOfInertia/momentOfInertia.H index 0f56e8b00b7b6b8c9398f2ac9effa28ba11050c5..ef286ac5a4e114ff2b44a19f12de53de60d56307 100644 --- a/src/meshTools/momentOfInertia/momentOfInertia.H +++ b/src/meshTools/momentOfInertia/momentOfInertia.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 @@ -111,7 +111,7 @@ public: static tensor meshInertia ( const polyMesh& mesh, - label cellI + label celli ); }; diff --git a/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C b/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C index 8ae25c28984bc83068a4636de0cdfc73f2684cd1..24e8738d3dcb7e9f1da2d1e6993caa8fadcdb654 100644 --- a/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C +++ b/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C @@ -76,19 +76,19 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh) const faceList& oldFaces = mesh.faces(); const labelListList& pFaces = mesh.pointFaces(); - forAll(Cells, cellI) + forAll(Cells, celli) { - const labelList& curFaces = Cells[cellI]; - const edgeList cellEdges = Cells[cellI].edges(oldFaces); - const labelList cellPoints = Cells[cellI].labels(oldFaces); + const labelList& curFaces = Cells[celli]; + const edgeList cellEdges = Cells[celli].edges(oldFaces); + const labelList cellPoints = Cells[celli].labels(oldFaces); // Find the edges used only once in the cell labelList edgeUsage(cellEdges.size(), 0); - forAll(curFaces, faceI) + forAll(curFaces, facei) { - edgeList curFaceEdges = oldFaces[curFaces[faceI]].edges(); + edgeList curFaceEdges = oldFaces[curFaces[facei]].edges(); forAll(curFaceEdges, faceEdgeI) { @@ -118,15 +118,15 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh) else if (edgeUsage[edgeI] != 2) { WarningInFunction - << "edge " << cellEdges[edgeI] << " in cell " << cellI + << "edge " << cellEdges[edgeI] << " in cell " << celli << " used " << edgeUsage[edgeI] << " times. " << nl << "Should be 1 or 2 - serious error " << "in mesh structure. " << endl; #ifdef DEBUG_ZIPUP - forAll(curFaces, faceI) + forAll(curFaces, facei) { - Info<< "face: " << oldFaces[curFaces[faceI]] + Info<< "face: " << oldFaces[curFaces[facei]] << endl; } @@ -143,7 +143,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh) #endif // Gather the problem cell - problemCells.insert(cellI); + problemCells.insert(celli); } } @@ -153,11 +153,11 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh) singleEdges.setSize(nSingleEdges); #ifdef DEBUG_ZIPUP - Info<< "Cell " << cellI << endl; + Info<< "Cell " << celli << endl; - forAll(curFaces, faceI) + forAll(curFaces, facei) { - Info<< "face: " << oldFaces[curFaces[faceI]] << endl; + Info<< "face: " << oldFaces[curFaces[facei]] << endl; } Info<< "Cell edges: " << cellEdges << nl @@ -499,7 +499,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh) << nl << "Point: " << orderedEdge[checkI] << " edge: " << orderedEdge << endl; - problemCells.insert(cellI); + problemCells.insert(celli); } } } @@ -527,12 +527,12 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh) facesSharingEdge[nfse++] = endPF[pfI]; } - forAll(facesSharingEdge, faceI) + forAll(facesSharingEdge, facei) { bool faceChanges = false; // Label of the face being analysed - const label currentFaceIndex = facesSharingEdge[faceI]; + const label currentFaceIndex = facesSharingEdge[facei]; const edgeList curFaceEdges = oldFaces[currentFaceIndex].edges(); @@ -696,7 +696,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh) << " face: " << newFace << endl; - problemCells.insert(cellI); + problemCells.insert(celli); } } } @@ -743,10 +743,10 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh) labelList patchSizes(bMesh.size(), 0); labelList patchStarts(bMesh.size(), 0); - forAll(bMesh, patchI) + forAll(bMesh, patchi) { - patchSizes[patchI] = bMesh[patchI].size(); - patchStarts[patchI] = bMesh[patchI].start(); + patchSizes[patchi] = bMesh[patchi].size(); + patchStarts[patchi] = bMesh[patchi].start(); } // Reset the mesh. Number of active faces is one beyond the last patch diff --git a/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C b/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C index 933a95a38a5380094b0c9a5b2c4c2b38a04eb150..aae501af8aeb4b0945dff9bb48134e343ea73533 100644 --- a/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C +++ b/src/meshTools/primitiveMeshGeometry/primitiveMeshGeometry.C @@ -116,71 +116,71 @@ void Foam::primitiveMeshGeometry::updateCellCentresAndVols forAll(changedFaces, i) { - label faceI = changedFaces[i]; - cEst[own[faceI]] += faceCentres_[faceI]; - nCellFaces[own[faceI]] += 1; + label facei = changedFaces[i]; + cEst[own[facei]] += faceCentres_[facei]; + nCellFaces[own[facei]] += 1; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - cEst[nei[faceI]] += faceCentres_[faceI]; - nCellFaces[nei[faceI]] += 1; + cEst[nei[facei]] += faceCentres_[facei]; + nCellFaces[nei[facei]] += 1; } } forAll(changedCells, i) { - label cellI = changedCells[i]; - cEst[cellI] /= nCellFaces[cellI]; + label celli = changedCells[i]; + cEst[celli] /= nCellFaces[celli]; } forAll(changedFaces, i) { - label faceI = changedFaces[i]; + label facei = changedFaces[i]; // Calculate 3*face-pyramid volume scalar pyr3Vol = max ( - faceAreas_[faceI] & (faceCentres_[faceI] - cEst[own[faceI]]), + faceAreas_[facei] & (faceCentres_[facei] - cEst[own[facei]]), VSMALL ); // Calculate face-pyramid centre - vector pc = (3.0/4.0)*faceCentres_[faceI] + (1.0/4.0)*cEst[own[faceI]]; + vector pc = (3.0/4.0)*faceCentres_[facei] + (1.0/4.0)*cEst[own[facei]]; // Accumulate volume-weighted face-pyramid centre - cellCentres_[own[faceI]] += pyr3Vol*pc; + cellCentres_[own[facei]] += pyr3Vol*pc; // Accumulate face-pyramid volume - cellVolumes_[own[faceI]] += pyr3Vol; + cellVolumes_[own[facei]] += pyr3Vol; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { // Calculate 3*face-pyramid volume scalar pyr3Vol = max ( - faceAreas_[faceI] & (cEst[nei[faceI]] - faceCentres_[faceI]), + faceAreas_[facei] & (cEst[nei[facei]] - faceCentres_[facei]), VSMALL ); // Calculate face-pyramid centre vector pc = - (3.0/4.0)*faceCentres_[faceI] - + (1.0/4.0)*cEst[nei[faceI]]; + (3.0/4.0)*faceCentres_[facei] + + (1.0/4.0)*cEst[nei[facei]]; // Accumulate volume-weighted face-pyramid centre - cellCentres_[nei[faceI]] += pyr3Vol*pc; + cellCentres_[nei[facei]] += pyr3Vol*pc; // Accumulate face-pyramid volume - cellVolumes_[nei[faceI]] += pyr3Vol; + cellVolumes_[nei[facei]] += pyr3Vol; } } forAll(changedCells, i) { - label cellI = changedCells[i]; + label celli = changedCells[i]; - cellCentres_[cellI] /= cellVolumes_[cellI]; - cellVolumes_[cellI] *= (1.0/3.0); + cellCentres_[celli] /= cellVolumes_[celli]; + cellVolumes_[celli] *= (1.0/3.0); } } @@ -197,13 +197,13 @@ Foam::labelList Foam::primitiveMeshGeometry::affectedCells forAll(changedFaces, i) { - label faceI = changedFaces[i]; + label facei = changedFaces[i]; - affectedCells.insert(own[faceI]); + affectedCells.insert(own[facei]); - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - affectedCells.insert(nei[faceI]); + affectedCells.insert(nei[facei]); } } return affectedCells.toc(); @@ -281,12 +281,12 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - vector d = cellCentres[nei[faceI]] - cellCentres[own[faceI]]; - const vector& s = faceAreas[faceI]; + vector d = cellCentres[nei[facei]] - cellCentres[own[facei]]; + const vector& s = faceAreas[facei]; scalar dDotS = (d & s)/(mag(d)*mag(s) + VSMALL); @@ -297,16 +297,16 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct if (report) { // Severe non-orthogonality but mesh still OK - Pout<< "Severe non-orthogonality for face " << faceI - << " between cells " << own[faceI] - << " and " << nei[faceI] + Pout<< "Severe non-orthogonality for face " << facei + << " between cells " << own[facei] + << " and " << nei[facei] << ": Angle = " << radToDeg(::acos(dDotS)) << " deg." << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } severeNonOrth++; @@ -318,9 +318,9 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct { WarningInFunction << "Severe non-orthogonality detected for face " - << faceI - << " between cells " << own[faceI] << " and " - << nei[faceI] + << facei + << " between cells " << own[facei] << " and " + << nei[facei] << ": Angle = " << radToDeg(::acos(dDotS)) << " deg." << endl; } @@ -329,7 +329,7 @@ bool Foam::primitiveMeshGeometry::checkFaceDotProduct if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } } } @@ -416,13 +416,13 @@ bool Foam::primitiveMeshGeometry::checkFacePyramids forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; // Create the owner pyramid - it will have negative volume scalar pyrVol = pyramidPointFaceRef ( - f[faceI], - cellCentres[own[faceI]] + f[facei], + cellCentres[own[facei]] ).mag(p); if (pyrVol > -minPyrVol) @@ -432,29 +432,29 @@ bool Foam::primitiveMeshGeometry::checkFacePyramids Pout<< "bool primitiveMeshGeometry::checkFacePyramids(" << "const bool, const scalar, const pointField&" << ", const labelList&, labelHashSet*): " - << "face " << faceI << " points the wrong way. " << endl + << "face " << facei << " points the wrong way. " << endl << "Pyramid volume: " << -pyrVol - << " Face " << f[faceI] << " area: " << f[faceI].mag(p) - << " Owner cell: " << own[faceI] << endl + << " Face " << f[facei] << " area: " << f[facei].mag(p) + << " Owner cell: " << own[facei] << endl << "Owner cell vertex labels: " - << mesh.cells()[own[faceI]].labels(f) + << mesh.cells()[own[facei]].labels(f) << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorPyrs++; } - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { // Create the neighbour pyramid - it will have positive volume scalar pyrVol = - pyramidPointFaceRef(f[faceI], cellCentres[nei[faceI]]).mag(p); + pyramidPointFaceRef(f[facei], cellCentres[nei[facei]]).mag(p); if (pyrVol < minPyrVol) { @@ -463,18 +463,18 @@ bool Foam::primitiveMeshGeometry::checkFacePyramids Pout<< "bool primitiveMeshGeometry::checkFacePyramids(" << "const bool, const scalar, const pointField&" << ", const labelList&, labelHashSet*): " - << "face " << faceI << " points the wrong way. " << endl + << "face " << facei << " points the wrong way. " << endl << "Pyramid volume: " << -pyrVol - << " Face " << f[faceI] << " area: " << f[faceI].mag(p) - << " Neighbour cell: " << nei[faceI] << endl + << " Face " << f[facei] << " area: " << f[facei].mag(p) + << " Neighbour cell: " << nei[facei] << endl << "Neighbour cell vertex labels: " - << mesh.cells()[nei[faceI]].labels(f) + << mesh.cells()[nei[facei]].labels(f) << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nErrorPyrs++; @@ -532,21 +532,21 @@ bool Foam::primitiveMeshGeometry::checkFaceSkewness forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - scalar dOwn = mag(faceCentres[faceI] - cellCentres[own[faceI]]); - scalar dNei = mag(faceCentres[faceI] - cellCentres[nei[faceI]]); + scalar dOwn = mag(faceCentres[facei] - cellCentres[own[facei]]); + scalar dNei = mag(faceCentres[facei] - cellCentres[nei[facei]]); point faceIntersection = - cellCentres[own[faceI]]*dNei/(dOwn+dNei) - + cellCentres[nei[faceI]]*dOwn/(dOwn+dNei); + cellCentres[own[facei]]*dNei/(dOwn+dNei) + + cellCentres[nei[facei]]*dOwn/(dOwn+dNei); scalar skewness = - mag(faceCentres[faceI] - faceIntersection) + mag(faceCentres[facei] - faceIntersection) / ( - mag(cellCentres[nei[faceI]]-cellCentres[own[faceI]]) + mag(cellCentres[nei[facei]]-cellCentres[own[facei]]) + VSMALL ); @@ -557,13 +557,13 @@ bool Foam::primitiveMeshGeometry::checkFaceSkewness { if (report) { - Pout<< "Severe skewness for face " << faceI + Pout<< "Severe skewness for face " << facei << " skewness = " << skewness << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nWarnSkew++; @@ -579,17 +579,17 @@ bool Foam::primitiveMeshGeometry::checkFaceSkewness // Boundary faces: consider them to have only skewness error. // (i.e. treat as if mirror cell on other side) - vector faceNormal = faceAreas[faceI]; + vector faceNormal = faceAreas[facei]; faceNormal /= mag(faceNormal) + VSMALL; - vector dOwn = faceCentres[faceI] - cellCentres[own[faceI]]; + vector dOwn = faceCentres[facei] - cellCentres[own[facei]]; vector dWall = faceNormal*(faceNormal & dOwn); - point faceIntersection = cellCentres[own[faceI]] + dWall; + point faceIntersection = cellCentres[own[facei]] + dWall; scalar skewness = - mag(faceCentres[faceI] - faceIntersection) + mag(faceCentres[facei] - faceIntersection) /(2*mag(dWall) + VSMALL); // Check if the skewness vector is greater than the PN vector. @@ -599,13 +599,13 @@ bool Foam::primitiveMeshGeometry::checkFaceSkewness { if (report) { - Pout<< "Severe skewness for boundary face " << faceI + Pout<< "Severe skewness for boundary face " << facei << " skewness = " << skewness << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nWarnSkew++; @@ -670,14 +670,14 @@ bool Foam::primitiveMeshGeometry::checkFaceWeights forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - const point& fc = faceCentres[faceI]; + const point& fc = faceCentres[facei]; - scalar dOwn = mag(faceAreas[faceI] & (fc-cellCentres[own[faceI]])); - scalar dNei = mag(faceAreas[faceI] & (cellCentres[nei[faceI]]-fc)); + scalar dOwn = mag(faceAreas[facei] & (fc-cellCentres[own[facei]])); + scalar dNei = mag(faceAreas[facei] & (cellCentres[nei[facei]]-fc)); scalar weight = min(dNei,dOwn)/(dNei+dOwn); @@ -685,13 +685,13 @@ bool Foam::primitiveMeshGeometry::checkFaceWeights { if (report) { - Pout<< "Small weighting factor for face " << faceI + Pout<< "Small weighting factor for face " << facei << " weight = " << weight << endl; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nWarnWeight++; @@ -763,11 +763,11 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - const face& f = fcs[faceI]; + const face& f = fcs[facei]; - vector faceNormal = faceAreas[faceI]; + vector faceNormal = faceAreas[facei]; faceNormal /= mag(faceNormal) + VSMALL; // Get edge from f[0] to f[size-1]; @@ -801,16 +801,16 @@ 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++; } if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } maxEdgeSin = max(maxEdgeSin, magEdgeNormal); @@ -900,15 +900,15 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles // // forAll(checkFaces, i) // { -// label faceI = checkFaces[i]; +// label facei = checkFaces[i]; // -// const face& f = fcs[faceI]; +// const face& f = fcs[facei]; // -// scalar magArea = mag(faceAreas[faceI]); +// scalar magArea = mag(faceAreas[facei]); // // if (f.size() > 3 && magArea > VSMALL) // { -// const point& fc = faceCentres[faceI]; +// const point& fc = faceCentres[facei]; // // // Calculate the sum of magnitude of areas and compare to // // magnitude of sum of areas. @@ -938,7 +938,7 @@ bool Foam::primitiveMeshGeometry::checkFaceAngles // // if (setPtr) // { -// setPtr->insert(faceI); +// setPtr->insert(facei); // } // } // } @@ -1025,17 +1025,17 @@ bool Foam::primitiveMeshGeometry::checkFaceTwist forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - const face& f = fcs[faceI]; + const face& f = fcs[facei]; - scalar magArea = mag(faceAreas[faceI]); + scalar magArea = mag(faceAreas[facei]); if (f.size() > 3 && magArea > VSMALL) { - const vector nf = faceAreas[faceI] / magArea; + const vector nf = faceAreas[facei] / magArea; - const point& fc = faceCentres[faceI]; + const point& fc = faceCentres[facei]; forAll(f, fpI) { @@ -1057,7 +1057,7 @@ bool Foam::primitiveMeshGeometry::checkFaceTwist if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } } } @@ -1118,13 +1118,13 @@ bool Foam::primitiveMeshGeometry::checkFaceArea forAll(checkFaces, i) { - label faceI = checkFaces[i]; + label facei = checkFaces[i]; - if (mag(faceAreas[faceI]) < minArea) + if (mag(faceAreas[facei]) < minArea) { if (setPtr) { - setPtr->insert(faceI); + setPtr->insert(facei); } nZeroArea++; } @@ -1192,12 +1192,12 @@ bool Foam::primitiveMeshGeometry::checkCellDeterminant forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - scalar magArea = mag(faceAreas[faceI]); + scalar magArea = mag(faceAreas[facei]); magAreaSum += magArea; - areaSum += faceAreas[faceI]*(faceAreas[faceI]/magArea); + areaSum += faceAreas[facei]*(faceAreas[facei]/magArea); } scalar scaledDet = det(areaSum/magAreaSum)/0.037037037037037; @@ -1213,8 +1213,8 @@ bool Foam::primitiveMeshGeometry::checkCellDeterminant // Insert all faces of the cell. forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; - setPtr->insert(faceI); + label facei = cFaces[cFaceI]; + setPtr->insert(facei); } } nWarnDet++; diff --git a/src/meshTools/regionSplit/localPointRegion.C b/src/meshTools/regionSplit/localPointRegion.C index 8a5d714a9565b72d6f9b32f91a30f21e058e0e97..12e1be2f97132bd331e6c49783872b79bd4976f9 100644 --- a/src/meshTools/regionSplit/localPointRegion.C +++ b/src/meshTools/regionSplit/localPointRegion.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 @@ -119,17 +119,17 @@ void Foam::localPointRegion::countPointRegions forAllConstIter(Map<label>, candidateFace, iter) { - label faceI = iter.key(); + label facei = iter.key(); - if (!mesh.isInternalFace(faceI)) + if (!mesh.isInternalFace(facei)) { - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; - if (minRegion[faceI].empty()) + if (minRegion[facei].empty()) { FatalErrorInFunction << "Face from candidateFace without minRegion set." << endl - << "Face:" << faceI << " fc:" << mesh.faceCentres()[faceI] + << "Face:" << facei << " fc:" << mesh.faceCentres()[facei] << " verts:" << f << abort(FatalError); } @@ -142,7 +142,7 @@ void Foam::localPointRegion::countPointRegions if (candidatePoint[pointI]) { - label region = minRegion[faceI][fp]; + label region = minRegion[facei][fp]; if (minPointRegion[pointI] == -1) { @@ -173,7 +173,7 @@ void Foam::localPointRegion::countPointRegions } label meshFaceMapI = meshFaceMap_.size(); - meshFaceMap_.insert(faceI, meshFaceMapI); + meshFaceMap_.insert(facei, meshFaceMapI); } } } @@ -185,11 +185,11 @@ void Foam::localPointRegion::countPointRegions // region! forAllConstIter(Map<label>, candidateFace, iter) { - label faceI = iter.key(); + label facei = iter.key(); - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, fp) { @@ -198,7 +198,7 @@ void Foam::localPointRegion::countPointRegions if (candidatePoint[f[fp]] && meshPointMap_.found(f[fp])) { label meshFaceMapI = meshFaceMap_.size(); - meshFaceMap_.insert(faceI, meshFaceMapI); + meshFaceMap_.insert(facei, meshFaceMapI); } } } @@ -221,9 +221,9 @@ void Foam::localPointRegion::countPointRegions //// Print a bit //{ - // label faceI = iter.key(); - // const face& f = mesh.faces()[faceI]; - // Pout<< "Face:" << faceI << " fc:" << mesh.faceCentres()[faceI] + // label facei = iter.key(); + // const face& f = mesh.faces()[facei]; + // Pout<< "Face:" << facei << " fc:" << mesh.faceCentres()[facei] // << " verts:" << f << endl; // forAll(f, fp) // { @@ -268,29 +268,29 @@ void Foam::localPointRegion::calcPointRegions Map<label> candidateCell(nBnd); label candidateCellI = 0; - forAll(mesh.faces(), faceI) + forAll(mesh.faces(), facei) { - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, fp) { if (candidatePoint[f[fp]]) { // Mark face - if (candidateFace.insert(faceI, candidateFaceI)) + if (candidateFace.insert(facei, candidateFaceI)) { candidateFaceI++; } // Mark cells - if (candidateCell.insert(faceOwner[faceI], candidateCellI)) + if (candidateCell.insert(faceOwner[facei], candidateCellI)) { candidateCellI++; } - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - label nei = faceNeighbour[faceI]; + label nei = faceNeighbour[facei]; if (candidateCell.insert(nei, candidateCellI)) { candidateCellI++; @@ -315,19 +315,19 @@ void Foam::localPointRegion::calcPointRegions faceList minRegion(mesh.nFaces()); forAllConstIter(Map<label>, candidateFace, iter) { - label faceI = iter.key(); - const face& f = mesh.faces()[faceI]; + label facei = iter.key(); + const face& f = mesh.faces()[facei]; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - label globOwn = globalCells.toGlobal(faceOwner[faceI]); - label globNei = globalCells.toGlobal(faceNeighbour[faceI]); - minRegion[faceI].setSize(f.size(), min(globOwn, globNei)); + label globOwn = globalCells.toGlobal(faceOwner[facei]); + label globNei = globalCells.toGlobal(faceNeighbour[facei]); + minRegion[facei].setSize(f.size(), min(globOwn, globNei)); } else { - label globOwn = globalCells.toGlobal(faceOwner[faceI]); - minRegion[faceI].setSize(f.size(), globOwn); + label globOwn = globalCells.toGlobal(faceOwner[facei]); + minRegion[facei].setSize(f.size(), globOwn); } } @@ -346,17 +346,17 @@ void Foam::localPointRegion::calcPointRegions { minPointValue.clear(); - label cellI = iter.key(); - const cell& cFaces = mesh.cells()[cellI]; + label celli = iter.key(); + const cell& cFaces = mesh.cells()[celli]; // Determine minimum per point forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - if (minRegion[faceI].size()) + if (minRegion[facei].size()) { - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, fp) { @@ -365,12 +365,12 @@ void Foam::localPointRegion::calcPointRegions if (iter == minPointValue.end()) { - minPointValue.insert(pointI, minRegion[faceI][fp]); + minPointValue.insert(pointI, minRegion[facei][fp]); } else { label currentMin = iter(); - iter() = min(currentMin, minRegion[faceI][fp]); + iter() = min(currentMin, minRegion[facei][fp]); } } } @@ -379,19 +379,19 @@ void Foam::localPointRegion::calcPointRegions // Set face minimum from point minimum forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - if (minRegion[faceI].size()) + if (minRegion[facei].size()) { - const face& f = mesh.faces()[faceI]; + const face& f = mesh.faces()[facei]; forAll(f, fp) { label minVal = minPointValue[f[fp]]; - if (minVal != minRegion[faceI][fp]) + if (minVal != minRegion[facei][fp]) { - minRegion[faceI][fp] = minVal; + minRegion[facei][fp] = minVal; nChanged++; } } @@ -456,11 +456,11 @@ Foam::localPointRegion::localPointRegion(const polyMesh& mesh) // Get any point on the outside which is on a non-coupled boundary boolList candidatePoint(mesh.nPoints(), false); - forAll(patches, patchI) + forAll(patches, patchi) { - if (!patches[patchI].coupled()) + if (!patches[patchi].coupled()) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; forAll(pp.meshPoints(), i) { diff --git a/src/meshTools/regionSplit/regionSplit.C b/src/meshTools/regionSplit/regionSplit.C index 5c5ef0487c18b581bc0c8f268456d7b534204d8b..28aff8f275f652fca7d9da66a6c809c870bf00f3 100644 --- a/src/meshTools/regionSplit/regionSplit.C +++ b/src/meshTools/regionSplit/regionSplit.C @@ -43,31 +43,31 @@ defineTypeNameAndDebug(regionSplit, 0); // Handle (non-processor) coupled faces. void Foam::regionSplit::transferCoupledFaceRegion ( - const label faceI, + const label facei, const label otherFaceI, labelList& faceRegion, DynamicList<label>& newChangedFaces ) const { - if (faceRegion[faceI] >= 0) + if (faceRegion[facei] >= 0) { if (faceRegion[otherFaceI] == -1) { - faceRegion[otherFaceI] = faceRegion[faceI]; + faceRegion[otherFaceI] = faceRegion[facei]; newChangedFaces.append(otherFaceI); } 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] + << "Problem : coupled face " << facei + << " on patch " << mesh().boundaryMesh().whichPatch(facei) + << " has region " << faceRegion[facei] << " but coupled face " << otherFaceI << " has region " << faceRegion[otherFaceI] << endl @@ -76,16 +76,16 @@ void Foam::regionSplit::transferCoupledFaceRegion << abort(FatalError); } } - else if (faceRegion[faceI] == -1) + else if (faceRegion[facei] == -1) { if (faceRegion[otherFaceI] >= 0) { - faceRegion[faceI] = faceRegion[otherFaceI]; - newChangedFaces.append(faceI); + faceRegion[facei] = faceRegion[otherFaceI]; + newChangedFaces.append(facei); } 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. } } @@ -114,12 +114,12 @@ void Foam::regionSplit::fillSeedMask forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (faceRegion[faceI] == -1) + if (faceRegion[facei] == -1) { - faceRegion[faceI] = markValue; - changedFaces[nFaces++] = faceI; + faceRegion[facei] = markValue; + changedFaces[nFaces++] = facei; } } changedFaces.setSize(nFaces); @@ -139,9 +139,9 @@ void Foam::regionSplit::fillSeedMask forAll(changedFaces, i) { - label faceI = changedFaces[i]; + label facei = changedFaces[i]; - label own = mesh().faceOwner()[faceI]; + label own = mesh().faceOwner()[facei]; if (cellRegion[own] == -1) { @@ -149,9 +149,9 @@ void Foam::regionSplit::fillSeedMask changedCells.append(own); } - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { - label nei = mesh().faceNeighbour()[faceI]; + label nei = mesh().faceNeighbour()[facei]; if (cellRegion[nei] == -1) { @@ -173,18 +173,18 @@ void Foam::regionSplit::fillSeedMask forAll(changedCells, i) { - label cellI = changedCells[i]; + label celli = changedCells[i]; - const cell& cFaces = mesh().cells()[cellI]; + const cell& cFaces = mesh().cells()[celli]; forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - if (faceRegion[faceI] == -1) + if (faceRegion[facei] == -1) { - faceRegion[faceI] = markValue; - newChangedFaces.append(faceI); + faceRegion[facei] = markValue; + newChangedFaces.append(facei); } } } @@ -202,9 +202,9 @@ void Foam::regionSplit::fillSeedMask const polyBoundaryMesh& patches = mesh().boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if ( @@ -217,21 +217,21 @@ void Foam::regionSplit::fillSeedMask const cyclicPolyPatch& cycPatch = refCast<const cyclicPolyPatch>(pp); - label faceI = cycPatch.start(); + label facei = cycPatch.start(); forAll(cycPatch, i) { - label otherFaceI = cycPatch.transformGlobalFace(faceI); + label otherFaceI = cycPatch.transformGlobalFace(facei); transferCoupledFaceRegion ( - faceI, + facei, otherFaceI, faceRegion, newChangedFaces ); - faceI++; + facei++; } } } @@ -273,14 +273,14 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit boolList syncBlockedFace(blockedFace); syncTools::swapFaceList(mesh(), syncBlockedFace); - forAll(syncBlockedFace, faceI) + forAll(syncBlockedFace, facei) { - if (syncBlockedFace[faceI] != blockedFace[faceI]) + if (syncBlockedFace[facei] != blockedFace[facei]) { FatalErrorInFunction - << "Face " << faceI << " not synchronised. My value:" - << blockedFace[faceI] << " coupled value:" - << syncBlockedFace[faceI] + << "Face " << facei << " not synchronised. My value:" + << blockedFace[facei] << " coupled value:" + << syncBlockedFace[facei] << abort(FatalError); } } @@ -294,11 +294,11 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit if (blockedFace.size()) { - forAll(blockedFace, faceI) + forAll(blockedFace, facei) { - if (blockedFace[faceI]) + if (blockedFace[facei]) { - faceRegion[faceI] = -2; + faceRegion[facei] = -2; } } } @@ -347,22 +347,22 @@ Foam::label Foam::regionSplit::calcLocalRegionSplit if (debug) { - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - if (cellRegion[cellI] < 0) + if (cellRegion[celli] < 0) { FatalErrorInFunction - << "cell:" << cellI << " region:" << cellRegion[cellI] + << "cell:" << celli << " region:" << cellRegion[celli] << abort(FatalError); } } - forAll(faceRegion, faceI) + forAll(faceRegion, facei) { - if (faceRegion[faceI] == -1) + if (faceRegion[facei] == -1) { FatalErrorInFunction - << "face:" << faceI << " region:" << faceRegion[faceI] + << "face:" << facei << " region:" << faceRegion[facei] << abort(FatalError); } } @@ -405,9 +405,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit // Convert regions to global ones - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - cellRegion[cellI] = globalRegions.toGlobal(cellRegion[cellI]); + cellRegion[celli] = globalRegions.toGlobal(cellRegion[celli]); } @@ -429,9 +429,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit const polyBoundaryMesh& patches = mesh().boundaryMesh(); labelList nbrRegion(mesh().nFaces()-mesh().nInternalFaces(), -1); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { @@ -445,8 +445,8 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit forAll(patchCells, i) { - label faceI = pp.start()+i; - if (!blockedFace.size() || !blockedFace[faceI]) + label facei = pp.start()+i; + if (!blockedFace.size() || !blockedFace[facei]) { patchNbrRegion[i] = cellRegion[patchCells[i]]; } @@ -457,9 +457,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit Map<label> globalToMerged(mesh().nFaces()-mesh().nInternalFaces()); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { @@ -473,9 +473,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit forAll(patchCells, i) { - label faceI = pp.start()+i; + label facei = pp.start()+i; - if (!blockedFace.size() || !blockedFace[faceI]) + if (!blockedFace.size() || !blockedFace[facei]) { if (patchNbrRegion[i] < cellRegion[patchCells[i]]) { @@ -512,13 +512,13 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit } // Renumber the regions according to the globalToMerged - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - label regionI = cellRegion[cellI]; + label regionI = cellRegion[celli]; Map<label>::const_iterator iter = globalToMerged.find(regionI); if (iter != globalToMerged.end()) { - cellRegion[cellI] = iter(); + cellRegion[celli] = iter(); } } } @@ -531,12 +531,12 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit label nCompact = 0; { labelHashSet localRegion(mesh().nFaces()-mesh().nInternalFaces()); - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { if ( - globalRegions.isLocal(cellRegion[cellI]) - && localRegion.insert(cellRegion[cellI]) + globalRegions.isLocal(cellRegion[celli]) + && localRegion.insert(cellRegion[celli]) ) { nCompact++; @@ -571,9 +571,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit nonLocal[procI].resize((nLocalRegions-nCompact)/Pstream::nProcs()); } - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - label region = cellRegion[cellI]; + label region = cellRegion[celli]; if (globalRegions.isLocal(region)) { Map<label>::const_iterator iter = globalToCompact.find(region); @@ -663,9 +663,9 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit } // Finally renumber the regions - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - cellRegion[cellI] = globalToCompact[cellRegion[cellI]]; + cellRegion[celli] = globalToCompact[cellRegion[celli]]; } return globalCompactPtr; diff --git a/src/meshTools/regionSplit/regionSplit.H b/src/meshTools/regionSplit/regionSplit.H index 83302529df24349890b4c4425d21fe4a0c5dfdae..d3290f54c0f65989bb83834748c05e79ed4427b8 100644 --- a/src/meshTools/regionSplit/regionSplit.H +++ b/src/meshTools/regionSplit/regionSplit.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 @@ -129,7 +129,7 @@ class regionSplit //- Transfer faceRegion data from one face to the other (or vice versa) void transferCoupledFaceRegion ( - const label faceI, + const label facei, const label otherFaceI, labelList& faceRegion, diff --git a/src/meshTools/searchableSurface/searchableSurfaces.C b/src/meshTools/searchableSurface/searchableSurfaces.C index 0b9672fa038018c1784e9e85e0a63c7886e3c6fd..e25c1c0094a4e07f86ccdb5603d8be1787bc4ceb 100644 --- a/src/meshTools/searchableSurface/searchableSurfaces.C +++ b/src/meshTools/searchableSurface/searchableSurfaces.C @@ -763,9 +763,9 @@ bool Foam::searchableSurfaces::checkQuality ); label nBadTris = 0; - forAll(s, faceI) + forAll(s, facei) { - const labelledTri& f = s[faceI]; + const labelledTri& f = s[facei]; scalar q = triPointRef ( diff --git a/src/meshTools/searchableSurface/triSurfaceMesh.C b/src/meshTools/searchableSurface/triSurfaceMesh.C index 22b54df937302b3103f6f250c5cd6c192d897109..c7258aab13aee221a215f330656d32131788c6ac 100644 --- a/src/meshTools/searchableSurface/triSurfaceMesh.C +++ b/src/meshTools/searchableSurface/triSurfaceMesh.C @@ -407,14 +407,14 @@ void Foam::triSurfaceMesh::boundingSpheres const pointField& pts = triSurface::points(); - forAll(*this, faceI) + forAll(*this, facei) { - const labelledTri& f = triSurface::operator[](faceI); - const point& fc = centres[faceI]; + const labelledTri& f = triSurface::operator[](facei); + const point& fc = centres[facei]; forAll(f, fp) { const point& pt = pts[f[fp]]; - radiusSqr[faceI] = max(radiusSqr[faceI], Foam::magSqr(fc-pt)); + radiusSqr[facei] = max(radiusSqr[facei], Foam::magSqr(fc-pt)); } } @@ -651,15 +651,15 @@ void Foam::triSurfaceMesh::getNormal { if (info[i].hit()) { - label faceI = info[i].index(); - normal[i] = s[faceI].normal(pts); + label facei = info[i].index(); + normal[i] = s[facei].normal(pts); - scalar qual = s[faceI].tri(pts).quality(); + scalar qual = s[facei].tri(pts).quality(); if (qual < minQuality_) { // Search neighbouring triangles - const labelList& fFaces = faceFaces[faceI]; + const labelList& fFaces = faceFaces[facei]; forAll(fFaces, j) { @@ -688,12 +688,12 @@ void Foam::triSurfaceMesh::getNormal { if (info[i].hit()) { - label faceI = info[i].index(); + label facei = info[i].index(); // Cached: - //normal[i] = faceNormals()[faceI]; + //normal[i] = faceNormals()[facei]; // Uncached - normal[i] = s[faceI].normal(pts); + normal[i] = s[facei].normal(pts); normal[i] /= mag(normal[i]) + VSMALL; } else diff --git a/src/meshTools/sets/cellSources/boxToCell/boxToCell.C b/src/meshTools/sets/cellSources/boxToCell/boxToCell.C index 28bec358bc1bd83f7bb07bd1a1ed64c7caabc3bb..bd01674c0a8d34aeb0049c2dc48a21313e7c0bbb 100644 --- a/src/meshTools/sets/cellSources/boxToCell/boxToCell.C +++ b/src/meshTools/sets/cellSources/boxToCell/boxToCell.C @@ -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 @@ -56,13 +56,13 @@ void Foam::boxToCell::combine(topoSet& set, const bool add) const { const pointField& ctrs = mesh_.cellCentres(); - forAll(ctrs, cellI) + forAll(ctrs, celli) { forAll(bbs_, i) { - if (bbs_[i].contains(ctrs[cellI])) + if (bbs_[i].contains(ctrs[celli])) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); break; } } diff --git a/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.C b/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.C index 18584fcf4af7effef16db49498babafbd21699f8..06d89f6e3e8fd8facdc212b5fa99571ba4f2d829 100644 --- a/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.C +++ b/src/meshTools/sets/cellSources/cylinderAnnulusToCell/cylinderAnnulusToCell.C @@ -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 @@ -57,9 +57,9 @@ void Foam::cylinderAnnulusToCell::combine(topoSet& set, const bool add) const const pointField& ctrs = mesh_.cellCentres(); - forAll(ctrs, cellI) + forAll(ctrs, celli) { - vector d = ctrs[cellI] - p1_; + vector d = ctrs[celli] - p1_; scalar magD = d & axis; if ((magD > 0) && (magD < magAxis2)) @@ -67,7 +67,7 @@ void Foam::cylinderAnnulusToCell::combine(topoSet& set, const bool add) const scalar d2 = (d & d) - sqr(magD)/magAxis2; if ((d2 < orad2) && (d2 > irad2)) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } diff --git a/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C b/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C index ee0276765ad3e2494aa629b78e02a9113b1ac1c8..787c73da692a061b50e1846f9d864b2a698b2658 100644 --- a/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C +++ b/src/meshTools/sets/cellSources/cylinderToCell/cylinderToCell.C @@ -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 @@ -55,9 +55,9 @@ void Foam::cylinderToCell::combine(topoSet& set, const bool add) const const pointField& ctrs = mesh_.cellCentres(); - forAll(ctrs, cellI) + forAll(ctrs, celli) { - vector d = ctrs[cellI] - p1_; + vector d = ctrs[celli] - p1_; scalar magD = d & axis; if ((magD > 0) && (magD < magAxis2)) @@ -65,7 +65,7 @@ void Foam::cylinderToCell::combine(topoSet& set, const bool add) const scalar d2 = (d & d) - sqr(magD)/magAxis2; if (d2 < rad2) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } diff --git a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C index 002d027663855ab0b56b1bbcccbda3fddaeeeda5..4fdb93b1b827d069bc5bfb47f9555580351fa01e 100644 --- a/src/meshTools/sets/cellSources/faceToCell/faceToCell.C +++ b/src/meshTools/sets/cellSources/faceToCell/faceToCell.C @@ -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 @@ -75,22 +75,22 @@ void Foam::faceToCell::combine(topoSet& set, const bool add) const // Handle owner/neighbour/any selection forAllConstIter(faceSet, loadedSet, iter) { - const label faceI = iter.key(); + const label facei = iter.key(); if ((option_ == OWNER) || (option_ == ANY)) { - const label cellI = mesh_.faceOwner()[faceI]; + const label celli = mesh_.faceOwner()[facei]; - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { if ((option_ == NEIGHBOUR) || (option_ == ANY)) { - const label cellI = mesh_.faceNeighbour()[faceI]; + const label celli = mesh_.faceNeighbour()[facei]; - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } @@ -104,8 +104,8 @@ void Foam::faceToCell::combine(topoSet& set, const bool add) const forAllConstIter(faceSet, loadedSet, iter) { - const label faceI = iter.key(); - const label own = mesh_.faceOwner()[faceI]; + const label facei = iter.key(); + const label own = mesh_.faceOwner()[facei]; Map<label>::iterator fndOwn = facesPerCell.find(own); @@ -118,9 +118,9 @@ void Foam::faceToCell::combine(topoSet& set, const bool add) const fndOwn()++; } - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; Map<label>::iterator fndNei = facesPerCell.find(nei); @@ -139,11 +139,11 @@ void Foam::faceToCell::combine(topoSet& set, const bool add) const // -> all faces in set. forAllConstIter(Map<label>, facesPerCell, iter) { - const label cellI = iter.key(); + const label celli = iter.key(); - if (iter() == mesh_.cells()[cellI].size()) + if (iter() == mesh_.cells()[celli].size()) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } diff --git a/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C b/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C index 475ba3c313e6ccb0defb23310de5d1534dd3bb3c..8e969516204ebdfadc81397973d52e77a5f903be 100644 --- a/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.C +++ b/src/meshTools/sets/cellSources/fieldToCell/fieldToCell.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 @@ -71,11 +71,11 @@ void Foam::fieldToCell::applyToSet Info<< " Adding all cells with value of field " << fieldName_ << " within range " << min_ << ".." << max_ << endl; - forAll(field, cellI) + forAll(field, celli) { - if (field[cellI] >= min_ && field[cellI] <= max_) + if (field[celli] >= min_ && field[celli] <= max_) { - set.insert(cellI); + set.insert(celli); } } } @@ -84,11 +84,11 @@ void Foam::fieldToCell::applyToSet Info<< " Removing all cells with value of field " << fieldName_ << " within range " << min_ << ".." << max_ << endl; - forAll(field, cellI) + forAll(field, celli) { - if (field[cellI] >= min_ && field[cellI] <= max_) + if (field[celli] >= min_ && field[celli] <= max_) { - set.erase(cellI); + set.erase(celli); } } } @@ -168,15 +168,15 @@ void Foam::fieldToCell::applyToSet // const polyBoundaryMesh& patches = mesh().boundaryMesh(); // // List<polyPatch*> newPatches(patches.size()); -// forAll(patches, patchI) +// forAll(patches, patchi) // { -// const polyPatch& pp = patches[patchI]; +// const polyPatch& pp = patches[patchi]; // -// newPatches[patchI] = -// patches[patchI].clone +// newPatches[patchi] = +// patches[patchi].clone // ( // fMesh.boundaryMesh(), -// patchI, +// patchi, // pp.size(), // pp.start() // ).ptr(); diff --git a/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C b/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C index 737f9c088b22d86e2394e27c0a8483b62ce25836..cb52cb01db3ede9963fd5235c82dfb1a40483a2f 100644 --- a/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C +++ b/src/meshTools/sets/cellSources/nbrToCell/nbrToCell.C @@ -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 @@ -59,36 +59,36 @@ void Foam::nbrToCell::combine(topoSet& set, const bool add) const boolList isCoupled(mesh_.nFaces()-mesh_.nInternalFaces(), false); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - isCoupled[faceI-mesh_.nInternalFaces()] = true; - faceI++; + isCoupled[facei-mesh_.nInternalFaces()] = true; + facei++; } } } - forAll(cells, cellI) + forAll(cells, celli) { - const cell& cFaces = cells[cellI]; + const cell& cFaces = cells[celli]; label nNbrCells = 0; forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { nNbrCells++; } - else if (isCoupled[faceI-mesh_.nInternalFaces()]) + else if (isCoupled[facei-mesh_.nInternalFaces()]) { nNbrCells++; } @@ -96,7 +96,7 @@ void Foam::nbrToCell::combine(topoSet& set, const bool add) const if (nNbrCells <= minNbrs_) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } diff --git a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C index 0939a2e3bec5142b84c8b3eb25a2d3788234458d..db5bd0042804fd372f44c4b9b93489bab94b376d 100644 --- a/src/meshTools/sets/cellSources/pointToCell/pointToCell.C +++ b/src/meshTools/sets/cellSources/pointToCell/pointToCell.C @@ -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 @@ -87,18 +87,18 @@ void Foam::pointToCell::combine(topoSet& set, const bool add) const else if (option_ == EDGE) { const faceList& faces = mesh_.faces(); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; forAll(f, fp) { if (loadedSet.found(f[fp]) && loadedSet.found(f.nextLabel(fp))) { - addOrDelete(set, mesh_.faceOwner()[faceI], add); - if (mesh_.isInternalFace(faceI)) + addOrDelete(set, mesh_.faceOwner()[facei], add); + if (mesh_.isInternalFace(facei)) { - addOrDelete(set, mesh_.faceNeighbour()[faceI], add); + addOrDelete(set, mesh_.faceNeighbour()[facei], add); } } } diff --git a/src/meshTools/sets/cellSources/regionToCell/regionToCell.C b/src/meshTools/sets/cellSources/regionToCell/regionToCell.C index f602bc239cb8bbf51cac03ff96d291945a6c3d5a..3558ee9020a5731e0a4d6b322b24dfad829e0ce6 100644 --- a/src/meshTools/sets/cellSources/regionToCell/regionToCell.C +++ b/src/meshTools/sets/cellSources/regionToCell/regionToCell.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 @@ -64,15 +64,15 @@ void Foam::regionToCell::markRegionFaces // Internal faces const labelList& faceOwner = mesh_.faceOwner(); const labelList& faceNeighbour = mesh_.faceNeighbour(); - forAll(faceNeighbour, faceI) + forAll(faceNeighbour, facei) { if ( - selectedCell[faceOwner[faceI]] - != selectedCell[faceNeighbour[faceI]] + selectedCell[faceOwner[facei]] + != selectedCell[faceNeighbour[facei]] ) { - regionFace[faceI] = true; + regionFace[facei] = true; } } @@ -82,21 +82,21 @@ void Foam::regionToCell::markRegionFaces // Boundary faces const polyBoundaryMesh& pbm = mesh_.boundaryMesh(); - forAll(pbm, patchI) + forAll(pbm, patchi) { - const polyPatch& pp = pbm[patchI]; + const polyPatch& pp = pbm[patchi]; const labelUList& faceCells = pp.faceCells(); forAll(faceCells, i) { - label faceI = pp.start()+i; - label bFaceI = faceI-mesh_.nInternalFaces(); + label facei = pp.start()+i; + label bFaceI = facei-mesh_.nInternalFaces(); if ( selectedCell[faceCells[i]] != selectedCell[nbrSelected[bFaceI]] ) { - regionFace[faceI] = true; + regionFace[facei] = true; } } } @@ -115,13 +115,13 @@ Foam::boolList Foam::regionToCell::findRegions { // Find the region containing the insidePoint - label cellI = mesh_.findCell(insidePoints_[i]); + label celli = mesh_.findCell(insidePoints_[i]); label keepRegionI = -1; label keepProcI = -1; - if (cellI != -1) + if (celli != -1) { - keepRegionI = cellRegion[cellI]; + keepRegionI = cellRegion[celli]; keepProcI = Pstream::myProcNo(); } reduce(keepRegionI, maxOp<label>()); @@ -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; } @@ -166,11 +166,11 @@ void Foam::regionToCell::unselectOutsideRegions boolList keepRegion(findRegions(true, cellRegion)); // Go back to bool per cell - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - if (!keepRegion[cellRegion[cellI]]) + if (!keepRegion[cellRegion[celli]]) { - selectedCell[cellI] = false; + selectedCell[celli] = false; } } } @@ -188,9 +188,9 @@ void Foam::regionToCell::shrinkRegions const polyBoundaryMesh& pbm = mesh_.boundaryMesh(); - forAll(pbm, patchI) + forAll(pbm, patchi) { - const polyPatch& pp = pbm[patchI]; + const polyPatch& pp = pbm[patchi]; if (!pp.coupled() && !isA<emptyPolyPatch>(pp)) { @@ -205,11 +205,11 @@ void Foam::regionToCell::shrinkRegions } } - forAll(selectedCell, cellI) + forAll(selectedCell, celli) { - if (!selectedCell[cellI]) + if (!selectedCell[celli]) { - const labelList& cPoints = mesh_.cellPoints(cellI); + const labelList& cPoints = mesh_.cellPoints(celli); forAll(cPoints, i) { boundaryPoint[cPoints[i]] = true; @@ -231,10 +231,10 @@ void Foam::regionToCell::shrinkRegions const labelList& pCells = mesh_.pointCells(pointI); forAll(pCells, i) { - label cellI = pCells[i]; - if (selectedCell[cellI]) + label celli = pCells[i]; + if (selectedCell[celli]) { - selectedCell[cellI] = false; + selectedCell[celli] = false; nChanged++; } } @@ -279,11 +279,11 @@ void Foam::regionToCell::erode // Extract cells in regions that are not to be kept. boolList removeCell(mesh_.nCells(), false); - forAll(cellRegion, cellI) + forAll(cellRegion, celli) { - if (shrunkSelectedCell[cellI] && !keepRegion[cellRegion[cellI]]) + if (shrunkSelectedCell[celli] && !keepRegion[cellRegion[celli]]) { - removeCell[cellI] = true; + removeCell[celli] = true; } } @@ -297,11 +297,11 @@ void Foam::regionToCell::erode { // Grow selected cell in regions that are not for keeping boolList boundaryPoint(mesh_.nPoints(), false); - forAll(removeCell, cellI) + forAll(removeCell, celli) { - if (removeCell[cellI]) + if (removeCell[celli]) { - const labelList& cPoints = mesh_.cellPoints(cellI); + const labelList& cPoints = mesh_.cellPoints(celli); forAll(cPoints, i) { boundaryPoint[cPoints[i]] = true; @@ -320,10 +320,10 @@ void Foam::regionToCell::erode const labelList& pCells = mesh_.pointCells(pointI); forAll(pCells, i) { - label cellI = pCells[i]; - if (!removeCell[cellI]) + label celli = pCells[i]; + if (!removeCell[celli]) { - removeCell[cellI] = true; + removeCell[celli] = true; nChanged++; } } @@ -336,11 +336,11 @@ void Foam::regionToCell::erode // Unmark removeCell - forAll(removeCell, cellI) + forAll(removeCell, celli) { - if (removeCell[cellI]) + if (removeCell[celli]) { - selectedCell[cellI] = false; + selectedCell[celli] = false; } } } @@ -373,11 +373,11 @@ void Foam::regionToCell::combine(topoSet& set, const bool add) const } - forAll(selectedCell, cellI) + forAll(selectedCell, celli) { - if (selectedCell[cellI]) + if (selectedCell[celli]) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } diff --git a/src/meshTools/sets/cellSources/rotatedBoxToCell/rotatedBoxToCell.C b/src/meshTools/sets/cellSources/rotatedBoxToCell/rotatedBoxToCell.C index 2879083955c26fed538d3802f42d9eda27374ce3..0e5c35bf5b60ff834fd321b88b6ba6e232a15576 100644 --- a/src/meshTools/sets/cellSources/rotatedBoxToCell/rotatedBoxToCell.C +++ b/src/meshTools/sets/cellSources/rotatedBoxToCell/rotatedBoxToCell.C @@ -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 @@ -92,7 +92,7 @@ void Foam::rotatedBoxToCell::combine(topoSet& set, const bool add) const const pointField& ctrs = mesh_.cellCentres(); - forAll(ctrs, cellI) + forAll(ctrs, celli) { bool inside = true; @@ -100,7 +100,7 @@ void Foam::rotatedBoxToCell::combine(topoSet& set, const bool add) const { const face& f = boxFaces[i]; - if (((ctrs[cellI] - boxPoints[f[0]]) & boxFaceNormals[i]) > 0) + if (((ctrs[celli] - boxPoints[f[0]]) & boxFaceNormals[i]) > 0) { inside = false; break; @@ -109,7 +109,7 @@ void Foam::rotatedBoxToCell::combine(topoSet& set, const bool add) const if (inside) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } diff --git a/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C b/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C index 1fcc2495224c735ab153d15b019b0f5cb877d8f2..a6c033a84d391a74ca1f4d14b57552fc19521532 100644 --- a/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.C +++ b/src/meshTools/sets/cellSources/shapeToCell/shapeToCell.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 @@ -64,13 +64,13 @@ void Foam::shapeToCell::combine(topoSet& set, const bool add) const { if (type_ == "splitHex") { - for (label cellI = 0; cellI < mesh_.nCells(); cellI++) + for (label celli = 0; celli < mesh_.nCells(); celli++) { - cellFeatures superCell(mesh_, featureCos, cellI); + cellFeatures superCell(mesh_, featureCos, celli); if (hexMatcher().isA(superCell.faces())) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } @@ -80,11 +80,11 @@ void Foam::shapeToCell::combine(topoSet& set, const bool add) const const cellShapeList& cellShapes = mesh_.cellShapes(); - forAll(cellShapes, cellI) + forAll(cellShapes, celli) { - if (cellShapes[cellI].model() == wantedModel) + if (cellShapes[celli].model() == wantedModel) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } diff --git a/src/meshTools/sets/cellSources/sphereToCell/sphereToCell.C b/src/meshTools/sets/cellSources/sphereToCell/sphereToCell.C index ee9fd3bb092ddb645a62efb37e9f3acd2940c5f8..d3c7cfc3ae8bcec3230a7e978ba8f5c2a6e130db 100644 --- a/src/meshTools/sets/cellSources/sphereToCell/sphereToCell.C +++ b/src/meshTools/sets/cellSources/sphereToCell/sphereToCell.C @@ -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 @@ -53,12 +53,12 @@ void Foam::sphereToCell::combine(topoSet& set, const bool add) const const scalar radSquared = radius_*radius_; - forAll(ctrs, cellI) + forAll(ctrs, celli) { - scalar offset = magSqr(centre_ - ctrs[cellI]); + scalar offset = magSqr(centre_ - ctrs[celli]); if (offset <= radSquared) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } diff --git a/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.C b/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.C index b08d4b4c8aebdd7dbbff5a6debbe810f3a976487..fc6b976204b4cabb71cdf05cfae5fc1c59f34699 100644 --- a/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.C +++ b/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.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 @@ -99,7 +99,7 @@ bool Foam::surfaceToCell::differingPointNormals const triSurfaceSearch& querySurf, const vector& span, // Current search span - const label cellI, + const label celli, const label cellTriI, // Nearest (to cell centre) surface triangle Map<label>& pointToNearest // Cache for nearest triangle to point @@ -111,7 +111,7 @@ bool Foam::surfaceToCell::differingPointNormals const faceList& faces = mesh().faces(); const pointField& points = mesh().points(); - const labelList& cFaces = mesh().cells()[cellI]; + const labelList& cFaces = mesh().cells()[celli]; forAll(cFaces, cFaceI) { @@ -161,15 +161,15 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const Info<< " Marked inside/outside using surface orientation in = " << timer.cpuTimeIncrement() << " s" << endl << endl; - forAll(isInside, cellI) + forAll(isInside, celli) { - if (isInside[cellI] && includeInside_) + if (isInside[celli] && includeInside_) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } - else if (!isInside[cellI] && includeOutside_) + else if (!isInside[celli] && includeOutside_) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } @@ -191,8 +191,8 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const const point& outsidePoint = outsidePoints_[outsideI]; // Find cell point is in. Linear search. - label cellI = queryMesh.findCell(outsidePoint, -1, false); - if (returnReduce(cellI, maxOp<label>()) == -1) + label celli = queryMesh.findCell(outsidePoint, -1, false); + if (returnReduce(celli, maxOp<label>()) == -1) { FatalErrorInFunction << "outsidePoint " << outsidePoint @@ -216,9 +216,9 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const << timer.cpuTimeIncrement() << " s" << endl << endl; //- Add/remove cells using set - forAll(cellType, cellI) + forAll(cellType, celli) { - label cType = cellType[cellI]; + label cType = cellType[celli]; if ( @@ -236,7 +236,7 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const ) ) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } @@ -261,15 +261,15 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const // No need to test curvature. Insert near cells into set. - forAll(ctrs, cellI) + forAll(ctrs, celli) { - const point& c = ctrs[cellI]; + const point& c = ctrs[celli]; pointIndexHit inter = querySurf().nearest(c, span); if (inter.hit() && (mag(inter.hitPoint() - c) < nearDist_)) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } @@ -288,9 +288,9 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const // Cache for nearest surface triangle for a point Map<label> pointToNearest(mesh_.nCells()/10); - forAll(ctrs, cellI) + forAll(ctrs, celli) { - const point& c = ctrs[cellI]; + const point& c = ctrs[celli]; pointIndexHit inter = querySurf().nearest(c, span); @@ -302,13 +302,13 @@ void Foam::surfaceToCell::combine(topoSet& set, const bool add) const ( querySurf(), span, - cellI, + celli, inter.index(), // nearest surface triangle pointToNearest ) ) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } diff --git a/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.H b/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.H index 0d46db0504e9cf8272aa9af4bd443a26ffe53a46..5db79b4c957f9961acf2ceb4b47789b684c9bdce 100644 --- a/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.H +++ b/src/meshTools/sets/cellSources/surfaceToCell/surfaceToCell.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 @@ -127,7 +127,7 @@ class surfaceToCell ( const triSurfaceSearch& querySurf, const vector& span, - const label cellI, + const label celli, const label cellTriI, Map<label>& pointToNearest ) const; diff --git a/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C b/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C index 10d54638390360aea19f1f02a7bf81507bc5aaba..9868577e3043fb56313c4efafc0be4ebc30fe06b 100644 --- a/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.C +++ b/src/meshTools/sets/cellSources/targetVolumeToCell/targetVolumeToCell.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 @@ -61,11 +61,11 @@ Foam::scalar Foam::targetVolumeToCell::volumeOfSet ) const { scalar sumVol = 0.0; - forAll(selected, cellI) + forAll(selected, celli) { - if (selected[cellI]) + if (selected[celli]) { - sumVol += mesh_.cellVolumes()[cellI]; + sumVol += mesh_.cellVolumes()[celli]; } } return returnReduce(sumVol, sumOp<scalar>()); @@ -84,13 +84,13 @@ Foam::label Foam::targetVolumeToCell::selectCells label nSelected = 0; - forAll(mesh_.cellCentres(), cellI) + forAll(mesh_.cellCentres(), celli) { - const point& cc = mesh_.cellCentres()[cellI]; + const point& cc = mesh_.cellCentres()[celli]; - if (maskSet[cellI] && ((cc&n_) < normalComp)) + if (maskSet[celli] && ((cc&n_) < normalComp)) { - selected[cellI] = true; + selected[celli] = true; nSelected++; } } @@ -256,11 +256,11 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const Info<< " Selected " << nSelected << " with actual volume " << selectedVol << endl; - forAll(selected, cellI) + forAll(selected, celli) { - if (selected[cellI]) + if (selected[celli]) { - addOrDelete(set, cellI, add); + addOrDelete(set, celli, add); } } } diff --git a/src/meshTools/sets/cellZoneSources/setToCellZone/setToCellZone.C b/src/meshTools/sets/cellZoneSources/setToCellZone/setToCellZone.C index 7fc2aa1a3cc243fe75333b3a46681d4890b9c73b..afd7f703316ba0f1adfd77e1e7c2e066e66c07ce 100644 --- a/src/meshTools/sets/cellZoneSources/setToCellZone/setToCellZone.C +++ b/src/meshTools/sets/cellZoneSources/setToCellZone/setToCellZone.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 @@ -125,11 +125,11 @@ void Foam::setToCellZone::applyToSet forAllConstIter(cellSet, fSet, iter) { - label cellI = iter.key(); + label celli = iter.key(); - if (!fzSet.found(cellI)) + if (!fzSet.found(celli)) { - newAddressing.append(cellI); + newAddressing.append(celli); } } diff --git a/src/meshTools/sets/faceSources/boundaryToFace/boundaryToFace.C b/src/meshTools/sets/faceSources/boundaryToFace/boundaryToFace.C index 7015d058ffcb781fc1992beffc687fd65a859e0d..7ae3ab1a6c1ae69fa1ce8f843329ecccc9204d57 100644 --- a/src/meshTools/sets/faceSources/boundaryToFace/boundaryToFace.C +++ b/src/meshTools/sets/faceSources/boundaryToFace/boundaryToFace.C @@ -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 @@ -56,12 +56,12 @@ void Foam::boundaryToFace::combine(topoSet& set, const bool add) const { for ( - label faceI = mesh().nInternalFaces(); - faceI < mesh().nFaces(); - faceI++ + label facei = mesh().nInternalFaces(); + facei < mesh().nFaces(); + facei++ ) { - addOrDelete(set, faceI, add); + addOrDelete(set, facei, add); } } diff --git a/src/meshTools/sets/faceSources/boxToFace/boxToFace.C b/src/meshTools/sets/faceSources/boxToFace/boxToFace.C index 698bb5c311e262934e3256157774591ae3925fc0..5ad4d8e5e1bafc8b68e13842a9377726b3a11e8f 100644 --- a/src/meshTools/sets/faceSources/boxToFace/boxToFace.C +++ b/src/meshTools/sets/faceSources/boxToFace/boxToFace.C @@ -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 @@ -56,13 +56,13 @@ void Foam::boxToFace::combine(topoSet& set, const bool add) const { const pointField& ctrs = mesh_.faceCentres(); - forAll(ctrs, faceI) + forAll(ctrs, facei) { forAll(bbs_, i) { - if (bbs_[i].contains(ctrs[faceI])) + if (bbs_[i].contains(ctrs[facei])) { - addOrDelete(set, faceI, add); + addOrDelete(set, facei, add); break; } } diff --git a/src/meshTools/sets/faceSources/cellToFace/cellToFace.C b/src/meshTools/sets/faceSources/cellToFace/cellToFace.C index 38cde979a468a72055e162a6f12d5544d75eb4bd..454eb9117b65dc96674862a89784dfb1aec2a76f 100644 --- a/src/meshTools/sets/faceSources/cellToFace/cellToFace.C +++ b/src/meshTools/sets/faceSources/cellToFace/cellToFace.C @@ -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 @@ -81,8 +81,8 @@ void Foam::cellToFace::combine(topoSet& set, const bool add) const // Add all faces from cell forAllConstIter(cellSet, loadedSet, iter) { - const label cellI = iter.key(); - const labelList& cFaces = mesh_.cells()[cellI]; + const label celli = iter.key(); + const labelList& cFaces = mesh_.cells()[celli]; forAll(cFaces, cFaceI) { @@ -101,11 +101,11 @@ void Foam::cellToFace::combine(topoSet& set, const bool add) const // Check all internal faces - for (label faceI = 0; faceI < nInt; faceI++) + for (label facei = 0; facei < nInt; facei++) { - if (loadedSet.found(own[faceI]) && loadedSet.found(nei[faceI])) + if (loadedSet.found(own[facei]) && loadedSet.found(nei[facei])) { - addOrDelete(set, faceI, add); + addOrDelete(set, facei, add); } } @@ -113,17 +113,17 @@ void Foam::cellToFace::combine(topoSet& set, const bool add) const // Get coupled cell status boolList neiInSet(mesh_.nFaces()-nInt, false); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - neiInSet[faceI-nInt] = loadedSet.found(own[faceI]); - faceI++; + neiInSet[facei-nInt] = loadedSet.found(own[facei]); + facei++; } } } @@ -131,20 +131,20 @@ void Foam::cellToFace::combine(topoSet& set, const bool add) const // Check all boundary faces - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - if (loadedSet.found(own[faceI]) && neiInSet[faceI-nInt]) + if (loadedSet.found(own[facei]) && neiInSet[facei-nInt]) { - addOrDelete(set, faceI, add); + addOrDelete(set, facei, add); } - faceI++; + facei++; } } } diff --git a/src/meshTools/sets/faceSources/normalToFace/normalToFace.C b/src/meshTools/sets/faceSources/normalToFace/normalToFace.C index eb1891208623264a0d75260c6fd6433bdd1f5615..eb289aa68c0780ee7094e1e31a6afc7796356cb9 100644 --- a/src/meshTools/sets/faceSources/normalToFace/normalToFace.C +++ b/src/meshTools/sets/faceSources/normalToFace/normalToFace.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 @@ -128,14 +128,14 @@ void Foam::normalToFace::applyToSet Info<< " Adding faces according to normal being aligned with " << normal_ << " (to within " << tol_ << ") ..." << endl; - forAll(mesh_.faceAreas(), faceI) + forAll(mesh_.faceAreas(), facei) { - vector n = mesh_.faceAreas()[faceI]; + vector n = mesh_.faceAreas()[facei]; n /= mag(n) + VSMALL; if (mag(1 - (n & normal_)) < tol_) { - set.insert(faceI); + set.insert(facei); } } } @@ -149,14 +149,14 @@ void Foam::normalToFace::applyToSet forAllConstIter(topoSet, set, iter) { - const label faceI = iter.key(); + const label facei = iter.key(); - vector n = mesh_.faceAreas()[faceI]; + vector n = mesh_.faceAreas()[facei]; n /= mag(n) + VSMALL; if (mag(1 - (n & normal_)) < tol_) { - toBeRemoved.append(faceI); + toBeRemoved.append(facei); } } diff --git a/src/meshTools/sets/faceSources/patchToFace/patchToFace.C b/src/meshTools/sets/faceSources/patchToFace/patchToFace.C index e4c36cbc28d8c441f841327414419d46d7a6fbc3..acbef6688640dc65d25269a5b87e3000a9d59bf5 100644 --- a/src/meshTools/sets/faceSources/patchToFace/patchToFace.C +++ b/src/meshTools/sets/faceSources/patchToFace/patchToFace.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 @@ -63,21 +63,21 @@ void Foam::patchToFace::combine(topoSet& set, const bool add) const forAllConstIter(labelHashSet, patchIDs, iter) { - label patchI = iter.key(); + label patchi = iter.key(); - const polyPatch& pp = mesh_.boundaryMesh()[patchI]; + const polyPatch& pp = mesh_.boundaryMesh()[patchi]; Info<< " Found matching patch " << pp.name() << " with " << pp.size() << " faces." << endl; for ( - label faceI = pp.start(); - faceI < pp.start() + pp.size(); - faceI++ + label facei = pp.start(); + facei < pp.start() + pp.size(); + facei++ ) { - addOrDelete(set, faceI, add); + addOrDelete(set, facei, add); } } diff --git a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C index 7d66aaefe2cd999053f8cca4d2d5209c8e6dd9dd..4cc7ca1d821a9e1933d5367baeebec66d972f78b 100644 --- a/src/meshTools/sets/faceSources/pointToFace/pointToFace.C +++ b/src/meshTools/sets/faceSources/pointToFace/pointToFace.C @@ -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 @@ -100,13 +100,13 @@ void Foam::pointToFace::combine(topoSet& set, const bool add) const forAll(pFaces, pFaceI) { - const label faceI = pFaces[pFaceI]; + const label facei = pFaces[pFaceI]; - Map<label>::iterator fndFace = numPoints.find(faceI); + Map<label>::iterator fndFace = numPoints.find(facei); if (fndFace == numPoints.end()) { - numPoints.insert(faceI, 1); + numPoints.insert(facei, 1); } else { @@ -120,26 +120,26 @@ void Foam::pointToFace::combine(topoSet& set, const bool add) const // in face -> all points of face forAllConstIter(Map<label>, numPoints, iter) { - const label faceI = iter.key(); + const label facei = iter.key(); - if (iter() == mesh_.faces()[faceI].size()) + if (iter() == mesh_.faces()[facei].size()) { - addOrDelete(set, faceI, add); + addOrDelete(set, facei, add); } } } else if (option_ == EDGE) { const faceList& faces = mesh_.faces(); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; forAll(f, fp) { if (loadedSet.found(f[fp]) && loadedSet.found(f.nextLabel(fp))) { - addOrDelete(set, faceI, add); + addOrDelete(set, facei, add); break; } } diff --git a/src/meshTools/sets/faceSources/regionToFace/regionToFace.C b/src/meshTools/sets/faceSources/regionToFace/regionToFace.C index e03a9f5c7946aa293cd6ec0a3bdc23ee0fdb1e24..b12be8efc526e0ba5fa9819570bdfabeadd83c4d 100644 --- a/src/meshTools/sets/faceSources/regionToFace/regionToFace.C +++ b/src/meshTools/sets/faceSources/regionToFace/regionToFace.C @@ -62,7 +62,7 @@ void Foam::regionToFace::markZone ( const indirectPrimitivePatch& patch, const label procI, - const label faceI, + const label facei, const label zoneI, labelList& faceZone ) const @@ -76,7 +76,7 @@ void Foam::regionToFace::markZone if (Pstream::myProcNo() == procI) { - const labelList& fEdges = patch.faceEdges()[faceI]; + const labelList& fEdges = patch.faceEdges()[facei]; forAll(fEdges, i) { changedEdges.append(fEdges[i]); @@ -100,11 +100,11 @@ void Foam::regionToFace::markZone returnReduce(patch.nEdges(), sumOp<label>()) ); - forAll(allFaceInfo, faceI) + forAll(allFaceInfo, facei) { - if (allFaceInfo[faceI].region() == zoneI) + if (allFaceInfo[facei].region() == zoneI) { - faceZone[faceI] = zoneI; + faceZone[facei] = zoneI; } } } @@ -164,11 +164,11 @@ void Foam::regionToFace::combine(topoSet& set, const bool add) const faceRegion ); - forAll(faceRegion, faceI) + forAll(faceRegion, facei) { - if (faceRegion[faceI] == 0) + if (faceRegion[facei] == 0) { - addOrDelete(set, patch.addressing()[faceI], add); + addOrDelete(set, patch.addressing()[facei], add); } } } diff --git a/src/meshTools/sets/faceSources/regionToFace/regionToFace.H b/src/meshTools/sets/faceSources/regionToFace/regionToFace.H index 1dc1d48069ff74a2311ed47de996498a5f971c7f..e218ed07cd56782ff2788212aaccbed61228cea6 100644 --- a/src/meshTools/sets/faceSources/regionToFace/regionToFace.H +++ b/src/meshTools/sets/faceSources/regionToFace/regionToFace.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -71,7 +71,7 @@ class regionToFace ( const indirectPrimitivePatch& patch, const label procI, - const label faceI, + const label facei, const label zoneI, labelList& faceZone ) const; diff --git a/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C b/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C index 1015de9bd6b8f50c3b81780366679c01cc082881..50b423a4ad72f0372c09fbfd693d31b0a9bd8f72 100644 --- a/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.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 @@ -117,10 +117,10 @@ void Foam::searchableSurfaceToFaceZone::applyToSet const pointField& cc = mesh_.cellCentres(); // Internal faces - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - start[faceI] = cc[mesh_.faceOwner()[faceI]]; - end[faceI] = cc[mesh_.faceNeighbour()[faceI]]; + start[facei] = cc[mesh_.faceOwner()[facei]]; + end[facei] = cc[mesh_.faceNeighbour()[facei]]; } // Boundary faces @@ -129,26 +129,26 @@ void Foam::searchableSurfaceToFaceZone::applyToSet const polyBoundaryMesh& pbm = mesh_.boundaryMesh(); - forAll(pbm, patchI) + forAll(pbm, patchi) { - const polyPatch& pp = pbm[patchI]; + const polyPatch& pp = pbm[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start()+i; - start[faceI] = cc[mesh_.faceOwner()[faceI]]; - end[faceI] = nbrCellCentres[faceI-mesh_.nInternalFaces()]; + label facei = pp.start()+i; + start[facei] = cc[mesh_.faceOwner()[facei]]; + end[facei] = nbrCellCentres[facei-mesh_.nInternalFaces()]; } } else { forAll(pp, i) { - label faceI = pp.start()+i; - start[faceI] = cc[mesh_.faceOwner()[faceI]]; - end[faceI] = mesh_.faceCentres()[faceI]; + label facei = pp.start()+i; + start[facei] = cc[mesh_.faceOwner()[facei]]; + end[facei] = mesh_.faceCentres()[facei]; } } } @@ -174,13 +174,13 @@ void Foam::searchableSurfaceToFaceZone::applyToSet DynamicList<label> newAddressing(fzSet.addressing()); DynamicList<bool> newFlipMap(fzSet.flipMap()); - forAll(hits, faceI) + forAll(hits, facei) { - if (hits[faceI].hit() && !fzSet.found(faceI)) + if (hits[facei].hit() && !fzSet.found(facei)) { - newAddressing.append(faceI); - vector d = end[faceI]-start[faceI]; - newFlipMap.append((normals[faceI] & d) < 0); + newAddressing.append(facei); + vector d = end[facei]-start[facei]; + newFlipMap.append((normals[facei] & d) < 0); } } diff --git a/src/meshTools/sets/faceZoneSources/setAndNormalToFaceZone/setAndNormalToFaceZone.C b/src/meshTools/sets/faceZoneSources/setAndNormalToFaceZone/setAndNormalToFaceZone.C index 2f1ed95d7932f1e404e18f5bdc71530d1ea17b3e..baf34a3551998855fa5945990455e1e50a534a2d 100644 --- a/src/meshTools/sets/faceZoneSources/setAndNormalToFaceZone/setAndNormalToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/setAndNormalToFaceZone/setAndNormalToFaceZone.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 @@ -130,13 +130,13 @@ void Foam::setAndNormalToFaceZone::applyToSet forAllConstIter(faceSet, fSet, iter) { - label faceI = iter.key(); + label facei = iter.key(); - if (!fzSet.found(faceI)) + if (!fzSet.found(facei)) { - newAddressing.append(faceI); + newAddressing.append(facei); - vector n = faces[faceI].normal(points); + vector n = faces[facei].normal(points); if ((n & normal_) > 0) { newFlipMap.append(false); diff --git a/src/meshTools/sets/faceZoneSources/setToFaceZone/setToFaceZone.C b/src/meshTools/sets/faceZoneSources/setToFaceZone/setToFaceZone.C index fc32253f96fbf61d5faeabc1583a9c9d65df3fbe..821d0777f29a4b19e8342dfb84a9ba2cc084c473 100644 --- a/src/meshTools/sets/faceZoneSources/setToFaceZone/setToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/setToFaceZone/setToFaceZone.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 @@ -127,11 +127,11 @@ void Foam::setToFaceZone::applyToSet forAllConstIter(faceSet, fSet, iter) { - label faceI = iter.key(); + label facei = iter.key(); - if (!fzSet.found(faceI)) + if (!fzSet.found(facei)) { - newAddressing.append(faceI); + newAddressing.append(facei); newFlipMap.append(false); } } diff --git a/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C b/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C index 91bb90e39b43a1777544324ef40e3dbffe2821ec..89d666e810cd0d6cecc4341bb1e4f327220f005b 100644 --- a/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C +++ b/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.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 @@ -133,18 +133,18 @@ void Foam::setsToFaceZone::applyToSet forAllConstIter(faceSet, fSet, iter) { - label faceI = iter.key(); + label facei = iter.key(); - if (!fzSet.found(faceI)) + if (!fzSet.found(facei)) { bool flipFace = false; - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; bool ownFound = cSet.found(own); - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; bool neiFound = cSet.found(nei); if (ownFound && !neiFound) @@ -159,11 +159,11 @@ void Foam::setsToFaceZone::applyToSet { WarningInFunction << "One of owner or neighbour of internal face " - << faceI << " should be in cellSet " + << facei << " should be in cellSet " << cSet.name() << " to be able to determine orientation." << endl - << "Face:" << faceI << " own:" << own + << "Face:" << facei << " own:" << own << " OwnInCellSet:" << ownFound << " nei:" << nei << " NeiInCellSet:" << neiFound @@ -181,7 +181,7 @@ void Foam::setsToFaceZone::applyToSet flipFace = !flipFace; } - newAddressing.append(faceI); + newAddressing.append(facei); newFlipMap.append(flipFace); } } diff --git a/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C b/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C index ed65ed86f808c95713bf720ba47fadbc97fd2428..3a52076ac8d0eca09408bc34da532c952ad793c6 100644 --- a/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C +++ b/src/meshTools/sets/pointSources/cellToPoint/cellToPoint.C @@ -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 @@ -70,8 +70,8 @@ void Foam::cellToPoint::combine(topoSet& set, const bool add) const // Add all point from cells in loadedSet forAllConstIter(cellSet, loadedSet, iter) { - const label cellI = iter.key(); - const labelList& cFaces = mesh_.cells()[cellI]; + const label celli = iter.key(); + const labelList& cFaces = mesh_.cells()[celli]; forAll(cFaces, cFaceI) { diff --git a/src/meshTools/sets/topoSetSource/topoSetSource.C b/src/meshTools/sets/topoSetSource/topoSetSource.C index 25fce98506dea2f2b55c18788ed7b5d00e944bbf..632e159ddd5e48f8d233149972bd5f1ca4ad683e 100644 --- a/src/meshTools/sets/topoSetSource/topoSetSource.C +++ b/src/meshTools/sets/topoSetSource/topoSetSource.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 @@ -139,17 +139,17 @@ Foam::Istream& Foam::topoSetSource::checkIs(Istream& is) void Foam::topoSetSource::addOrDelete ( topoSet& set, - const label cellI, + const label celli, const bool add ) const { if (add) { - set.insert(cellI); + set.insert(celli); } else { - set.erase(cellI); + set.erase(celli); } } diff --git a/src/meshTools/sets/topoSetSource/topoSetSource.H b/src/meshTools/sets/topoSetSource/topoSetSource.H index 0b83d2b34c9813a4883640422a51f37f1afd4e9c..d031a1a0d9300c05b293b72ddb012053401e04ab 100644 --- a/src/meshTools/sets/topoSetSource/topoSetSource.H +++ b/src/meshTools/sets/topoSetSource/topoSetSource.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 @@ -126,8 +126,8 @@ protected: const polyMesh& mesh_; - //- Add (if bool) cellI to set or delete cellI from set. - void addOrDelete(topoSet& set, const label cellI, const bool) const; + //- Add (if bool) celli to set or delete celli from set. + void addOrDelete(topoSet& set, const label celli, const bool) const; private: diff --git a/src/meshTools/sets/topoSets/cellZoneSet.C b/src/meshTools/sets/topoSets/cellZoneSet.C index cd52d72ed96c406afe32af7c43e60a956230f842..280f6d02aaec08ee4be4214d855934430ffd19e8 100644 --- a/src/meshTools/sets/topoSets/cellZoneSet.C +++ b/src/meshTools/sets/topoSets/cellZoneSet.C @@ -139,9 +139,9 @@ void cellZoneSet::invert(const label maxLen) // Count label n = 0; - for (label cellI = 0; cellI < maxLen; cellI++) + for (label celli = 0; celli < maxLen; celli++) { - if (!found(cellI)) + if (!found(celli)) { n++; } @@ -151,11 +151,11 @@ void cellZoneSet::invert(const label maxLen) addressing_.setSize(n); n = 0; - for (label cellI = 0; cellI < maxLen; cellI++) + for (label celli = 0; celli < maxLen; celli++) { - if (!found(cellI)) + if (!found(celli)) { - addressing_[n] = cellI; + addressing_[n] = celli; n++; } } @@ -172,11 +172,11 @@ void cellZoneSet::subset(const topoSet& set) forAll(fSet.addressing(), i) { - label cellI = fSet.addressing()[i]; + label celli = fSet.addressing()[i]; - if (found(cellI)) + if (found(celli)) { - newAddressing.append(cellI); + newAddressing.append(celli); } } @@ -193,11 +193,11 @@ void cellZoneSet::addSet(const topoSet& set) forAll(fSet.addressing(), i) { - label cellI = fSet.addressing()[i]; + label celli = fSet.addressing()[i]; - if (!found(cellI)) + if (!found(celli)) { - newAddressing.append(cellI); + newAddressing.append(celli); } } @@ -214,12 +214,12 @@ void cellZoneSet::deleteSet(const topoSet& set) forAll(addressing_, i) { - label cellI = addressing_[i]; + label celli = addressing_[i]; - if (!fSet.found(cellI)) + if (!fSet.found(celli)) { // Not found in fSet so add - newAddressing.append(cellI); + newAddressing.append(celli); } } @@ -290,8 +290,8 @@ void cellZoneSet::updateMesh(const mapPolyMesh& morphMap) label n = 0; forAll(addressing_, i) { - label cellI = addressing_[i]; - label newCellI = morphMap.reverseCellMap()[cellI]; + label celli = addressing_[i]; + label newCellI = morphMap.reverseCellMap()[celli]; if (newCellI >= 0) { newAddressing[n] = newCellI; diff --git a/src/meshTools/sets/topoSets/faceSet.C b/src/meshTools/sets/topoSets/faceSet.C index 08dd1360d71eef2bfefeb08858d6af1f5167ec59..52622b3dc679fdfe995c60633cedcf25bcbed5a1 100644 --- a/src/meshTools/sets/topoSets/faceSet.C +++ b/src/meshTools/sets/topoSets/faceSet.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 @@ -122,16 +122,16 @@ void faceSet::sync(const polyMesh& mesh) label nAdded = 0; - forAll(set, faceI) + forAll(set, facei) { - if (set[faceI]) + if (set[facei]) { - if (insert(faceI)) + if (insert(facei)) { nAdded++; } } - else if (found(faceI)) + else if (found(facei)) { FatalErrorInFunction << "Problem : syncing removed faces from set." diff --git a/src/meshTools/sets/topoSets/faceZoneSet.C b/src/meshTools/sets/topoSets/faceZoneSet.C index 34ce4249afa594141e3475a415371edc408f0f45..b24846f13fc70dcddf835476eac8a3f40017af12 100644 --- a/src/meshTools/sets/topoSets/faceZoneSet.C +++ b/src/meshTools/sets/topoSets/faceZoneSet.C @@ -144,9 +144,9 @@ void faceZoneSet::invert(const label maxLen) // Count label n = 0; - for (label faceI = 0; faceI < maxLen; faceI++) + for (label facei = 0; facei < maxLen; facei++) { - if (!found(faceI)) + if (!found(facei)) { n++; } @@ -157,11 +157,11 @@ void faceZoneSet::invert(const label maxLen) flipMap_.setSize(n); n = 0; - for (label faceI = 0; faceI < maxLen; faceI++) + for (label facei = 0; facei < maxLen; facei++) { - if (!found(faceI)) + if (!found(facei)) { - addressing_[n] = faceI; + addressing_[n] = facei; flipMap_[n] = false; //? or true? n++; } @@ -187,9 +187,9 @@ void faceZoneSet::subset(const topoSet& set) forAll(fSet.addressing(), i) { - label faceI = fSet.addressing()[i]; + label facei = fSet.addressing()[i]; - Map<label>::const_iterator iter = faceToIndex.find(faceI); + Map<label>::const_iterator iter = faceToIndex.find(facei); if (iter != faceToIndex.end()) { @@ -199,7 +199,7 @@ void faceZoneSet::subset(const topoSet& set) { nConflict++; } - newAddressing.append(faceI); + newAddressing.append(facei); newFlipMap.append(flipMap_[index]); } } @@ -235,9 +235,9 @@ void faceZoneSet::addSet(const topoSet& set) forAll(fSet.addressing(), i) { - label faceI = fSet.addressing()[i]; + label facei = fSet.addressing()[i]; - Map<label>::const_iterator iter = faceToIndex.find(faceI); + Map<label>::const_iterator iter = faceToIndex.find(facei); if (iter != faceToIndex.end()) { @@ -250,7 +250,7 @@ void faceZoneSet::addSet(const topoSet& set) } else { - newAddressing.append(faceI); + newAddressing.append(facei); newFlipMap.append(fSet.flipMap()[i]); } } @@ -286,9 +286,9 @@ void faceZoneSet::deleteSet(const topoSet& set) forAll(addressing_, i) { - label faceI = addressing_[i]; + label facei = addressing_[i]; - Map<label>::const_iterator iter = faceToIndex.find(faceI); + Map<label>::const_iterator iter = faceToIndex.find(facei); if (iter != faceToIndex.end()) { @@ -302,7 +302,7 @@ void faceZoneSet::deleteSet(const topoSet& set) else { // Not found in fSet so add - newAddressing.append(faceI); + newAddressing.append(facei); newFlipMap.append(fSet.flipMap()[i]); } } @@ -385,8 +385,8 @@ void faceZoneSet::updateMesh(const mapPolyMesh& morphMap) label n = 0; forAll(addressing_, i) { - label faceI = addressing_[i]; - label newFaceI = morphMap.reverseFaceMap()[faceI]; + label facei = addressing_[i]; + label newFaceI = morphMap.reverseFaceMap()[facei]; if (newFaceI >= 0) { newAddressing[n] = newFaceI; diff --git a/src/meshTools/sets/topoSets/topoSet.C b/src/meshTools/sets/topoSets/topoSet.C index ee6fe930e2635e0f9a190e16a98a20d3df818a45..7344d2f7f1d72a079465692290d8540df2a3b408 100644 --- a/src/meshTools/sets/topoSets/topoSet.C +++ b/src/meshTools/sets/topoSets/topoSet.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 @@ -454,11 +454,11 @@ void Foam::topoSet::invert(const label maxLen) clear(); resize(2*(maxLen - currentSet.size())); - for (label cellI = 0; cellI < maxLen; cellI++) + for (label celli = 0; celli < maxLen; celli++) { - if (!currentSet.found(cellI)) + if (!currentSet.found(celli)) { - insert(cellI); + insert(celli); } } } diff --git a/src/meshTools/surfaceSets/surfaceSets.C b/src/meshTools/surfaceSets/surfaceSets.C index 850df22698f1d50186cfecab665d4489e6e9c2da..768a15a29efc0e6229b215938a7ef4a5b309cd53 100644 --- a/src/meshTools/surfaceSets/surfaceSets.C +++ b/src/meshTools/surfaceSets/surfaceSets.C @@ -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 @@ -69,16 +69,16 @@ License //( // const primitiveMesh& mesh, // const boolList& selectedPoint, -// const label cellI +// const label celli //) //{ -// const labelList& cFaces = mesh.cells()[cellI]; +// const labelList& cFaces = mesh.cells()[celli]; // // forAll(cFaces, cFaceI) // { -// label faceI = cFaces[cFaceI]; +// label facei = cFaces[cFaceI]; // -// const face& f = mesh.faces()[faceI]; +// const face& f = mesh.faces()[facei]; // // forAll(f, fp) // { @@ -149,16 +149,16 @@ License // label nRemoved = 0; // forAllConstIter(labelHashSet, flatCandidates, iter) // { -// label cellI = iter.key(); +// label celli = iter.key(); // -// const cell& cll = cells[cellI]; +// const cell& cll = cells[celli]; // // scalar newVol = cll.mag(newPoints, faces); -// scalar oldVol = mesh.cellVolumes()[cellI]; +// scalar oldVol = mesh.cellVolumes()[celli]; // // if (newVol < 0.1 * oldVol) // { -// internalCells.erase(cellI); +// internalCells.erase(celli); // nRemoved++; // } // } @@ -258,21 +258,21 @@ void Foam::surfaceSets::getSurfaceSets ); } - forAll(cellType, cellI) + forAll(cellType, celli) { - label cType = cellType[cellI]; + label cType = cellType[celli]; if (cType == cellClassification::CUT) { - cut.insert(cellI); + cut.insert(celli); } else if (cType == cellClassification::INSIDE) { - inside.insert(cellI); + inside.insert(celli); } else if (cType == cellClassification::OUTSIDE) { - outside.insert(cellI); + outside.insert(celli); } } } @@ -295,12 +295,12 @@ Foam::labelHashSet Foam::surfaceSets::getHangingCells List<pointStatus> pointSide(mesh.nPoints(), NOTSET); - for (label cellI = 0; cellI < mesh.nCells(); cellI++) + for (label celli = 0; celli < mesh.nCells(); celli++) { - if (internalCells.found(cellI)) + if (internalCells.found(celli)) { // Inside cell. Mark all vertices seen from this cell. - const labelList& cFaces = cells[cellI]; + const labelList& cFaces = cells[celli]; forAll(cFaces, cFaceI) { @@ -328,7 +328,7 @@ Foam::labelHashSet Foam::surfaceSets::getHangingCells else { // Outside cell - const labelList& cFaces = cells[cellI]; + const labelList& cFaces = cells[celli]; forAll(cFaces, cFaceI) { @@ -376,8 +376,8 @@ Foam::labelHashSet Foam::surfaceSets::getHangingCells forAllConstIter(labelHashSet, internalCells, iter) { - const label cellI = iter.key(); - const cell& cFaces = cells[cellI]; + const label celli = iter.key(); + const cell& cFaces = cells[celli]; label usesMixedOnly = true; @@ -401,7 +401,7 @@ Foam::labelHashSet Foam::surfaceSets::getHangingCells } if (usesMixedOnly) { - mixedOnlyCells.insert(cellI); + mixedOnlyCells.insert(celli); } } diff --git a/src/meshTools/surfaceSets/surfaceSets.H b/src/meshTools/surfaceSets/surfaceSets.H index 4b960b9f6660d8c7de7f3697ccc5f16de89a5b42..18edb8bbf9f70f0c9ca6b356aeeaba8ffc8a662c 100644 --- a/src/meshTools/surfaceSets/surfaceSets.H +++ b/src/meshTools/surfaceSets/surfaceSets.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 @@ -87,7 +87,7 @@ class surfaceSets //( // const primitiveMesh& mesh, // const boolList& selectedPoint, - // const label cellI + // const label celli //); ////- Find points used only by internalCells and remove from diff --git a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C index 09ca7c7eeeb3fa65fb7f67cc558d3f33632b976c..4d59410b4e4eacf7d59ccaba077037af286c773f 100644 --- a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C +++ b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.C @@ -137,9 +137,9 @@ Foam::geometricSurfacePatchList Foam::booleanSurface::mergePatches // Copy all patches of surf1 label combinedPatchI = 0; - forAll(surf1.patches(), patchI) + forAll(surf1.patches(), patchi) { - combinedPatches[combinedPatchI++] = surf1.patches()[patchI]; + combinedPatches[combinedPatchI++] = surf1.patches()[patchi]; } // (inefficiently) add unique patches from surf2 @@ -308,15 +308,15 @@ void Foam::booleanSurface::propagateSide ( const triSurface& surf, const label prevState, - const label faceI, + const label facei, labelList& side ) { - if (side[faceI] == UNVISITED) + if (side[facei] == UNVISITED) { - side[faceI] = prevState; + side[facei] = prevState; - const labelledTri& tri = surf.localFaces()[faceI]; + const labelledTri& tri = surf.localFaces()[facei]; // Get copy of face labels label a = tri[0]; @@ -325,7 +325,7 @@ void Foam::booleanSurface::propagateSide // Go and visit my edges' face-neighbours. - const labelList& myEdges = surf.faceEdges()[faceI]; + const labelList& myEdges = surf.faceEdges()[facei]; label edgeAB = findEdge(surf.edges(), myEdges, edge(a, b)); @@ -333,7 +333,7 @@ void Foam::booleanSurface::propagateSide ( surf, a, - faceI, + facei, prevState, edgeAB, side @@ -345,7 +345,7 @@ void Foam::booleanSurface::propagateSide ( surf, b, - faceI, + facei, prevState, edgeBC, side @@ -357,7 +357,7 @@ void Foam::booleanSurface::propagateSide ( surf, c, - faceI, + facei, prevState, edgeCA, side @@ -485,11 +485,11 @@ Foam::booleanSurface::booleanSurface // Subset zone which includes cutSurf2FaceI boolList includedFaces1(cutSurf1.size(), false); - forAll(faceZone1, faceI) + forAll(faceZone1, facei) { - if (faceZone1[faceI] == faceZone1[cutSurf1FaceI]) + if (faceZone1[facei] == faceZone1[cutSurf1FaceI]) { - includedFaces1[faceI] = true; + includedFaces1[facei] = true; } } @@ -533,11 +533,11 @@ Foam::booleanSurface::booleanSurface // Subset zone which includes cutSurf2FaceI boolList includedFaces2(cutSurf2.size(), false); - forAll(faceZone2, faceI) + forAll(faceZone2, facei) { - if (faceZone2[faceI] == faceZone2[cutSurf2FaceI]) + if (faceZone2[facei] == faceZone2[cutSurf2FaceI]) { - includedFaces2[faceI] = true; + includedFaces2[facei] = true; } } @@ -651,18 +651,18 @@ Foam::booleanSurface::booleanSurface // Copy faces from subSurf1. No need for renumbering. label combinedFaceI = 0; - forAll(subSurf1, faceI) + 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. - forAll(subSurf2, faceI) + forAll(subSurf2, facei) { - const labelledTri& f = subSurf2[faceI]; + const labelledTri& f = subSurf2[facei]; - faceMap_[combinedFaceI] = -faceMap2[faceI]-1; + faceMap_[combinedFaceI] = -faceMap2[facei]-1; combinedFaces[combinedFaceI++] = labelledTri @@ -858,16 +858,16 @@ Foam::booleanSurface::booleanSurface label combinedFaceI = 0; - forAll(cutSurf1, faceI) + forAll(cutSurf1, facei) { - combinedFaces[combinedFaceI++] = cutSurf1[faceI]; + combinedFaces[combinedFaceI++] = cutSurf1[facei]; } - forAll(cutSurf2, faceI) + forAll(cutSurf2, facei) { labelledTri& combinedTri = combinedFaces[combinedFaceI++]; - const labelledTri& tri = cutSurf2[faceI]; + const labelledTri& tri = cutSurf2[facei]; forAll(tri, fp) { @@ -918,13 +918,13 @@ Foam::booleanSurface::booleanSurface label combinedFaceI = 0; - forAll(cutSurf1, faceI) + forAll(cutSurf1, facei) { - faceMap_[combinedFaceI++] = cutSurf1.faceMap()[faceI]; + faceMap_[combinedFaceI++] = cutSurf1.faceMap()[facei]; } - forAll(cutSurf2, faceI) + forAll(cutSurf2, facei) { - faceMap_[combinedFaceI++] = -cutSurf2.faceMap()[faceI] - 1; + faceMap_[combinedFaceI++] = -cutSurf2.faceMap()[facei] - 1; } triSurface::operator=(combinedSurf); @@ -945,14 +945,14 @@ Foam::booleanSurface::booleanSurface label minFaceI = -1; pointHit minHit(false, Zero, GREAT, true); - forAll(combinedSurf, faceI) + forAll(combinedSurf, facei) { - pointHit curHit = combinedSurf[faceI].nearestPoint(outsidePoint, pts); + pointHit curHit = combinedSurf[facei].nearestPoint(outsidePoint, pts); if (curHit.distance() < minHit.distance()) { minHit = curHit; - minFaceI = faceI; + minFaceI = facei; } } @@ -981,43 +981,43 @@ Foam::booleanSurface::booleanSurface boolList include(combinedSurf.size(), false); - forAll(side, faceI) + forAll(side, facei) { - if (side[faceI] == UNVISITED) + if (side[facei] == UNVISITED) { FatalErrorInFunction - << "Face " << faceI << " has not been reached by walking from" + << "Face " << facei << " has not been reached by walking from" << " nearest point " << minHit.rawPoint() << " nearest face " << minFaceI << exit(FatalError); } - else if (side[faceI] == OUTSIDE) + else if (side[facei] == OUTSIDE) { if (booleanOp == booleanSurface::UNION) { - include[faceI] = true; + include[facei] = true; } else if (booleanOp == booleanSurface::INTERSECTION) { - include[faceI] = false; + include[facei] = false; } else // difference { - include[faceI] = (faceI < cutSurf1.size()); // face from surf1 + include[facei] = (facei < cutSurf1.size()); // face from surf1 } } else // inside { if (booleanOp == booleanSurface::UNION) { - include[faceI] = false; + include[facei] = false; } else if (booleanOp == booleanSurface::INTERSECTION) { - include[faceI] = true; + include[facei] = true; } else // difference { - include[faceI] = (faceI >= cutSurf1.size()); // face from surf2 + include[facei] = (facei >= cutSurf1.size()); // face from surf2 } } } @@ -1038,10 +1038,10 @@ Foam::booleanSurface::booleanSurface // Create face map faceMap_.setSize(subSurf.size()); - forAll(subToCombinedFace, faceI) + forAll(subToCombinedFace, facei) { // Get label in combinedSurf - label combinedFaceI = subToCombinedFace[faceI]; + label combinedFaceI = subToCombinedFace[facei]; // First faces in combinedSurf come from cutSurf1. @@ -1049,13 +1049,13 @@ Foam::booleanSurface::booleanSurface { label cutSurf1Face = combinedFaceI; - faceMap_[faceI] = cutSurf1.faceMap()[cutSurf1Face]; + faceMap_[facei] = cutSurf1.faceMap()[cutSurf1Face]; } else { label cutSurf2Face = combinedFaceI - cutSurf1.size(); - faceMap_[faceI] = - cutSurf2.faceMap()[cutSurf2Face] - 1; + 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 76651191cea6437287f5c28a4747d8ebd7bad191..6f3fd1e9bc75c79584ecc2267ae09e72973a3a2c 100644 --- a/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.H +++ b/src/meshTools/triSurface/booleanOps/booleanSurface/booleanSurface.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 @@ -148,7 +148,7 @@ class booleanSurface ( const triSurface& surf, const label prevState, - const label faceI, + const label facei, labelList& side ); @@ -209,31 +209,31 @@ public: return faceMap_; } - bool from1(const label faceI) const + bool from1(const label facei) const { - return faceMap_[faceI] >= 0; + return faceMap_[facei] >= 0; } - bool surf1Face(const label faceI) const + bool surf1Face(const label facei) const { - if (!from1(faceI)) + if (!from1(facei)) { FatalErrorInFunction - << "face " << faceI << " not from surface 1" + << "face " << facei << " not from surface 1" << abort(FatalError); } - return faceMap_[faceI]; + return faceMap_[facei]; } - bool surf2Face(const label faceI) const + bool surf2Face(const label facei) const { - if (from1(faceI)) + if (from1(facei)) { FatalErrorInFunction - << "face " << faceI << " not from surface 2" + << "face " << facei << " not from surface 2" << abort(FatalError); } - return -faceMap_[faceI]-1; + return -faceMap_[facei]-1; } }; diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C index f287a4d67fc1e958a6d06d4c26dd64c2fe113f36..31e013e2e7bcf2f7ba25f0e6935fca9b83aab407 100644 --- a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C +++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C @@ -266,28 +266,28 @@ Foam::edgeSurface::edgeSurface // Get the face from the correct surface const FixedList<label, 2>& twoFaces = iter.key(); - label faceI; + label facei; if (isFirstSurface) { - faceI = twoFaces[0]; + facei = twoFaces[0]; } else { - faceI = twoFaces[1]; + facei = twoFaces[1]; } // Store on face-edge addressing. (note: offset edge) - allFaceEdges[faceI].append(edgeI + nSurfaceEdges_); + allFaceEdges[facei].append(edgeI + nSurfaceEdges_); } // Transfer. edges_.transfer(allEdges); parentEdges_.transfer(allParentEdges); - forAll(allFaceEdges, faceI) + forAll(allFaceEdges, facei) { - faceEdges_[faceI].transfer(allFaceEdges[faceI]); + faceEdges_[facei].transfer(allFaceEdges[facei]); } @@ -301,14 +301,14 @@ Foam::edgeSurface::edgeSurface { Pout<< "edgeSurface : Dumping faceEdges to files" << endl; - forAll(faceEdges_, faceI) + forAll(faceEdges_, facei) { - const labelList& fEdges = faceEdges_[faceI]; + const labelList& fEdges = faceEdges_[facei]; if (fEdges.size() != 3) { - fileName faceFName("face_" + name(faceI) + ".obj"); - Pout<< "edgeSurface : Dumping faceEdges for face " << faceI + fileName faceFName("face_" + name(facei) + ".obj"); + Pout<< "edgeSurface : Dumping faceEdges for face " << facei << " to " << faceFName << endl; OFstream fStream(faceFName); @@ -341,7 +341,7 @@ Foam::edgeSurface::edgeSurface void Foam::edgeSurface::addIntersectionEdges ( - const label faceI, + const label facei, const edgeList& additionalEdges ) { @@ -349,7 +349,7 @@ void Foam::edgeSurface::addIntersectionEdges { Pout<< "Old face consisted of edges:" << endl; - const labelList& fEdges = faceEdges_[faceI]; + const labelList& fEdges = faceEdges_[facei]; forAll(fEdges, i) { const edge& e = edges_[fEdges[i]]; @@ -375,7 +375,7 @@ void Foam::edgeSurface::addIntersectionEdges } // Append to faceEdges. - labelList& fEdges = faceEdges_[faceI]; + labelList& fEdges = faceEdges_[facei]; label nFEdges = fEdges.size(); @@ -393,7 +393,7 @@ void Foam::edgeSurface::addIntersectionEdges if (debug & 2) { - const labelList& fEdges = faceEdges_[faceI]; + const labelList& fEdges = faceEdges_[facei]; Pout<< "New face consists of edges:" << endl; forAll(fEdges, i) diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.H b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.H index 720e99c3d31987674c4a28884d3128a9cc6c11dd..d8564be949c487386d4c909d731f7850b54aa228 100644 --- a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.H +++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.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 @@ -195,7 +195,7 @@ public: //- Add intersection edges to a face. Used for connecting // floating intersection on face to rest of face. - void addIntersectionEdges(const label faceI, const edgeList&); + void addIntersectionEdges(const label facei, const edgeList&); }; diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C index 10ba05bc645c45737f9a0e132b54812ae8b307c8..6b52daf7481e3fd2408310d021a6f890edb8a31b 100644 --- a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C +++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C @@ -286,13 +286,13 @@ Foam::Map<Foam::DynamicList<Foam::label>> Foam::intersectedSurface::calcPointEdgeAddressing ( const edgeSurface& eSurf, - const label faceI + const label facei ) { const pointField& points = eSurf.points(); const edgeList& edges = eSurf.edges(); - const labelList& fEdges = eSurf.faceEdges()[faceI]; + const labelList& fEdges = eSurf.faceEdges()[facei]; Map<DynamicList<label>> facePointEdges(4*fEdges.size()); @@ -381,7 +381,7 @@ Foam::label Foam::intersectedSurface::nextEdge ( const edgeSurface& eSurf, const Map<label>& visited, - const label faceI, + const label facei, const vector& n, const Map<DynamicList<label>>& facePointEdges, const label prevEdgeI, @@ -390,7 +390,7 @@ Foam::label Foam::intersectedSurface::nextEdge { const pointField& points = eSurf.points(); const edgeList& edges = eSurf.edges(); - const labelList& fEdges = eSurf.faceEdges()[faceI]; + const labelList& fEdges = eSurf.faceEdges()[facei]; // Edges connected to prevVertI @@ -400,7 +400,7 @@ Foam::label Foam::intersectedSurface::nextEdge { // Problem. Point not connected. { - Pout<< "Writing face:" << faceI << " to face.obj" << endl; + Pout<< "Writing face:" << facei << " to face.obj" << endl; OFstream str("face.obj"); writeOBJ(points, edges, fEdges, str); @@ -456,7 +456,7 @@ Foam::label Foam::intersectedSurface::nextEdge if (mag(mag(e1) - 1) > SMALL) { { - Pout<< "Writing face:" << faceI << " to face.obj" << endl; + Pout<< "Writing face:" << facei << " to face.obj" << endl; OFstream str("face.obj"); writeOBJ(points, edges, fEdges, str); @@ -524,7 +524,7 @@ Foam::label Foam::intersectedSurface::nextEdge { // No unvisited edge found { - Pout<< "Writing face:" << faceI << " to face.obj" << endl; + Pout<< "Writing face:" << facei << " to face.obj" << endl; OFstream str("face.obj"); writeOBJ(points, edges, fEdges, str); @@ -559,7 +559,7 @@ Foam::label Foam::intersectedSurface::nextEdge Foam::face Foam::intersectedSurface::walkFace ( const edgeSurface& eSurf, - const label faceI, + const label facei, const vector& n, const Map<DynamicList<label>>& facePointEdges, @@ -573,7 +573,7 @@ Foam::face Foam::intersectedSurface::walkFace const edgeList& edges = eSurf.edges(); // Overestimate size of face - face f(eSurf.faceEdges()[faceI].size()); + face f(eSurf.faceEdges()[facei].size()); label fp = 0; @@ -619,7 +619,7 @@ Foam::face Foam::intersectedSurface::walkFace ( eSurf, visited, - faceI, + facei, n, facePointEdges, edgeI, @@ -636,7 +636,7 @@ Foam::face Foam::intersectedSurface::walkFace void Foam::intersectedSurface::findNearestVisited ( const edgeSurface& eSurf, - const label faceI, + const label facei, const Map<DynamicList<label>>& facePointEdges, const Map<label>& pointVisited, const point& pt, @@ -673,7 +673,7 @@ void Foam::intersectedSurface::findNearestVisited if (minVertI == -1) { - const labelList& fEdges = eSurf.faceEdges()[faceI]; + const labelList& fEdges = eSurf.faceEdges()[facei]; SeriousErrorInFunction << "Dumping face edges to faceEdges.obj" << endl; @@ -698,7 +698,7 @@ void Foam::intersectedSurface::findNearestVisited Foam::faceList Foam::intersectedSurface::resplitFace ( const triSurface& surf, - const label faceI, + const label facei, const Map<DynamicList<label>>& facePointEdges, const Map<label>& visited, edgeSurface& eSurf @@ -706,9 +706,9 @@ Foam::faceList Foam::intersectedSurface::resplitFace { { // Dump face for debugging. - Pout<< "Writing face:" << faceI << " to face.obj" << endl; + Pout<< "Writing face:" << facei << " to face.obj" << endl; OFstream str("face.obj"); - writeOBJ(eSurf.points(), eSurf.edges(), eSurf.faceEdges()[faceI], str); + writeOBJ(eSurf.points(), eSurf.edges(), eSurf.faceEdges()[facei], str); } @@ -804,7 +804,7 @@ Foam::faceList Foam::intersectedSurface::resplitFace findNearestVisited ( eSurf, - faceI, + facei, facePointEdges, pointVisited, eSurf.points()[pointI], @@ -851,7 +851,7 @@ Foam::faceList Foam::intersectedSurface::resplitFace findNearestVisited ( eSurf, - faceI, + facei, facePointEdges, pointVisited, eSurf.points()[pointI], @@ -888,34 +888,34 @@ Foam::faceList Foam::intersectedSurface::resplitFace edgeList additionalEdges(1); additionalEdges[0] = edge(visitedVert0, unvisitedVert0); - eSurf.addIntersectionEdges(faceI, additionalEdges); + eSurf.addIntersectionEdges(facei, additionalEdges); - fileName newFName("face_" + Foam::name(faceI) + "_newEdges.obj"); - Pout<< "Dumping face:" << faceI << " to " << newFName << endl; + fileName newFName("face_" + Foam::name(facei) + "_newEdges.obj"); + Pout<< "Dumping face:" << facei << " to " << newFName << endl; writeLocalOBJ ( eSurf.points(), eSurf.edges(), - eSurf.faceEdges()[faceI], + eSurf.faceEdges()[facei], newFName ); // Retry splitFace. Use recursion since is rare situation. - return splitFace(surf, faceI, eSurf); + return splitFace(surf, facei, eSurf); } Foam::faceList Foam::intersectedSurface::splitFace ( const triSurface& surf, - const label faceI, + const label facei, edgeSurface& eSurf ) { // Alias const pointField& points = eSurf.points(); const edgeList& edges = eSurf.edges(); - const labelList& fEdges = eSurf.faceEdges()[faceI]; + const labelList& fEdges = eSurf.faceEdges()[facei]; // Create local (for the face only) point-edge connectivity. Map<DynamicList<label>> facePointEdges @@ -923,7 +923,7 @@ Foam::faceList Foam::intersectedSurface::splitFace calcPointEdgeAddressing ( eSurf, - faceI + facei ) ); @@ -944,11 +944,11 @@ Foam::faceList Foam::intersectedSurface::splitFace if ( - owner == faceI + owner == facei || sameEdgeOrder ( surf.localFaces()[owner], - surf.localFaces()[faceI] + surf.localFaces()[facei] ) ) { @@ -1025,7 +1025,7 @@ Foam::faceList Foam::intersectedSurface::splitFace //printVisit(eSurf.edges(), fEdges, visited); //{ - // Pout<< "Writing face:" << faceI << " to face.obj" << endl; + // Pout<< "Writing face:" << facei << " to face.obj" << endl; // OFstream str("face.obj"); // writeOBJ(eSurf.points(), eSurf.edges(), fEdges, str); //} @@ -1035,8 +1035,8 @@ Foam::faceList Foam::intersectedSurface::splitFace walkFace ( eSurf, - faceI, - surf.faceNormals()[faceI], + facei, + surf.faceNormals()[facei], facePointEdges, startEdgeI, @@ -1064,7 +1064,7 @@ Foam::faceList Foam::intersectedSurface::splitFace FatalErrorInFunction << "Problem: edge " << edgeI << " vertices " - << edges[edgeI] << " on face " << faceI + << edges[edgeI] << " on face " << facei << " has visited status " << stat << " from a " << "righthanded walk along all" << " of the triangle edges. Are the original surfaces" @@ -1092,7 +1092,7 @@ Foam::faceList Foam::intersectedSurface::splitFace return resplitFace ( surf, - faceI, + facei, facePointEdges, visited, eSurf @@ -1106,7 +1106,7 @@ Foam::faceList Foam::intersectedSurface::splitFace vector n = faces[0].normal(eSurf.points()); - if ((n & surf.faceNormals()[faceI]) < 0) + if ((n & surf.faceNormals()[facei]) < 0) { forAll(faces, i) { @@ -1161,9 +1161,9 @@ Foam::intersectedSurface::intersectedSurface // Identity for face map faceMap_.setSize(size()); - forAll(faceMap_, faceI) + forAll(faceMap_, facei) { - faceMap_[faceI] = faceI; + faceMap_[facei] = facei; } return; } @@ -1185,11 +1185,11 @@ Foam::intersectedSurface::intersectedSurface // Start in newTris for decomposed face. labelList startTriI(surf.size(), 0); - forAll(surf, faceI) + forAll(surf, facei) { - startTriI[faceI] = newTris.size(); + startTriI[facei] = newTris.size(); - if (eSurf.faceEdges()[faceI].size() != surf.faceEdges()[faceI].size()) + if (eSurf.faceEdges()[facei].size() != surf.faceEdges()[facei].size()) { // Face has been cut by intersection. // Cut face into multiple subfaces. Use faceEdge information @@ -1200,7 +1200,7 @@ Foam::intersectedSurface::intersectedSurface splitFace ( surf, - faceI, // current triangle + facei, // current triangle eSurf // face-edge description of surface // + intersection ) @@ -1213,12 +1213,12 @@ Foam::intersectedSurface::intersectedSurface // fileName fName // ( // "face_" -// + Foam::name(faceI) +// + Foam::name(facei) // + "_subFace_" // + Foam::name(newFaceI) // + ".obj" // ); -// Pout<< "Writing original face:" << faceI << " subFace:" +// Pout<< "Writing original face:" << facei << " subFace:" // << newFaceI << " to " << fName << endl; // // OFstream str(fName); @@ -1236,8 +1236,8 @@ Foam::intersectedSurface::intersectedSurface // } - const vector& n = surf.faceNormals()[faceI]; - const label region = surf[faceI].region(); + const vector& n = surf.faceNormals()[facei]; + const label region = surf[facei].region(); faceTriangulation tris(eSurf.points(), newF, n); @@ -1250,7 +1250,7 @@ Foam::intersectedSurface::intersectedSurface if (t[i] < 0 || t[i] >= eSurf.points().size()) { FatalErrorInFunction - << "Face triangulation of face " << faceI + << "Face triangulation of face " << facei << " uses points outside range 0.." << eSurf.points().size()-1 << endl << "Triangulation:" @@ -1266,7 +1266,7 @@ Foam::intersectedSurface::intersectedSurface { // Face has not been cut at all. No need to renumber vertices since // eSurf keeps surface vertices first. - newTris.append(surf.localFaces()[faceI]); + newTris.append(surf.localFaces()[facei]); } } @@ -1288,11 +1288,11 @@ Foam::intersectedSurface::intersectedSurface // Construct mapping back into original surface faceMap_.setSize(size()); - for (label faceI = 0; faceI < surf.size()-1; faceI++) + for (label facei = 0; facei < surf.size()-1; facei++) { - for (label triI = startTriI[faceI]; triI < startTriI[faceI+1]; triI++) + for (label triI = startTriI[facei]; triI < startTriI[facei+1]; triI++) { - faceMap_[triI] = faceI; + faceMap_[triI] = facei; } } for (label triI = startTriI[surf.size()-1]; triI < size(); triI++) diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.H b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.H index 8b0c105c7db875e51f89263d6830318da3d832e6..368551286d4be13e314784f828b15885a8ab6aaa 100644 --- a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.H +++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.H @@ -170,7 +170,7 @@ private: static Map<DynamicList<label>> calcPointEdgeAddressing ( const edgeSurface&, - const label faceI + const label facei ); //- Choose edge out of candidates (facePointEdges) according to @@ -179,7 +179,7 @@ private: ( const edgeSurface& eSurf, const Map<label>& visited, - const label faceI, + const label facei, const vector& n, // original triangle normal const Map<DynamicList<label>>& facePointEdges, const label prevEdgeI, @@ -190,7 +190,7 @@ private: static face walkFace ( const edgeSurface& eSurf, - const label faceI, + const label facei, const vector& n, const Map<DynamicList<label>>& facePointEdges, @@ -205,7 +205,7 @@ private: static void findNearestVisited ( const edgeSurface& eSurf, - const label faceI, + const label facei, const Map<DynamicList<label>>& facePointEdges, const Map<label>& pointVisited, const point& pt, @@ -220,7 +220,7 @@ private: static faceList resplitFace ( const triSurface& surf, - const label faceI, + const label facei, const Map<DynamicList<label>>& facePointEdges, const Map<label>& visited, edgeSurface& eSurf @@ -231,7 +231,7 @@ private: static faceList splitFace ( const triSurface& surf, - const label faceI, + const label facei, edgeSurface& eSurf ); diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C index 9aeb2864a22b85e3a3e623c35e09936fe308723f..dd32bd3530c4e7f81b5589845d424717ddfd6bca 100644 --- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C +++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C @@ -52,11 +52,11 @@ bool Foam::surfaceIntersection::excludeEdgeHit ( const triSurface& surf, const label edgeI, - const label faceI, + const label facei, const scalar ) { - const triSurface::FaceType& f = surf.localFaces()[faceI]; + const triSurface::FaceType& f = surf.localFaces()[facei]; const edge& e = surf.edges()[edgeI]; forAll(f, fp) @@ -72,7 +72,7 @@ bool Foam::surfaceIntersection::excludeEdgeHit // vector eVec = e.vec(surf.localPoints()); // eVec /= mag(eVec) + VSMALL; // -// const labelList& eLabels = surf.faceEdges()[faceI]; +// const labelList& eLabels = surf.faceEdges()[facei]; // // // Get edge vector of 0th edge of face // vector e0Vec = surf.edges()[eLabels[0]].vec(surf.localPoints()); @@ -97,12 +97,12 @@ bool Foam::surfaceIntersection::excludeEdgeHit // } // // // Check if same as faceNormal -// if (mag(n & surf.faceNormals()[faceI]) > 1-tol) +// if (mag(n & surf.faceNormals()[facei]) > 1-tol) // { // -// Pout<< "edge:" << e << " face:" << faceI +// Pout<< "edge:" << e << " face:" << facei // << " e0Vec:" << e0Vec << " n:" << n -// << " normalComponent:" << (n & surf.faceNormals()[faceI]) +// << " normalComponent:" << (n & surf.faceNormals()[facei]) // << " tol:" << tol << endl; // // return true; diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.H b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.H index 685d2ea2175ae26d1d0f9a0e5e0f503062091bb9..f2184f5e7249353a93d304ba1df75f71ab960be7 100644 --- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.H +++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.H @@ -130,7 +130,7 @@ class surfaceIntersection static label getEdge ( const triSurface& surf, - const label faceI, + const label facei, const label fp ); @@ -154,7 +154,7 @@ class surfaceIntersection ( const triSurface& surf, const label edgeI, - const label faceI, + const label facei, const scalar tol ); diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C index aff5455ae00aeea5020cba1098ef2ee878f82633..73be4e106bfdd7fa4028394cf7662bb2ceff9678 100644 --- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C +++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C @@ -82,17 +82,17 @@ Foam::scalar Foam::surfaceIntersection::minEdgeLen } -// Get edge between fp and fp+1 on faceI. +// Get edge between fp and fp+1 on facei. Foam::label Foam::surfaceIntersection::getEdge ( const triSurface& surf, - const label faceI, + const label facei, const label fp ) { - const edge faceEdge = surf.localFaces()[faceI].faceEdge(fp); + const edge faceEdge = surf.localFaces()[facei].faceEdge(fp); - const labelList& eLabels = surf.faceEdges()[faceI]; + const labelList& eLabels = surf.faceEdges()[facei]; forAll(eLabels, eI) { @@ -106,7 +106,7 @@ Foam::label Foam::surfaceIntersection::getEdge FatalErrorInFunction << "Problem:: Cannot find edge with vertices " << faceEdge - << " in face " << faceI + << " in face " << facei << abort(FatalError); return -1; diff --git a/src/meshTools/triSurface/orientedSurface/orientedSurface.C b/src/meshTools/triSurface/orientedSurface/orientedSurface.C index 2f117fd9b9731ae0e9ce254edcc8c249789eeed5..5276ef93d891a75a3c9b2128c2c1d77c78cbe6a0 100644 --- a/src/meshTools/triSurface/orientedSurface/orientedSurface.C +++ b/src/meshTools/triSurface/orientedSurface/orientedSurface.C @@ -261,12 +261,12 @@ void Foam::orientedSurface::findZoneSide pointField start(1, outsidePoint); List<List<pointIndexHit>> hits(1, List<pointIndexHit>()); - forAll(faceZone, faceI) + forAll(faceZone, facei) { - if (faceZone[faceI] == zoneI) + if (faceZone[facei] == zoneI) { - const point& fc = s.faceCentres()[faceI]; - const vector& n = s.faceNormals()[faceI]; + const point& fc = s.faceCentres()[facei]; + const vector& n = s.faceNormals()[facei]; const vector d = fc - outsidePoint; const scalar magD = mag(d); @@ -279,7 +279,7 @@ void Foam::orientedSurface::findZoneSide //Info<< "Zone " << zoneI << " : Shooting ray" // << " from " << outsidePoint // << " to " << end - // << " to pierce triangle " << faceI + // << " to pierce triangle " << facei // << " with centre " << fc << endl; @@ -288,7 +288,7 @@ void Foam::orientedSurface::findZoneSide label zoneIndex = -1; forAll(hits[0], i) { - if (hits[0][i].index() == faceI) + if (hits[0][i].index() == facei) { zoneIndex = i; break; @@ -297,7 +297,7 @@ void Foam::orientedSurface::findZoneSide if (zoneIndex != -1) { - zoneFaceI = faceI; + zoneFaceI = facei; if ((zoneIndex%2) == 0) { @@ -326,17 +326,17 @@ bool Foam::orientedSurface::flipSurface bool hasFlipped = false; // Flip tris in s - forAll(flipState, faceI) + forAll(flipState, facei) { - if (flipState[faceI] == UNVISITED) + if (flipState[facei] == UNVISITED) { FatalErrorInFunction - << "unvisited face " << faceI + << "unvisited face " << facei << abort(FatalError); } - else if (flipState[faceI] == FLIP) + else if (flipState[facei] == FLIP) { - labelledTri& tri = s[faceI]; + labelledTri& tri = s[facei]; label tmp = tri[0]; @@ -370,18 +370,18 @@ bool Foam::orientedSurface::orientConsistent(triSurface& s) // FLIP: need to flip labelList flipState(s.size(), UNVISITED); - label faceI = 0; + label facei = 0; while (true) { label startFaceI = -1; - while (faceI < s.size()) + while (facei < s.size()) { - if (flipState[faceI] == UNVISITED) + if (flipState[facei] == UNVISITED) { - startFaceI = faceI; + startFaceI = facei; break; } - faceI++; + facei++; } if (startFaceI == -1) @@ -470,18 +470,18 @@ bool Foam::orientedSurface::orient point minPoint; label minFaceI = -1; - forAll(s, faceI) + forAll(s, facei) { - if (flipState[faceI] == UNVISITED) + if (flipState[facei] == UNVISITED) { pointHit curHit = - s[faceI].nearestPoint(samplePoint, s.points()); + s[facei].nearestPoint(samplePoint, s.points()); if (curHit.distance() < minDist) { minDist = curHit.distance(); minPoint = curHit.rawPoint(); - minFaceI = faceI; + minFaceI = facei; } } } diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C index 47d20dcfc0c1fbbaeb13c019002a2ce144959849..34856f5fc9c9d83ab753c300d7701f011ae6a805 100644 --- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C +++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C @@ -53,20 +53,20 @@ const Foam::label Foam::triSurfaceTools::COLLAPSED = -3; void Foam::triSurfaceTools::calcRefineStatus ( const triSurface& surf, - const label faceI, + const label facei, List<refineType>& refine ) { - if (refine[faceI] == RED) + if (refine[facei] == RED) { // Already marked for refinement. Do nothing. } else { // Not marked or marked for 'green' refinement. Refine. - refine[faceI] = RED; + refine[facei] = RED; - const labelList& myNeighbours = surf.faceFaces()[faceI]; + const labelList& myNeighbours = surf.faceFaces()[facei]; forAll(myNeighbours, myNeighbourI) { @@ -86,17 +86,17 @@ void Foam::triSurfaceTools::calcRefineStatus } -// Split faceI along edgeI at position newPointI +// Split facei along edgeI at position newPointI void Foam::triSurfaceTools::greenRefine ( const triSurface& surf, - const label faceI, + const label facei, const label edgeI, const label newPointI, DynamicList<labelledTri>& newFaces ) { - const labelledTri& f = surf.localFaces()[faceI]; + const labelledTri& f = surf.localFaces()[facei]; const edge& e = surf.edges()[edgeI]; // Find index of edge in face. @@ -177,12 +177,12 @@ Foam::triSurface Foam::triSurfaceTools::doRefine // Point index for midpoint on edge labelList edgeMid(surf.nEdges(), -1); - forAll(refineStatus, faceI) + forAll(refineStatus, facei) { - if (refineStatus[faceI] == RED) + if (refineStatus[facei] == RED) { // Create new vertices on all edges to be refined. - const labelList& fEdges = surf.faceEdges()[faceI]; + const labelList& fEdges = surf.faceEdges()[facei]; forAll(fEdges, i) { @@ -218,7 +218,7 @@ Foam::triSurface Foam::triSurfaceTools::doRefine edgeMid[fEdges[0]], edges[fEdges[0]].commonVertex(edges[fEdges[1]]), edgeMid[fEdges[1]], - surf[faceI].region() + surf[facei].region() ) ); @@ -229,7 +229,7 @@ Foam::triSurface Foam::triSurfaceTools::doRefine edgeMid[fEdges[1]], edges[fEdges[1]].commonVertex(edges[fEdges[2]]), edgeMid[fEdges[2]], - surf[faceI].region() + surf[facei].region() ) ); @@ -240,7 +240,7 @@ Foam::triSurface Foam::triSurfaceTools::doRefine edgeMid[fEdges[2]], edges[fEdges[2]].commonVertex(edges[fEdges[0]]), edgeMid[fEdges[0]], - surf[faceI].region() + surf[facei].region() ) ); @@ -252,7 +252,7 @@ Foam::triSurface Foam::triSurfaceTools::doRefine edgeMid[fEdges[0]], edgeMid[fEdges[1]], edgeMid[fEdges[2]], - surf[faceI].region() + surf[facei].region() ) ); @@ -262,7 +262,7 @@ 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)) { @@ -280,11 +280,11 @@ Foam::triSurface Foam::triSurfaceTools::doRefine } // Copy unmarked triangles since keep original vertex numbering. - forAll(refineStatus, faceI) + forAll(refineStatus, facei) { - if (refineStatus[faceI] == NONE) + if (refineStatus[facei] == NONE) { - newFaces.append(surf.localFaces()[faceI]); + newFaces.append(surf.localFaces()[facei]); } } @@ -339,11 +339,11 @@ void Foam::triSurfaceTools::protectNeighbours // const labelList& myFaces = surf.pointFaces()[vertI]; // forAll(myFaces, i) // { -// label faceI = myFaces[i]; +// label facei = myFaces[i]; // -// if ((faceStatus[faceI] == ANYEDGE) || (faceStatus[faceI] >= 0)) +// if ((faceStatus[facei] == ANYEDGE) || (faceStatus[facei] >= 0)) // { -// faceStatus[faceI] = NOEDGE; +// faceStatus[facei] = NOEDGE; // } // } @@ -354,11 +354,11 @@ void Foam::triSurfaceTools::protectNeighbours forAll(myFaces, myFaceI) { - label faceI = myFaces[myFaceI]; + label facei = myFaces[myFaceI]; - if ((faceStatus[faceI] == ANYEDGE) || (faceStatus[faceI] >= 0)) + if ((faceStatus[facei] == ANYEDGE) || (faceStatus[facei] >= 0)) { - faceStatus[faceI] = NOEDGE; + faceStatus[facei] = NOEDGE; } } } @@ -526,7 +526,7 @@ void Foam::triSurfaceTools::getMergedEdges } -// Calculates (cos of) angle across edgeI of faceI, +// Calculates (cos of) angle across edgeI of facei, // taking into account updated addressing (resulting from edge collapse) Foam::scalar Foam::triSurfaceTools::edgeCosAngle ( @@ -536,7 +536,7 @@ Foam::scalar Foam::triSurfaceTools::edgeCosAngle const labelHashSet& collapsedFaces, const HashTable<label, label, Hash<label>>& edgeToEdge, const HashTable<label, label, Hash<label>>& edgeToFace, - const label faceI, + const label facei, const label edgeI ) { @@ -544,7 +544,7 @@ Foam::scalar Foam::triSurfaceTools::edgeCosAngle label A = surf.edges()[edgeI].start(); label B = surf.edges()[edgeI].end(); - label C = oppositeVertex(surf, faceI, edgeI); + label C = oppositeVertex(surf, facei, edgeI); label D = -1; @@ -561,7 +561,7 @@ Foam::scalar Foam::triSurfaceTools::edgeCosAngle else { // Use normal edge-face addressing - face2I = otherFace(surf, faceI, edgeI); + face2I = otherFace(surf, facei, edgeI); if ((face2I != -1) && !collapsedFaces.found(face2I)) { @@ -616,7 +616,7 @@ Foam::scalar Foam::triSurfaceTools::edgeCosAngle else { FatalErrorInFunction - << "face " << faceI << " does not use vertex " + << "face " << facei << " does not use vertex " << v1 << " of collapsed edge" << abort(FatalError); } } @@ -640,14 +640,14 @@ Foam::scalar Foam::triSurfaceTools::collapseMinCosAngle forAll(v1Faces, v1FaceI) { - label faceI = v1Faces[v1FaceI]; + label facei = v1Faces[v1FaceI]; - if (collapsedFaces.found(faceI)) + if (collapsedFaces.found(facei)) { continue; } - const labelList& myEdges = surf.faceEdges()[faceI]; + const labelList& myEdges = surf.faceEdges()[facei]; forAll(myEdges, myEdgeI) { @@ -665,7 +665,7 @@ Foam::scalar Foam::triSurfaceTools::collapseMinCosAngle collapsedFaces, edgeToEdge, edgeToFace, - faceI, + facei, edgeI ) ); @@ -693,14 +693,14 @@ bool Foam::triSurfaceTools::collapseCreatesFold forAll(v1Faces, v1FaceI) { - label faceI = v1Faces[v1FaceI]; + label facei = v1Faces[v1FaceI]; - if (collapsedFaces.found(faceI)) + if (collapsedFaces.found(facei)) { continue; } - const labelList& myEdges = surf.faceEdges()[faceI]; + const labelList& myEdges = surf.faceEdges()[facei]; forAll(myEdges, myEdgeI) { @@ -716,7 +716,7 @@ bool Foam::triSurfaceTools::collapseCreatesFold collapsedFaces, edgeToEdge, edgeToFace, - faceI, + facei, edgeI ) < minCos @@ -755,11 +755,11 @@ bool Foam::triSurfaceTools::collapseCreatesFold // // forAll(collapsed, collapseI) // { -// const label faceI = collapsed[collapseI]; +// const label facei = collapsed[collapseI]; // -// const labelList& myEdges = surf.faceEdges()[faceI]; +// const labelList& myEdges = surf.faceEdges()[facei]; // -// Pout<< "collapsing faceI:" << faceI << " uses edges:" << myEdges +// Pout<< "collapsing facei:" << facei << " uses edges:" << myEdges // << endl; // // forAll(myEdges, myEdgeI) @@ -774,7 +774,7 @@ bool Foam::triSurfaceTools::collapseCreatesFold // // Get the other face // label neighbourFaceI = myFaces[0]; // -// if (neighbourFaceI == faceI) +// if (neighbourFaceI == facei) // { // neighbourFaceI = myFaces[1]; // } @@ -812,7 +812,7 @@ bool Foam::triSurfaceTools::collapseCreatesFold // { // const labelList& faceJEdges = surf.faceEdges()[neighbourList[j]]; // -// // Check if faceI and faceJ share an edge +// // Check if facei and faceJ share an edge // forAll(faceIEdges, fI) // { // forAll(faceJEdges, fJ) @@ -1328,11 +1328,11 @@ void Foam::triSurfaceTools::getVertexTriangles forAll(endFaces, endFaceI) { - label faceI = endFaces[endFaceI]; + label facei = endFaces[endFaceI]; - if ((faceI != face1I) && (faceI != face2I)) + if ((facei != face1I) && (facei != face2I)) { - edgeTris[nTris++] = faceI; + edgeTris[nTris++] = facei; } } } @@ -1427,7 +1427,7 @@ Foam::labelList Foam::triSurfaceTools::getVertexVertices Foam::label Foam::triSurfaceTools::otherFace ( const triSurface& surf, - const label faceI, + const label facei, const label edgeI ) { @@ -1439,7 +1439,7 @@ Foam::label Foam::triSurfaceTools::otherFace } else { - if (faceI == myFaces[0]) + if (facei == myFaces[0]) { return myFaces[1]; } @@ -1451,17 +1451,17 @@ Foam::label Foam::triSurfaceTools::otherFace } -// Get the two edges on faceI counterclockwise after edgeI +// Get the two edges on facei counterclockwise after edgeI void Foam::triSurfaceTools::otherEdges ( const triSurface& surf, - const label faceI, + const label facei, const label edgeI, label& e1, label& e2 ) { - const labelList& eFaces = surf.faceEdges()[faceI]; + const labelList& eFaces = surf.faceEdges()[facei]; label i0 = findIndex(eFaces, edgeI); @@ -1469,7 +1469,7 @@ void Foam::triSurfaceTools::otherEdges { FatalErrorInFunction << "Edge " << surf.edges()[edgeI] << " not in face " - << surf.localFaces()[faceI] << abort(FatalError); + << surf.localFaces()[facei] << abort(FatalError); } label i1 = eFaces.fcIndex(i0); @@ -1480,17 +1480,17 @@ void Foam::triSurfaceTools::otherEdges } -// Get the two vertices on faceI counterclockwise vertI +// Get the two vertices on facei counterclockwise vertI void Foam::triSurfaceTools::otherVertices ( const triSurface& surf, - const label faceI, + const label facei, const label vertI, label& vert1I, label& vert2I ) { - const labelledTri& f = surf.localFaces()[faceI]; + const labelledTri& f = surf.localFaces()[facei]; if (vertI == f[0]) { @@ -1519,11 +1519,11 @@ void Foam::triSurfaceTools::otherVertices Foam::label Foam::triSurfaceTools::oppositeEdge ( const triSurface& surf, - const label faceI, + const label facei, const label vertI ) { - const labelList& myEdges = surf.faceEdges()[faceI]; + const labelList& myEdges = surf.faceEdges()[facei]; forAll(myEdges, myEdgeI) { @@ -1538,7 +1538,7 @@ Foam::label Foam::triSurfaceTools::oppositeEdge } FatalErrorInFunction - << "Cannot find vertex " << vertI << " in edges of face " << faceI + << "Cannot find vertex " << vertI << " in edges of face " << facei << abort(FatalError); return -1; @@ -1549,11 +1549,11 @@ Foam::label Foam::triSurfaceTools::oppositeEdge Foam::label Foam::triSurfaceTools::oppositeVertex ( const triSurface& surf, - const label faceI, + const label facei, const label edgeI ) { - const triSurface::FaceType& f = surf.localFaces()[faceI]; + const triSurface::FaceType& f = surf.localFaces()[facei]; const edge& e = surf.edges()[edgeI]; forAll(f, fp) @@ -1568,7 +1568,7 @@ Foam::label Foam::triSurfaceTools::oppositeVertex FatalErrorInFunction << "Cannot find vertex opposite edge " << edgeI << " vertices " << e - << " in face " << faceI << " vertices " << f << abort(FatalError); + << " in face " << facei << " vertices " << f << abort(FatalError); return -1; } @@ -1619,9 +1619,9 @@ Foam::label Foam::triSurfaceTools::getTriangle forAll(eFaces, eFaceI) { - label faceI = eFaces[eFaceI]; + label facei = eFaces[eFaceI]; - const labelList& myEdges = surf.faceEdges()[faceI]; + const labelList& myEdges = surf.faceEdges()[facei]; if ( @@ -1637,7 +1637,7 @@ Foam::label Foam::triSurfaceTools::getTriangle || (myEdges[2] == e2I) ) { - return faceI; + return facei; } } } @@ -1818,9 +1818,9 @@ Foam::triSurface Foam::triSurfaceTools::collapseEdges // Get only non-collapsed triangles and renumber vertex labels. - forAll(localFaces, faceI) + forAll(localFaces, facei) { - const labelledTri& f = localFaces[faceI]; + const labelledTri& f = localFaces[facei]; const label a = pointMap[f[0]]; const label b = pointMap[f[1]]; @@ -1829,7 +1829,7 @@ Foam::triSurface Foam::triSurfaceTools::collapseEdges if ( (a != b) && (a != c) && (b != c) - && (faceStatus[faceI] != COLLAPSED) + && (faceStatus[facei] != COLLAPSED) ) { // uncollapsed triangle @@ -1837,7 +1837,7 @@ Foam::triSurface Foam::triSurfaceTools::collapseEdges } else { - //Pout<< "Collapsed triangle " << faceI + //Pout<< "Collapsed triangle " << facei // << " vertices:" << f << endl; } } @@ -1951,11 +1951,11 @@ Foam::triSurface Foam::triSurfaceTools::greenRefine } // Add unrefined faces - forAll(surf.localFaces(), faceI) + forAll(surf.localFaces(), facei) { - if (refineStatus[faceI] == NONE) + if (refineStatus[facei] == NONE) { - newFaces.append(surf.localFaces()[faceI]); + newFaces.append(surf.localFaces()[facei]); } } @@ -2059,9 +2059,9 @@ Foam::triSurface Foam::triSurfaceTools::mergePoints List<labelledTri> newTriangles(surf.size()); label newTriangleI = 0; - forAll(surf, faceI) + forAll(surf, facei) { - const labelledTri& f = surf.localFaces()[faceI]; + const labelledTri& f = surf.localFaces()[facei]; label newA = pointMap[f[0]]; label newB = pointMap[f[1]]; @@ -2348,8 +2348,8 @@ Foam::triSurface Foam::triSurfaceTools::triangulate forAllConstIter(labelHashSet, includePatches, iter) { - const label patchI = iter.key(); - const polyPatch& patch = bMesh[patchI]; + const label patchi = iter.key(); + const polyPatch& patch = bMesh[patchi]; const pointField& points = patch.points(); label nTriTotal = 0; @@ -2402,8 +2402,8 @@ Foam::triSurface Foam::triSurfaceTools::triangulate forAllConstIter(labelHashSet, includePatches, iter) { - const label patchI = iter.key(); - const polyPatch& patch = bMesh[patchI]; + const label patchi = iter.key(); + const polyPatch& patch = bMesh[patchi]; surface.patches()[newPatchI].name() = patch.name(); surface.patches()[newPatchI].geometricType() = patch.type(); @@ -2437,9 +2437,9 @@ Foam::triSurface Foam::triSurfaceTools::triangulateFaceCentre { newPoints[newPointI++] = points[pointI]; } - forAll(faceCentres, faceI) + forAll(faceCentres, facei) { - newPoints[newPointI++] = faceCentres[faceI]; + newPoints[newPointI++] = faceCentres[facei]; } @@ -2453,8 +2453,8 @@ Foam::triSurface Foam::triSurfaceTools::triangulateFaceCentre forAllConstIter(labelHashSet, includePatches, iter) { - const label patchI = iter.key(); - const polyPatch& patch = bMesh[patchI]; + const label patchi = iter.key(); + const polyPatch& patch = bMesh[patchi]; label nTriTotal = 0; @@ -2505,8 +2505,8 @@ Foam::triSurface Foam::triSurfaceTools::triangulateFaceCentre forAllConstIter(labelHashSet, includePatches, iter) { - const label patchI = iter.key(); - const polyPatch& patch = bMesh[patchI]; + const label patchi = iter.key(); + const polyPatch& patch = bMesh[patchi]; surface.patches()[newPatchI].name() = patch.name(); surface.patches()[newPatchI].geometricType() = patch.type(); @@ -2638,9 +2638,9 @@ void Foam::triSurfaceTools::calcInterpolationWeights scalar minDistance = GREAT; - forAll(s, faceI) + forAll(s, facei) { - const labelledTri& f = s[faceI]; + const labelledTri& f = s[facei]; triPointRef tri(f.tri(points)); @@ -2663,7 +2663,7 @@ void Foam::triSurfaceTools::calcInterpolationWeights calcInterpolationWeights(tri, nearest.rawPoint(), weights); //Pout<< "calcScalingFactors : samplePt:" << samplePt - // << " inside triangle:" << faceI + // << " inside triangle:" << facei // << " verts:" << verts // << " weights:" << weights // << endl; diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H index ed7a14daf6df89e137ed3f44ad0887a6472ea497..a11813459dbc2ac4933ad3b4323a739213666dee 100644 --- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H +++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.H @@ -75,13 +75,13 @@ class triSurfaceTools static void calcRefineStatus ( const triSurface& surf, - const label faceI, + const label facei, List<refineType>& refine ); static void greenRefine ( const triSurface& surf, - const label faceI, + const label facei, const label edgeI, const label newPointI, DynamicList<labelledTri>& newFaces @@ -143,7 +143,7 @@ class triSurfaceTools HashTable<label, label, Hash<label>>& edgeToFace ); - //- Calculates (cos of) angle across edgeI of faceI, + //- Calculates (cos of) angle across edgeI of facei, // taking into account updated addressing (resulting from edge // collapse) static scalar edgeCosAngle @@ -154,7 +154,7 @@ class triSurfaceTools const labelHashSet& collapsedFaces, const HashTable<label, label, Hash<label>>& edgeToEdge, const HashTable<label, label, Hash<label>>& edgeToFace, - const label faceI, + const label facei, const label edgeI ); @@ -287,30 +287,30 @@ public: // label& vB //); - //- Get face connected to edge not faceI + //- Get face connected to edge not facei static label otherFace ( const triSurface& surf, - const label faceI, + const label facei, const label edgeI ); - //- Get the two edges on faceI counterclockwise after edgeI + //- Get the two edges on facei counterclockwise after edgeI static void otherEdges ( const triSurface& surf, - const label faceI, + const label facei, const label edgeI, label& e1, label& e2 ); - //- Get the two vertices (local numbering) on faceI counterclockwise + //- Get the two vertices (local numbering) on facei counterclockwise // vertI static void otherVertices ( const triSurface& surf, - const label faceI, + const label facei, const label vertI, label& vert1I, label& vert2I @@ -320,7 +320,7 @@ public: static label oppositeEdge ( const triSurface& surf, - const label faceI, + const label facei, const label vertI ); @@ -328,7 +328,7 @@ public: static label oppositeVertex ( const triSurface& surf, - const label faceI, + const label facei, const label edgeI ); diff --git a/src/meshTools/twoDPointCorrector/twoDPointCorrector.C b/src/meshTools/twoDPointCorrector/twoDPointCorrector.C index 61689f137a6e4dabe0161d80aba3e74bb80ab488..03d3565611fc27e5602c5f34d09a905c7610553e 100644 --- a/src/meshTools/twoDPointCorrector/twoDPointCorrector.C +++ b/src/meshTools/twoDPointCorrector/twoDPointCorrector.C @@ -57,14 +57,14 @@ void Foam::twoDPointCorrector::calcAddressing() const // Try and find a wedge patch const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - if (isA<wedgePolyPatch>(patches[patchI])) + if (isA<wedgePolyPatch>(patches[patchi])) { isWedge_ = true; const wedgePolyPatch& wp = - refCast<const wedgePolyPatch>(patches[patchI]); + refCast<const wedgePolyPatch>(patches[patchi]); pn = wp.centreNormal(); @@ -73,7 +73,7 @@ void Foam::twoDPointCorrector::calcAddressing() const if (polyMesh::debug) { - Pout<< "Found normal from wedge patch " << patchI; + Pout<< "Found normal from wedge patch " << patchi; } break; @@ -83,15 +83,15 @@ void Foam::twoDPointCorrector::calcAddressing() const // Try to find an empty patch with faces if (!isWedge_) { - forAll(patches, patchI) + forAll(patches, patchi) { - if (isA<emptyPolyPatch>(patches[patchI]) && patches[patchI].size()) + if (isA<emptyPolyPatch>(patches[patchi]) && patches[patchi].size()) { - pn = patches[patchI].faceAreas()[0]; + pn = patches[patchi].faceAreas()[0]; if (polyMesh::debug) { - Pout<< "Found normal from empty patch " << patchI; + Pout<< "Found normal from empty patch " << patchi; } break; diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C index bf37bfd1ff329a81b42a43b399bd9e372990eab0..1d365456e2af5d7493d7423b78ceb27daa0a0707 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C @@ -193,24 +193,24 @@ void Foam::decompositionMethod::calcCellCells labelList globalNeighbour(mesh.nFaces()-mesh.nInternalFaces()); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp))) { - label faceI = pp.start(); + label facei = pp.start(); label bFaceI = pp.start() - mesh.nInternalFaces(); forAll(pp, i) { globalNeighbour[bFaceI] = globalAgglom.toGlobal ( - agglom[faceOwner[faceI]] + agglom[faceOwner[facei]] ); bFaceI++; - faceI++; + facei++; } } } @@ -225,27 +225,27 @@ void Foam::decompositionMethod::calcCellCells // Number of faces per coarse cell labelList nFacesPerCell(nLocalCoarse, 0); - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - label own = agglom[faceOwner[faceI]]; - label nei = agglom[faceNeighbour[faceI]]; + label own = agglom[faceOwner[facei]]; + label nei = agglom[faceNeighbour[facei]]; nFacesPerCell[own]++; nFacesPerCell[nei]++; } - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp))) { - label faceI = pp.start(); + label facei = pp.start(); label bFaceI = pp.start()-mesh.nInternalFaces(); forAll(pp, i) { - label own = agglom[faceOwner[faceI]]; + label own = agglom[faceOwner[facei]]; label globalNei = globalNeighbour[bFaceI]; if @@ -257,7 +257,7 @@ void Foam::decompositionMethod::calcCellCells nFacesPerCell[own]++; } - faceI++; + facei++; bFaceI++; } } @@ -275,28 +275,28 @@ void Foam::decompositionMethod::calcCellCells const labelList& offsets = cellCells.offsets(); // For internal faces is just offsetted owner and neighbour - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - label own = agglom[faceOwner[faceI]]; - label nei = agglom[faceNeighbour[faceI]]; + label own = agglom[faceOwner[facei]]; + label nei = agglom[faceNeighbour[facei]]; m[offsets[own] + nFacesPerCell[own]++] = globalAgglom.toGlobal(nei); m[offsets[nei] + nFacesPerCell[nei]++] = globalAgglom.toGlobal(own); } // For boundary faces is offsetted coupled neighbour - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp))) { - label faceI = pp.start(); + label facei = pp.start(); label bFaceI = pp.start()-mesh.nInternalFaces(); forAll(pp, i) { - label own = agglom[faceOwner[faceI]]; + label own = agglom[faceOwner[facei]]; label globalNei = globalNeighbour[bFaceI]; @@ -309,7 +309,7 @@ void Foam::decompositionMethod::calcCellCells m[offsets[own] + nFacesPerCell[own]++] = globalNei; } - faceI++; + facei++; bFaceI++; } } @@ -330,12 +330,12 @@ void Foam::decompositionMethod::calcCellCells label startIndex = cellCells.offsets()[0]; - forAll(cellCells, cellI) + forAll(cellCells, celli) { nbrCells.clear(); - nbrCells.insert(globalAgglom.toGlobal(cellI)); + nbrCells.insert(globalAgglom.toGlobal(celli)); - label endIndex = cellCells.offsets()[cellI+1]; + label endIndex = cellCells.offsets()[celli+1]; for (label i = startIndex; i < endIndex; i++) { @@ -345,20 +345,20 @@ void Foam::decompositionMethod::calcCellCells } } startIndex = endIndex; - cellCells.offsets()[cellI+1] = newIndex; + cellCells.offsets()[celli+1] = newIndex; } cellCells.m().setSize(newIndex); - //forAll(cellCells, cellI) + //forAll(cellCells, celli) //{ - // Pout<< "Original: Coarse cell " << cellI << endl; - // forAll(mesh.cellCells()[cellI], i) + // Pout<< "Original: Coarse cell " << celli << endl; + // forAll(mesh.cellCells()[celli], i) // { - // Pout<< " nbr:" << mesh.cellCells()[cellI][i] << endl; + // Pout<< " nbr:" << mesh.cellCells()[celli][i] << endl; // } - // Pout<< "Compacted: Coarse cell " << cellI << endl; - // const labelUList cCells = cellCells[cellI]; + // Pout<< "Compacted: Coarse cell " << celli << endl; + // const labelUList cCells = cellCells[celli]; // forAll(cCells, i) // { // Pout<< " nbr:" << cCells[i] << endl; @@ -400,24 +400,24 @@ void Foam::decompositionMethod::calcCellCells // // labelList globalNeighbour(mesh.nFaces()-mesh.nInternalFaces()); // -// forAll(patches, patchI) +// forAll(patches, patchi) // { -// const polyPatch& pp = patches[patchI]; +// const polyPatch& pp = patches[patchi]; // // if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp))) // { -// label faceI = pp.start(); +// label facei = pp.start(); // label bFaceI = pp.start() - mesh.nInternalFaces(); // // forAll(pp, i) // { // globalNeighbour[bFaceI] = globalAgglom.toGlobal // ( -// agglom[faceOwner[faceI]] +// agglom[faceOwner[facei]] // ); // // bFaceI++; -// faceI++; +// facei++; // } // } // } @@ -433,12 +433,12 @@ void Foam::decompositionMethod::calcCellCells // labelList nFacesPerCell(nLocalCoarse, 0); // // // 1. Internal faces -// for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) +// for (label facei = 0; facei < mesh.nInternalFaces(); facei++) // { -// if (!blockedFace[faceI]) +// if (!blockedFace[facei]) // { -// label own = agglom[faceOwner[faceI]]; -// label nei = agglom[faceNeighbour[faceI]]; +// label own = agglom[faceOwner[facei]]; +// label nei = agglom[faceNeighbour[facei]]; // // nFacesPerCell[own]++; // nFacesPerCell[nei]++; @@ -446,20 +446,20 @@ void Foam::decompositionMethod::calcCellCells // } // // // 2. Coupled faces -// forAll(patches, patchI) +// forAll(patches, patchi) // { -// const polyPatch& pp = patches[patchI]; +// const polyPatch& pp = patches[patchi]; // // if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp))) // { -// label faceI = pp.start(); +// label facei = pp.start(); // label bFaceI = pp.start()-mesh.nInternalFaces(); // // forAll(pp, i) // { -// if (!blockedFace[faceI]) +// if (!blockedFace[facei]) // { -// label own = agglom[faceOwner[faceI]]; +// label own = agglom[faceOwner[facei]]; // // label globalNei = globalNeighbour[bFaceI]; // if @@ -471,7 +471,7 @@ void Foam::decompositionMethod::calcCellCells // nFacesPerCell[own]++; // } // -// faceI++; +// facei++; // bFaceI++; // } // } @@ -560,12 +560,12 @@ void Foam::decompositionMethod::calcCellCells // const labelList& offsets = cellCells.offsets(); // // // 1. For internal faces is just offsetted owner and neighbour -// for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) +// for (label facei = 0; facei < mesh.nInternalFaces(); facei++) // { -// if (!blockedFace[faceI]) +// if (!blockedFace[facei]) // { -// label own = agglom[faceOwner[faceI]]; -// label nei = agglom[faceNeighbour[faceI]]; +// label own = agglom[faceOwner[facei]]; +// label nei = agglom[faceNeighbour[facei]]; // // m[offsets[own] + nFacesPerCell[own]++] = // globalAgglom.toGlobal(nei); @@ -575,20 +575,20 @@ void Foam::decompositionMethod::calcCellCells // } // // // 2. For boundary faces is offsetted coupled neighbour -// forAll(patches, patchI) +// forAll(patches, patchi) // { -// const polyPatch& pp = patches[patchI]; +// const polyPatch& pp = patches[patchi]; // // if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp))) // { -// label faceI = pp.start(); +// label facei = pp.start(); // label bFaceI = pp.start()-mesh.nInternalFaces(); // // forAll(pp, i) // { -// if (!blockedFace[faceI]) +// if (!blockedFace[facei]) // { -// label own = agglom[faceOwner[faceI]]; +// label own = agglom[faceOwner[facei]]; // // label globalNei = globalNeighbour[bFaceI]; // @@ -601,7 +601,7 @@ void Foam::decompositionMethod::calcCellCells // m[offsets[own] + nFacesPerCell[own]++] = globalNei; // } // -// faceI++; +// facei++; // bFaceI++; // } // } @@ -705,12 +705,12 @@ void Foam::decompositionMethod::calcCellCells // // label startIndex = cellCells.offsets()[0]; // -// forAll(cellCells, cellI) +// forAll(cellCells, celli) // { // nbrCells.clear(); -// nbrCells.insert(globalAgglom.toGlobal(cellI)); +// nbrCells.insert(globalAgglom.toGlobal(celli)); // -// label endIndex = cellCells.offsets()[cellI+1]; +// label endIndex = cellCells.offsets()[celli+1]; // // for (label i = startIndex; i < endIndex; i++) // { @@ -720,20 +720,20 @@ void Foam::decompositionMethod::calcCellCells // } // } // startIndex = endIndex; -// cellCells.offsets()[cellI+1] = newIndex; +// cellCells.offsets()[celli+1] = newIndex; // } // // cellCells.m().setSize(newIndex); // -// //forAll(cellCells, cellI) +// //forAll(cellCells, celli) // //{ -// // Pout<< "Original: Coarse cell " << cellI << endl; -// // forAll(mesh.cellCells()[cellI], i) +// // Pout<< "Original: Coarse cell " << celli << endl; +// // forAll(mesh.cellCells()[celli], i) // // { -// // Pout<< " nbr:" << mesh.cellCells()[cellI][i] << endl; +// // Pout<< " nbr:" << mesh.cellCells()[celli][i] << endl; // // } -// // Pout<< "Compacted: Coarse cell " << cellI << endl; -// // const labelUList cCells = cellCells[cellI]; +// // Pout<< "Compacted: Coarse cell " << celli << endl; +// // const labelUList cCells = cellCells[celli]; // // forAll(cCells, i) // // { // // Pout<< " nbr:" << cCells[i] << endl; @@ -789,9 +789,9 @@ Foam::labelList Foam::decompositionMethod::decompose // Any faces not blocked? label nUnblocked = 0; - forAll(blockedFace, faceI) + forAll(blockedFace, facei) { - if (!blockedFace[faceI]) + if (!blockedFace[facei]) { nUnblocked++; } @@ -858,13 +858,13 @@ Foam::labelList Foam::decompositionMethod::decompose pointField regionCentres(localRegion.nLocalRegions(), point::max); - forAll(localRegion, cellI) + forAll(localRegion, celli) { - label regionI = localRegion[cellI]; + label regionI = localRegion[celli]; if (regionCentres[regionI] == point::max) { - regionCentres[regionI] = mesh.cellCentres()[cellI]; + regionCentres[regionI] = mesh.cellCentres()[celli]; } } @@ -875,18 +875,18 @@ Foam::labelList Foam::decompositionMethod::decompose if (nWeights > 0) { - forAll(localRegion, cellI) + forAll(localRegion, celli) { - label regionI = localRegion[cellI]; + label regionI = localRegion[celli]; - regionWeights[regionI] += cellWeights[cellI]; + regionWeights[regionI] += cellWeights[celli]; } } else { - forAll(localRegion, cellI) + forAll(localRegion, celli) { - label regionI = localRegion[cellI]; + label regionI = localRegion[celli]; regionWeights[regionI] += 1.0; } @@ -951,11 +951,11 @@ Foam::labelList Foam::decompositionMethod::decompose // Take over blockedFaces by seeding a negative number // (so is always less than the decomposition) label nUnblocked = 0; - forAll(blockedFace, faceI) + forAll(blockedFace, facei) { - if (blockedFace[faceI]) + if (blockedFace[facei]) { - faceData[faceI] = minData(-123); + faceData[facei] = minData(-123); } else { @@ -968,12 +968,12 @@ Foam::labelList Foam::decompositionMethod::decompose List<minData> seedData(nUnblocked); nUnblocked = 0; - forAll(blockedFace, faceI) + forAll(blockedFace, facei) { - if (!blockedFace[faceI]) + if (!blockedFace[facei]) { - label own = mesh.faceOwner()[faceI]; - seedFaces[nUnblocked] = faceI; + label own = mesh.faceOwner()[facei]; + seedFaces[nUnblocked] = facei; seedData[nUnblocked] = minData(finalDecomp[own]); nUnblocked++; } @@ -992,11 +992,11 @@ Foam::labelList Foam::decompositionMethod::decompose ); // And extract - forAll(finalDecomp, cellI) + forAll(finalDecomp, celli) { - if (cellData[cellI].valid(deltaCalc.data())) + if (cellData[celli].valid(deltaCalc.data())) { - finalDecomp[cellI] = cellData[cellI].data(); + finalDecomp[celli] = cellData[celli].data(); } } } @@ -1035,12 +1035,12 @@ Foam::labelList Foam::decompositionMethod::decompose const labelList& pFaces = mesh.pointFaces()[f[fp]]; forAll(pFaces, i) { - label faceI = pFaces[i]; + label facei = pFaces[i]; - finalDecomp[mesh.faceOwner()[faceI]] = procI; - if (mesh.isInternalFace(faceI)) + finalDecomp[mesh.faceOwner()[facei]] = procI; + if (mesh.isInternalFace(facei)) { - finalDecomp[mesh.faceNeighbour()[faceI]] = procI; + finalDecomp[mesh.faceNeighbour()[facei]] = procI; } } } @@ -1054,18 +1054,18 @@ Foam::labelList Foam::decompositionMethod::decompose syncTools::swapBoundaryCellList(mesh, finalDecomp, nbrDecomp); const polyBoundaryMesh& patches = mesh.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (pp.coupled()) { forAll(pp, i) { - label faceI = pp.start()+i; - label own = mesh.faceOwner()[faceI]; - label bFaceI = faceI-mesh.nInternalFaces(); + label facei = pp.start()+i; + label own = mesh.faceOwner()[facei]; + label bFaceI = facei-mesh.nInternalFaces(); - if (!blockedFace[faceI]) + if (!blockedFace[facei]) { label ownProc = finalDecomp[own]; label nbrProc = nbrDecomp[bFaceI]; @@ -1073,8 +1073,8 @@ Foam::labelList Foam::decompositionMethod::decompose { FatalErrorInFunction << "patch:" << pp.name() - << " face:" << faceI - << " at:" << mesh.faceCentres()[faceI] + << " face:" << facei + << " at:" << mesh.faceCentres()[facei] << " ownProc:" << ownProc << " nbrProc:" << nbrProc << exit(FatalError); @@ -1119,9 +1119,9 @@ void Foam::decompositionMethod::setConstraints forAll(pNames, i) { - const label patchI = patches.findPatchID(pNames[i]); + const label patchi = patches.findPatchID(pNames[i]); - if (patchI == -1) + if (patchi == -1) { FatalErrorInFunction << "Unknown preservePatch " << pNames[i] @@ -1129,7 +1129,7 @@ void Foam::decompositionMethod::setConstraints << exit(FatalError); } - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; forAll(pp, i) { diff --git a/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C b/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C index f99e59bfba96cd89c6cc5654a8ed021d361a908a..10f90af74f5b569d9972b31bc70ae871c67c3493 100644 --- a/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C +++ b/src/parallel/decompose/decompositionMethods/multiLevelDecomp/multiLevelDecomp.C @@ -109,8 +109,8 @@ 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); // Convert into global compact numbering diff --git a/src/parallel/decompose/decompositionMethods/structuredDecomp/structuredDecomp.C b/src/parallel/decompose/decompositionMethods/structuredDecomp/structuredDecomp.C index 3dfd39f6de740f0378c3f51b44aea2b4ec42882a..dd6f9e9236c3ca496fcccbe0543aa36569f8277a 100644 --- a/src/parallel/decompose/decompositionMethods/structuredDecomp/structuredDecomp.C +++ b/src/parallel/decompose/decompositionMethods/structuredDecomp/structuredDecomp.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 @@ -143,23 +143,23 @@ Foam::labelList Foam::structuredDecomp::decompose // And extract bool haveWarned = false; - forAll(finalDecomp, cellI) + forAll(finalDecomp, celli) { - if (!cellData[cellI].valid(deltaCalc.data())) + if (!cellData[celli].valid(deltaCalc.data())) { if (!haveWarned) { WarningInFunction - << "Did not visit some cells, e.g. cell " << cellI - << " at " << mesh.cellCentres()[cellI] << endl + << "Did not visit some cells, e.g. cell " << celli + << " at " << mesh.cellCentres()[celli] << endl << "Assigning these cells to domain 0." << endl; haveWarned = true; } - finalDecomp[cellI] = 0; + finalDecomp[celli] = 0; } else { - finalDecomp[cellI] = cellData[cellI].data(); + finalDecomp[celli] = cellData[celli].data(); } } diff --git a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C index d004c617b882156d30ad1575d625f7258380eca6..47863d90cb77c4a9276ac29bf9e11529c2341b70 100644 --- a/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C +++ b/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C @@ -342,10 +342,10 @@ Foam::label Foam::ptscotchDecomp::decompose label baseval = 0; // 100*hasVertlabels+10*hasEdgeWeights+1*hasVertWeighs str << baseval << ' ' << "000" << nl; - for (label cellI = 0; cellI < xadjSize-1; cellI++) + for (label celli = 0; celli < xadjSize-1; celli++) { - label start = xadj[cellI]; - label end = xadj[cellI+1]; + label start = xadj[celli]; + label end = xadj[celli+1]; str << end-start; for (label i = start; i < end; i++) diff --git a/src/parallel/decompose/scotchDecomp/scotchDecomp.C b/src/parallel/decompose/scotchDecomp/scotchDecomp.C index 52c0f173fb74c74698a3e33f0b64f6c0c766d7aa..d76ee941f3963071f4667332d0ff008424a60a16 100644 --- a/src/parallel/decompose/scotchDecomp/scotchDecomp.C +++ b/src/parallel/decompose/scotchDecomp/scotchDecomp.C @@ -114,10 +114,10 @@ Foam::label Foam::scotchDecomp::decompose // Insert my own label nTotalCells = 0; - forAll(cWeights, cellI) + forAll(cWeights, celli) { - allXadj[nTotalCells] = xadj[cellI]; - allWeights[nTotalCells++] = cWeights[cellI]; + allXadj[nTotalCells] = xadj[celli]; + allWeights[nTotalCells++] = cWeights[celli]; } nTotalConnections = 0; forAll(adjncy, i) @@ -134,10 +134,10 @@ Foam::label Foam::scotchDecomp::decompose // Append. //label procStart = nTotalCells; - forAll(nbrXadj, cellI) + forAll(nbrXadj, celli) { - allXadj[nTotalCells] = nTotalConnections+nbrXadj[cellI]; - allWeights[nTotalCells++] = nbrWeights[cellI]; + allXadj[nTotalCells] = nTotalConnections+nbrXadj[celli]; + allWeights[nTotalCells++] = nbrWeights[celli]; } // No need to renumber xadj since already global. forAll(nbrAdjncy, i) @@ -230,10 +230,10 @@ Foam::label Foam::scotchDecomp::decomposeOneProc label hasVertexWeights = 0; label numericflag = 10*hasEdgeWeights+hasVertexWeights; str << baseval << ' ' << numericflag << nl; - for (label cellI = 0; cellI < xadj.size()-1; cellI++) + for (label celli = 0; celli < xadj.size()-1; celli++) { - label start = xadj[cellI]; - label end = xadj[cellI+1]; + label start = xadj[celli]; + label end = xadj[celli+1]; str << end-start; for (label i = start; i < end; i++) diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C index 5eee83a42693cf081fc18e0495b7ff45830eebe6..729f453ceaf0518313c4f6c6186e32f7ca5c0caf 100644 --- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C +++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C @@ -965,7 +965,7 @@ void Foam::distributedTriSurfaceMesh::subsetMeshMap oldToNewPoints.setSize(s.points().size()); oldToNewPoints = -1; { - label faceI = 0; + label facei = 0; label pointI = 0; forAll(include, oldFacei) @@ -973,7 +973,7 @@ void Foam::distributedTriSurfaceMesh::subsetMeshMap if (include[oldFacei]) { // Store new faces compact - newToOldFaces[faceI++] = oldFacei; + newToOldFaces[facei++] = oldFacei; // Renumber labels for face const triSurface::FaceType& f = s[oldFacei]; diff --git a/src/parallel/reconstruct/reconstruct/fvFieldReconstructorReconstructFields.C b/src/parallel/reconstruct/reconstruct/fvFieldReconstructorReconstructFields.C index 889af083bea65bd0d3196715de1d42ab2318fbd7..e3337619341bc1f09ab1ef9418fc0b004e1f4bae 100644 --- a/src/parallel/reconstruct/reconstruct/fvFieldReconstructorReconstructFields.C +++ b/src/parallel/reconstruct/reconstruct/fvFieldReconstructorReconstructFields.C @@ -145,14 +145,14 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField ); // 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 + procField.mesh().boundary()[patchi].patchSlice ( faceProcAddressing_[procI] ); @@ -169,7 +169,7 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField curBPatch, fvPatchField<Type>::New ( - procField.boundaryField()[patchI], + procField.boundaryField()[patchi], mesh_.boundary()[curBPatch], DimensionedField<Type, volMesh>::null(), fvPatchFieldReconstructor @@ -185,45 +185,45 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField labelList reverseAddressing(cp.size()); - forAll(cp, faceI) + forAll(cp, facei) { // Check - if (cp[faceI] <= 0) + if (cp[facei] <= 0) { FatalErrorInFunction << "Processor " << procI << " patch " - << procField.mesh().boundary()[patchI].name() - << " face " << faceI + << procField.mesh().boundary()[patchi].name() + << " face " << facei << " originates from reversed face since " - << cp[faceI] + << cp[facei] << exit(FatalError); } // Subtract one to take into account offsets for // face direction. - reverseAddressing[faceI] = cp[faceI] - 1 - curPatchStart; + reverseAddressing[facei] = cp[facei] - 1 - curPatchStart; } patchFields[curBPatch].rmap ( - procField.boundaryField()[patchI], + procField.boundaryField()[patchi], reverseAddressing ); } else { const Field<Type>& curProcPatch = - procField.boundaryField()[patchI]; + procField.boundaryField()[patchi]; // In processor patches, there's a mix of internal faces (some // of them turned) and possible cyclics. Slow loop - forAll(cp, faceI) + forAll(cp, facei) { // Subtract one to take into account offsets for // face direction. - label curF = cp[faceI] - 1; + label curF = cp[facei] - 1; // Is the face on the boundary? if (curF >= mesh_.nInternalFaces()) @@ -250,29 +250,29 @@ Foam::fvFieldReconstructor::reconstructFvVolumeField [curBPatch].whichFace(curF); patchFields[curBPatch][curPatchFace] = - curProcPatch[faceI]; + curProcPatch[facei]; } } } } } - forAll(mesh_.boundary(), patchI) + forAll(mesh_.boundary(), patchi) { // add empty patches if ( - isType<emptyFvPatch>(mesh_.boundary()[patchI]) - && !patchFields(patchI) + isType<emptyFvPatch>(mesh_.boundary()[patchi]) + && !patchFields(patchi) ) { patchFields.set ( - patchI, + patchi, fvPatchField<Type>::New ( emptyFvPatchField<Type>::typeName, - mesh_.boundary()[patchI], + mesh_.boundary()[patchi], DimensionedField<Type, volMesh>::null() ) ); @@ -391,14 +391,14 @@ 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] ); @@ -415,7 +415,7 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField curBPatch, fvsPatchField<Type>::New ( - procField.boundaryField()[patchI], + procField.boundaryField()[patchi], mesh_.boundary()[curBPatch], DimensionedField<Type, surfaceMesh>::null(), fvPatchFieldReconstructor @@ -431,29 +431,29 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField labelList reverseAddressing(cp.size()); - forAll(cp, faceI) + forAll(cp, facei) { // Subtract one to take into account offsets for // face direction. - reverseAddressing[faceI] = cp[faceI] - 1 - curPatchStart; + reverseAddressing[facei] = cp[facei] - 1 - curPatchStart; } patchFields[curBPatch].rmap ( - procField.boundaryField()[patchI], + procField.boundaryField()[patchi], reverseAddressing ); } else { const Field<Type>& curProcPatch = - procField.boundaryField()[patchI]; + procField.boundaryField()[patchi]; // In processor patches, there's a mix of internal faces (some // of them turned) and possible cyclics. Slow loop - forAll(cp, faceI) + forAll(cp, facei) { - label curF = cp[faceI] - 1; + label curF = cp[facei] - 1; // Is the face turned the right side round if (curF >= 0) @@ -485,12 +485,12 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField [curBPatch].whichFace(curF); patchFields[curBPatch][curPatchFace] = - curProcPatch[faceI]; + curProcPatch[facei]; } else { // Internal face - internalField[curF] = curProcPatch[faceI]; + internalField[curF] = curProcPatch[facei]; } } } @@ -498,22 +498,22 @@ Foam::fvFieldReconstructor::reconstructFvSurfaceField } } - forAll(mesh_.boundary(), patchI) + forAll(mesh_.boundary(), patchi) { // add empty patches if ( - isType<emptyFvPatch>(mesh_.boundary()[patchI]) - && !patchFields(patchI) + isType<emptyFvPatch>(mesh_.boundary()[patchi]) + && !patchFields(patchi) ) { patchFields.set ( - patchI, + patchi, fvsPatchField<Type>::New ( emptyFvsPatchField<Type>::typeName, - mesh_.boundary()[patchI], + mesh_.boundary()[patchi], DimensionedField<Type, surfaceMesh>::null() ) ); diff --git a/src/postProcessing/foamCalcFunctions/field/randomise/writeRandomField.C b/src/postProcessing/foamCalcFunctions/field/randomise/writeRandomField.C index df9beed0ef0ef4122f4745e5e6a48ffce80e0d0b..771a8659d949e5aadd737290e15f26bac010bd27 100644 --- a/src/postProcessing/foamCalcFunctions/field/randomise/writeRandomField.C +++ b/src/postProcessing/foamCalcFunctions/field/randomise/writeRandomField.C @@ -44,13 +44,13 @@ void Foam::calcTypes::randomise::writeRandomField Info<< " Reading " << header.name() << endl; fieldType field(header, mesh); - forAll(field, cellI) + forAll(field, celli) { Type rndPert; rand.randomise(rndPert); rndPert = 2.0*rndPert - pTraits<Type>::one; rndPert /= mag(rndPert); - field[cellI] += pertMag*rndPert; + field[celli] += pertMag*rndPert; } fieldType randomisedField diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C index a800dbd5688975c7383e900a0601d9b2d621516b..481c494236dc94fe345baf162edf6c95994a1ea2 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMaxTemplates.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 @@ -139,12 +139,12 @@ void Foam::fieldMinMax::calcMinMaxFields maxVs[procI] = magField[maxProcI]; maxCs[procI] = field.mesh().C()[maxProcI]; - forAll(magFieldBoundary, patchI) + forAll(magFieldBoundary, patchi) { - const scalarField& mfp = magFieldBoundary[patchI]; + const scalarField& mfp = magFieldBoundary[patchi]; if (mfp.size()) { - const vectorField& Cfp = CfBoundary[patchI]; + const vectorField& Cfp = CfBoundary[patchi]; label minPI = findMin(mfp); if (mfp[minPI] < minVs[procI]) @@ -212,12 +212,12 @@ void Foam::fieldMinMax::calcMinMaxFields maxVs[procI] = field[maxProcI]; maxCs[procI] = field.mesh().C()[maxProcI]; - forAll(fieldBoundary, patchI) + forAll(fieldBoundary, patchi) { - const Field<Type>& fp = fieldBoundary[patchI]; + const Field<Type>& fp = fieldBoundary[patchi]; if (fp.size()) { - const vectorField& Cfp = CfBoundary[patchI]; + const vectorField& Cfp = CfBoundary[patchi]; label minPI = findMin(fp); if (fp[minPI] < minVs[procI]) diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C index b54175b32469f7223a690d520e24d2ec5874ef29..885ca04ef373921c3b207bc831b3381bc5084a51 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.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 @@ -106,24 +106,24 @@ void Foam::fieldValues::faceSource::setFaceZoneFaces() forAll(fZone, i) { - label faceI = fZone[i]; + label facei = fZone[i]; label faceId = -1; label facePatchId = -1; - if (mesh().isInternalFace(faceI)) + if (mesh().isInternalFace(facei)) { - faceId = faceI; + faceId = facei; facePatchId = -1; } else { - facePatchId = mesh().boundaryMesh().whichPatch(faceI); + facePatchId = mesh().boundaryMesh().whichPatch(facei); const polyPatch& pp = mesh().boundaryMesh()[facePatchId]; if (isA<coupledPolyPatch>(pp)) { if (refCast<const coupledPolyPatch>(pp).owner()) { - faceId = pp.whichFace(faceI); + faceId = pp.whichFace(facei); } else { @@ -132,7 +132,7 @@ void Foam::fieldValues::faceSource::setFaceZoneFaces() } else if (!isA<emptyPolyPatch>(pp)) { - faceId = faceI - pp.start(); + faceId = facei - pp.start(); } else { @@ -171,9 +171,9 @@ void Foam::fieldValues::faceSource::setFaceZoneFaces() void Foam::fieldValues::faceSource::setPatchFaces() { - const label patchId = mesh().boundaryMesh().findPatchID(sourceName_); + const label patchid = mesh().boundaryMesh().findPatchID(sourceName_); - if (patchId < 0) + if (patchid < 0) { FatalErrorInFunction << type() << " " << name_ << ": " @@ -184,7 +184,7 @@ void Foam::fieldValues::faceSource::setPatchFaces() << exit(FatalError); } - const polyPatch& pp = mesh().boundaryMesh()[patchId]; + const polyPatch& pp = mesh().boundaryMesh()[patchid]; label nFaces = pp.size(); if (isA<emptyPolyPatch>(pp)) @@ -197,11 +197,11 @@ void Foam::fieldValues::faceSource::setPatchFaces() faceSign_.setSize(nFaces); nFaces_ = returnReduce(faceId_.size(), sumOp<label>()); - forAll(faceId_, faceI) + forAll(faceId_, facei) { - faceId_[faceI] = faceI; - facePatchId_[faceI] = patchId; - faceSign_[faceI] = 1; + faceId_[facei] = facei; + facePatchId_[facei] = patchid; + faceSign_[facei] = 1; } } @@ -233,8 +233,8 @@ void Foam::fieldValues::faceSource::combineMeshGeometry { if (facePatchId_[i] != -1) { - label patchI = facePatchId_[i]; - globalFacesIs[i] += mesh().boundaryMesh()[patchI].start(); + label patchi = facePatchId_[i]; + globalFacesIs[i] += mesh().boundaryMesh()[patchi].start(); } } diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C index 0cfd1f40c63922929ed7466a726e322d7ef07550..eb860ffc068da1935e2c8c709aac2d3e73d7d96b 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSourceTemplates.C @@ -85,14 +85,14 @@ Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::getFieldValues ); Field<Type>& avg = tavg.ref(); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; forAll(f, fp) { - avg[faceI] += intFld[f[fp]]; + avg[facei] += intFld[f[fp]]; } - avg[faceI] /= f.size(); + avg[facei] /= f.size(); } return tavg; @@ -359,11 +359,11 @@ Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::filterField forAll(values, i) { - label faceI = faceId_[i]; - label patchI = facePatchId_[i]; - if (patchI >= 0) + label facei = faceId_[i]; + label patchi = facePatchId_[i]; + if (patchi >= 0) { - values[i] = field.boundaryField()[patchI][faceI]; + values[i] = field.boundaryField()[patchi][facei]; } else { @@ -400,15 +400,15 @@ Foam::tmp<Foam::Field<Type>> Foam::fieldValues::faceSource::filterField forAll(values, i) { - label faceI = faceId_[i]; - label patchI = facePatchId_[i]; - if (patchI >= 0) + label facei = faceId_[i]; + label patchi = facePatchId_[i]; + if (patchi >= 0) { - values[i] = field.boundaryField()[patchI][faceI]; + values[i] = field.boundaryField()[patchi][facei]; } else { - values[i] = field[faceI]; + values[i] = field[facei]; } } diff --git a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.C b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.C index ad4d234a35dcf0cc8834bca46b5e506937d9a3f5..89603c19ca833480ad50264602c597fcd263baba 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,14 +31,14 @@ Foam::findCellParticle::findCellParticle ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, 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 852a3d5d4d3cfd73705afe31dfe3828d67ad4f12..96a2fbed9650c1428287725827461ccd94bdf47b 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H +++ b/src/postProcessing/functionObjects/field/nearWallFields/findCellParticle.H @@ -112,7 +112,7 @@ public: ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const point& end, diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C index e581468a0f65a0221f06661284d643eb6fce499f..598cf0fe228ebf08779e6c26d461184739849a14 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C @@ -47,8 +47,8 @@ void Foam::nearWallFields::calcAddressing() label nPatchFaces = 0; forAllConstIter(labelHashSet, patchSet_, iter) { - label patchI = iter.key(); - nPatchFaces += mesh.boundary()[patchI].size(); + label patchi = iter.key(); + nPatchFaces += mesh.boundary()[patchi].size(); } // Global indexing @@ -67,8 +67,8 @@ void Foam::nearWallFields::calcAddressing() forAllConstIter(labelHashSet, patchSet_, iter) { - label patchI = iter.key(); - const fvPatch& patch = mesh.boundary()[patchI]; + label patchi = iter.key(); + const fvPatch& patch = mesh.boundary()[patchi]; vectorField nf(patch.nf()); vectorField faceCellCentres(patch.patch().faceCellCentres()); @@ -104,10 +104,10 @@ void Foam::nearWallFields::calcAddressing() const point end = start-distance_*nf[patchFaceI]; // Find tet for starting location - label cellI = -1; + label celli = -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 @@ -116,7 +116,7 @@ void Foam::nearWallFields::calcAddressing() ( mesh, start, - cellI, + celli, tetFaceI, tetPtI, end, @@ -202,10 +202,10 @@ void Foam::nearWallFields::calcAddressing() ); InfoInFunction << "Dumping obtained to " << str.name() << endl; - forAll(cellToWalls_, cellI) + forAll(cellToWalls_, celli) { - const List<point>& ends = cellToSamples_[cellI]; - const labelList& cData = cellToWalls_[cellI]; + const List<point>& ends = cellToSamples_[celli]; + const labelList& cData = cellToWalls_[celli]; forAll(cData, i) { str.write(linePointRef(ends[i], start[cData[i]])); diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C index ae619bceceb1fc79fdf85ec175bfde436abbaec9..be71fd0bde3f2215f66f404efc533ebcc5e40e93 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFieldsTemplates.C @@ -81,14 +81,14 @@ void Foam::nearWallFields::sampleBoundaryField // Construct flat fields for all patch faces to be sampled Field<Type> sampledValues(getPatchDataMapPtr_().constructSize()); - forAll(cellToWalls_, cellI) + forAll(cellToWalls_, celli) { - const labelList& cData = cellToWalls_[cellI]; + const labelList& cData = cellToWalls_[celli]; forAll(cData, i) { - const point& samplePt = cellToSamples_[cellI][i]; - sampledValues[cData[i]] = interpolator.interpolate(samplePt, cellI); + const point& samplePt = cellToSamples_[celli][i]; + sampledValues[cData[i]] = interpolator.interpolate(samplePt, celli); } } diff --git a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C index 8e6698b326854f1c9d34a99c9570615c06cd85f6..5b607baed63d5377007a00def832d5c7be6b10f9 100644 --- a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C +++ b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C @@ -128,21 +128,21 @@ void Foam::regionSizeDistribution::writeAlphaFields // Knock out any cell not in patchRegions - forAll(liquidCore, cellI) + forAll(liquidCore, celli) { - label regionI = regions[cellI]; + label regionI = regions[celli]; if (patchRegions.found(regionI)) { - backgroundAlpha[cellI] = 0; + backgroundAlpha[celli] = 0; } else { - liquidCore[cellI] = 0; + liquidCore[celli] = 0; scalar regionVol = regionVolume[regionI]; if (regionVol < maxDropletVol) { - backgroundAlpha[cellI] = 0; + backgroundAlpha[celli] = 0; } } } @@ -456,10 +456,10 @@ void Foam::regionSizeDistribution::write() label nBlocked = 0; { - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh.nInternalFaces(); facei++) { - scalar ownVal = alpha[mesh.faceOwner()[faceI]]; - scalar neiVal = alpha[mesh.faceNeighbour()[faceI]]; + scalar ownVal = alpha[mesh.faceOwner()[facei]]; + scalar neiVal = alpha[mesh.faceNeighbour()[facei]]; if ( @@ -467,15 +467,15 @@ void Foam::regionSizeDistribution::write() || (ownVal > threshold_ && neiVal < threshold_) ) { - blockedFace[faceI] = true; + blockedFace[facei] = true; nBlocked++; } } // Block coupled faces - forAll(alpha.boundaryField(), patchI) + forAll(alpha.boundaryField(), patchi) { - const fvPatchScalarField& fvp = alpha.boundaryField()[patchI]; + const fvPatchScalarField& fvp = alpha.boundaryField()[patchi]; if (fvp.coupled()) { tmp<scalarField> townFld(fvp.patchInternalField()); @@ -529,9 +529,9 @@ void Foam::regionSizeDistribution::write() Info<< " Dumping region as volScalarField to " << region.name() << endl; - forAll(regions, cellI) + forAll(regions, celli) { - region[cellI] = regions[cellI]; + region[celli] = regions[celli]; } region.correctBoundaryConditions(); region.write(); diff --git a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistributionTemplates.C b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistributionTemplates.C index 2f55434315f165816263af977965f0cf4db898d7..8f707f4e0554a09ae491c2c017d77bfe75c17ecb 100644 --- a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistributionTemplates.C +++ b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistributionTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,18 +39,18 @@ Foam::Map<Type> Foam::regionSizeDistribution::regionSum // Per region the sum of fld Map<Type> regionToSum(regions.nRegions()/Pstream::nProcs()); - forAll(fld, cellI) + forAll(fld, celli) { - label regionI = regions[cellI]; + label regionI = regions[celli]; typename Map<Type>::iterator fnd = regionToSum.find(regionI); if (fnd == regionToSum.end()) { - regionToSum.insert(regionI, fld[cellI]); + regionToSum.insert(regionI, fld[celli]); } else { - fnd() += fld[cellI]; + fnd() += fld[celli]; } } Pstream::mapCombineGather(regionToSum, plusEqOp<Type>()); diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLine.C b/src/postProcessing/functionObjects/field/streamLine/streamLine.C index bde66938ab32eeb5b7cc4864350ec5735f92c351..db00431ee52921f7281507641710a1f46a86e142 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLine.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLine.C @@ -55,12 +55,12 @@ Foam::streamLine::wallPatch() const label nFaces = 0; - forAll(patches, patchI) + forAll(patches, patchi) { - //if (!polyPatch::constraintType(patches[patchI].type())) - if (isA<wallPolyPatch>(patches[patchI])) + //if (!polyPatch::constraintType(patches[patchi].type())) + if (isA<wallPolyPatch>(patches[patchi])) { - nFaces += patches[patchI].size(); + nFaces += patches[patchi].size(); } } @@ -68,12 +68,12 @@ Foam::streamLine::wallPatch() const nFaces = 0; - forAll(patches, patchI) + forAll(patches, patchi) { - //if (!polyPatch::constraintType(patches[patchI].type())) - if (isA<wallPolyPatch>(patches[patchI])) + //if (!polyPatch::constraintType(patches[patchi].type())) + if (isA<wallPolyPatch>(patches[patchi])) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; forAll(pp, i) { diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C index 4b31d77e397fd0d23bc4be98c1b7777834b194e2..dda36dd6858bafe6cf26f71edd22ec248e71d6d7 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.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 @@ -59,14 +59,14 @@ Foam::vector Foam::streamLineParticle::interpolateFields ( const trackingData& td, const point& position, - const label cellI, - const label faceI + const label celli, + const label facei ) { - if (cellI == -1) + if (celli == -1) { FatalErrorInFunction - << "Cell:" << cellI << abort(FatalError); + << "Cell:" << celli << abort(FatalError); } sampledScalars_.setSize(td.vsInterp_.size()); @@ -77,8 +77,8 @@ Foam::vector Foam::streamLineParticle::interpolateFields td.vsInterp_[scalarI].interpolate ( position, - cellI, - faceI + celli, + facei ) ); } @@ -91,8 +91,8 @@ Foam::vector Foam::streamLineParticle::interpolateFields td.vvInterp_[vectorI].interpolate ( position, - cellI, - faceI + celli, + facei ) ); } @@ -109,11 +109,11 @@ Foam::streamLineParticle::streamLineParticle ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label lifeTime ) : - particle(mesh, position, cellI), + particle(mesh, position, celli), lifeTime_(lifeTime) {} diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H index d200175232d8d12d930f845c72588e3e90c8f8d3..cd9b1bf420b243659fc9dfe3db2c572e32912b54 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H @@ -152,8 +152,8 @@ private: ( const trackingData&, const point&, - const label cellI, - const label faceI + const label celli, + const label facei ); @@ -166,7 +166,7 @@ public: ( const polyMesh& c, const vector& position, - const label cellI, + const label celli, const label lifeTime ); diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.C index 90409642814f8b004b21e303c91084cf90268b21..e9a0ec48ce0935dcef4d4e4cc2fbd64fd440ee24 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.C +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.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 @@ -302,14 +302,14 @@ Foam::wallBoundedParticle::wallBoundedParticle ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, 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 5f1f0b3f0c1149c3a5c5185545eea33bdb7f2dce..32245162d4c17765e941422763da93a943601af7 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticle.H @@ -104,7 +104,7 @@ protected: //- Particle is on diagonal edge: // const face& f = mesh.faces()[tetFace()] - // label faceBasePtI = mesh.tetBasePtIs()[faceI]; + // label faceBasePtI = mesh.tetBasePtIs()[facei]; // label diagPtI = (faceBasePtI+diagEdge_)%f.size(); // const edge e(f[faceBasePtI], f[diagPtI]); label diagEdge_; @@ -224,7 +224,7 @@ public: ( const polyMesh& c, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label meshEdgeStart, diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C index c63a9a1422d988ed71520d40da28db5ae4aeb743..8f8b8c5f4317d6eccdac6cf6b434a89576169833 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedParticleTemplates.C @@ -40,10 +40,10 @@ void Foam::wallBoundedParticle::patchInteraction particleType& p = static_cast<particleType&>(*this); p.hitFace(td); - if (!internalFace(faceI_)) + if (!internalFace(facei_)) { - label origFaceI = faceI_; - label patchI = patch(faceI_); + label origFaceI = facei_; + label patchi = patch(facei_); // No action taken for tetPtI_ for tetFaceI_ here, handled by // patch interaction call or later during processor transfer. @@ -56,9 +56,9 @@ void Foam::wallBoundedParticle::patchInteraction ( !p.hitPatch ( - mesh_.boundaryMesh()[patchI], + mesh_.boundaryMesh()[patchi], td, - patchI, + patchi, trackFraction, faceHitTetIs ) @@ -66,12 +66,12 @@ void Foam::wallBoundedParticle::patchInteraction { // Did patch interaction model switch patches? // Note: recalculate meshEdgeStart_, diagEdge_! - if (faceI_ != origFaceI) + if (facei_ != origFaceI) { - patchI = patch(faceI_); + patchi = patch(facei_); } - const polyPatch& patch = mesh_.boundaryMesh()[patchI]; + const polyPatch& patch = mesh_.boundaryMesh()[patchi]; if (isA<wedgePolyPatch>(patch)) { @@ -168,9 +168,9 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge { label nbrCellI = ( - cellI_ == mesh_.faceOwner()[faceI_] - ? mesh_.faceNeighbour()[faceI_] - : mesh_.faceOwner()[faceI_] + celli_ == mesh_.faceOwner()[facei_] + ? mesh_.faceNeighbour()[facei_] + : mesh_.faceOwner()[facei_] ); // Check angle to nbrCell tet. Is it in the direction of the // endposition? I.e. since volume of nbr tet is positive the @@ -179,9 +179,9 @@ Foam::scalar Foam::wallBoundedParticle::trackToEdge if ((nbrTi.faceTri(mesh_).normal() & (endPosition-position())) < 0) { // Change into nbrCell. No need to change tetFace, tetPt. - //Pout<< " crossed from cell:" << cellI_ + //Pout<< " crossed from cell:" << celli_ // << " into " << nbrCellI << endl; - cellI_ = nbrCellI; + celli_ = nbrCellI; patchInteraction(td, trackFraction); } else @@ -386,7 +386,7 @@ bool Foam::wallBoundedParticle::hitPatch ( const polyPatch&, TrackData& td, - const label patchI, + const label patchi, const scalar trackFraction, const tetIndices& tetIs ) diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C index 7bcf797c43baf6e285e3c06141b3d3d01c4568c1..8659ef71e2564260c14e726a9e26cecb9877d87b 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C @@ -57,12 +57,12 @@ Foam::wallBoundedStreamLine::wallPatch() const label nFaces = 0; - forAll(patches, patchI) + forAll(patches, patchi) { - //if (!polyPatch::constraintType(patches[patchI].type())) - if (isA<wallPolyPatch>(patches[patchI])) + //if (!polyPatch::constraintType(patches[patchi].type())) + if (isA<wallPolyPatch>(patches[patchi])) { - nFaces += patches[patchI].size(); + nFaces += patches[patchi].size(); } } @@ -70,12 +70,12 @@ Foam::wallBoundedStreamLine::wallPatch() const nFaces = 0; - forAll(patches, patchI) + forAll(patches, patchi) { - //if (!polyPatch::constraintType(patches[patchI].type())) - if (isA<wallPolyPatch>(patches[patchI])) + //if (!polyPatch::constraintType(patches[patchi].type())) + if (isA<wallPolyPatch>(patches[patchi])) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; forAll(pp, i) { @@ -103,12 +103,12 @@ Foam::tetIndices Foam::wallBoundedStreamLine::findNearestTet ( const PackedBoolList& isWallPatch, const point& seedPt, - const label cellI + const label celli ) const { const fvMesh& mesh = dynamic_cast<const fvMesh&>(obr_); - const cell& cFaces = mesh.cells()[cellI]; + const cell& cFaces = mesh.cells()[celli]; label minFaceI = -1; label minTetPtI = -1; @@ -116,12 +116,12 @@ Foam::tetIndices Foam::wallBoundedStreamLine::findNearestTet forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; - if (isWallPatch[faceI]) + if (isWallPatch[facei]) { - const face& f = mesh.faces()[faceI]; - const label fp0 = mesh.tetBasePtIs()[faceI]; + const face& f = mesh.faces()[facei]; + const label fp0 = mesh.tetBasePtIs()[facei]; const point& basePoint = mesh.points()[f[fp0]]; label fp = f.fcIndex(fp0); @@ -137,7 +137,7 @@ Foam::tetIndices Foam::wallBoundedStreamLine::findNearestTet if (d2 < minDistSqr) { minDistSqr = d2; - minFaceI = faceI; + minFaceI = facei; minTetPtI = i-1; } fp = nextFp; @@ -148,7 +148,7 @@ Foam::tetIndices Foam::wallBoundedStreamLine::findNearestTet // Put particle in tet return tetIndices ( - cellI, + celli, minFaceI, minTetPtI, mesh @@ -196,9 +196,9 @@ void Foam::wallBoundedStreamLine::track() forAll(seedPoints, i) { const point& seedPt = seedPoints[i]; - label cellI = seedPoints.cells()[i]; + label celli = seedPoints.cells()[i]; - tetIndices ids(findNearestTet(isWallPatch, seedPt, cellI)); + tetIndices ids(findNearestTet(isWallPatch, seedPt, celli)); if (ids.face() != -1 && isWallPatch[ids.face()]) { @@ -583,16 +583,16 @@ void Foam::wallBoundedStreamLine::read(const dictionary& dict) // 2. all edges on a cell having two faces EdgeMap<label> numFacesPerEdge; - forAll(mesh.cells(), cellI) + forAll(mesh.cells(), celli) { - const cell& cFaces = mesh.cells()[cellI]; + const cell& cFaces = mesh.cells()[celli]; numFacesPerEdge.clear(); forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; - const face& f = mesh.faces()[faceI]; + label facei = cFaces[cFaceI]; + const face& f = mesh.faces()[facei]; forAll(f, fp) { const edge e(f[fp], f.nextLabel(fp)); @@ -614,7 +614,7 @@ void Foam::wallBoundedStreamLine::read(const dictionary& dict) if (iter() != 2) { FatalErrorInFunction - << "problem cell:" << cellI + << "problem cell:" << celli << abort(FatalError); } } diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H index 7a728b0fe5dc532f88f59ba83860f2d53bcc850e..dc920ef39565843c0680b3409f16cc298fd0a690 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H @@ -219,7 +219,7 @@ class wallBoundedStreamLine ( const PackedBoolList& isWallPatch, const point& seedPt, - const label cellI + const label celli ) const; //- Do all seeding and tracking diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.C index 0efa297151a64c97c54aacd7dcaa756ff8bc36ff..b0b87f2a775afceac5076455d7006b05f5d10d89 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.C +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.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 @@ -32,14 +32,14 @@ Foam::vector Foam::wallBoundedStreamLineParticle::interpolateFields ( const trackingData& td, const point& position, - const label cellI, - const label faceI + const label celli, + const label facei ) { - if (cellI == -1) + if (celli == -1) { FatalErrorInFunction - << "Cell:" << cellI << abort(FatalError); + << "Cell:" << celli << abort(FatalError); } const tetIndices ti = currentTetIndices(); @@ -47,8 +47,8 @@ Foam::vector Foam::wallBoundedStreamLineParticle::interpolateFields const vector U = td.vvInterp_[td.UIndex_].interpolate ( position, - ti, //cellI, - faceI + ti, //celli, + facei ); // Check if at different position @@ -70,8 +70,8 @@ Foam::vector Foam::wallBoundedStreamLineParticle::interpolateFields td.vsInterp_[scalarI].interpolate ( position, - ti, //cellI, - faceI + ti, //celli, + facei ) ); } @@ -90,8 +90,8 @@ Foam::vector Foam::wallBoundedStreamLineParticle::interpolateFields positionU = td.vvInterp_[vectorI].interpolate ( position, - ti, //cellI, - faceI + ti, //celli, + facei ); } sampledVectors_[vectorI].append(positionU); @@ -134,7 +134,7 @@ Foam::wallBoundedStreamLineParticle::wallBoundedStreamLineParticle ( const polyMesh& mesh, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label meshEdgeStart, @@ -146,7 +146,7 @@ Foam::wallBoundedStreamLineParticle::wallBoundedStreamLineParticle ( mesh, position, - cellI, + celli, tetFaceI, tetPtI, meshEdgeStart, diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.H b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.H index cbc82be2a11ddac5f86dccdfed486905958503b7..25dd5f57e7132fdd6f05e7c1fa9c7e7b7ff83d3c 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.H +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLineParticle.H @@ -144,8 +144,8 @@ private: ( const trackingData& td, const point& position, - const label cellI, - const label faceI + const label celli, + const label facei ); vector sample(trackingData& td); @@ -160,7 +160,7 @@ public: ( const polyMesh& c, const vector& position, - const label cellI, + const label celli, const label tetFaceI, const label tetPtI, const label meshEdgeStart, diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index b55eeab66ca2772bcf26f9b795e3665854cabf32..9a201e347a32f12aa0d40aa133fd8841307c2963 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -711,8 +711,8 @@ void Foam::forces::read(const dictionary& dict) scalar binMax = -GREAT; forAllConstIter(labelHashSet, patchSet_, iter) { - label patchI = iter.key(); - const polyPatch& pp = pbm[patchI]; + label patchi = iter.key(); + const polyPatch& pp = pbm[patchi]; scalarField d(pp.faceCentres() & binDir_); binMin_ = min(min(d), binMin_); binMax = max(max(d), binMax); @@ -826,31 +826,31 @@ void Foam::forces::calcForcesMoment() forAllConstIter(labelHashSet, patchSet_, iter) { - label patchI = iter.key(); + label patchi = iter.key(); vectorField Md ( - mesh.C().boundaryField()[patchI] - coordSys_.origin() + mesh.C().boundaryField()[patchi] - coordSys_.origin() ); - scalarField sA(mag(Sfb[patchI])); + scalarField sA(mag(Sfb[patchi])); // Normal force = surfaceUnitNormal*(surfaceNormal & forceDensity) vectorField fN ( - Sfb[patchI]/sA + Sfb[patchi]/sA *( - Sfb[patchI] & fD.boundaryField()[patchI] + Sfb[patchi] & fD.boundaryField()[patchi] ) ); // Tangential force (total force minus normal fN) - vectorField fT(sA*fD.boundaryField()[patchI] - fN); + vectorField fT(sA*fD.boundaryField()[patchi] - fN); //- Porous force vectorField fP(Md.size(), Zero); - applyBins(Md, fN, fT, fP, mesh.C().boundaryField()[patchI]); + applyBins(Md, fN, fT, fP, mesh.C().boundaryField()[patchi]); } } else @@ -872,23 +872,23 @@ void Foam::forces::calcForcesMoment() forAllConstIter(labelHashSet, patchSet_, iter) { - label patchI = iter.key(); + label patchi = iter.key(); vectorField Md ( - mesh.C().boundaryField()[patchI] - coordSys_.origin() + mesh.C().boundaryField()[patchi] - coordSys_.origin() ); vectorField fN ( - rho(p)*Sfb[patchI]*(p.boundaryField()[patchI] - pRef) + rho(p)*Sfb[patchi]*(p.boundaryField()[patchi] - pRef) ); - vectorField fT(Sfb[patchI] & devRhoReffb[patchI]); + vectorField fT(Sfb[patchi] & devRhoReffb[patchi]); vectorField fP(Md.size(), Zero); - applyBins(Md, fN, fT, fP, mesh.C().boundaryField()[patchI]); + applyBins(Md, fN, fT, fP, mesh.C().boundaryField()[patchi]); } } diff --git a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C index 8e0b2bbfc339296e65f9fbb18077465af0497860..3281ea4ffd4c9c933738232416a46ea380980161 100644 --- a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C +++ b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C @@ -53,16 +53,16 @@ Foam::wordList Foam::scalarTransport::boundaryTypes() const wordList bTypes(U.boundaryField().size()); - forAll(bTypes, patchI) + forAll(bTypes, patchi) { - const fvPatchField<vector>& pf = U.boundaryField()[patchI]; + const fvPatchField<vector>& pf = U.boundaryField()[patchi]; if (isA<fixedValueFvPatchVectorField>(pf)) { - bTypes[patchI] = fixedValueFvPatchScalarField::typeName; + bTypes[patchi] = fixedValueFvPatchScalarField::typeName; } else { - bTypes[patchI] = zeroGradientFvPatchScalarField::typeName; + bTypes[patchi] = zeroGradientFvPatchScalarField::typeName; } } diff --git a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C index fc4c5a8e8f478c4785ec8ac45c7d2fb02e3acb18..7169fb5427aac0f7a9088371ef1fec850515c5cd 100644 --- a/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C +++ b/src/regionCoupled/derivedFvPatchFields/energyRegionCoupled/energyRegionCoupledFvPatchScalarField.C @@ -192,12 +192,12 @@ weights() const tmp<scalarField> tw(new scalarField(deltas.size())); scalarField& w = tw.ref(); - forAll(alphaDelta, faceI) + forAll(alphaDelta, facei) { - scalar di = alphaDelta[faceI]; - scalar dni = nbrAlphaDelta[faceI]; + scalar di = alphaDelta[facei]; + scalar dni = nbrAlphaDelta[facei]; - w[faceI] = di/(di + dni); + w[facei] = di/(di + dni); } return tw; diff --git a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C index 74d56ea273fecddf6a51e5bd101b223e20c688c7..3805da989c525cdb49e5504e381436ba5f811d62 100644 --- a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C +++ b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.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 @@ -130,7 +130,7 @@ pyrolysisModel::~pyrolysisModel() scalar pyrolysisModel::addMassSources ( const label patchI, - const label faceI + const label facei ) { return 0.0; diff --git a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.H b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.H index 669c7bfdb67f542b4ec5782b387139b2563ddb83..c23990a87e52038f9611e794527e4034d6f392d1 100644 --- a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.H +++ b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.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 @@ -213,7 +213,7 @@ public: virtual scalar addMassSources ( const label patchI, - const label faceI + const label facei ); diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C index 4ff712e058d1774209dca4558dc3ebbf0282e64e..44e62de53b352ebf137b75aead54192842ffb6a3 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.C @@ -127,19 +127,19 @@ void reactingOneDim::updateQr() const scalarField& Qrp = Qr_.boundaryField()[patchi]; const vectorField& Cf = regionMesh().Cf().boundaryField()[patchi]; - forAll(Qrp, faceI) + forAll(Qrp, facei) { - const scalar Qr0 = Qrp[faceI]; - point Cf0 = Cf[faceI]; + const scalar Qr0 = Qrp[facei]; + point Cf0 = Cf[facei]; const labelList& cells = boundaryFaceCells_[localPyrolysisFaceI++]; scalar kappaInt = 0.0; forAll(cells, k) { - const label cellI = cells[k]; - const point& Cf1 = cellC[cellI]; + const label celli = cells[k]; + const point& Cf1 = cellC[celli]; const scalar delta = mag(Cf1 - Cf0); - kappaInt += kappa()[cellI]*delta; - Qr_[cellI] = Qr0*exp(-kappaInt); + kappaInt += kappa()[celli]*delta; + Qr_[celli] = Qr0*exp(-kappaInt); Cf0 = Cf1; } } @@ -175,25 +175,25 @@ void reactingOneDim::updatePhiGas() scalarField& phiGasp = phiGasBf[patchi]; const scalarField& cellVol = regionMesh().V(); - forAll(phiGasp, faceI) + forAll(phiGasp, facei) { const labelList& cells = boundaryFaceCells_[totalFaceId++]; scalar massInt = 0.0; forAllReverse(cells, k) { - const label cellI = cells[k]; - massInt += RRiGas[cellI]*cellVol[cellI]; - phiHsGas_[cellI] += massInt*HsiGas[cellI]; + const label celli = cells[k]; + massInt += RRiGas[celli]*cellVol[celli]; + phiHsGas_[celli] += massInt*HsiGas[celli]; } - phiGasp[faceI] += massInt; + phiGasp[facei] += massInt; if (debug) { Info<< " Gas : " << gasTable[gasI] << " on patch : " << patchi << " mass produced at face(local) : " - << faceI + << facei << " is : " << massInt << " [kg/s] " << endl; } @@ -590,7 +590,7 @@ reactingOneDim::~reactingOneDim() // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -scalar reactingOneDim::addMassSources(const label patchi, const label faceI) +scalar reactingOneDim::addMassSources(const label patchi, const label facei) { label index = 0; forAll(primaryPatchIDs_, i) @@ -604,7 +604,7 @@ scalar reactingOneDim::addMassSources(const label patchi, const label faceI) const label localPatchId = intCoupledPatchIDs_[index]; - const scalar massAdded = phiGas_.boundaryField()[localPatchId][faceI]; + const scalar massAdded = phiGas_.boundaryField()[localPatchId][facei]; if (debug) { @@ -683,9 +683,9 @@ void reactingOneDim::preEvolveRegion() pyrolysisModel::preEvolveRegion(); // Initialise all cells as able to react - forAll(h_, cellI) + forAll(h_, celli) { - solidChemistry_->setCellReacting(cellI, true); + solidChemistry_->setCellReacting(celli, true); } } diff --git a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.H b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.H index 753df0ba15a72cb9978e5b59a3bd1ea50dfe7284..434fc9475587a962537076839ba9cd3c4a8358df 100644 --- a/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.H +++ b/src/regionModels/pyrolysisModels/reactingOneDim/reactingOneDim.H @@ -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 @@ -266,7 +266,7 @@ public: virtual scalar addMassSources ( const label patchI, // patchI on primary region - const label faceI // faceI of patchI + const label facei // facei of patchI ); //- Mean diffusion number of the solid region diff --git a/src/regionModels/regionModel/regionModel/regionModel.C b/src/regionModels/regionModel/regionModel/regionModel.C index b1d516ce03eccd33af1dfe96f0ed608cf0f404b4..8dffa3d76f538826e37dd9ca115e0ecfbc6bec37 100644 --- a/src/regionModels/regionModel/regionModel/regionModel.C +++ b/src/regionModels/regionModel/regionModel/regionModel.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 @@ -100,9 +100,9 @@ void Foam::regionModels::regionModel::initialise() DynamicList<label> intCoupledPatchIDs; const polyBoundaryMesh& rbm = regionMesh().boundaryMesh(); - forAll(rbm, patchI) + forAll(rbm, patchi) { - const polyPatch& regionPatch = rbm[patchI]; + const polyPatch& regionPatch = rbm[patchi]; if (isA<mappedPatchBase>(regionPatch)) { if (debug) @@ -111,7 +111,7 @@ void Foam::regionModels::regionModel::initialise() << " " << regionPatch.name() << endl; } - intCoupledPatchIDs.append(patchI); + intCoupledPatchIDs.append(patchi); nBoundaryFaces += regionPatch.faceCells().size(); diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C index c53acb48c18c0377ece4c34627bf436fa3014a57..c6c1c1ce11f06ee140d06fbd6812ec7cdae29eb6 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C @@ -77,34 +77,34 @@ void Foam::regionModels::regionModel1D::initialise() forAll(intCoupledPatchIDs_, i) { - const label patchI = intCoupledPatchIDs_[i]; - const polyPatch& ppCoupled = rbm[patchI]; + const label patchi = intCoupledPatchIDs_[i]; + const polyPatch& ppCoupled = rbm[patchi]; forAll(ppCoupled, localFaceI) { - label faceI = ppCoupled.start() + localFaceI; - label cellI = -1; + 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 { - cellI = regionMesh().faceNeighbour()[faceI]; + celli = regionMesh().faceNeighbour()[facei]; } nCells++; - cellIDs.append(cellI); - const cell& cFaces = regionMesh().cells()[cellI]; - faceI = cFaces.opposingFaceLabel(faceI, regionMesh().faces()); - faceIDs.append(faceI); + cellIDs.append(celli); + const cell& cFaces = regionMesh().cells()[celli]; + facei = cFaces.opposingFaceLabel(facei, regionMesh().faces()); + faceIDs.append(facei); nFaces++; - } while (regionMesh().isInternalFace(faceI)); + } while (regionMesh().isInternalFace(facei)); - boundaryFaceOppositeFace_[localPyrolysisFaceI] = faceI; + boundaryFaceOppositeFace_[localPyrolysisFaceI] = facei; faceIDs.remove(); //remove boundary face. nFaces--; @@ -129,17 +129,17 @@ void Foam::regionModels::regionModel1D::initialise() forAll(intCoupledPatchIDs_, i) { - const label patchI = intCoupledPatchIDs_[i]; - const polyPatch& ppCoupled = rbm[patchI]; + const label patchi = intCoupledPatchIDs_[i]; + const polyPatch& ppCoupled = rbm[patchi]; const vectorField& pNormals = ppCoupled.faceNormals(); - nMagSfBf[patchI] = regionMesh().Sf().boundaryField()[patchI] & pNormals; + nMagSfBf[patchi] = regionMesh().Sf().boundaryField()[patchi] & pNormals; forAll(pNormals, localFaceI) { const vector& n = pNormals[localFaceI]; const labelList& faces = boundaryFaceFaces_[localPyrolysisFaceI++]; - forAll(faces, faceI) + forAll(faces, facei) { - const label faceID = faces[faceI]; + const label faceID = faces[facei]; nMagSf[faceID] = regionMesh().Sf()[faceID] & n; } } @@ -201,9 +201,9 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh label totalFaceId = 0; forAll(intCoupledPatchIDs_, localPatchI) { - label patchI = intCoupledPatchIDs_[localPatchI]; - const polyPatch pp = bm[patchI]; - const vectorField& cf = regionMesh().Cf().boundaryField()[patchI]; + label patchi = intCoupledPatchIDs_[localPatchI]; + const polyPatch pp = bm[patchi]; + const vectorField& cf = regionMesh().Cf().boundaryField()[patchi]; forAll(pp, patchFaceI) { @@ -225,12 +225,12 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh forAll(faces, i) { - const label faceI = faces[i]; - const label cellI = cells[i]; + const label facei = faces[i]; + const label celli = cells[i]; - const face f = regionMesh().faces()[faceI]; + const face f = regionMesh().faces()[facei]; - newDelta += (deltaV[cellI]/mag(sf))*n; + newDelta += (deltaV[celli]/mag(sf))*n; vector localDelta = Zero; forAll(f, pti) @@ -245,7 +245,7 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh { newPoints[pointI] = oldPoints[pointI] + newDelta; localDelta = newDelta; - cellMoveMap[cellI] = 1; + cellMoveMap[celli] = 1; } } nbrCf = oldCf[i + 1] + localDelta; @@ -253,8 +253,8 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh // Modify boundary const label bFaceI = boundaryFaceOppositeFace_[totalFaceId]; const face f = regionMesh().faces()[bFaceI]; - const label cellI = cells[cells.size() - 1]; - newDelta += (deltaV[cellI]/mag(sf))*n; + const label celli = cells[cells.size() - 1]; + newDelta += (deltaV[celli]/mag(sf))*n; forAll(f, pti) { const label pointI = f[pti]; @@ -265,7 +265,7 @@ Foam::tmp<Foam::labelField> Foam::regionModels::regionModel1D::moveMesh ) { newPoints[pointI] = oldPoints[pointI] + newDelta; - cellMoveMap[cellI] = 1; + cellMoveMap[celli] = 1; } } totalFaceId ++; diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C index 11350225c3668ea962833c619f4e19348e981f76..44b54b0a8b10825c61d360ebaf1a4c9f3d27713a 100644 --- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C +++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegion.C @@ -95,8 +95,8 @@ void Foam::regionModels::singleLayerRegion::initialise() volScalarField& magSf = magSfPtr_(); forAll(intCoupledPatchIDs_, i) { - const label patchI = intCoupledPatchIDs_[i]; - const polyPatch& pp = rbm[patchI]; + const label patchi = intCoupledPatchIDs_[i]; + const polyPatch& pp = rbm[patchi]; const labelList& fCells = pp.faceCells(); nBoundaryFaces += fCells.size(); @@ -121,15 +121,15 @@ void Foam::regionModels::singleLayerRegion::initialise() passivePatchIDs_.setSize(intCoupledPatchIDs_.size(), -1); forAll(intCoupledPatchIDs_, i) { - const label patchI = intCoupledPatchIDs_[i]; - const polyPatch& ppIntCoupled = rbm[patchI]; + const label patchi = intCoupledPatchIDs_[i]; + const polyPatch& ppIntCoupled = rbm[patchi]; if (ppIntCoupled.size() > 0) { - label cellId = rbm[patchI].faceCells()[0]; + label cellId = rbm[patchi].faceCells()[0]; const cell& cFaces = regionMesh().cells()[cellId]; - label faceI = ppIntCoupled.start(); - label faceO = cFaces.opposingFaceLabel(faceI, regionMesh().faces()); + label facei = ppIntCoupled.start(); + label faceO = cFaces.opposingFaceLabel(facei, regionMesh().faces()); label passivePatchI = rbm.whichPatch(faceO); passivePatchIDs_[i] = passivePatchI; diff --git a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegionTemplates.C b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegionTemplates.C index 1f0ae5700b730479f92fd2b76dd1ee7931debf0e..75849337a0734a7eb570417cc6a2c2a54145e5be 100644 --- a/src/regionModels/regionModel/singleLayerRegion/singleLayerRegionTemplates.C +++ b/src/regionModels/regionModel/singleLayerRegion/singleLayerRegionTemplates.C @@ -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 @@ -40,8 +40,8 @@ Foam::regionModels::singleLayerRegion::mappedFieldAndInternalPatchTypes() const forAll(intCoupledPatchIDs_, i) { - const label patchI = intCoupledPatchIDs_[i]; - bTypes[patchI] = mappedFixedInternalValueFvPatchField<Type>::typeName; + const label patchi = intCoupledPatchIDs_[i]; + bTypes[patchi] = mappedFixedInternalValueFvPatchField<Type>::typeName; } return bTypes; @@ -58,8 +58,8 @@ Foam::regionModels::singleLayerRegion::mappedPushedFieldPatchTypes() const forAll(intCoupledPatchIDs_, i) { - const label patchI = intCoupledPatchIDs_[i]; - bTypes[patchI] = + const label patchi = intCoupledPatchIDs_[i]; + bTypes[patchi] = mappedFixedPushedInternalValueFvPatchField<Type>::typeName; } diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C index 790ff3ab603139f8e687b183508c430997767b9b..19ebc51bf064ea610f552ffdf855113fed5d6496 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltHeight/inclinedFilmNusseltHeightFvPatchScalarField.C @@ -113,7 +113,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs() return; } - const label patchI = patch().index(); + const label patchi = patch().index(); // retrieve the film region from the database @@ -135,7 +135,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs() const vectorField n(-patch().nf()); // TODO: currently re-evaluating the entire gTan field to return this patch - const scalarField gTan(film.gTan()().boundaryField()[patchI] & n); + const scalarField gTan(film.gTan()().boundaryField()[patchi] & n); if (patch().size() && (max(mag(gTan)) < SMALL)) { @@ -147,7 +147,7 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs() const volVectorField& nHat = film.nHat(); - const vectorField nHatp(nHat.boundaryField()[patchI].patchInternalField()); + const vectorField nHatp(nHat.boundaryField()[patchi].patchInternalField()); vectorField nTan(nHatp ^ n); nTan /= mag(nTan) + ROOTVSMALL; @@ -168,10 +168,10 @@ void Foam::inclinedFilmNusseltHeightFvPatchScalarField::updateCoeffs() const scalarField G(GMean + a*sin(omega*constant::mathematical::twoPi*d)); const volScalarField& mu = film.mu(); - const scalarField mup(mu.boundaryField()[patchI].patchInternalField()); + const scalarField mup(mu.boundaryField()[patchi].patchInternalField()); const volScalarField& rho = film.rho(); - const scalarField rhop(rho.boundaryField()[patchI].patchInternalField()); + const scalarField rhop(rho.boundaryField()[patchi].patchInternalField()); const scalarField Re(max(G, scalar(0.0))/mup); diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C index 78f75a30a9620282eaff53924dfce47357c59eaa..3611de9e92e57e640c378baa6d450174714b1ed7 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/inclinedFilmNusseltInletVelocity/inclinedFilmNusseltInletVelocityFvPatchVectorField.C @@ -113,7 +113,7 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs() return; } - const label patchI = patch().index(); + const label patchi = patch().index(); // retrieve the film region from the database @@ -134,7 +134,7 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs() const vectorField n(-patch().nf()); // TODO: currently re-evaluating the entire gTan field to return this patch - const scalarField gTan(film.gTan()().boundaryField()[patchI] & n); + const scalarField gTan(film.gTan()().boundaryField()[patchi] & n); if (patch().size() && (max(mag(gTan)) < SMALL)) { @@ -146,7 +146,7 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs() const volVectorField& nHat = film.nHat(); - const vectorField nHatp(nHat.boundaryField()[patchI].patchInternalField()); + const vectorField nHatp(nHat.boundaryField()[patchi].patchInternalField()); vectorField nTan(nHatp ^ n); nTan /= mag(nTan) + ROOTVSMALL; @@ -167,10 +167,10 @@ void Foam::inclinedFilmNusseltInletVelocityFvPatchVectorField::updateCoeffs() const scalarField G(GMean + a*sin(omega*constant::mathematical::twoPi*d)); const volScalarField& mu = film.mu(); - const scalarField mup(mu.boundaryField()[patchI].patchInternalField()); + const scalarField mup(mu.boundaryField()[patchi].patchInternalField()); const volScalarField& rho = film.rho(); - const scalarField rhop(rho.boundaryField()[patchI].patchInternalField()); + const scalarField rhop(rho.boundaryField()[patchi].patchInternalField()); const scalarField Re(max(G, scalar(0.0))/mup); diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C index e6eb83bc9db59c7ea77509ca8fc1948424117d11..beaedbdea06eea818d69f6a29aa60bf86d6cb37f 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/alphatFilmWallFunction/alphatFilmWallFunctionFvPatchScalarField.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 @@ -185,18 +185,18 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs() // Populate alphat field values scalarField& alphat = *this; - forAll(alphat, faceI) + forAll(alphat, facei) { - label faceCellI = patch().faceCells()[faceI]; + label faceCellI = patch().faceCells()[facei]; scalar uTau = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = y[faceI]*uTau/(muw[faceI]/rhow[faceI]); + scalar yPlus = y[facei]*uTau/(muw[facei]/rhow[facei]); - scalar Pr = muw[faceI]/alphaw[faceI]; + scalar Pr = muw[facei]/alphaw[facei]; scalar factor = 0.0; - scalar mStar = mDotFilmp[faceI]/(y[faceI]*uTau); + scalar mStar = mDotFilmp[facei]/(y[facei]*uTau); if (yPlus > yPlusCrit_) { scalar expTerm = exp(min(50.0, yPlusCrit_*mStar*Pr)); @@ -211,11 +211,11 @@ void alphatFilmWallFunctionFvPatchScalarField::updateCoeffs() factor = mStar/(expTerm - 1.0 + ROOTVSMALL); } - scalar dx = patch().deltaCoeffs()[faceI]; + scalar dx = patch().deltaCoeffs()[facei]; - scalar alphaEff = dx*rhow[faceI]*uTau*factor; + scalar alphaEff = dx*rhow[facei]*uTau*factor; - alphat[faceI] = max(alphaEff - alphaw[faceI], 0.0); + alphat[facei] = max(alphaEff - alphaw[facei], 0.0); } // Restore tag diff --git a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C index 72b853d0de80b5ee7568d4aa7e6222a950a9f9d8..862b678d2ddd40368235bc6cfafac1911eb842db 100644 --- a/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C +++ b/src/regionModels/surfaceFilmModels/derivedFvPatchFields/wallFunctions/nutkFilmWallFunction/nutkFilmWallFunctionFvPatchScalarField.C @@ -93,15 +93,15 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::calcUTau const scalar Cmu25 = pow(Cmu_, 0.25); - forAll(uTau, faceI) + forAll(uTau, facei) { - label faceCellI = patch().faceCells()[faceI]; + label faceCellI = patch().faceCells()[facei]; scalar ut = Cmu25*sqrt(k[faceCellI]); - scalar yPlus = y[faceI]*ut/nuw[faceI]; + scalar yPlus = y[facei]*ut/nuw[facei]; - scalar mStar = mDotFilmp[faceI]/(y[faceI]*ut); + scalar mStar = mDotFilmp[facei]/(y[facei]*ut); scalar factor = 0.0; if (yPlus > yPlusCrit_) @@ -116,7 +116,7 @@ tmp<scalarField> nutkFilmWallFunctionFvPatchScalarField::calcUTau factor = mStar/(expTerm*yPlus - 1.0 + ROOTVSMALL); } - uTau[faceI] = sqrt(max(0, magGradU[faceI]*ut*factor)); + uTau[facei] = sqrt(max(0, magGradU[facei]*ut*factor)); } return tuTau; diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C index 352061ef099ea958be4b08bbe016c4deadb55218..b035d4f8dd4cfd28bbae1b1bcc9a441bd1f8dd46 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C @@ -838,7 +838,7 @@ kinematicSingleLayer::~kinematicSingleLayer() void kinematicSingleLayer::addSources ( const label patchi, - const label faceI, + const label facei, const scalar massSource, const vector& momentumSource, const scalar pressureSource, @@ -854,9 +854,9 @@ void kinematicSingleLayer::addSources << " pressure = " << pressureSource << endl; } - rhoSpPrimary_.boundaryFieldRef()[patchi][faceI] -= massSource; - USpPrimary_.boundaryFieldRef()[patchi][faceI] -= momentumSource; - pSpPrimary_.boundaryFieldRef()[patchi][faceI] -= pressureSource; + rhoSpPrimary_.boundaryFieldRef()[patchi][facei] -= massSource; + USpPrimary_.boundaryFieldRef()[patchi][facei] -= momentumSource; + pSpPrimary_.boundaryFieldRef()[patchi][facei] -= pressureSource; addedMassTotal_ += massSource; } diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H index 2951aab36231260e7fa97e89247eb86d5d2b46b0..0b469fe561e268c27204f7247c1a1f7a67e6609a 100644 --- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H +++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.H @@ -404,7 +404,7 @@ public: virtual void addSources ( const label patchI, // patchI on primary region - const label faceI, // faceI of patchI + const label facei, // facei of patchI const scalar massSource, // [kg] const vector& momentumSource, // [kg.m/s] (tang'l momentum) const scalar pressureSource, // [kg.m/s] (normal momentum) diff --git a/src/regionModels/surfaceFilmModels/noFilm/noFilm.H b/src/regionModels/surfaceFilmModels/noFilm/noFilm.H index e8c091402d790806cc0551a110fc06406734f8d2..afc316cd304ea053700413dcbe385d7ad7c05f56 100644 --- a/src/regionModels/surfaceFilmModels/noFilm/noFilm.H +++ b/src/regionModels/surfaceFilmModels/noFilm/noFilm.H @@ -103,7 +103,7 @@ public: virtual void addSources ( const label patchI, - const label faceI, + const label facei, const scalar massSource, const vector& momentumSource, const scalar pressureSource, diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C index 13f6937b2a42ab989547ba3900215baed7df4171..f4b1fbad9416cfc2491c9302263d4d7b38ed1c4b 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmThermoModel/liquidFilmThermo/liquidFilmThermo.C @@ -259,9 +259,9 @@ tmp<volScalarField> liquidFilmThermo::rho() const if (useReferenceValues_) { - forAll(rho, cellI) + forAll(rho, celli) { - rho[cellI] = this->rho(pRef_, TRef_); + rho[celli] = this->rho(pRef_, TRef_); } } else @@ -271,9 +271,9 @@ tmp<volScalarField> liquidFilmThermo::rho() const const volScalarField& T = film.T(); const volScalarField& p = film.pPrimary(); - forAll(rho, cellI) + forAll(rho, celli) { - rho[cellI] = this->rho(p[cellI], T[cellI]); + rho[celli] = this->rho(p[celli], T[celli]); } } @@ -307,9 +307,9 @@ tmp<volScalarField> liquidFilmThermo::mu() const if (useReferenceValues_) { - forAll(mu, cellI) + forAll(mu, celli) { - mu[cellI] = this->mu(pRef_, TRef_); + mu[celli] = this->mu(pRef_, TRef_); } } else @@ -319,9 +319,9 @@ tmp<volScalarField> liquidFilmThermo::mu() const const volScalarField& T = film.T(); const volScalarField& p = film.pPrimary(); - forAll(mu, cellI) + forAll(mu, celli) { - mu[cellI] = this->mu(p[cellI], T[cellI]); + mu[celli] = this->mu(p[celli], T[celli]); } } @@ -355,9 +355,9 @@ tmp<volScalarField> liquidFilmThermo::sigma() const if (useReferenceValues_) { - forAll(sigma, cellI) + forAll(sigma, celli) { - sigma[cellI] = this->sigma(pRef_, TRef_); + sigma[celli] = this->sigma(pRef_, TRef_); } } else @@ -367,9 +367,9 @@ tmp<volScalarField> liquidFilmThermo::sigma() const const volScalarField& T = film.T(); const volScalarField& p = film.pPrimary(); - forAll(sigma, cellI) + forAll(sigma, celli) { - sigma[cellI] = this->sigma(p[cellI], T[cellI]); + sigma[celli] = this->sigma(p[celli], T[celli]); } } @@ -403,9 +403,9 @@ tmp<volScalarField> liquidFilmThermo::Cp() const if (useReferenceValues_) { - forAll(Cp, cellI) + forAll(Cp, celli) { - Cp[cellI] = this->Cp(pRef_, TRef_); + Cp[celli] = this->Cp(pRef_, TRef_); } } else @@ -415,9 +415,9 @@ tmp<volScalarField> liquidFilmThermo::Cp() const const volScalarField& T = film.T(); const volScalarField& p = film.pPrimary(); - forAll(Cp, cellI) + forAll(Cp, celli) { - Cp[cellI] = this->Cp(p[cellI], T[cellI]); + Cp[celli] = this->Cp(p[celli], T[celli]); } } @@ -451,9 +451,9 @@ tmp<volScalarField> liquidFilmThermo::kappa() const if (useReferenceValues_) { - forAll(kappa, cellI) + forAll(kappa, celli) { - kappa[cellI] = this->kappa(pRef_, TRef_); + kappa[celli] = this->kappa(pRef_, TRef_); } } else @@ -463,9 +463,9 @@ tmp<volScalarField> liquidFilmThermo::kappa() const const volScalarField& T = film.T(); const volScalarField& p = film.pPrimary(); - forAll(kappa, cellI) + forAll(kappa, celli) { - kappa[cellI] = this->kappa(p[cellI], T[cellI]); + kappa[celli] = this->kappa(p[celli], T[celli]); } } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C index d560d810c3cc6bfe355aae0b0cc0c4238ab716b5..45c007087a553c5a1b53510cdd60a082efd533d2 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/force/contactAngleForce/contactAngleForce.C @@ -62,8 +62,8 @@ void contactAngleForce::initialise() forAllConstIter(labelHashSet, patchIDs, iter) { - label patchI = iter.key(); - Info<< " " << pbm[patchI].name() << endl; + label patchi = iter.key(); + Info<< " " << pbm[patchi].name() << endl; } // Temporary implementation until run-time selection covers this case @@ -165,54 +165,54 @@ tmp<fvVectorMatrix> contactAngleForce::correct(volVectorField& U) volVectorField gradAlpha(fvc::grad(alpha)); - forAll(nbr, faceI) + forAll(nbr, facei) { - const label cellO = own[faceI]; - const label cellN = nbr[faceI]; + const label cellO = own[facei]; + const label cellN = nbr[facei]; - label cellI = -1; + label celli = -1; if ((alpha[cellO] > 0.5) && (alpha[cellN] < 0.5)) { - cellI = cellO; + celli = cellO; } else if ((alpha[cellO] < 0.5) && (alpha[cellN] > 0.5)) { - cellI = cellN; + celli = cellN; } - if (cellI != -1 && mask_[cellI] > 0.5) + if (celli != -1 && mask_[celli] > 0.5) { - const scalar invDx = owner_.regionMesh().deltaCoeffs()[faceI]; + const scalar invDx = owner_.regionMesh().deltaCoeffs()[facei]; const vector n = - gradAlpha[cellI]/(mag(gradAlpha[cellI]) + ROOTVSMALL); + gradAlpha[celli]/(mag(gradAlpha[celli]) + ROOTVSMALL); scalar theta = cos(degToRad(distribution_->sample())); - force[cellI] += Ccf_*n*sigma[cellI]*(1.0 - theta)/invDx; + force[celli] += Ccf_*n*sigma[celli]*(1.0 - theta)/invDx; } } - forAll(alpha.boundaryField(), patchI) + forAll(alpha.boundaryField(), patchi) { - if (!owner().isCoupledPatch(patchI)) + if (!owner().isCoupledPatch(patchi)) { - const fvPatchField<scalar>& alphaf = alpha.boundaryField()[patchI]; - const fvPatchField<scalar>& maskf = mask_.boundaryField()[patchI]; + const fvPatchField<scalar>& alphaf = alpha.boundaryField()[patchi]; + const fvPatchField<scalar>& maskf = mask_.boundaryField()[patchi]; const scalarField& invDx = alphaf.patch().deltaCoeffs(); const labelUList& faceCells = alphaf.patch().faceCells(); - forAll(alphaf, faceI) + forAll(alphaf, facei) { - if (maskf[faceI] > 0.5) + if (maskf[facei] > 0.5) { - label cellO = faceCells[faceI]; + label cellO = faceCells[facei]; - if ((alpha[cellO] > 0.5) && (alphaf[faceI] < 0.5)) + if ((alpha[cellO] > 0.5) && (alphaf[facei] < 0.5)) { const vector n = gradAlpha[cellO] /(mag(gradAlpha[cellO]) + ROOTVSMALL); scalar theta = cos(degToRad(distribution_->sample())); force[cellO] += - Ccf_*n*sigma[cellO]*(1.0 - theta)/invDx[faceI]; + Ccf_*n*sigma[cellO]*(1.0 - theta)/invDx[facei]; } } } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C index 0fd83cea973303f7e58414ee64cde42a8504ac11..5c6d904231f1fa21223b4ae77d72699ac25a59d2 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C @@ -86,9 +86,9 @@ tmp<volScalarField> curvatureSeparation::calcInvR1 const polyBoundaryMesh& pbm = mesh.boundaryMesh(); forAll(definedPatchRadii_, i) { - label patchI = definedPatchRadii_[i].first(); + label patchi = definedPatchRadii_[i].first(); scalar definedInvR1 = 1.0/max(rMin, definedPatchRadii_[i].second()); - UIndirectList<scalar>(invR1, pbm[patchI].faceCells()) = definedInvR1; + UIndirectList<scalar>(invR1, pbm[patchi].faceCells()) = definedInvR1; } // filter out large radii @@ -122,36 +122,36 @@ tmp<scalarField> curvatureSeparation::calcCosAngle scalarField phiMax(mesh.nCells(), -GREAT); scalarField cosAngle(mesh.nCells(), 0.0); - forAll(nbr, faceI) + forAll(nbr, facei) { - label cellO = own[faceI]; - label cellN = nbr[faceI]; + label cellO = own[facei]; + label cellN = nbr[facei]; - if (phi[faceI] > phiMax[cellO]) + if (phi[facei] > phiMax[cellO]) { - phiMax[cellO] = phi[faceI]; - cosAngle[cellO] = -gHat_ & nf[faceI]; + phiMax[cellO] = phi[facei]; + cosAngle[cellO] = -gHat_ & nf[facei]; } - if (-phi[faceI] > phiMax[cellN]) + if (-phi[facei] > phiMax[cellN]) { - phiMax[cellN] = -phi[faceI]; - cosAngle[cellN] = -gHat_ & -nf[faceI]; + phiMax[cellN] = -phi[facei]; + cosAngle[cellN] = -gHat_ & -nf[facei]; } } - forAll(phi.boundaryField(), patchI) + forAll(phi.boundaryField(), patchi) { - const fvsPatchScalarField& phip = phi.boundaryField()[patchI]; + const fvsPatchScalarField& phip = phi.boundaryField()[patchi]; const fvPatch& pp = phip.patch(); const labelList& faceCells = pp.faceCells(); const vectorField nf(pp.nf()); forAll(phip, i) { - label cellI = faceCells[i]; - if (phip[i] > phiMax[cellI]) + label celli = faceCells[i]; + if (phip[i] > phiMax[celli]) { - phiMax[cellI] = phip[i]; - cosAngle[cellI] = -gHat_ & nf[i]; + phiMax[celli] = phip[i]; + cosAngle[celli] = -gHat_ & nf[i]; } } } @@ -159,14 +159,14 @@ tmp<scalarField> curvatureSeparation::calcCosAngle // correction for cyclics - use cyclic pairs' face normal instead of // local face normal const fvBoundaryMesh& pbm = mesh.boundary(); - forAll(phi.boundaryField(), patchI) + forAll(phi.boundaryField(), patchi) { - if (isA<cyclicPolyPatch>(pbm[patchI])) + if (isA<cyclicPolyPatch>(pbm[patchi])) { - const scalarField& phip = phi.boundaryField()[patchI]; - const vectorField nf(pbm[patchI].nf()); - const labelList& faceCells = pbm[patchI].faceCells(); - const label sizeBy2 = pbm[patchI].size()/2; + const scalarField& phip = phi.boundaryField()[patchi]; + const vectorField nf(pbm[patchi].nf()); + const labelList& faceCells = pbm[patchi].faceCells(); + const label sizeBy2 = pbm[patchi].size()/2; for (label face0=0; face0<sizeBy2; face0++) { @@ -252,14 +252,14 @@ curvatureSeparation::curvatureSeparation labelList patchIDs = findStrings(prIn[i].first(), allPatchNames); forAll(patchIDs, j) { - const label patchI = patchIDs[j]; + const label patchi = patchIDs[j]; - if (!uniquePatchIDs.found(patchI)) + if (!uniquePatchIDs.found(patchi)) { const scalar radius = prIn[i].second(); - prData.append(Tuple2<label, scalar>(patchI, radius)); + prData.append(Tuple2<label, scalar>(patchi, radius)); - uniquePatchIDs.insert(patchI); + uniquePatchIDs.insert(patchi); } } } diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/drippingInjection/drippingInjection.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/drippingInjection/drippingInjection.C index 905477378cad342c7c6faec04bf2ac9be0a784dc..a429af6bec6e2bcc3f947cff521044b5b6cf291c 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/drippingInjection/drippingInjection.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/drippingInjection/drippingInjection.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 @@ -112,45 +112,45 @@ void drippingInjection::correct // Collect the data to be transferred - forAll(massDrip, cellI) + forAll(massDrip, celli) { - if (massDrip[cellI] > 0) + if (massDrip[celli] > 0) { // set new particle diameter if not already set - if (diameter_[cellI] < 0) + if (diameter_[celli] < 0) { - diameter_[cellI] = parcelDistribution_->sample(); + diameter_[celli] = parcelDistribution_->sample(); } - scalar& diam = diameter_[cellI]; - scalar rhoc = rho[cellI]; + scalar& diam = diameter_[celli]; + scalar rhoc = rho[celli]; scalar minMass = particlesPerParcel_*rhoc*pi/6*pow3(diam); - if (massDrip[cellI] > minMass) + if (massDrip[celli] > minMass) { // All drip mass can be injected - massToInject[cellI] += massDrip[cellI]; - availableMass[cellI] -= massDrip[cellI]; + massToInject[celli] += massDrip[celli]; + availableMass[celli] -= massDrip[celli]; // Set particle diameter - diameterToInject[cellI] = diam; + diameterToInject[celli] = diam; // Retrieve new particle diameter sample diam = parcelDistribution_->sample(); - addToInjectedMass(massDrip[cellI]); + addToInjectedMass(massDrip[celli]); } else { // Particle mass below minimum threshold - cannot be injected - massToInject[cellI] = 0.0; - diameterToInject[cellI] = 0.0; + massToInject[celli] = 0.0; + diameterToInject[celli] = 0.0; } } else { - massToInject[cellI] = 0.0; - diameterToInject[cellI] = 0.0; + massToInject[celli] = 0.0; + diameterToInject[celli] = 0.0; } } diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C index 6443c3ad808f5bee300ac13870925cf48ee9bdc5..125cf104b265ebbdf89b82db481daef5249c51f1 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.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 @@ -119,18 +119,18 @@ void standardPhaseChange::correctModel max(scalar(0.0), availableMass - deltaMin_*rho*magSf) ); - forAll(dMass, cellI) + forAll(dMass, celli) { - if (delta[cellI] > deltaMin_) + if (delta[celli] > deltaMin_) { // cell pressure [Pa] - const scalar pc = pInf[cellI]; + const scalar pc = pInf[celli]; // calculate the boiling temperature const scalar Tb = filmThermo.Tb(pc); // local temperature - impose lower limit of 200 K for stability - const scalar Tloc = min(TbFactor_*Tb, max(200.0, T[cellI])); + const scalar Tloc = min(TbFactor_*Tb, max(200.0, T[celli])); // saturation pressure [Pa] const scalar pSat = filmThermo.pv(pc, Tloc); @@ -143,20 +143,20 @@ void standardPhaseChange::correctModel { // boiling const scalar Cp = filmThermo.Cp(pc, Tloc); - const scalar Tcorr = max(0.0, T[cellI] - Tb); - const scalar qCorr = limMass[cellI]*Cp*(Tcorr); - dMass[cellI] = qCorr/hVap; + const scalar Tcorr = max(0.0, T[celli] - Tb); + const scalar qCorr = limMass[celli]*Cp*(Tcorr); + dMass[celli] = qCorr/hVap; } else { // Primary region density [kg/m3] - const scalar rhoInfc = rhoInf[cellI]; + const scalar rhoInfc = rhoInf[celli]; // Primary region viscosity [Pa.s] - const scalar muInfc = muInf[cellI]; + const scalar muInfc = muInf[celli]; // Reynolds number - const scalar Re = rhoInfc*mag(dU[cellI])*L_/muInfc; + const scalar Re = rhoInfc*mag(dU[celli])*L_/muInfc; // molecular weight of vapour [kg/kmol] const scalar Wvap = thermo.carrier().W(vapId); @@ -180,12 +180,12 @@ void standardPhaseChange::correctModel const scalar hm = Sh*Dab/(L_ + ROOTVSMALL); // add mass contribution to source - dMass[cellI] = - dt*magSf[cellI]*rhoInfc*hm*(Ys - YInf[cellI])/(1.0 - Ys); + dMass[celli] = + dt*magSf[celli]*rhoInfc*hm*(Ys - YInf[celli])/(1.0 - Ys); } - dMass[cellI] = min(limMass[cellI], max(0.0, dMass[cellI])); - dEnergy[cellI] = dMass[cellI]*hVap; + dMass[celli] = min(limMass[celli], max(0.0, dMass[celli])); + dEnergy[celli] = dMass[celli]*hVap; } } } diff --git a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H index 77817d5809e9c0a77c2f0bf6d86bfada8cae705c..0a3a86d2c0bf40574733583766148d1d9368ea82 100644 --- a/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H +++ b/src/regionModels/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel.H @@ -149,7 +149,7 @@ public: virtual void addSources ( const label patchI, - const label faceI, + const label facei, const scalar massSource, const vector& momentumSource, const scalar pressureSource, diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index d063b2a520687ca770f26a9b2562587265f7b33e..02d91951c28a6d7f46acc3eb2d30c2a89345747f 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -585,7 +585,7 @@ thermoSingleLayer::~thermoSingleLayer() void thermoSingleLayer::addSources ( const label patchi, - const label faceI, + const label facei, const scalar massSource, const vector& momentumSource, const scalar pressureSource, @@ -595,7 +595,7 @@ void thermoSingleLayer::addSources kinematicSingleLayer::addSources ( patchi, - faceI, + facei, massSource, momentumSource, pressureSource, @@ -607,7 +607,7 @@ void thermoSingleLayer::addSources Info<< " energy = " << energySource << nl << endl; } - hsSpPrimary_.boundaryFieldRef()[patchi][faceI] -= energySource; + hsSpPrimary_.boundaryFieldRef()[patchi][facei] -= energySource; } diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H index d2f13c10edcf2303d9a7931d9eef44cb5605489e..33b3474ddd9ba4684e58577e3850ace214e1c205 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.H @@ -319,7 +319,7 @@ public: virtual void addSources ( const label patchI, // patchI on primary region - const label faceI, // faceI of patchI + const label facei, // facei of patchI const scalar massSource, // [kg] const vector& momentumSource, // [kg.m/s] (tangential momentum) const scalar pressureSource, // [kg.m/s] (normal momentum) diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H index 22bd215deb2574b2469cd90e61b730e5264be913..bf9f8e60c76354990b6254da648fefda51be5a1d 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayerI.H @@ -48,10 +48,10 @@ inline const SLGThermo& thermoSingleLayer::thermo() const inline tmp<scalarField> thermoSingleLayer::hs ( const scalarField& T, - const label patchI + const label patchi ) const { - const scalarField& Cp = Cp_.boundaryField()[patchI]; + const scalarField& Cp = Cp_.boundaryField()[patchi]; return Cp*(T - 298.15); } @@ -155,21 +155,21 @@ inline const filmRadiationModel& thermoSingleLayer::radiation() const } -inline tmp<scalarField> thermoSingleLayer::Qconvw(const label patchI) const +inline tmp<scalarField> thermoSingleLayer::Qconvw(const label patchi) const { - const scalarField htc(htcw_->h()().boundaryField()[patchI]); - const scalarField& Tp = T_.boundaryField()[patchI]; - const scalarField& Twp = Tw_.boundaryField()[patchI]; + const scalarField htc(htcw_->h()().boundaryField()[patchi]); + const scalarField& Tp = T_.boundaryField()[patchi]; + const scalarField& Twp = Tw_.boundaryField()[patchi]; return htc*(Tp - Twp); } -inline tmp<scalarField> thermoSingleLayer::Qconvp(const label patchI) const +inline tmp<scalarField> thermoSingleLayer::Qconvp(const label patchi) const { - const scalarField htc(htcs_->h()().boundaryField()[patchI]); - const scalarField& Tp = T_.boundaryField()[patchI]; - const scalarField& Tpp = TPrimary_.boundaryField()[patchI]; + const scalarField htc(htcs_->h()().boundaryField()[patchi]); + const scalarField& Tp = T_.boundaryField()[patchi]; + const scalarField& Tpp = TPrimary_.boundaryField()[patchi]; return htc*(Tp - Tpp); } diff --git a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C index e575a1c480e851e2cfc3e6d58f3f1a6b24625c26..70a3a0f2c1824b35519b7d771e8eb778acb9cb7b 100644 --- a/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C +++ b/src/regionModels/thermalBaffleModels/derivedFvPatchFields/thermalBaffle/thermalBaffleFvPatchScalarField.C @@ -208,18 +208,18 @@ void thermalBaffleFvPatchScalarField::createPatchMesh() dicts[topPatchID].add("sampleMode", mpp.sampleModeNames_[mpp.mode()]); - forAll(regionPatches, patchI) + forAll(regionPatches, patchi) { - dictionary& patchDict = dicts[patchI]; + dictionary& patchDict = dicts[patchi]; patchDict.set("nFaces", 0); patchDict.set("startFace", 0); - regionPatches[patchI] = polyPatch::New + regionPatches[patchi] = polyPatch::New ( - patchTypes[patchI], - patchNames[patchI], - dicts[patchI], - patchI, + patchTypes[patchi], + patchNames[patchi], + dicts[patchi], + patchi, thisMesh.boundaryMesh() ).ptr(); } diff --git a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C index 5454563cb8ec162b5d27fbc8a228923fba0c4944..1a6a191417a446ec9487d9e133fe84c507d93a37 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffle/thermalBaffle.C @@ -101,8 +101,8 @@ void thermalBaffle::solveEnergy() if (oneD_ && !constantThickness_) { // Scale K and rhoCp and fill Q in the internal baffle region. - const label patchI = intCoupledPatchIDs_[0]; - const polyPatch& ppCoupled = rbm[patchI]; + const label patchi = intCoupledPatchIDs_[0]; + const polyPatch& ppCoupled = rbm[patchi]; forAll(ppCoupled, localFaceI) { @@ -112,7 +112,7 @@ void thermalBaffle::solveEnergy() const label cellId = cells[i]; Q[cellId] = - Qs_.boundaryField()[patchI][localFaceI] + Qs_.boundaryField()[patchi][localFaceI] /thickness_[localFaceI]; rho[cellId] *= delta_.value()/thickness_[localFaceI]; @@ -288,8 +288,8 @@ void thermalBaffle::init() { if (oneD_ && !constantThickness_) { - label patchI = intCoupledPatchIDs_[0]; - const label Qsb = Qs_.boundaryField()[patchI].size(); + label patchi = intCoupledPatchIDs_[0]; + const label Qsb = Qs_.boundaryField()[patchi].size(); if (Qsb!= thickness_.size()) { @@ -358,15 +358,15 @@ void thermalBaffle::info() forAll(coupledPatches, i) { - const label patchI = coupledPatches[i]; - const fvPatchScalarField& ph = h_.boundaryField()[patchI]; - const word patchName = regionMesh().boundary()[patchI].name(); + const label patchi = coupledPatches[i]; + const fvPatchScalarField& ph = h_.boundaryField()[patchi]; + const word patchName = regionMesh().boundary()[patchi].name(); Info<< indent << "Q : " << patchName << indent << gSum ( - mag(regionMesh().Sf().boundaryField()[patchI]) + mag(regionMesh().Sf().boundaryField()[patchi]) * ph.snGrad() - * thermo_->alpha().boundaryField()[patchI] + * thermo_->alpha().boundaryField()[patchi] ) << endl; } } diff --git a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C index f56ef9193e5b7a4eeb6b754fe25303840951fa3e..c2fffd5a8ecbde341f93291aa44e8472d1cf4691 100644 --- a/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C +++ b/src/regionModels/thermalBaffleModels/thermalBaffleModel/thermalBaffleModel.C @@ -104,8 +104,8 @@ void thermalBaffleModel::init() forAll(intCoupledPatchIDs_, i) { - const label patchI = intCoupledPatchIDs_[i]; - const polyPatch& pp = rbm[patchI]; + const label patchi = intCoupledPatchIDs_[i]; + const polyPatch& pp = rbm[patchi]; if ( @@ -135,8 +135,8 @@ void thermalBaffleModel::init() if (oneD_ && !constantThickness_) { - const label patchI = intCoupledPatchIDs_[0]; - const polyPatch& pp = rbm[patchI]; + const label patchi = intCoupledPatchIDs_[0]; + const polyPatch& pp = rbm[patchi]; const mappedVariableThicknessWallPolyPatch& ppCoupled = refCast < @@ -159,14 +159,14 @@ void thermalBaffleModel::init() { forAll(ppCoupled, localFaceI) { - label faceI = ppCoupled.start() + localFaceI; + label facei = ppCoupled.start() + localFaceI; label faceO = boundaryFaceOppositeFace_[localFaceI]; delta_.value() = mag ( - regionMesh().faceCentres()[faceI] + regionMesh().faceCentres()[facei] - regionMesh().faceCentres()[faceO] ); break; diff --git a/src/renumber/SloanRenumber/SloanRenumber.C b/src/renumber/SloanRenumber/SloanRenumber.C index 43e8006a7ab7cf01546614c8d4d4e4540f71d88e..2f41299b56fba1806509d3efe24c084b69582928 100644 --- a/src/renumber/SloanRenumber/SloanRenumber.C +++ b/src/renumber/SloanRenumber/SloanRenumber.C @@ -113,16 +113,16 @@ Foam::labelList Foam::SloanRenumber::renumber // Determine neighbour cell labelList nbr(mesh.nFaces()-mesh.nInternalFaces(), -1); - forAll(pbm, patchI) + forAll(pbm, patchi) { - if (pbm[patchI].coupled() && !isA<processorPolyPatch>(pbm[patchI])) + if (pbm[patchi].coupled() && !isA<processorPolyPatch>(pbm[patchi])) { SubList<label> ( nbr, - pbm[patchI].size(), - pbm[patchI].start()-mesh.nInternalFaces() - ) = pbm[patchI].faceCells(); + pbm[patchi].size(), + pbm[patchi].start()-mesh.nInternalFaces() + ) = pbm[patchi].faceCells(); } } syncTools::swapBoundaryFaceList(mesh, nbr); @@ -131,24 +131,24 @@ Foam::labelList Foam::SloanRenumber::renumber Graph G(mesh.nCells()); // Add internal faces - forAll(mesh.faceNeighbour(), faceI) + forAll(mesh.faceNeighbour(), facei) { - add_edge(mesh.faceOwner()[faceI], mesh.faceNeighbour()[faceI], G); + add_edge(mesh.faceOwner()[facei], mesh.faceNeighbour()[facei], G); } // Add cyclics - forAll(pbm, patchI) + forAll(pbm, patchi) { if ( - pbm[patchI].coupled() - && !isA<processorPolyPatch>(pbm[patchI]) - && refCast<const coupledPolyPatch>(pbm[patchI]).owner() + pbm[patchi].coupled() + && !isA<processorPolyPatch>(pbm[patchi]) + && refCast<const coupledPolyPatch>(pbm[patchi]).owner() ) { - const labelUList& faceCells = pbm[patchI].faceCells(); + const labelUList& faceCells = pbm[patchi].faceCells(); forAll(faceCells, i) { - label bFaceI = pbm[patchI].start()+i-mesh.nInternalFaces(); + label bFaceI = pbm[patchi].start()+i-mesh.nInternalFaces(); label nbrCellI = nbr[bFaceI]; if (faceCells[i] < nbrCellI) @@ -210,14 +210,14 @@ Foam::labelList Foam::SloanRenumber::renumber { Graph G(cellCells.size()); - forAll(cellCells, cellI) + forAll(cellCells, celli) { - const labelList& nbrs = cellCells[cellI]; + const labelList& nbrs = cellCells[celli]; forAll(nbrs, i) { - if (nbrs[i] > cellI) + if (nbrs[i] > celli) { - add_edge(cellI, nbrs[i], G); + add_edge(celli, nbrs[i], G); } } } diff --git a/src/renumber/renumberMethods/springRenumber/springRenumber.C b/src/renumber/renumberMethods/springRenumber/springRenumber.C index 764be3018db7ccbf49e1a0489d8e802d43badddc..8158796d435d05661a74ecd9ca0d2494e568e821 100644 --- a/src/renumber/renumberMethods/springRenumber/springRenumber.C +++ b/src/renumber/renumberMethods/springRenumber/springRenumber.C @@ -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 @@ -86,9 +86,9 @@ Foam::labelList Foam::springRenumber::renumber // Move cells to the average 'position' of their neighbour. scalarField position(cellCells.size()); - forAll(position, cellI) + forAll(position, celli) { - position[cellI] = cellI; + position[celli] = celli; } labelList oldToNew(identity(cellCells.size())); @@ -112,13 +112,13 @@ Foam::labelList Foam::springRenumber::renumber forAll(cellCells, oldCellI) { const labelList& cCells = cellCells[oldCellI]; - label cellI = oldToNew[oldCellI]; + label celli = oldToNew[oldCellI]; forAll(cCells, i) { label nbrCellI = oldToNew[cCells[i]]; - sumForce[cellI] += (position[nbrCellI]-position[cellI]); + sumForce[celli] += (position[nbrCellI]-position[celli]); } } diff --git a/src/renumber/renumberMethods/structuredRenumber/structuredRenumber.C b/src/renumber/renumberMethods/structuredRenumber/structuredRenumber.C index 03830bd1ea27fdafe655b89207340b7c6f82a87f..093d44bb25b88d573c51369224f01672732007a0 100644 --- a/src/renumber/renumberMethods/structuredRenumber/structuredRenumber.C +++ b/src/renumber/renumberMethods/structuredRenumber/structuredRenumber.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 @@ -180,30 +180,30 @@ Foam::labelList Foam::structuredRenumber::renumber // And extract. // Note that distance is distance from face so starts at 1. bool haveWarned = false; - forAll(orderedToOld, cellI) + forAll(orderedToOld, celli) { - if (!cellData[cellI].valid(deltaCalc.data())) + if (!cellData[celli].valid(deltaCalc.data())) { if (!haveWarned) { WarningInFunction - << "Did not visit some cells, e.g. cell " << cellI - << " at " << mesh.cellCentres()[cellI] << endl + << "Did not visit some cells, e.g. cell " << celli + << " at " << mesh.cellCentres()[celli] << endl << "Assigning these cells to domain 0." << endl; haveWarned = true; } - orderedToOld[cellI] = 0; + orderedToOld[celli] = 0; } else { - label layerI = cellData[cellI].distance(); + label layerI = cellData[celli].distance(); if (depthFirst_) { - orderedToOld[nLayers*cellData[cellI].data()+layerI] = cellI; + orderedToOld[nLayers*cellData[celli].data()+layerI] = celli; } else { - orderedToOld[cellData[cellI].data()+nLayers*layerI] = cellI; + orderedToOld[cellData[celli].data()+nLayers*layerI] = celli; } } } diff --git a/src/renumber/zoltanRenumber/zoltanRenumber.C b/src/renumber/zoltanRenumber/zoltanRenumber.C index ffd318fd70fe298f632fd7baf0494c95e43100f5..f12f53bb227f93a7da7476ad4e1608224e5ee9de 100644 --- a/src/renumber/zoltanRenumber/zoltanRenumber.C +++ b/src/renumber/zoltanRenumber/zoltanRenumber.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 @@ -121,8 +121,8 @@ static void get_num_edges_list(void *data, int sizeGID, int sizeLID, for (Foam::label i=0; i < num_obj ;i++) { - Foam::label cellI = localID[i]; - const Foam::cell& cFaces = mesh.cells()[cellI]; + Foam::label celli = localID[i]; + const Foam::cell& cFaces = mesh.cells()[celli]; forAll(cFaces, cFaceI) { Foam::label n = 0; @@ -164,20 +164,20 @@ static void get_edge_list(void *data, int sizeGID, int sizeLID, for (Foam::label i=0; i < num_obj; i++) { - Foam::label cellI = localID[i]; + Foam::label celli = localID[i]; - const Foam::cell& cFaces = mesh.cells()[cellI]; + const Foam::cell& cFaces = mesh.cells()[celli]; forAll(cFaces, cFaceI) { Foam::label n = 0; - Foam::label faceI = cFaces[cFaceI]; - if (mesh.isInternalFace(faceI)) + Foam::label facei = cFaces[cFaceI]; + if (mesh.isInternalFace(facei)) { - Foam::label nbr = mesh.faceOwner()[faceI]; - if (nbr == cellI) + Foam::label nbr = mesh.faceOwner()[facei]; + if (nbr == celli) { - nbr = mesh.faceNeighbour()[faceI]; + nbr = mesh.faceNeighbour()[facei]; } // Note: global index @@ -240,9 +240,9 @@ static void get_geom_list const Foam::pointField& cc = mesh.cellCentres(); - for (Foam::label cellI = 0; cellI < num_obj; cellI++) + for (Foam::label celli = 0; celli < num_obj; celli++) { - const Foam::point& pt = cc[cellI]; + const Foam::point& pt = cc[celli]; for (Foam::direction cmpt = 0; cmpt < Foam::vector::nComponents; cmpt++) { diff --git a/src/sampling/cuttingPlane/cuttingPlane.C b/src/sampling/cuttingPlane/cuttingPlane.C index b20ffd6688610d91ec8981418fa2932538c35d26..5cf7a37dd7cd39524ffb2da2afcaeaed6e436b61 100644 --- a/src/sampling/cuttingPlane/cuttingPlane.C +++ b/src/sampling/cuttingPlane/cuttingPlane.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 @@ -56,20 +56,20 @@ void Foam::cuttingPlane::calcCutCells } cutCells_.setSize(listSize); - label cutcellI(0); + label cutcelli(0); // Find the cut cells by detecting any cell that uses points with // opposing dotProducts. for (label listI = 0; listI < listSize; ++listI) { - label cellI = listI; + label celli = listI; if (notNull(cellIdLabels)) { - cellI = cellIdLabels[listI]; + celli = cellIdLabels[listI]; } - const labelList& cEdges = cellEdges[cellI]; + const labelList& cEdges = cellEdges[celli]; label nCutEdges = 0; @@ -87,7 +87,7 @@ void Foam::cuttingPlane::calcCutCells if (nCutEdges > 2) { - cutCells_[cutcellI++] = cellI; + cutCells_[cutcelli++] = celli; break; } @@ -96,7 +96,7 @@ void Foam::cuttingPlane::calcCutCells } // Set correct list size - cutCells_.setSize(cutcellI); + cutCells_.setSize(cutcelli); } @@ -161,12 +161,12 @@ bool Foam::cuttingPlane::walkCell ( const primitiveMesh& mesh, const labelUList& edgePoint, - const label cellI, + const label celli, const label startEdgeI, DynamicList<label>& faceVerts ) { - label faceI = -1; + label facei = -1; label edgeI = startEdgeI; label nIter = 0; @@ -177,10 +177,10 @@ bool Foam::cuttingPlane::walkCell faceVerts.append(edgePoint[edgeI]); // Cross edge to other face - faceI = meshTools::otherFace(mesh, cellI, faceI, edgeI); + facei = meshTools::otherFace(mesh, celli, facei, edgeI); // Find next cut edge on face. - const labelList& fEdges = mesh.faceEdges()[faceI]; + const labelList& fEdges = mesh.faceEdges()[facei]; label nextEdgeI = -1; @@ -202,9 +202,9 @@ bool Foam::cuttingPlane::walkCell if (nextEdgeI == -1) { - // Did not find another cut edge on faceI. Do what? + // Did not find another cut edge on facei. Do what? WarningInFunction - << "Did not find closed walk along surface of cell " << cellI + << "Did not find closed walk along surface of cell " << celli << " starting from edge " << startEdgeI << " in " << nIter << " iterations." << nl << "Collected cutPoints so far:" << faceVerts @@ -220,7 +220,7 @@ bool Foam::cuttingPlane::walkCell if (nIter > 1000) { WarningInFunction - << "Did not find closed walk along surface of cell " << cellI + << "Did not find closed walk along surface of cell " << celli << " starting from edge " << startEdgeI << " in " << nIter << " iterations." << nl << "Collected cutPoints so far:" << faceVerts @@ -238,7 +238,7 @@ bool Foam::cuttingPlane::walkCell else { WarningInFunction - << "Did not find closed walk along surface of cell " << cellI + << "Did not find closed walk along surface of cell " << celli << " starting from edge " << startEdgeI << nl << "Collected cutPoints so far:" << faceVerts << endl; @@ -266,10 +266,10 @@ void Foam::cuttingPlane::walkCellCuts forAll(cutCells_, i) { - label cellI = cutCells_[i]; + label celli = cutCells_[i]; // Find the starting edge to walk from. - const labelList& cEdges = mesh.cellEdges()[cellI]; + const labelList& cEdges = mesh.cellEdges()[celli]; label startEdgeI = -1; @@ -288,7 +288,7 @@ void Foam::cuttingPlane::walkCellCuts if (startEdgeI == -1) { FatalErrorInFunction - << "Cannot find cut edge for cut cell " << cellI + << "Cannot find cut edge for cut cell " << celli << abort(FatalError); } @@ -297,7 +297,7 @@ void Foam::cuttingPlane::walkCellCuts ( mesh, edgePoint, - cellI, + celli, startEdgeI, faceVerts ); @@ -318,13 +318,13 @@ void Foam::cuttingPlane::walkCellCuts label nTri = f.triangles(cutPoints, dynCutFaces); while (nTri--) { - dynCutCells.append(cellI); + dynCutCells.append(celli); } } else { dynCutFaces.append(f); - dynCutCells.append(cellI); + dynCutCells.append(celli); } } } @@ -397,9 +397,9 @@ void Foam::cuttingPlane::remapFaces MeshStorage::remapFaces(faceMap); List<label> newCutCells(faceMap.size()); - forAll(faceMap, faceI) + forAll(faceMap, facei) { - newCutCells[faceI] = cutCells_[faceMap[faceI]]; + newCutCells[facei] = cutCells_[faceMap[facei]]; } cutCells_.transfer(newCutCells); } diff --git a/src/sampling/cuttingPlane/cuttingPlane.H b/src/sampling/cuttingPlane/cuttingPlane.H index d8309cf9421a3918ff567318e6acae6da128d40c..44097254e48f6ee401f68cb063d9d5d3f9581b10 100644 --- a/src/sampling/cuttingPlane/cuttingPlane.H +++ b/src/sampling/cuttingPlane/cuttingPlane.H @@ -97,7 +97,7 @@ class cuttingPlane ( const primitiveMesh&, const labelUList& edgePoint, - const label cellI, + const label celli, const label startEdgeI, DynamicList<label>& faceVerts ); diff --git a/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.C b/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.C index b0a04ef6d09f7b0c5aec3a50c99341af3e9f322f..9b7b40187509ca995bfbefc4d31bf6f80e45cfea 100644 --- a/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.C +++ b/src/sampling/meshToMesh/calcMethod/mapNearest/mapNearestMethod.C @@ -252,18 +252,18 @@ void Foam::mapNearestMethod::setNextNearestCells srcCellI = -1; forAll(srcNbr, i) { - label cellI = srcNbr[i]; - if (mapFlag[cellI]) + label celli = srcNbr[i]; + if (mapFlag[celli]) { - srcCellI = cellI; + srcCellI = celli; return; } } for (label i = startSeedI; i < srcCellIDs.size(); i++) { - label cellI = srcCellIDs[i]; - if (mapFlag[cellI]) + label celli = srcCellIDs[i]; + if (mapFlag[celli]) { startSeedI = i; break; diff --git a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.C b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.C index 11b0a5d5928a7e72695d9789228f1f66fa9b011e..1e6919978891cd478dfd2e92028901998b5e3636 100644 --- a/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.C +++ b/src/sampling/meshToMesh/calcMethod/meshToMeshMethod/meshToMeshMethod.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 @@ -123,13 +123,13 @@ Foam::scalar Foam::meshToMeshMethod::interVol void Foam::meshToMeshMethod::appendNbrCells ( - const label cellI, + const label celli, const polyMesh& mesh, const DynamicList<label>& visitedCells, DynamicList<label>& nbrCellIDs ) const { - const labelList& nbrCells = mesh.cellCells()[cellI]; + const labelList& nbrCells = mesh.cellCells()[celli]; // filter out cells already visited from cell neighbours forAll(nbrCells, i) @@ -237,10 +237,10 @@ void Foam::meshToMeshMethod::writeConnectivity const labelList& addr = mesh1ToMesh2Addr[i]; forAll(addr, j) { - label cellI = addr[j]; + label celli = addr[j]; const vector& c0 = mesh1.cellCentres()[i]; - const cell& c = mesh2.cells()[cellI]; + const cell& c = mesh2.cells()[celli]; const pointField pts(c.points(mesh2.faces(), mesh2.points())); forAll(pts, j) { diff --git a/src/sampling/meshToMesh/meshToMesh.C b/src/sampling/meshToMesh/meshToMesh.C index e37fb7f41494a6f30b14168ad4d720b30306f21d..22ece113d1b1600f9bc005593638a9e79a231d5c 100644 --- a/src/sampling/meshToMesh/meshToMesh.C +++ b/src/sampling/meshToMesh/meshToMesh.C @@ -101,9 +101,9 @@ void Foam::meshToMesh::normaliseWeights if (nCell > 0) { - forAll(wght, cellI) + forAll(wght, celli) { - scalarList& w = wght[cellI]; + scalarList& w = wght[celli]; scalar s = sum(w); forAll(w, i) @@ -434,9 +434,9 @@ void Foam::meshToMesh::constructNoCuttingPatches DynamicList<label> srcPatchID(srcBM.size()); DynamicList<label> tgtPatchID(tgtBM.size()); - forAll(srcBM, patchI) + forAll(srcBM, patchi) { - const polyPatch& pp = srcBM[patchI]; + const polyPatch& pp = srcBM[patchi]; if (!polyPatch::constraintType(pp.type())) { srcPatchID.append(pp.index()); diff --git a/src/sampling/meshToMesh/meshToMeshParallelOps.C b/src/sampling/meshToMesh/meshToMeshParallelOps.C index e1b72cce2a8f77425a78688643c12100dff7a5cd..8e730842db9221703a02be832925b731ef10c2ef 100644 --- a/src/sampling/meshToMesh/meshToMeshParallelOps.C +++ b/src/sampling/meshToMesh/meshToMeshParallelOps.C @@ -167,15 +167,15 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap // work array - whether src processor bb overlaps the tgt cell bounds boolList procBbOverlaps(Pstream::nProcs()); - forAll(cells, cellI) + forAll(cells, celli) { - const cell& c = cells[cellI]; + const cell& c = cells[celli]; // determine bounding box of tgt cell boundBox cellBb(point::max, point::min); - forAll(c, faceI) + forAll(c, facei) { - const face& f = faces[c[faceI]]; + const face& f = faces[c[facei]]; forAll(f, fp) { cellBb.min() = min(cellBb.min(), points[f[fp]]); @@ -190,7 +190,7 @@ Foam::autoPtr<Foam::mapDistribute> Foam::meshToMesh::calcProcMap { if (procBbOverlaps[procI]) { - dynSendMap[procI].append(cellI); + dynSendMap[procI].append(celli); } } } @@ -307,10 +307,10 @@ void Foam::meshToMesh::distributeCells label nInternal = 0; // internal faces - forAll(tgtMesh.faceNeighbour(), faceI) + forAll(tgtMesh.faceNeighbour(), facei) { - label own = tgtMesh.faceOwner()[faceI]; - label nbr = tgtMesh.faceNeighbour()[faceI]; + label own = tgtMesh.faceOwner()[facei]; + label nbr = tgtMesh.faceNeighbour()[facei]; label subOwn = reverseCellMap[own]; label subNbr = reverseCellMap[nbr]; @@ -320,7 +320,7 @@ void Foam::meshToMesh::distributeCells if (subOwn < subNbr) { - subFaces.append(tgtMesh.faces()[faceI]); + subFaces.append(tgtMesh.faces()[facei]); subFaceOwner.append(subOwn); subFaceNeighbour.append(subNbr); subNbrProcIDs.append(-1); @@ -328,7 +328,7 @@ void Foam::meshToMesh::distributeCells } else { - subFaces.append(tgtMesh.faces()[faceI].reverseFace()); + subFaces.append(tgtMesh.faces()[facei].reverseFace()); subFaceOwner.append(subNbr); subFaceNeighbour.append(subOwn); subNbrProcIDs.append(-1); @@ -338,16 +338,16 @@ void Foam::meshToMesh::distributeCells } // boundary faces for new region - forAll(tgtMesh.faceNeighbour(), faceI) + forAll(tgtMesh.faceNeighbour(), facei) { - label own = tgtMesh.faceOwner()[faceI]; - label nbr = tgtMesh.faceNeighbour()[faceI]; + label own = tgtMesh.faceOwner()[facei]; + label nbr = tgtMesh.faceNeighbour()[facei]; label subOwn = reverseCellMap[own]; label subNbr = reverseCellMap[nbr]; if (subOwn != -1 && subNbr == -1) { - subFaces.append(tgtMesh.faces()[faceI]); + subFaces.append(tgtMesh.faces()[facei]); subFaceOwner.append(subOwn); subFaceNeighbour.append(subNbr); subNbrProcIDs.append(-1); @@ -355,7 +355,7 @@ void Foam::meshToMesh::distributeCells } else if (subOwn == -1 && subNbr != -1) { - subFaces.append(tgtMesh.faces()[faceI].reverseFace()); + subFaces.append(tgtMesh.faces()[facei].reverseFace()); subFaceOwner.append(subNbr); subFaceNeighbour.append(subOwn); subNbrProcIDs.append(-1); @@ -364,9 +364,9 @@ void Foam::meshToMesh::distributeCells } // boundary faces of existing region - forAll(tgtMesh.boundaryMesh(), patchI) + forAll(tgtMesh.boundaryMesh(), patchi) { - const polyPatch& pp = tgtMesh.boundaryMesh()[patchI]; + const polyPatch& pp = tgtMesh.boundaryMesh()[patchi]; label nbrProcI = -1; @@ -381,12 +381,12 @@ void Foam::meshToMesh::distributeCells forAll(pp, i) { - label faceI = pp.start() + i; - label own = tgtMesh.faceOwner()[faceI]; + label facei = pp.start() + i; + label own = tgtMesh.faceOwner()[facei]; if (reverseCellMap[own] != -1) { - subFaces.append(tgtMesh.faces()[faceI]); + subFaces.append(tgtMesh.faces()[facei]); subFaceOwner.append(reverseCellMap[own]); subFaceNeighbour.append(-1); subNbrProcIDs.append(nbrProcI); diff --git a/src/sampling/meshToMesh/meshToMeshTemplates.C b/src/sampling/meshToMesh/meshToMeshTemplates.C index 7b80f1e6ba8162f8b72983541ff81ba4c524a067..414eda5e67631134f5e5b80689d9d988678975d5 100644 --- a/src/sampling/meshToMesh/meshToMeshTemplates.C +++ b/src/sampling/meshToMesh/meshToMeshTemplates.C @@ -104,40 +104,40 @@ void Foam::meshToMesh::mapSrcToTgt List<Type> work(srcField); map.distribute(work); - forAll(result, cellI) + forAll(result, celli) { - const labelList& srcAddress = tgtToSrcCellAddr_[cellI]; - const scalarList& srcWeight = tgtToSrcCellWght_[cellI]; + const labelList& srcAddress = tgtToSrcCellAddr_[celli]; + const scalarList& srcWeight = tgtToSrcCellWght_[celli]; if (srcAddress.size()) { -// result[cellI] = Zero; - result[cellI] *= (1.0 - sum(srcWeight)); +// result[celli] = Zero; + result[celli] *= (1.0 - sum(srcWeight)); forAll(srcAddress, i) { label srcI = srcAddress[i]; scalar w = srcWeight[i]; - cbop(result[cellI], cellI, work[srcI], w); + cbop(result[celli], celli, work[srcI], w); } } } } else { - forAll(result, cellI) + forAll(result, celli) { - const labelList& srcAddress = tgtToSrcCellAddr_[cellI]; - const scalarList& srcWeight = tgtToSrcCellWght_[cellI]; + const labelList& srcAddress = tgtToSrcCellAddr_[celli]; + const scalarList& srcWeight = tgtToSrcCellWght_[celli]; if (srcAddress.size()) { -// result[cellI] = Zero; - result[cellI] *= (1.0 - sum(srcWeight)); +// result[celli] = Zero; + result[celli] *= (1.0 - sum(srcWeight)); forAll(srcAddress, i) { label srcI = srcAddress[i]; scalar w = srcWeight[i]; - cbop(result[cellI], cellI, srcField[srcI], w); + cbop(result[celli], celli, srcField[srcI], w); } } } @@ -225,38 +225,38 @@ void Foam::meshToMesh::mapTgtToSrc List<Type> work(tgtField); map.distribute(work); - forAll(result, cellI) + forAll(result, celli) { - const labelList& tgtAddress = srcToTgtCellAddr_[cellI]; - const scalarList& tgtWeight = srcToTgtCellWght_[cellI]; + const labelList& tgtAddress = srcToTgtCellAddr_[celli]; + const scalarList& tgtWeight = srcToTgtCellWght_[celli]; if (tgtAddress.size()) { - result[cellI] *= (1.0 - sum(tgtWeight)); + result[celli] *= (1.0 - sum(tgtWeight)); forAll(tgtAddress, i) { label tgtI = tgtAddress[i]; scalar w = tgtWeight[i]; - cbop(result[cellI], cellI, work[tgtI], w); + cbop(result[celli], celli, work[tgtI], w); } } } } else { - forAll(result, cellI) + forAll(result, celli) { - const labelList& tgtAddress = srcToTgtCellAddr_[cellI]; - const scalarList& tgtWeight = srcToTgtCellWght_[cellI]; + const labelList& tgtAddress = srcToTgtCellAddr_[celli]; + const scalarList& tgtWeight = srcToTgtCellWght_[celli]; if (tgtAddress.size()) { - result[cellI] *= (1.0 - sum(tgtWeight)); + result[celli] *= (1.0 - sum(tgtWeight)); forAll(tgtAddress, i) { label tgtI = tgtAddress[i]; scalar w = tgtWeight[i]; - cbop(result[cellI], cellI, tgtField[tgtI], w); + cbop(result[celli], celli, tgtField[tgtI], w); } } } diff --git a/src/sampling/meshToMesh0/calculateMeshToMesh0Addressing.C b/src/sampling/meshToMesh0/calculateMeshToMesh0Addressing.C index 7aea0547209b3e6848295e0c19e15841359cb324..3bd2a71e54c1b89bc393e52b49de18e42e8b946b 100644 --- a/src/sampling/meshToMesh0/calculateMeshToMesh0Addressing.C +++ b/src/sampling/meshToMesh0/calculateMeshToMesh0Addressing.C @@ -70,14 +70,14 @@ void Foam::meshToMesh0::calcAddressing() // set reference to boundary const polyPatchList& patchesFrom = fromMesh_.boundaryMesh(); - forAll(patchesFrom, patchI) + forAll(patchesFrom, patchi) { // get reference to cells next to the boundary - const labelUList& bCells = patchesFrom[patchI].faceCells(); + const labelUList& bCells = patchesFrom[patchi].faceCells(); - forAll(bCells, faceI) + forAll(bCells, facei) { - boundaryCell[bCells[faceI]] = true; + boundaryCell[bCells[facei]] = true; } } diff --git a/src/sampling/meshToMesh0/meshToMesh0Templates.C b/src/sampling/meshToMesh0/meshToMesh0Templates.C index 12569cb63f1537bc7a4cf0020a5bd2219b27fae8..0c7841ce37b15b32d1a613fef1e6163515cbf23e 100644 --- a/src/sampling/meshToMesh0/meshToMesh0Templates.C +++ b/src/sampling/meshToMesh0/meshToMesh0Templates.C @@ -385,19 +385,19 @@ Foam::meshToMesh0::interpolate boundaryAddressing_.size() ); - forAll(boundaryAddressing_, patchI) + forAll(boundaryAddressing_, patchi) { patchFields.set ( - patchI, + patchi, fvPatchField<Type>::New ( - fromVf.boundaryField()[patchI], - toMesh_.boundary()[patchI], + fromVf.boundaryField()[patchi], + toMesh_.boundary()[patchi], DimensionedField<Type, volMesh>::null(), patchFieldInterpolator ( - boundaryAddressing_[patchI] + boundaryAddressing_[patchi] ) ) ); diff --git a/src/sampling/probes/patchProbes.C b/src/sampling/probes/patchProbes.C index 41b902486933bcb6d35bb8364fa1a1ea8432d05e..450cbadeacc0fd11e76e391cf7d07d767931acc8 100644 --- a/src/sampling/probes/patchProbes.C +++ b/src/sampling/probes/patchProbes.C @@ -45,9 +45,9 @@ void Foam::patchProbes::findElements(const fvMesh& mesh) const polyBoundaryMesh& bm = mesh.boundaryMesh(); - label patchI = bm.findPatchID(patchName_); + label patchi = bm.findPatchID(patchName_); - if (patchI == -1) + if (patchi == -1) { FatalErrorInFunction << " Unknown patch name " @@ -58,7 +58,7 @@ void Foam::patchProbes::findElements(const fvMesh& mesh) // All the info for nearest. Construct to miss List<mappedPatchBase::nearInfo> nearest(this->size()); - const polyPatch& pp = bm[patchI]; + const polyPatch& pp = bm[patchi]; if (pp.size() > 0) { @@ -110,9 +110,9 @@ void Foam::patchProbes::findElements(const fvMesh& mesh) ); } - label faceI = boundaryTree.shapes().faceLabels()[info.index()]; + label facei = boundaryTree.shapes().faceLabels()[info.index()]; - const label patchi = bm.whichPatch(faceI); + const label patchi = bm.whichPatch(facei); if (isA<emptyPolyPatch>(bm[patchi])) { @@ -125,7 +125,7 @@ void Foam::patchProbes::findElements(const fvMesh& mesh) } else { - const point& fc = mesh.faceCentres()[faceI]; + const point& fc = mesh.faceCentres()[facei]; mappedPatchBase::nearInfo sampleInfo; @@ -133,7 +133,7 @@ void Foam::patchProbes::findElements(const fvMesh& mesh) ( true, fc, - faceI + facei ); sampleInfo.second().first() = magSqr(fc-sample); diff --git a/src/sampling/probes/patchProbesTemplates.C b/src/sampling/probes/patchProbesTemplates.C index 59dfd0f50a5a78cf89a493d5de85cbdd60d06f2c..b6c348993d46b84fb78e2311e21174cbde8e7daf 100644 --- a/src/sampling/probes/patchProbesTemplates.C +++ b/src/sampling/probes/patchProbesTemplates.C @@ -208,13 +208,13 @@ Foam::patchProbes::sample forAll(*this, probeI) { - label faceI = elementList_[probeI]; + label facei = elementList_[probeI]; - if (faceI >= 0) + if (facei >= 0) { - label patchI = patches.whichPatch(faceI); - label localFaceI = patches[patchI].whichFace(faceI); - values[probeI] = vField.boundaryField()[patchI][localFaceI]; + label patchi = patches.whichPatch(facei); + label localFaceI = patches[patchi].whichFace(facei); + values[probeI] = vField.boundaryField()[patchi][localFaceI]; } } @@ -259,13 +259,13 @@ Foam::patchProbes::sample forAll(*this, probeI) { - label faceI = elementList_[probeI]; + label facei = elementList_[probeI]; - if (faceI >= 0) + if (facei >= 0) { - label patchI = patches.whichPatch(faceI); - label localFaceI = patches[patchI].whichFace(faceI); - values[probeI] = sField.boundaryField()[patchI][localFaceI]; + label patchi = patches.whichPatch(facei); + 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 9a103e1367c6e44712c0ae02b5cac908916eee90..01f6497936c3f5d233297ac304f51d88da0b490f 100644 --- a/src/sampling/probes/probes.C +++ b/src/sampling/probes/probes.C @@ -57,24 +57,24 @@ void Foam::probes::findElements(const fvMesh& mesh) { const vector& location = operator[](probeI); - const label cellI = mesh.findCell(location); + const label celli = mesh.findCell(location); - elementList_[probeI] = cellI; + elementList_[probeI] = celli; - if (cellI != -1) + if (celli != -1) { - const labelList& cellFaces = mesh.cells()[cellI]; - const vector& cellCentre = mesh.cellCentres()[cellI]; + const labelList& cellFaces = mesh.cells()[celli]; + const vector& cellCentre = mesh.cellCentres()[celli]; scalar minDistance = GREAT; label minFaceID = -1; forAll(cellFaces, i) { - label faceI = cellFaces[i]; - vector dist = mesh.faceCentres()[faceI] - cellCentre; + label facei = cellFaces[i]; + vector dist = mesh.faceCentres()[facei] - cellCentre; if (mag(dist) < minDistance) { minDistance = mag(dist); - minFaceID = faceI; + minFaceID = facei; } } faceList_[probeI] = minFaceID; @@ -97,14 +97,14 @@ void Foam::probes::findElements(const fvMesh& mesh) forAll(elementList_, probeI) { const vector& location = operator[](probeI); - label cellI = elementList_[probeI]; - label faceI = faceList_[probeI]; + label celli = elementList_[probeI]; + label facei = faceList_[probeI]; // Check at least one processor with cell. - reduce(cellI, maxOp<label>()); - reduce(faceI, maxOp<label>()); + reduce(celli, maxOp<label>()); + reduce(facei, maxOp<label>()); - if (cellI == -1) + if (celli == -1) { if (Pstream::master()) { @@ -113,7 +113,7 @@ void Foam::probes::findElements(const fvMesh& mesh) << " in any cell. Skipping location." << endl; } } - else if (faceI == -1) + else if (facei == -1) { if (Pstream::master()) { @@ -125,28 +125,28 @@ void Foam::probes::findElements(const fvMesh& mesh) else { // Make sure location not on two domains. - if (elementList_[probeI] != -1 && elementList_[probeI] != cellI) + if (elementList_[probeI] != -1 && elementList_[probeI] != celli) { WarningInFunction << "Location " << location << " seems to be on multiple domains:" << " cell " << elementList_[probeI] << " on my domain " << Pstream::myProcNo() - << " and cell " << cellI << " on some other domain." + << " and cell " << celli << " on some other domain." << endl << "This might happen if the probe location is on" << " a processor patch. Change the location slightly" << " to prevent this." << endl; } - if (faceList_[probeI] != -1 && faceList_[probeI] != faceI) + if (faceList_[probeI] != -1 && faceList_[probeI] != facei) { WarningInFunction << "Location " << location << " seems to be on multiple domains:" << " cell " << faceList_[probeI] << " on my domain " << Pstream::myProcNo() - << " and face " << faceI << " on some other domain." + << " and face " << facei << " on some other domain." << endl << "This might happen if the probe location is on" << " a processor patch. Change the location slightly" @@ -381,8 +381,8 @@ void Foam::probes::updateMesh(const mapPolyMesh& mpm) const labelList& reverseMap = mpm.reverseCellMap(); forAll(elementList_, i) { - label cellI = elementList_[i]; - label newCellI = reverseMap[cellI]; + label celli = elementList_[i]; + label newCellI = reverseMap[celli]; if (newCellI == -1) { // cell removed @@ -409,8 +409,8 @@ void Foam::probes::updateMesh(const mapPolyMesh& mpm) const labelList& reverseMap = mpm.reverseFaceMap(); forAll(faceList_, i) { - label faceI = faceList_[i]; - label newFaceI = reverseMap[faceI]; + label facei = faceList_[i]; + label newFaceI = reverseMap[facei]; if (newFaceI == -1) { // face removed diff --git a/src/sampling/sampledSet/array/arraySet.C b/src/sampling/sampledSet/array/arraySet.C index 49e3b76e8c98e692f705006c28182331ce265834..1ff788d173b189fcf3c40820c5b14a3d406aa06d 100644 --- a/src/sampling/sampledSet/array/arraySet.C +++ b/src/sampling/sampledSet/array/arraySet.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 @@ -88,12 +88,12 @@ void Foam::arraySet::calcSamples forAll(sampleCoords, sampleI) { - label cellI = queryMesh.findCell(sampleCoords[sampleI]); + label celli = queryMesh.findCell(sampleCoords[sampleI]); - if (cellI != -1) + if (celli != -1) { samplingPts.append(sampleCoords[sampleI]); - samplingCells.append(cellI); + samplingCells.append(celli); samplingFaces.append(-1); samplingSegments.append(0); samplingCurveDist.append(1.0 * sampleI); diff --git a/src/sampling/sampledSet/circle/circleSet.C b/src/sampling/sampledSet/circle/circleSet.C index cc525f28058b9642f025578b73c1aadf128a97a5..fee319e5dbcc17bec5eeab0ab403dcb42375ae45 100644 --- a/src/sampling/sampledSet/circle/circleSet.C +++ b/src/sampling/sampledSet/circle/circleSet.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 @@ -65,11 +65,11 @@ void Foam::circleSet::calcSamples ); // set start point - label cellI = searchEngine().findCell(startPoint_); - if (cellI != -1) + label celli = searchEngine().findCell(startPoint_); + if (celli != -1) { samplingPts.append(startPoint_); - samplingCells.append(cellI); + samplingCells.append(celli); samplingFaces.append(-1); samplingSegments.append(0); samplingCurveDist.append(0.0); @@ -110,12 +110,12 @@ void Foam::circleSet::calcSamples axis1 /= mag(axis1); point pt = origin_ + radius*axis1; - label cellI = searchEngine().findCell(pt); + label celli = searchEngine().findCell(pt); - if (cellI != -1) + if (celli != -1) { samplingPts.append(pt); - samplingCells.append(cellI); + samplingCells.append(celli); samplingFaces.append(-1); samplingSegments.append(nPoint); samplingCurveDist.append diff --git a/src/sampling/sampledSet/cloud/cloudSet.C b/src/sampling/sampledSet/cloud/cloudSet.C index 9101338e443847de89c8b4971f6c1427735376cd..43d7f11fe70a646bd66b48a06b0014b67e3e0f31 100644 --- a/src/sampling/sampledSet/cloud/cloudSet.C +++ b/src/sampling/sampledSet/cloud/cloudSet.C @@ -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 @@ -55,12 +55,12 @@ void Foam::cloudSet::calcSamples forAll(sampleCoords_, sampleI) { - label cellI = queryMesh.findCell(sampleCoords_[sampleI]); + label celli = queryMesh.findCell(sampleCoords_[sampleI]); - if (cellI != -1) + if (celli != -1) { samplingPts.append(sampleCoords_[sampleI]); - samplingCells.append(cellI); + samplingCells.append(celli); samplingFaces.append(-1); samplingSegments.append(0); samplingCurveDist.append(1.0 * sampleI); diff --git a/src/sampling/sampledSet/patchCloud/patchCloudSet.C b/src/sampling/sampledSet/patchCloud/patchCloudSet.C index f955769ca3ba6350044dc2d331553f4107d276da..93b1f9c6d0ac0c698ce80b25f9a78a53ccaf8614 100644 --- a/src/sampling/sampledSet/patchCloud/patchCloudSet.C +++ b/src/sampling/sampledSet/patchCloud/patchCloudSet.C @@ -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 @@ -201,11 +201,11 @@ void Foam::patchCloudSet::calcSamples { if (nearest[sampleI].second().second() == Pstream::myProcNo()) { - label faceI = nearInfo.index(); + label facei = nearInfo.index(); samplingPts.append(nearInfo.hitPoint()); - samplingCells.append(mesh().faceOwner()[faceI]); - samplingFaces.append(faceI); + samplingCells.append(mesh().faceOwner()[facei]); + samplingFaces.append(facei); samplingSegments.append(0); samplingCurveDist.append(1.0 * sampleI); } diff --git a/src/sampling/sampledSet/patchSeed/patchSeedSet.C b/src/sampling/sampledSet/patchSeed/patchSeedSet.C index 3560fe42046778b9e36d572a8c59bdd432d9ce36..6cf3e575aca501fc86d29370ec12eea9e0442f4e 100644 --- a/src/sampling/sampledSet/patchSeed/patchSeedSet.C +++ b/src/sampling/sampledSet/patchSeed/patchSeedSet.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 @@ -134,19 +134,19 @@ void Foam::patchSeedSet::calcSamples forAll(patchFaces, i) { - label faceI = patchFaces[i]; + label facei = patchFaces[i]; pointIndexHit info = mappedPatchBase::facePoint ( mesh(), - faceI, + facei, polyMesh::FACE_DIAG_TRIS ); - label cellI = mesh().faceOwner()[faceI]; + label celli = mesh().faceOwner()[facei]; if (info.hit()) { // Move the point into the cell - const point& cc = mesh().cellCentres()[cellI]; + const point& cc = mesh().cellCentres()[celli]; samplingPts.append ( info.hitPoint() + 1e-1*(cc-info.hitPoint()) @@ -156,8 +156,8 @@ void Foam::patchSeedSet::calcSamples { samplingPts.append(info.rawPoint()); } - samplingCells.append(cellI); - samplingFaces.append(faceI); + samplingCells.append(celli); + samplingFaces.append(facei); samplingSegments.append(0); samplingCurveDist.append(globalSampleNumbers.toGlobal(i)); } diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.C b/src/sampling/sampledSet/sampledSet/sampledSet.C index 6930bdcb8003cd4c8986ce61aa1dbd6e01baf7a2..a7b367e0c01f127a9e47fb7dac65641f12c94c7f 100644 --- a/src/sampling/sampledSet/sampledSet/sampledSet.C +++ b/src/sampling/sampledSet/sampledSet/sampledSet.C @@ -41,21 +41,21 @@ namespace Foam // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -Foam::label Foam::sampledSet::getBoundaryCell(const label faceI) const +Foam::label Foam::sampledSet::getBoundaryCell(const label facei) const { - return mesh().faceOwner()[faceI]; + return mesh().faceOwner()[facei]; } -Foam::label Foam::sampledSet::getNeighbourCell(const label faceI) const +Foam::label Foam::sampledSet::getNeighbourCell(const label facei) const { - if (faceI >= mesh().nInternalFaces()) + if (facei >= mesh().nInternalFaces()) { - return mesh().faceOwner()[faceI]; + return mesh().faceOwner()[facei]; } else { - return mesh().faceNeighbour()[faceI]; + return mesh().faceNeighbour()[facei]; } } @@ -134,11 +134,11 @@ Foam::label Foam::sampledSet::pointInCell Foam::scalar Foam::sampledSet::calcSign ( - const label faceI, + const label facei, const point& sample ) const { - vector vec = sample - mesh().faceCentres()[faceI]; + vector vec = sample - mesh().faceCentres()[facei]; scalar magVec = mag(vec); @@ -150,7 +150,7 @@ Foam::scalar Foam::sampledSet::calcSign vec /= magVec; - vector n = mesh().faceAreas()[faceI]; + vector n = mesh().faceAreas()[facei]; n /= mag(n) + VSMALL; @@ -160,12 +160,12 @@ Foam::scalar Foam::sampledSet::calcSign Foam::label Foam::sampledSet::findNearFace ( - const label cellI, + const label celli, const point& sample, const scalar smallDist ) const { - const cell& myFaces = mesh().cells()[cellI]; + const cell& myFaces = mesh().cells()[celli]; forAll(myFaces, myFaceI) { @@ -196,18 +196,18 @@ Foam::label Foam::sampledSet::findNearFace Foam::point Foam::sampledSet::pushIn ( const point& facePt, - const label faceI + const label facei ) const { - label cellI = mesh().faceOwner()[faceI]; - const point& cC = mesh().cellCentres()[cellI]; + label celli = mesh().faceOwner()[facei]; + const point& cC = mesh().cellCentres()[celli]; point newPosition = facePt; // Taken from particle::initCellFacePt() label tetFaceI; label tetPtI; - mesh().findTetFacePt(cellI, facePt, tetFaceI, tetPtI); + mesh().findTetFacePt(celli, facePt, tetFaceI, tetPtI); if (tetFaceI == -1 || tetPtI == -1) { @@ -223,7 +223,7 @@ Foam::point Foam::sampledSet::pushIn mesh().findTetFacePt ( - cellI, + celli, newPosition, tetFaceI, tetPtI @@ -238,9 +238,9 @@ Foam::point Foam::sampledSet::pushIn { FatalErrorInFunction << "After pushing " << facePt << " to " << newPosition - << " it is still outside face " << faceI - << " at " << mesh().faceCentres()[faceI] - << " of cell " << cellI + << " it is still outside face " << facei + << " at " << mesh().faceCentres()[facei] + << " of cell " << celli << " at " << cC << endl << "Please change your starting point" << abort(FatalError); @@ -478,7 +478,7 @@ Foam::Ostream& Foam::sampledSet::write(Ostream& os) const { coordSet::write(os); - os << endl << "\t(cellI)\t(faceI)" << endl; + os << endl << "\t(celli)\t(facei)" << endl; forAll(*this, sampleI) { diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.H b/src/sampling/sampledSet/sampledSet/sampledSet.H index 9b3eee907240d281832a5d40c624ef14de1c86e3..566ac019f40cd1e0730da2af3f9f63fb203f3145 100644 --- a/src/sampling/sampledSet/sampledSet/sampledSet.H +++ b/src/sampling/sampledSet/sampledSet/sampledSet.H @@ -101,21 +101,21 @@ protected: //- Calculates inproduct of face normal and vector sample-face centre // <0 if sample inside. - scalar calcSign(const label faceI, const point& sample) const; + scalar calcSign(const label facei, const point& sample) const; //- Returns face label (or -1) of face which is close to sample label findNearFace ( - const label cellI, + const label celli, const point& sample, const scalar smallDist ) const; - //- Moves sample in direction of -n to it is 'inside' of faceI + //- Moves sample in direction of -n to it is 'inside' of facei point pushIn ( const point& sample, - const label faceI + const label facei ) const; //- Calculates start of tracking given samplePt and first boundary diff --git a/src/sampling/sampledSet/sampledSets/sampledSetsTemplates.C b/src/sampling/sampledSet/sampledSets/sampledSetsTemplates.C index a2a51a3d64328154396cdb3c7e2fb6f8e8d84a14..ca90f4996f5776e7a25ca53495b92ecdbfd09630 100644 --- a/src/sampling/sampledSet/sampledSets/sampledSetsTemplates.C +++ b/src/sampling/sampledSet/sampledSets/sampledSetsTemplates.C @@ -54,10 +54,10 @@ Foam::sampledSets::volFieldSampler<Type>::volFieldSampler forAll(samples, sampleI) { const point& samplePt = samples[sampleI]; - label cellI = samples.cells()[sampleI]; - label faceI = samples.faces()[sampleI]; + label celli = samples.cells()[sampleI]; + label facei = samples.faces()[sampleI]; - if (cellI == -1 && faceI == -1) + if (celli == -1 && facei == -1) { // Special condition for illegal sampling points values[sampleI] = pTraits<Type>::max; @@ -67,8 +67,8 @@ Foam::sampledSets::volFieldSampler<Type>::volFieldSampler values[sampleI] = interpolator().interpolate ( samplePt, - cellI, - faceI + celli, + facei ); } } @@ -94,15 +94,15 @@ Foam::sampledSets::volFieldSampler<Type>::volFieldSampler values.setSize(samples.size()); forAll(samples, sampleI) { - label cellI = samples.cells()[sampleI]; + label celli = samples.cells()[sampleI]; - if (cellI ==-1) + if (celli ==-1) { values[sampleI] = pTraits<Type>::max; } else { - values[sampleI] = field[cellI]; + values[sampleI] = field[celli]; } } } diff --git a/src/sampling/sampledSet/triSurfaceMeshPointSet/triSurfaceMeshPointSet.C b/src/sampling/sampledSet/triSurfaceMeshPointSet/triSurfaceMeshPointSet.C index c4e4773376a0027df0c9d67184074c62f166e126..fe6643cd9e54231360325cb7c7f9578ca16bf9af 100644 --- a/src/sampling/sampledSet/triSurfaceMeshPointSet/triSurfaceMeshPointSet.C +++ b/src/sampling/sampledSet/triSurfaceMeshPointSet/triSurfaceMeshPointSet.C @@ -53,12 +53,12 @@ void Foam::triSurfaceMeshPointSet::calcSamples { forAll(sampleCoords_, sampleI) { - label cellI = searchEngine().findCell(sampleCoords_[sampleI]); + label celli = searchEngine().findCell(sampleCoords_[sampleI]); - if (cellI != -1) + if (celli != -1) { samplingPts.append(sampleCoords_[sampleI]); - samplingCells.append(cellI); + samplingCells.append(celli); samplingFaces.append(-1); samplingSegments.append(0); samplingCurveDist.append(1.0 * sampleI); diff --git a/src/sampling/sampledSurface/isoSurface/isoSurface.C b/src/sampling/sampledSurface/isoSurface/isoSurface.C index e698b3c8c97f9b4e03cbc7c382bf674756f9eb76..57b3720ca31a2753d6352c65aad2b56639a14dfb 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurface.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurface.C @@ -116,17 +116,17 @@ void Foam::isoSurface::syncUnseparatedPoints if (Pstream::parRun()) { // Send - forAll(patches, patchI) + forAll(patches, patchi) { if ( - isA<processorPolyPatch>(patches[patchI]) - && patches[patchI].nPoints() > 0 - && collocatedPatch(patches[patchI]) + isA<processorPolyPatch>(patches[patchi]) + && patches[patchi].nPoints() > 0 + && collocatedPatch(patches[patchi]) ) { const processorPolyPatch& pp = - refCast<const processorPolyPatch>(patches[patchI]); + refCast<const processorPolyPatch>(patches[patchi]); const labelList& meshPts = pp.meshPoints(); const labelList& nbrPts = pp.neighbPoints(); @@ -146,17 +146,17 @@ void Foam::isoSurface::syncUnseparatedPoints // Receive and combine. - forAll(patches, patchI) + forAll(patches, patchi) { if ( - isA<processorPolyPatch>(patches[patchI]) - && patches[patchI].nPoints() > 0 - && collocatedPatch(patches[patchI]) + isA<processorPolyPatch>(patches[patchi]) + && patches[patchi].nPoints() > 0 + && collocatedPatch(patches[patchi]) ) { const processorPolyPatch& pp = - refCast<const processorPolyPatch>(patches[patchI]); + refCast<const processorPolyPatch>(patches[patchi]); pointField nbrPatchInfo(pp.nPoints()); { @@ -182,12 +182,12 @@ void Foam::isoSurface::syncUnseparatedPoints } // Do the cyclics. - forAll(patches, patchI) + forAll(patches, patchi) { - if (isA<cyclicPolyPatch>(patches[patchI])) + if (isA<cyclicPolyPatch>(patches[patchi])) { const cyclicPolyPatch& cycPatch = - refCast<const cyclicPolyPatch>(patches[patchI]); + refCast<const cyclicPolyPatch>(patches[patchi]); if (cycPatch.owner() && collocatedPatch(cycPatch)) { @@ -300,8 +300,8 @@ void Foam::isoSurface::getNeighbour const labelList& boundaryRegion, const volVectorField& meshC, const volScalarField& cVals, - const label cellI, - const label faceI, + const label celli, + const label facei, scalar& nbrValue, point& nbrPoint ) const @@ -309,21 +309,21 @@ void Foam::isoSurface::getNeighbour const labelList& own = mesh_.faceOwner(); const labelList& nei = mesh_.faceNeighbour(); - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nbr = (own[faceI] == cellI ? nei[faceI] : own[faceI]); + label nbr = (own[facei] == celli ? nei[facei] : own[facei]); nbrValue = cVals[nbr]; nbrPoint = meshC[nbr]; } else { - label bFaceI = faceI-mesh_.nInternalFaces(); - label patchI = boundaryRegion[bFaceI]; - const polyPatch& pp = mesh_.boundaryMesh()[patchI]; - label patchFaceI = faceI-pp.start(); + label bFaceI = facei-mesh_.nInternalFaces(); + label patchi = boundaryRegion[bFaceI]; + const polyPatch& pp = mesh_.boundaryMesh()[patchi]; + 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]; } } @@ -343,10 +343,10 @@ void Foam::isoSurface::calcCutTypes faceCutType_.setSize(mesh_.nFaces()); faceCutType_ = NOTCUT; - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { // CC edge. - bool ownLower = (cVals[own[faceI]] < iso_); + bool ownLower = (cVals[own[facei]] < iso_); scalar nbrValue; point nbrPoint; @@ -355,8 +355,8 @@ void Foam::isoSurface::calcCutTypes boundaryRegion, meshC, cVals, - own[faceI], - faceI, + own[facei], + facei, nbrValue, nbrPoint ); @@ -365,30 +365,30 @@ void Foam::isoSurface::calcCutTypes if (ownLower != neiLower) { - faceCutType_[faceI] = CUT; + faceCutType_[facei] = CUT; } else { // See if any mesh edge is cut by looping over all the edges of the // face. - const face f = mesh_.faces()[faceI]; + const face f = mesh_.faces()[facei]; if (isEdgeOfFaceCut(pVals, f, ownLower, neiLower)) { - faceCutType_[faceI] = CUT; + faceCutType_[facei] = CUT; } } } - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - bool ownLower = (cVals[own[faceI]] < iso_); + bool ownLower = (cVals[own[facei]] < iso_); scalar nbrValue; point nbrPoint; @@ -397,8 +397,8 @@ void Foam::isoSurface::calcCutTypes boundaryRegion, meshC, cVals, - own[faceI], - faceI, + own[facei], + facei, nbrValue, nbrPoint ); @@ -407,20 +407,20 @@ void Foam::isoSurface::calcCutTypes if (ownLower != neiLower) { - faceCutType_[faceI] = CUT; + faceCutType_[facei] = CUT; } else { // Mesh edge. - const face f = mesh_.faces()[faceI]; + const face f = mesh_.faces()[facei]; if (isEdgeOfFaceCut(pVals, f, ownLower, neiLower)) { - faceCutType_[faceI] = CUT; + faceCutType_[facei] = CUT; } } - faceI++; + facei++; } } @@ -430,29 +430,29 @@ void Foam::isoSurface::calcCutTypes cellCutType_.setSize(mesh_.nCells()); cellCutType_ = NOTCUT; - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - if (faceCutType_[faceI] != NOTCUT) + if (faceCutType_[facei] != NOTCUT) { - if (cellCutType_[own[faceI]] == NOTCUT) + if (cellCutType_[own[facei]] == NOTCUT) { - cellCutType_[own[faceI]] = CUT; + cellCutType_[own[facei]] = CUT; nCutCells_++; } - if (cellCutType_[nei[faceI]] == NOTCUT) + if (cellCutType_[nei[facei]] == NOTCUT) { - cellCutType_[nei[faceI]] = CUT; + cellCutType_[nei[facei]] = CUT; nCutCells_++; } } } - for (label faceI = mesh_.nInternalFaces(); faceI < mesh_.nFaces(); faceI++) + for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++) { - if (faceCutType_[faceI] != NOTCUT) + if (faceCutType_[facei] != NOTCUT) { - if (cellCutType_[own[faceI]] == NOTCUT) + if (cellCutType_[own[facei]] == NOTCUT) { - cellCutType_[own[faceI]] = CUT; + cellCutType_[own[facei]] = CUT; nCutCells_++; } } @@ -500,13 +500,13 @@ void Foam::isoSurface::calcSnappedCc // Work arrays DynamicList<point, 64> localTriPoints(64); - forAll(mesh_.cells(), cellI) + forAll(mesh_.cells(), celli) { - if (cellCutType_[cellI] == CUT) + if (cellCutType_[celli] == CUT) { - scalar cVal = cVals[cellI]; + scalar cVal = cVals[celli]; - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; localTriPoints.clear(); label nOther = 0; @@ -517,7 +517,7 @@ void Foam::isoSurface::calcSnappedCc forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; + label facei = cFaces[cFaceI]; scalar nbrValue; point nbrPoint; @@ -526,8 +526,8 @@ void Foam::isoSurface::calcSnappedCc boundaryRegion, meshC, cVals, - cellI, - faceI, + celli, + facei, nbrValue, nbrPoint ); @@ -538,7 +538,7 @@ void Foam::isoSurface::calcSnappedCc // From cc to neighbour cc. s[2] = isoFraction(cVal, nbrValue); - pt[2] = (1.0-s[2])*cc[cellI] + s[2]*nbrPoint; + pt[2] = (1.0-s[2])*cc[celli] + s[2]*nbrPoint; const face& f = mesh_.faces()[cFaces[cFaceI]]; @@ -547,12 +547,12 @@ void Foam::isoSurface::calcSnappedCc // From cc to fp label p0 = f[fp]; s[0] = isoFraction(cVal, pVals[p0]); - pt[0] = (1.0-s[0])*cc[cellI] + s[0]*pts[p0]; + pt[0] = (1.0-s[0])*cc[celli] + s[0]*pts[p0]; // From cc to fp+1 label p1 = f[f.fcIndex(fp)]; s[1] = isoFraction(cVal, pVals[p1]); - pt[1] = (1.0-s[1])*cc[cellI] + s[1]*pts[p1]; + pt[1] = (1.0-s[1])*cc[celli] + s[1]*pts[p1]; if ( @@ -586,7 +586,7 @@ void Foam::isoSurface::calcSnappedCc // points. if (nOther > 0) { - snappedCc[cellI] = snappedPoints.size(); + snappedCc[celli] = snappedPoints.size(); snappedPoints.append(otherPointSum/nOther); //Pout<< " point:" << pointI @@ -599,7 +599,7 @@ void Foam::isoSurface::calcSnappedCc // Single triangle. No need for any analysis. Average points. pointField points; points.transfer(localTriPoints); - snappedCc[cellI] = snappedPoints.size(); + snappedCc[celli] = snappedPoints.size(); snappedPoints.append(sum(points)/points.size()); //Pout<< " point:" << pointI @@ -633,7 +633,7 @@ void Foam::isoSurface::calcSnappedCc if (nZones == 1) { - snappedCc[cellI] = snappedPoints.size(); + snappedCc[celli] = snappedPoints.size(); snappedPoints.append(calcCentre(surf)); //Pout<< " point:" << pointI << " nZones:" << nZones // << " replacing coord:" << mesh_.points()[pointI] @@ -679,9 +679,9 @@ void Foam::isoSurface::calcSnappedPoint forAll(pFaces, i) { - label faceI = pFaces[i]; + label facei = pFaces[i]; - if (faceCutType_[faceI] == CUT) + if (faceCutType_[facei] == CUT) { anyCut = true; break; @@ -703,9 +703,9 @@ void Foam::isoSurface::calcSnappedPoint // Create points for all intersections close to point // (i.e. from pyramid edges) - label faceI = pFaces[pFaceI]; - const face& f = mesh_.faces()[faceI]; - label own = mesh_.faceOwner()[faceI]; + label facei = pFaces[pFaceI]; + const face& f = mesh_.faces()[facei]; + label own = mesh_.faceOwner()[facei]; // Get neighbour value scalar nbrValue; @@ -716,7 +716,7 @@ void Foam::isoSurface::calcSnappedPoint meshC, cVals, own, - faceI, + facei, nbrValue, nbrPoint ); @@ -982,16 +982,16 @@ Foam::triSurface Foam::isoSurface::stitchTriPoints { triSurface surf(tris, geometricSurfacePatchList(0), newPoints); - forAll(surf, faceI) + forAll(surf, facei) { - const labelledTri& f = surf[faceI]; - const labelList& fFaces = surf.faceFaces()[faceI]; + const labelledTri& f = surf[facei]; + const labelList& fFaces = surf.faceFaces()[facei]; forAll(fFaces, i) { label nbrFaceI = fFaces[i]; - if (nbrFaceI <= faceI) + if (nbrFaceI <= facei) { // lower numbered faces already checked continue; @@ -1003,7 +1003,7 @@ Foam::triSurface Foam::isoSurface::stitchTriPoints { FatalErrorInFunction << "Check : " - << " triangle " << faceI << " vertices " << f + << " triangle " << facei << " vertices " << f << " fc:" << f.centre(surf.points()) << " has the same vertices as triangle " << nbrFaceI << " vertices " << nbrF @@ -1019,11 +1019,11 @@ Foam::triSurface Foam::isoSurface::stitchTriPoints } -bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI) +bool Foam::isoSurface::validTri(const triSurface& surf, const label facei) { // Simple check on indices ok. - const labelledTri& f = surf[faceI]; + const labelledTri& f = surf[facei]; if ( @@ -1033,7 +1033,7 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI) ) { WarningInFunction - << "triangle " << faceI << " vertices " << f + << "triangle " << facei << " vertices " << f << " uses point indices outside point range 0.." << surf.points().size()-1 << endl; @@ -1043,7 +1043,7 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI) if ((f[0] == f[1]) || (f[0] == f[2]) || (f[1] == f[2])) { WarningInFunction - << "triangle " << faceI + << "triangle " << facei << " uses non-unique vertices " << f << endl; return false; @@ -1051,7 +1051,7 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI) // duplicate triangle check - const labelList& fFaces = surf.faceFaces()[faceI]; + const labelList& fFaces = surf.faceFaces()[facei]; // Check if faceNeighbours use same points as this face. // Note: discards normal information - sides of baffle are merged. @@ -1059,7 +1059,7 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI) { label nbrFaceI = fFaces[i]; - if (nbrFaceI <= faceI) + if (nbrFaceI <= facei) { // lower numbered faces already checked continue; @@ -1075,7 +1075,7 @@ bool Foam::isoSurface::validTri(const triSurface& surf, const label faceI) ) { WarningInFunction - << "triangle " << faceI << " vertices " << f + << "triangle " << facei << " vertices " << f << " fc:" << f.centre(surf.points()) << " has the same vertices as triangle " << nbrFaceI << " vertices " << nbrF @@ -1227,16 +1227,16 @@ Foam::isoSurface::isoSurface mesh_.cellCentres(), mesh_.faceCentres() ); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; // Adapt separated coupled (proc and cyclic) patches if (pp.coupled()) { fvPatchVectorField& pfld = const_cast<fvPatchVectorField&> ( - meshC.boundaryField()[patchI] + meshC.boundaryField()[patchi] ); PackedBoolList isCollocated @@ -1259,21 +1259,21 @@ Foam::isoSurface::isoSurface bType& bfld = const_cast<bType&>(meshC.boundaryField()); // Clear old value. Cannot resize it since is a slice. - bfld.set(patchI, NULL); + bfld.set(patchi, NULL); // Set new value we can change bfld.set ( - patchI, + patchi, new calculatedFvPatchField<vector> ( - mesh_.boundary()[patchI], + mesh_.boundary()[patchi], meshC ) ); // Change to face centres - bfld[patchI] = pp.patchSlice(mesh_.faceCentres()); + bfld[patchi] = pp.patchSlice(mesh_.faceCentres()); } } @@ -1282,16 +1282,16 @@ Foam::isoSurface::isoSurface // Pre-calculate patch-per-face to avoid whichPatch call. labelList boundaryRegion(mesh_.nFaces()-mesh_.nInternalFaces()); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - boundaryRegion[faceI-mesh_.nInternalFaces()] = patchI; - faceI++; + boundaryRegion[facei-mesh_.nInternalFaces()] = patchi; + facei++; } } @@ -1342,17 +1342,17 @@ Foam::isoSurface::isoSurface // Determine if point is on boundary. PackedBoolList isBoundaryPoint(mesh_.nPoints()); - forAll(patches, patchI) + forAll(patches, patchi) { // Mark all boundary points that are not physically coupled // (so anything but collocated coupled patches) - if (patches[patchI].coupled()) + if (patches[patchi].coupled()) { const coupledPolyPatch& cpp = refCast<const coupledPolyPatch> ( - patches[patchI] + patches[patchi] ); PackedBoolList isCollocated(collocatedFaces(cpp)); @@ -1372,7 +1372,7 @@ Foam::isoSurface::isoSurface } else { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; forAll(pp, i) { diff --git a/src/sampling/sampledSurface/isoSurface/isoSurface.H b/src/sampling/sampledSurface/isoSurface/isoSurface.H index 1493c2ccf9454a589dac24ce3f3e2a9d39f3d466..7018195ec0d00be02fd695ad1da8d2751caf10c5 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurface.H +++ b/src/sampling/sampledSurface/isoSurface/isoSurface.H @@ -179,8 +179,8 @@ class isoSurface const labelList& boundaryRegion, const volVectorField& meshC, const volScalarField& cVals, - const label cellI, - const label faceI, + const label celli, + const label facei, scalar& nbrValue, point& nbrPoint ) const; @@ -288,7 +288,7 @@ class isoSurface const DynamicList<Type>& snappedPoints, const labelList& snappedCc, const labelList& snappedPoint, - const label faceI, + const label facei, const scalar neiVal, const Type& neiPt, diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C index e4b03e09fae2f61bc51b6f6e6ed09a2ebb270d64..d2bc06954973212ba3b3227c329073cd01617962 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.C @@ -79,12 +79,12 @@ Foam::isoSurfaceCell::cellCutType Foam::isoSurfaceCell::calcCutType const PackedBoolList& isTet, const scalarField& cellValues, const scalarField& pointValues, - const label cellI + const label celli ) const { - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; - if (isTet.get(cellI) == 1) + if (isTet.get(celli) == 1) { forAll(cFaces, cFaceI) { @@ -104,15 +104,15 @@ Foam::isoSurfaceCell::cellCutType Foam::isoSurfaceCell::calcCutType } else { - bool cellLower = (cellValues[cellI] < iso_); + bool cellLower = (cellValues[celli] < iso_); // First check if there is any cut in cell bool edgeCut = false; forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; - const face& f = mesh_.faces()[faceI]; + label facei = cFaces[cFaceI]; + const face& f = mesh_.faces()[facei]; // Check pyramids cut forAll(f, fp) @@ -129,7 +129,7 @@ Foam::isoSurfaceCell::cellCutType Foam::isoSurfaceCell::calcCutType break; } - const label fp0 = mesh_.tetBasePtIs()[faceI]; + const label fp0 = mesh_.tetBasePtIs()[facei]; label fp = f.fcIndex(fp0); for (label i = 2; i < f.size(); i++) { @@ -156,7 +156,7 @@ Foam::isoSurfaceCell::cellCutType Foam::isoSurfaceCell::calcCutType // Note: not needed if you don't want to preserve maxima/minima // centred around cellcentre. In that case just always return CUT - const labelList& cPoints = mesh_.cellPoints(cellI); + const labelList& cPoints = mesh_.cellPoints(celli); label nPyrCuts = 0; @@ -194,11 +194,11 @@ void Foam::isoSurfaceCell::calcCutTypes { cellCutType_.setSize(mesh_.nCells()); nCutCells_ = 0; - forAll(mesh_.cells(), cellI) + forAll(mesh_.cells(), celli) { - cellCutType_[cellI] = calcCutType(isTet, cVals, pVals, cellI); + cellCutType_[celli] = calcCutType(isTet, cVals, pVals, celli); - if (cellCutType_[cellI] == CUT) + if (cellCutType_[celli] == CUT) { nCutCells_++; } @@ -262,7 +262,7 @@ Foam::point Foam::isoSurfaceCell::calcCentre(const triSurface& s) Foam::pointIndexHit Foam::isoSurfaceCell::collapseSurface ( - const label cellI, + const label celli, pointField& localPoints, DynamicList<labelledTri, 64>& localTris ) const @@ -374,13 +374,13 @@ void Foam::isoSurfaceCell::calcSnappedCc DynamicList<labelledTri, 64> localTris(64); Map<label> pointToLocal(64); - forAll(mesh_.cells(), cellI) + forAll(mesh_.cells(), celli) { - if (cellCutType_[cellI] == CUT && isTet.get(cellI) == 0) + if (cellCutType_[celli] == CUT && isTet.get(celli) == 0) { - scalar cVal = cVals[cellI]; + scalar cVal = cVals[celli]; - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; localPoints.clear(); localTris.clear(); @@ -403,7 +403,7 @@ void Foam::isoSurfaceCell::calcSnappedCc { if (pointToLocal.insert(pointI, localPoints.size())) { - localPoints.append((1.0-s)*cc[cellI]+s*pts[pointI]); + localPoints.append((1.0-s)*cc[celli]+s*pts[pointI]); } } } @@ -412,40 +412,40 @@ void Foam::isoSurfaceCell::calcSnappedCc if (localPoints.size() == 1) { // No need for any analysis. - snappedCc[cellI] = snappedPoints.size(); + snappedCc[celli] = snappedPoints.size(); snappedPoints.append(localPoints[0]); - //Pout<< "cell:" << cellI - // << " at " << mesh_.cellCentres()[cellI] + //Pout<< "cell:" << celli + // << " at " << mesh_.cellCentres()[celli] // << " collapsing " << localPoints // << " intersections down to " - // << snappedPoints[snappedCc[cellI]] << endl; + // << snappedPoints[snappedCc[celli]] << endl; } else if (localPoints.size() == 2) { //? No need for any analysis.??? - snappedCc[cellI] = snappedPoints.size(); + snappedCc[celli] = snappedPoints.size(); snappedPoints.append(0.5*(localPoints[0]+localPoints[1])); - //Pout<< "cell:" << cellI - // << " at " << mesh_.cellCentres()[cellI] + //Pout<< "cell:" << celli + // << " at " << mesh_.cellCentres()[celli] // << " collapsing " << localPoints // << " intersections down to " - // << snappedPoints[snappedCc[cellI]] << endl; + // << snappedPoints[snappedCc[celli]] << endl; } else if (localPoints.size()) { // Need to analyse forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; - const face& f = mesh_.faces()[faceI]; + label facei = cFaces[cFaceI]; + const face& f = mesh_.faces()[facei]; // Do a tetrahedralisation. Each face to cc becomes pyr. // Each pyr gets split into tets by diagonalisation // of face. - const label fp0 = mesh_.tetBasePtIs()[faceI]; + const label fp0 = mesh_.tetBasePtIs()[facei]; label fp = f.fcIndex(fp0); for (label i = 2; i < f.size(); i++) { @@ -467,7 +467,7 @@ void Foam::isoSurfaceCell::calcSnappedCc { if ( - (mesh_.faceOwner()[faceI] == cellI) + (mesh_.faceOwner()[facei] == celli) == (cVal >= pVals[tri[0]]) ) { @@ -505,21 +505,21 @@ void Foam::isoSurfaceCell::calcSnappedCc surfPoints.transfer(localPoints); pointIndexHit info = collapseSurface ( - cellI, + celli, surfPoints, localTris ); if (info.hit()) { - snappedCc[cellI] = snappedPoints.size(); + snappedCc[celli] = snappedPoints.size(); snappedPoints.append(info.hitPoint()); - //Pout<< "cell:" << cellI - // << " at " << mesh_.cellCentres()[cellI] + //Pout<< "cell:" << celli + // << " at " << mesh_.cellCentres()[celli] // << " collapsing " << surfPoints // << " intersections down to " - // << snappedPoints[snappedCc[cellI]] << endl; + // << snappedPoints[snappedCc[celli]] << endl; } } } @@ -532,16 +532,16 @@ void Foam::isoSurfaceCell::genPointTris const scalarField& cellValues, const scalarField& pointValues, const label pointI, - const label faceI, - const label cellI, + const label facei, + const label celli, DynamicList<point, 64>& localTriPoints ) const { const pointField& cc = mesh_.cellCentres(); const pointField& pts = mesh_.points(); - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; - const label fp0 = mesh_.tetBasePtIs()[faceI]; + const label fp0 = mesh_.tetBasePtIs()[facei]; label fp = f.fcIndex(fp0); for (label i = 2; i < f.size(); i++) { @@ -563,7 +563,7 @@ void Foam::isoSurfaceCell::genPointTris FixedList<scalar, 3> s(3); s[0] = isoFraction(pointValues[pointI], pointValues[b]); s[1] = isoFraction(pointValues[pointI], pointValues[c]); - s[2] = isoFraction(pointValues[pointI], cellValues[cellI]); + s[2] = isoFraction(pointValues[pointI], cellValues[celli]); if ( @@ -574,12 +574,12 @@ void Foam::isoSurfaceCell::genPointTris { point p0 = (1.0-s[0])*pts[pointI] + s[0]*pts[b]; point p1 = (1.0-s[1])*pts[pointI] + s[1]*pts[c]; - point p2 = (1.0-s[2])*pts[pointI] + s[2]*cc[cellI]; + point p2 = (1.0-s[2])*pts[pointI] + s[2]*cc[celli]; if ( - (mesh_.faceOwner()[faceI] == cellI) - == (pointValues[pointI] > cellValues[cellI]) + (mesh_.faceOwner()[facei] == celli) + == (pointValues[pointI] > cellValues[celli]) ) { localTriPoints.append(p0); @@ -603,19 +603,19 @@ void Foam::isoSurfaceCell::genPointTris ( const scalarField& pointValues, const label pointI, - const label faceI, - const label cellI, + const label facei, + const label celli, DynamicList<point, 64>& localTriPoints ) const { const pointField& pts = mesh_.points(); - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; FixedList<label, 4> tet; // Make tet from this face to the 4th point (same as cellcentre in // non-tet cells) - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; // Find 4th point label ccPointI = -1; @@ -664,7 +664,7 @@ void Foam::isoSurfaceCell::genPointTris point p1 = (1.0-s[1])*pts[pointI] + s[1]*pts[c]; point p2 = (1.0-s[2])*pts[pointI] + s[2]*pts[ccPointI]; - if (mesh_.faceOwner()[faceI] != cellI) + if (mesh_.faceOwner()[facei] != celli) { localTriPoints.append(p0); localTriPoints.append(p1); @@ -694,16 +694,16 @@ void Foam::isoSurfaceCell::calcSnappedPoint // snapped. Coupled boundaries are handled explicitly so not marked here. PackedBoolList isBoundaryPoint(mesh_.nPoints()); const polyBoundaryMesh& patches = mesh_.boundaryMesh(); - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (!pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - const face& f = mesh_.faces()[faceI++]; + const face& f = mesh_.faces()[facei++]; forAll(f, fp) { @@ -736,14 +736,14 @@ void Foam::isoSurfaceCell::calcSnappedPoint forAll(pFaces, i) { - label faceI = pFaces[i]; + label facei = pFaces[i]; if ( - cellCutType_[mesh_.faceOwner()[faceI]] == CUT + cellCutType_[mesh_.faceOwner()[facei]] == CUT || ( - mesh_.isInternalFace(faceI) - && cellCutType_[mesh_.faceNeighbour()[faceI]] == CUT + mesh_.isInternalFace(facei) + && cellCutType_[mesh_.faceNeighbour()[facei]] == CUT ) ) { @@ -765,8 +765,8 @@ void Foam::isoSurfaceCell::calcSnappedPoint forAll(pFaces, pFaceI) { - label faceI = pFaces[pFaceI]; - label own = mesh_.faceOwner()[faceI]; + label facei = pFaces[pFaceI]; + label own = mesh_.faceOwner()[facei]; if (isTet.get(own) == 1) { @@ -774,7 +774,7 @@ void Foam::isoSurfaceCell::calcSnappedPoint // we only generate a triangle once per point. if (localPointCells.insert(own)) { - genPointTris(pVals, pointI, faceI, own, localTriPoints); + genPointTris(pVals, pointI, facei, own, localTriPoints); } } else @@ -784,21 +784,21 @@ void Foam::isoSurfaceCell::calcSnappedPoint cVals, pVals, pointI, - faceI, + facei, own, localTriPoints ); } - if (mesh_.isInternalFace(faceI)) + if (mesh_.isInternalFace(facei)) { - label nei = mesh_.faceNeighbour()[faceI]; + label nei = mesh_.faceNeighbour()[facei]; if (isTet.get(nei) == 1) { if (localPointCells.insert(nei)) { - genPointTris(pVals, pointI, faceI, nei, localTriPoints); + genPointTris(pVals, pointI, facei, nei, localTriPoints); } } else @@ -808,7 +808,7 @@ void Foam::isoSurfaceCell::calcSnappedPoint cVals, pVals, pointI, - faceI, + facei, nei, localTriPoints ); @@ -1046,18 +1046,18 @@ Foam::triSurface Foam::isoSurfaceCell::stitchTriPoints } -bool Foam::isoSurfaceCell::validTri(const triSurface& surf, const label faceI) +bool Foam::isoSurfaceCell::validTri(const triSurface& surf, const label facei) { // Simple check on indices ok. - const labelledTri& f = surf[faceI]; + const labelledTri& f = surf[facei]; forAll(f, fp) { if (f[fp] < 0 || f[fp] >= surf.points().size()) { WarningInFunction - << "triangle " << faceI << " vertices " << f + << "triangle " << facei << " vertices " << f << " uses point indices outside point range 0.." << surf.points().size()-1 << endl; @@ -1068,7 +1068,7 @@ bool Foam::isoSurfaceCell::validTri(const triSurface& surf, const label faceI) if ((f[0] == f[1]) || (f[0] == f[2]) || (f[1] == f[2])) { WarningInFunction - << "triangle " << faceI + << "triangle " << facei << " uses non-unique vertices " << f << endl; return false; @@ -1076,7 +1076,7 @@ bool Foam::isoSurfaceCell::validTri(const triSurface& surf, const label faceI) // duplicate triangle check - const labelList& fFaces = surf.faceFaces()[faceI]; + const labelList& fFaces = surf.faceFaces()[facei]; // Check if faceNeighbours use same points as this face. // Note: discards normal information - sides of baffle are merged. @@ -1084,7 +1084,7 @@ bool Foam::isoSurfaceCell::validTri(const triSurface& surf, const label faceI) { label nbrFaceI = fFaces[i]; - if (nbrFaceI <= faceI) + if (nbrFaceI <= facei) { // lower numbered faces already checked continue; @@ -1100,7 +1100,7 @@ bool Foam::isoSurfaceCell::validTri(const triSurface& surf, const label faceI) ) { WarningInFunction - << "triangle " << faceI << " vertices " << f + << "triangle " << facei << " vertices " << f << " coords:" << f.points(surf.points()) << " has the same vertices as triangle " << nbrFaceI << " vertices " << nbrF @@ -1390,11 +1390,11 @@ Foam::isoSurfaceCell::isoSurfaceCell { tetMatcher tet; - forAll(isTet, cellI) + forAll(isTet, celli) { - if (tet.isA(mesh_, cellI)) + if (tet.isA(mesh_, celli)) { - isTet.set(cellI, 1); + isTet.set(celli, 1); } } } diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.H b/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.H index 91de7fc8e3deeb43c2c276e336cccd2169d2fdf0..f871542ce59e9622d740116a175fecb54cecaa16 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.H +++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceCell.H @@ -153,7 +153,7 @@ class isoSurfaceCell // Returns point. Destroys arguments. pointIndexHit collapseSurface ( - const label cellI, + const label celli, pointField& localPoints, DynamicList<labelledTri, 64>& localTris ) const; @@ -175,8 +175,8 @@ class isoSurfaceCell const scalarField& cellValues, const scalarField& pointValues, const label pointI, - const label faceI, - const label cellI, + const label facei, + const label celli, DynamicList<point, 64>& localTriPoints ) const; @@ -185,8 +185,8 @@ class isoSurfaceCell ( const scalarField& pointValues, const label pointI, - const label faceI, - const label cellI, + const label facei, + const label celli, DynamicList<point, 64>& localTriPoints ) const; diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C index ea26461e5efa5e60e086d65cee7da4e342493619..ab4574cd7723430f477d4d05ad6e008e70251ae7 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceCellTemplates.C @@ -338,15 +338,15 @@ void Foam::isoSurfaceCell::generateTriPoints tetMatcher tet; label countNotFoundTets = 0; - forAll(mesh_.cells(), cellI) + forAll(mesh_.cells(), celli) { - if (cellCutType_[cellI] != NOTCUT) + if (cellCutType_[celli] != NOTCUT) { label oldNPoints = triPoints.size(); - const cell& cFaces = mesh_.cells()[cellI]; + const cell& cFaces = mesh_.cells()[celli]; - if (tet.isA(mesh_, cellI)) + if (tet.isA(mesh_, celli)) { // For tets don't do cell-centre decomposition, just use the // tet points and values @@ -368,7 +368,7 @@ void Foam::isoSurfaceCell::generateTriPoints // Start off from positive volume tet to make sure we // generate outwards pointing tets - if (mesh_.faceOwner()[cFaces[0]] == cellI) + if (mesh_.faceOwner()[cFaces[0]] == celli) { generateTriPoints ( @@ -423,10 +423,10 @@ void Foam::isoSurfaceCell::generateTriPoints { forAll(cFaces, cFaceI) { - label faceI = cFaces[cFaceI]; - const face& f = mesh_.faces()[faceI]; + label facei = cFaces[cFaceI]; + const face& f = mesh_.faces()[facei]; - label fp0 = mesh_.tetBasePtIs()[faceI]; + label fp0 = mesh_.tetBasePtIs()[facei]; // Skip undefined tets if (fp0 < 0) @@ -443,7 +443,7 @@ void Foam::isoSurfaceCell::generateTriPoints // Start off from positive volume tet to make sure we // generate outwards pointing tets - if (mesh_.faceOwner()[faceI] == cellI) + if (mesh_.faceOwner()[facei] == celli) { generateTriPoints ( @@ -461,9 +461,9 @@ void Foam::isoSurfaceCell::generateTriPoints pCoords[tri[2]], snappedPoint[tri[2]], - cVals[cellI], - cCoords[cellI], - snappedCc[cellI], + cVals[celli], + cCoords[celli], + snappedCc[celli], triPoints ); @@ -486,9 +486,9 @@ void Foam::isoSurfaceCell::generateTriPoints pCoords[tri[2]], snappedPoint[tri[2]], - cVals[cellI], - cCoords[cellI], - snappedCc[cellI], + cVals[celli], + cCoords[celli], + snappedCc[celli], triPoints ); @@ -504,7 +504,7 @@ void Foam::isoSurfaceCell::generateTriPoints label nCells = (triPoints.size()-oldNPoints)/3; for (label i = 0; i < nCells; i++) { - triMeshCells.append(cellI); + triMeshCells.append(celli); } } } diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C index 4501be80614c6e5b5fc08261a6fd1356947fefca..e2ec9b5f8b0f3628e5085ed0c31ed8368534eb0a 100644 --- a/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C +++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C @@ -441,7 +441,7 @@ Foam::label Foam::isoSurface::generateFaceTriPoints const DynamicList<Type>& snappedPoints, const labelList& snappedCc, const labelList& snappedPoint, - const label faceI, + const label facei, const scalar neiVal, const Type& neiPt, @@ -452,11 +452,11 @@ Foam::label Foam::isoSurface::generateFaceTriPoints DynamicList<label>& triMeshCells ) const { - label own = mesh_.faceOwner()[faceI]; + label own = mesh_.faceOwner()[facei]; label oldNPoints = triPoints.size(); - const face& f = mesh_.faces()[faceI]; + const face& f = mesh_.faces()[facei]; forAll(f, fp) { @@ -562,9 +562,9 @@ void Foam::isoSurface::generateTriPoints triPoints.clear(); triMeshCells.clear(); - for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++) + for (label facei = 0; facei < mesh_.nInternalFaces(); facei++) { - if (faceCutType_[faceI] != NOTCUT) + if (faceCutType_[facei] != NOTCUT) { generateFaceTriPoints ( @@ -577,14 +577,14 @@ void Foam::isoSurface::generateTriPoints snappedPoints, snappedCc, snappedPoint, - faceI, + facei, - cVals[nei[faceI]], - cCoords[nei[faceI]], - snappedCc[nei[faceI]] != -1, + cVals[nei[facei]], + cCoords[nei[facei]], + snappedCc[nei[facei]] != -1, ( - snappedCc[nei[faceI]] != -1 - ? snappedPoints[snappedCc[nei[faceI]]] + snappedCc[nei[facei]] != -1 + ? snappedPoints[snappedCc[nei[facei]]] : Type(Zero) ), @@ -604,18 +604,18 @@ void Foam::isoSurface::generateTriPoints if (pp.coupled()) { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - label bFaceI = faceI-mesh_.nInternalFaces(); - label snappedIndex = snappedCc[own[faceI]]; + label bFaceI = facei-mesh_.nInternalFaces(); + label snappedIndex = snappedCc[own[facei]]; if (snappedIndex != -1) { neiSnapped[bFaceI] = true; neiSnappedPoint[bFaceI] = snappedPoints[snappedIndex]; } - faceI++; + facei++; } } } @@ -637,9 +637,9 @@ void Foam::isoSurface::generateTriPoints forAll(isCollocated, i) { - label faceI = pp.start()+i; + label facei = pp.start()+i; - if (faceCutType_[faceI] != NOTCUT) + if (faceCutType_[facei] != NOTCUT) { if (isCollocated[i]) { @@ -654,12 +654,12 @@ void Foam::isoSurface::generateTriPoints snappedPoints, snappedCc, snappedPoint, - faceI, + facei, cVals.boundaryField()[patchi][i], cCoords.boundaryField()[patchi][i], - neiSnapped[faceI-mesh_.nInternalFaces()], - neiSnappedPoint[faceI-mesh_.nInternalFaces()], + neiSnapped[facei-mesh_.nInternalFaces()], + neiSnappedPoint[facei-mesh_.nInternalFaces()], triPoints, triMeshCells @@ -678,7 +678,7 @@ void Foam::isoSurface::generateTriPoints snappedPoints, snappedCc, snappedPoint, - faceI, + facei, cVals.boundaryField()[patchi][i], cCoords.boundaryField()[patchi][i], @@ -694,11 +694,11 @@ void Foam::isoSurface::generateTriPoints } else { - label faceI = pp.start(); + label facei = pp.start(); forAll(pp, i) { - if (faceCutType_[faceI] != NOTCUT) + if (faceCutType_[facei] != NOTCUT) { generateFaceTriPoints ( @@ -711,7 +711,7 @@ void Foam::isoSurface::generateTriPoints snappedPoints, snappedCc, snappedPoint, - faceI, + facei, cVals.boundaryField()[patchi][i], cCoords.boundaryField()[patchi][i], @@ -722,7 +722,7 @@ void Foam::isoSurface::generateTriPoints triMeshCells ); } - faceI++; + facei++; } } } diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.C index 012dd99842ae796cce36d168afa95ebd7ff858cc..b70a3750b01a87a57da762cc55d44e5076c5e6ee 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.C +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurfaceCell.C @@ -130,16 +130,16 @@ bool Foam::sampledIsoSurfaceCell::updateGeometry() const forAll(pCells, i) { - label cellI = pCells[i]; + label celli = pCells[i]; - cellAvg[cellI] += pointFld().internalField()[pointI]; - nPointCells[cellI]++; + cellAvg[celli] += pointFld().internalField()[pointI]; + nPointCells[celli]++; } } } - forAll(cellAvg, cellI) + forAll(cellAvg, celli) { - cellAvg[cellI] /= nPointCells[cellI]; + cellAvg[celli] /= nPointCells[celli]; } const isoSurfaceCell iso diff --git a/src/sampling/sampledSurface/sampledPatch/sampledPatch.C b/src/sampling/sampledSurface/sampledPatch/sampledPatch.C index 22a3e0490b7dcdec9137362651010295857c42fa..a998102b810e7222939f7860b722aba62f175879 100644 --- a/src/sampling/sampledSurface/sampledPatch/sampledPatch.C +++ b/src/sampling/sampledSurface/sampledPatch/sampledPatch.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 @@ -130,8 +130,8 @@ bool Foam::sampledPatch::update() label sz = 0; forAll(patchIDs(), i) { - label patchI = patchIDs()[i]; - const polyPatch& pp = mesh().boundaryMesh()[patchI]; + label patchi = patchIDs()[i]; + const polyPatch& pp = mesh().boundaryMesh()[patchi]; if (isA<emptyPolyPatch>(pp)) { @@ -154,11 +154,11 @@ bool Foam::sampledPatch::update() forAll(patchIDs(), i) { - label patchI = patchIDs()[i]; + label patchi = patchIDs()[i]; patchStart_[i] = sz; - const polyPatch& pp = mesh().boundaryMesh()[patchI]; + const polyPatch& pp = mesh().boundaryMesh()[patchi]; forAll(pp, j) { diff --git a/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C b/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C index 58bd02fcb0fa29f9608038cc1722c69191ecfe78..15674ed19c0c791532fdfd2695a9228b03daa720 100644 --- a/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C +++ b/src/sampling/sampledSurface/sampledPatch/sampledPatchTemplates.C @@ -39,8 +39,8 @@ Foam::sampledPatch::sampleField Field<Type>& values = tvalues.ref(); forAll(patchFaceLabels_, i) { - label patchI = patchIDs_[patchIndex_[i]]; - const Field<Type>& bField = vField.boundaryField()[patchI]; + label patchi = patchIDs_[patchIndex_[i]]; + const Field<Type>& bField = vField.boundaryField()[patchi]; values[i] = bField[patchFaceLabels_[i]]; } @@ -61,8 +61,8 @@ Foam::sampledPatch::sampleField forAll(patchFaceLabels_, i) { - label patchI = patchIDs_[patchIndex_[i]]; - values[i] = sField.boundaryField()[patchI][patchFaceLabels_[i]]; + label patchi = patchIDs_[patchIndex_[i]]; + values[i] = sField.boundaryField()[patchi][patchFaceLabels_[i]]; } return tvalues; @@ -86,8 +86,8 @@ Foam::sampledPatch::interpolateField forAll(faces(), cutFaceI) { - label patchI = patchIDs_[patchIndex_[cutFaceI]]; - const polyPatch& pp = mesh().boundaryMesh()[patchI]; + label patchi = patchIDs_[patchIndex_[cutFaceI]]; + const polyPatch& pp = mesh().boundaryMesh()[patchi]; label patchFaceI = patchFaceLabels()[cutFaceI]; const face& f = faces()[cutFaceI]; @@ -97,14 +97,14 @@ Foam::sampledPatch::interpolateField if (!pointDone[pointI]) { - label faceI = patchFaceI + pp.start(); - label cellI = own[faceI]; + label facei = patchFaceI + pp.start(); + label celli = own[facei]; values[pointI] = interpolator.interpolate ( points()[pointI], - cellI, - faceI + celli, + facei ); pointDone[pointI] = true; } diff --git a/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalFieldTemplates.C b/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalFieldTemplates.C index 803fa5c6fa21b6e8375d7b4a6b2013de6fc7e523..af9ed2716700ac13b6956cf162eebb0471a08e73 100644 --- a/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalFieldTemplates.C +++ b/src/sampling/sampledSurface/sampledPatchInternalField/sampledPatchInternalFieldTemplates.C @@ -93,14 +93,14 @@ Foam::sampledPatchInternalField::interpolateField Field<Type> patchVals(mesh().nCells()); - forAll(samples, cellI) + forAll(samples, celli) { - if (samples[cellI] != point::max) + if (samples[celli] != point::max) { - patchVals[cellI] = interpolator.interpolate + patchVals[celli] = interpolator.interpolate ( - samples[cellI], - cellI + samples[celli], + celli ); } } diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C index 38c478edc09ef183409670e0e959b1f54d84256d..7d6b4916875eeebdc3de94de395a11bc9f8d79ee 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C @@ -62,9 +62,9 @@ void Foam::sampledSurface::makeSf() const SfPtr_ = new vectorField(theFaces.size()); vectorField& values = *SfPtr_; - forAll(theFaces, faceI) + forAll(theFaces, facei) { - values[faceI] = theFaces[faceI].normal(points()); + values[facei] = theFaces[facei].normal(points()); } } @@ -83,9 +83,9 @@ void Foam::sampledSurface::makeMagSf() const magSfPtr_ = new scalarField(theFaces.size()); scalarField& values = *magSfPtr_; - forAll(theFaces, faceI) + forAll(theFaces, facei) { - values[faceI] = theFaces[faceI].mag(points()); + values[facei] = theFaces[facei].mag(points()); } } @@ -104,9 +104,9 @@ void Foam::sampledSurface::makeCf() const CfPtr_ = new vectorField(theFaces.size()); vectorField& values = *CfPtr_; - forAll(theFaces, faceI) + forAll(theFaces, facei) { - values[faceI] = theFaces[faceI].centre(points()); + values[facei] = theFaces[facei].centre(points()); } } @@ -293,9 +293,9 @@ Foam::sampledSurface::project(const Field<scalar>& field) const tmp<Field<scalar>> tRes(new Field<scalar>(faces().size())); Field<scalar>& res = tRes.ref(); - forAll(faces(), faceI) + forAll(faces(), facei) { - res[faceI] = field[faceI]; + res[facei] = field[facei]; } return tRes; diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C b/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C index 758c3395ed68e62b74fde3cd58f52210253daa93..71aeb1f4579ecaa8a0ceb86ac9919d3f29e2ad3d 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurfaceTemplates.C @@ -114,9 +114,9 @@ void Foam::sampledSurface::project { const vectorField& norm = Sf(); - forAll(norm, faceI) + forAll(norm, facei) { - res[faceI] = field[faceI] & (norm[faceI]/mag(norm[faceI])); + res[facei] = field[facei] & (norm[facei]/mag(norm[facei])); } } else @@ -187,16 +187,16 @@ Foam::sampledSurface::pointAverage forAll(pCells, i) { - label cellI = pCells[i]; + label celli = pCells[i]; - cellAvg[cellI] += pfld[pointI]; - nPointCells[cellI]++; + cellAvg[celli] += pfld[pointI]; + nPointCells[celli]++; } } } - forAll(cellAvg, cellI) + forAll(cellAvg, celli) { - cellAvg[cellI] /= nPointCells[cellI]; + cellAvg[celli] /= nPointCells[celli]; } // Give value to calculatedFvPatchFields cellAvg.correctBoundaryConditions(); diff --git a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C index 094ae45cfcb488323910c412de721701d661b8af..ae4cef7b0cbf79bd2bf83a951f2464d54f65f78c 100644 --- a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.C +++ b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMesh.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,9 +94,9 @@ Foam::sampledTriSurfaceMesh::nonCoupledboundaryTree() const labelList bndFaces(mesh().nFaces()-mesh().nInternalFaces()); label bndI = 0; - forAll(patches, patchI) + forAll(patches, patchi) { - const polyPatch& pp = patches[patchI]; + const polyPatch& pp = patches[patchi]; if (!pp.coupled()) { forAll(pp, i) @@ -274,13 +274,13 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher) label newPointI = 0; label newFaceI = 0; - forAll(s, faceI) + forAll(s, facei) { - if (cellOrFaceLabels[faceI] != -1) + if (cellOrFaceLabels[facei] != -1) { - faceMap[newFaceI++] = faceI; + faceMap[newFaceI++] = facei; - const triSurface::FaceType& f = s[faceI]; + const triSurface::FaceType& f = s[facei]; forAll(f, fp) { if (reversePointMap[f[fp]] == -1) @@ -348,8 +348,8 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher) forAll(points(), pointI) { const point& pt = points()[pointI]; - label cellI = cellOrFaceLabels[pointToFace[pointI]]; - sampleElements_[pointI] = cellI; + label celli = cellOrFaceLabels[pointToFace[pointI]]; + sampleElements_[pointI] = celli; // Check if point inside cell if @@ -367,7 +367,7 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher) else { // Find nearest point on faces of cell - const cell& cFaces = mesh().cells()[cellI]; + const cell& cFaces = mesh().cells()[celli]; scalar minDistSqr = VGREAT; @@ -392,8 +392,8 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher) forAll(points(), pointI) { const point& pt = points()[pointI]; - label cellI = cellOrFaceLabels[pointToFace[pointI]]; - sampleElements_[pointI] = cellI; + label celli = cellOrFaceLabels[pointToFace[pointI]]; + sampleElements_[pointI] = celli; samplePoints_[pointI] = pt; } } @@ -406,9 +406,9 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher) forAll(points(), pointI) { const point& pt = points()[pointI]; - label faceI = cellOrFaceLabels[pointToFace[pointI]]; - sampleElements_[pointI] = faceI; - samplePoints_[pointI] = mesh().faces()[faceI].nearestPoint + label facei = cellOrFaceLabels[pointToFace[pointI]]; + sampleElements_[pointI] = facei; + samplePoints_[pointI] = mesh().faces()[facei].nearestPoint ( pt, mesh().points() @@ -452,8 +452,8 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher) meshTools::writeOBJ(str, samplePoints_[pointI]); vertI++; - label cellI = sampleElements_[pointI]; - meshTools::writeOBJ(str, mesh().cellCentres()[cellI]); + label celli = sampleElements_[pointI]; + meshTools::writeOBJ(str, mesh().cellCentres()[celli]); vertI++; str << "l " << vertI-2 << ' ' << vertI-1 << ' ' << vertI << nl; @@ -469,8 +469,8 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher) meshTools::writeOBJ(str, samplePoints_[pointI]); vertI++; - label faceI = sampleElements_[pointI]; - meshTools::writeOBJ(str, mesh().faceCentres()[faceI]); + label facei = sampleElements_[pointI]; + meshTools::writeOBJ(str, mesh().faceCentres()[facei]); vertI++; str << "l " << vertI-2 << ' ' << vertI-1 << ' ' << vertI << nl; @@ -486,8 +486,8 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher) meshTools::writeOBJ(str, faceCentres()[triI]); vertI++; - label cellI = sampleElements_[triI]; - meshTools::writeOBJ(str, mesh().cellCentres()[cellI]); + label celli = sampleElements_[triI]; + meshTools::writeOBJ(str, mesh().cellCentres()[celli]); vertI++; str << "l " << vertI-1 << ' ' << vertI << nl; } @@ -499,8 +499,8 @@ bool Foam::sampledTriSurfaceMesh::update(const meshSearch& meshSearcher) meshTools::writeOBJ(str, faceCentres()[triI]); vertI++; - label faceI = sampleElements_[triI]; - meshTools::writeOBJ(str, mesh().faceCentres()[faceI]); + label facei = sampleElements_[triI]; + meshTools::writeOBJ(str, mesh().faceCentres()[facei]); vertI++; str << "l " << vertI-1 << ' ' << vertI << nl; } diff --git a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C index e2242536e545eb2c26bae9a5b7fef8e6262b1a2c..baf71065d9eae68cff6079827677d4d03e1fbfdc 100644 --- a/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C +++ b/src/sampling/sampledSurface/sampledTriSurfaceMesh/sampledTriSurfaceMeshTemplates.C @@ -58,24 +58,24 @@ Foam::sampledTriSurfaceMesh::sampleField Field<Type> bVals(nBnd, Zero); - forAll(vField.boundaryField(), patchI) + 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(), + vField.boundaryField()[patchi].size(), bFaceI - ) = vField.boundaryField()[patchI]; + ) = vField.boundaryField()[patchi]; } // Sample in flat boundary field forAll(sampleElements_, triI) { - label faceI = sampleElements_[triI]; - values[triI] = bVals[faceI-mesh().nInternalFaces()]; + label facei = sampleElements_[triI]; + values[triI] = bVals[facei-mesh().nInternalFaces()]; } } @@ -113,13 +113,13 @@ Foam::sampledTriSurfaceMesh::interpolateField forAll(samplePoints_, pointI) { - label faceI = sampleElements_[pointI]; + label facei = sampleElements_[pointI]; values[pointI] = interpolator.interpolate ( samplePoints_[pointI], - mesh().faceOwner()[faceI], - faceI + mesh().faceOwner()[facei], + facei ); } } diff --git a/src/sampling/sampledSurface/thresholdCellFaces/thresholdCellFaces.C b/src/sampling/sampledSurface/thresholdCellFaces/thresholdCellFaces.C index 26b73b3c606bce78a6968dcad2f16970f621ec1c..a1e55e88129c085aca9a4a9b25532e2093adbf2e 100644 --- a/src/sampling/sampledSurface/thresholdCellFaces/thresholdCellFaces.C +++ b/src/sampling/sampledSurface/thresholdCellFaces/thresholdCellFaces.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 @@ -69,14 +69,14 @@ void Foam::thresholdCellFaces::calculate 0 // index ); - forAll(bMesh, patchI) + forAll(bMesh, patchi) { - surfZones[patchI+1] = surfZone + surfZones[patchi+1] = surfZone ( - bMesh[patchI].name(), + bMesh[patchi].name(), 0, // size 0, // start - patchI+1 // index + patchi+1 // index ); } @@ -94,32 +94,32 @@ void Foam::thresholdCellFaces::calculate // internal faces only - for (label faceI = 0; faceI < mesh_.nInternalFaces(); ++faceI) + for (label facei = 0; facei < mesh_.nInternalFaces(); ++facei) { int side = 0; // check lowerThreshold - if (field[own[faceI]] > lowerThreshold) + if (field[own[facei]] > lowerThreshold) { - if (field[nei[faceI]] < lowerThreshold) + if (field[nei[facei]] < lowerThreshold) { side = +1; } } - else if (field[nei[faceI]] > lowerThreshold) + else if (field[nei[facei]] > lowerThreshold) { side = -1; } // check upperThreshold - if (field[own[faceI]] < upperThreshold) + if (field[own[facei]] < upperThreshold) { - if (field[nei[faceI]] > upperThreshold) + if (field[nei[facei]] > upperThreshold) { side = +1; } } - else if (field[nei[faceI]] < upperThreshold) + else if (field[nei[facei]] < upperThreshold) { side = -1; } @@ -127,7 +127,7 @@ void Foam::thresholdCellFaces::calculate if (side) { - const face& f = origFaces[faceI]; + const face& f = origFaces[facei]; forAll(f, fp) { @@ -144,12 +144,12 @@ void Foam::thresholdCellFaces::calculate if (side > 0) { surfFace = f; - cellId = own[faceI]; + cellId = own[facei]; } else { surfFace = f.reverseFace(); - cellId = nei[faceI]; + cellId = nei[facei]; } @@ -173,10 +173,10 @@ void Foam::thresholdCellFaces::calculate // nothing special for processor patches? - forAll(bMesh, patchI) + forAll(bMesh, patchi) { - const polyPatch& p = bMesh[patchI]; - surfZone& zone = surfZones[patchI+1]; + const polyPatch& p = bMesh[patchi]; + surfZone& zone = surfZones[patchi+1]; zone.start() = nFaces; @@ -189,18 +189,18 @@ void Foam::thresholdCellFaces::calculate continue; } - label faceI = p.start(); + label facei = p.start(); // patch faces forAll(p, localFaceI) { if ( - field[own[faceI]] > lowerThreshold - && field[own[faceI]] < upperThreshold + field[own[facei]] > lowerThreshold + && field[own[facei]] < upperThreshold ) { - const face& f = origFaces[faceI]; + const face& f = origFaces[facei]; forAll(f, fp) { if (oldToNewPoints[f[fp]] == -1) @@ -209,7 +209,7 @@ void Foam::thresholdCellFaces::calculate } } - label cellId = own[faceI]; + label cellId = own[facei]; if (triangulate) { @@ -226,7 +226,7 @@ void Foam::thresholdCellFaces::calculate } } - ++faceI; + ++facei; } zone.size() = surfFaces.size() - zone.start(); @@ -237,9 +237,9 @@ void Foam::thresholdCellFaces::calculate surfCells.shrink(); // renumber - forAll(surfFaces, faceI) + forAll(surfFaces, facei) { - inplaceRenumber(oldToNewPoints, surfFaces[faceI]); + inplaceRenumber(oldToNewPoints, surfFaces[facei]); } diff --git a/src/sampling/sampledSurface/writers/dx/dxSurfaceWriter.C b/src/sampling/sampledSurface/writers/dx/dxSurfaceWriter.C index 2c68fde5cae244f6b063721ccc10b697af40d9ad..7b8c463b77da60e513c7b03a0938ac0a7717f649 100644 --- a/src/sampling/sampledSurface/writers/dx/dxSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/dx/dxSurfaceWriter.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 @@ -67,14 +67,14 @@ void Foam::dxSurfaceWriter::writeGeometry << "object 2 class array type int rank 1 shape 3 items " << faces.size() << " data follows" << nl; - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; if (f.size() != 3) { FatalErrorInFunction - << "Face " << faceI << " vertices " << f + << "Face " << facei << " vertices " << f << " is not a triangle." << exit(FatalError); } diff --git a/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C b/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C index e85450dce5184b2680daf92298a4e8e0ccbbee2a..3f31f8d4fe4bd83d2d5819f8baefd4def4a833f3 100644 --- a/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/foamFile/foamFileSurfaceWriter.C @@ -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 @@ -129,9 +129,9 @@ void Foam::foamFileSurfaceWriter::write // for e.g. timeVaryingMapped bc. pointField faceCentres(faces.size(),point::zero); - forAll(faces, faceI) + forAll(faces, facei) { - faceCentres[faceI] = faces[faceI].centre(points); + faceCentres[facei] = faces[facei].centre(points); } OFstream(surfaceDir/"faceCentres")() << faceCentres; diff --git a/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.C b/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.C index f4b358760aa9663558f58c5b8df4aefaa87cf5d1..b8d077b836f43b8933bc7fe1eaed4b14f694c96e 100644 --- a/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriter.C @@ -285,19 +285,19 @@ void Foam::nastranSurfaceWriter::writeGeometry label nFace = 1; - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; if (f.size() == 3) { - writeFace("CTRIA3", faces[faceI], nFace, os); - decomposedFaces[faceI].append(faces[faceI]); + writeFace("CTRIA3", faces[facei], nFace, os); + decomposedFaces[facei].append(faces[facei]); } else if (f.size() == 4) { - writeFace("CQUAD4", faces[faceI], nFace, os); - decomposedFaces[faceI].append(faces[faceI]); + writeFace("CQUAD4", faces[facei], nFace, os); + decomposedFaces[facei].append(faces[facei]); } else { @@ -309,7 +309,7 @@ void Foam::nastranSurfaceWriter::writeGeometry forAll(triFaces, triI) { writeFace("CTRIA3", triFaces[triI], nFace, os); - decomposedFaces[faceI].append(triFaces[triI]); + decomposedFaces[facei].append(triFaces[triI]); } } } diff --git a/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriterTemplates.C b/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriterTemplates.C index 12a730b4245ef7979165a9835d946b1c84561d3d..f77190caf2cb4af8a73620ce7458cc94e74271cf 100644 --- a/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriterTemplates.C +++ b/src/sampling/sampledSurface/writers/nastran/nastranSurfaceWriterTemplates.C @@ -179,10 +179,10 @@ void Foam::nastranSurfaceWriter::writeTemplate forAll(decomposedFaces, i) { const DynamicList<face>& dFaces = decomposedFaces[i]; - forAll(dFaces, faceI) + forAll(dFaces, facei) { Type v = Zero; - const face& f = dFaces[faceI]; + const face& f = dFaces[facei]; forAll(f, fptI) { @@ -202,9 +202,9 @@ void Foam::nastranSurfaceWriter::writeTemplate { const DynamicList<face>& dFaces = decomposedFaces[i]; - forAll(dFaces, faceI) + forAll(dFaces, facei) { - writeFaceValue(nasFieldName, values[faceI], ++n, os); + writeFaceValue(nasFieldName, values[facei], ++n, os); } } } diff --git a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C index 58f9f90d4452c8ffbb3865ba5d2d0658d0cf2f50..f14b7dd1444f8f09ecabaf17951fc1cbf4a05974 100644 --- a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C @@ -59,10 +59,10 @@ inline void Foam::rawSurfaceWriter::writeLocation Ostream& os, const pointField& points, const faceList& faces, - const label faceI + const label facei ) { - const point& ct = faces[faceI].centre(points); + const point& ct = faces[facei].centre(points); os << ct.x() << ' ' << ct.y() << ' ' << ct.z() << ' '; } diff --git a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.H b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.H index 3d0d06155736d0961fc9dd166242b70181158a74..af0f5850868c893e2ebceb61e4710de985f6dc57 100644 --- a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.H +++ b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.H @@ -71,7 +71,7 @@ class rawSurfaceWriter Ostream&, const pointField&, const faceList&, - const label faceI + const label facei ); template<class Type> diff --git a/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C index c3e5a62570d1ab2988cef711fab1ec29372a2cc8..d1556576a809bb98b7337d086bbab41b2ed070d3 100644 --- a/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C +++ b/src/sampling/sampledSurface/writers/vtk/vtkSurfaceWriter.C @@ -68,17 +68,17 @@ void Foam::vtkSurfaceWriter::writeGeometry // Write faces label nNodes = 0; - forAll(faces, faceI) + forAll(faces, facei) { - nNodes += faces[faceI].size(); + nNodes += faces[facei].size(); } os << "POLYGONS " << faces.size() << ' ' << faces.size() + nNodes << nl; - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; os << f.size(); forAll(f, fp) diff --git a/src/surfMesh/MeshedSurface/MeshedSurface.C b/src/surfMesh/MeshedSurface/MeshedSurface.C index 6eebe1a080851fcf107dcad7d9b364a027e47645..493d8b8103b85111b6465e53ba5c62ae5428e749 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurface.C +++ b/src/surfMesh/MeshedSurface/MeshedSurface.C @@ -228,9 +228,9 @@ Foam::MeshedSurface<Face>::MeshedSurface const List<Face>& origFaces = surf.faces(); List<Face> newFaces(origFaces.size()); - forAll(newFaces, faceI) + forAll(newFaces, facei) { - newFaces[faceMap[faceI]] = origFaces[faceI]; + newFaces[faceMap[facei]] = origFaces[facei]; } this->storedFaces().transfer(newFaces); @@ -296,9 +296,9 @@ Foam::MeshedSurface<Face>::MeshedSurface label startFaceI = 0; label nZone = 0; - forAll(bPatches, patchI) + forAll(bPatches, patchi) { - const polyPatch& p = bPatches[patchI]; + const polyPatch& p = bPatches[patchi]; if (p.size()) { @@ -448,9 +448,9 @@ void Foam::MeshedSurface<Face>::remapFaces 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) + if (faceMap[facei] < origEndI) { ++newFaceI; } @@ -612,9 +612,9 @@ bool Foam::MeshedSurface<Face>::stitchFaces // Reset the point labels to the unique points array label newFaceI = 0; - forAll(faceLst, faceI) + forAll(faceLst, facei) { - Face& f = faceLst[faceI]; + Face& f = faceLst[facei]; forAll(f, fp) { f[fp] = pointMap[f[fp]]; @@ -623,17 +623,17 @@ 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; } - faceMap[newFaceI] = faceI; + faceMap[newFaceI] = facei; newFaceI++; } else if (verbose) { Pout<< "MeshedSurface::stitchFaces : " - << "Removing collapsed face " << faceI << endl + << "Removing collapsed face " << facei << endl << " vertices :" << f << endl; } } @@ -674,9 +674,9 @@ bool Foam::MeshedSurface<Face>::checkFaces label newFaceI = 0; // Detect badly labelled faces and mark degenerate faces const label maxPointI = this->points().size() - 1; - forAll(faceLst, faceI) + forAll(faceLst, facei) { - Face& f = faceLst[faceI]; + Face& f = faceLst[facei]; // avoid degenerate faces if (f.collapse() >= 3) @@ -693,19 +693,19 @@ bool Foam::MeshedSurface<Face>::checkFaces } } - faceMap[faceI] = faceI; + faceMap[facei] = facei; newFaceI++; } else { // mark as bad face - faceMap[faceI] = -1; + faceMap[facei] = -1; changed = true; if (verbose) { WarningInFunction - << "face[" << faceI << "] = " << f + << "face[" << facei << "] = " << f << " does not have three unique vertices" << endl; } } @@ -715,19 +715,19 @@ bool Foam::MeshedSurface<Face>::checkFaces // do not touch the faces const labelListList& fFaces = this->faceFaces(); newFaceI = 0; - forAll(faceLst, faceI) + forAll(faceLst, facei) { // skip already collapsed faces: - if (faceMap[faceI] < 0) + if (faceMap[facei] < 0) { continue; } - const Face& f = faceLst[faceI]; + const Face& f = faceLst[facei]; // duplicate face check bool okay = true; - const labelList& neighbours = fFaces[faceI]; + const labelList& neighbours = fFaces[facei]; // Check if faceNeighbours use same points as this face. // Note: discards normal information - sides of baffle are merged. @@ -735,7 +735,7 @@ bool Foam::MeshedSurface<Face>::checkFaces { 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 @@ -752,7 +752,7 @@ bool Foam::MeshedSurface<Face>::checkFaces { WarningInFunction << "faces share the same vertices:" << nl - << " face[" << faceI << "] : " << f << nl + << " face[" << facei << "] : " << f << nl << " face[" << neiFaceI << "] : " << nei << endl; // printFace(Warning, " ", f, points()); // printFace(Warning, " ", nei, points()); @@ -764,12 +764,12 @@ bool Foam::MeshedSurface<Face>::checkFaces if (okay) { - faceMap[faceI] = faceI; + faceMap[facei] = facei; newFaceI++; } else { - faceMap[faceI] = -1; + faceMap[facei] = -1; } } @@ -789,15 +789,15 @@ bool Foam::MeshedSurface<Face>::checkFaces // compress the face list newFaceI = 0; - forAll(faceLst, faceI) + forAll(faceLst, facei) { - if (faceMap[faceI] >= 0) + if (faceMap[facei] >= 0) { - if (newFaceI != faceI) + if (newFaceI != facei) { - faceLst[newFaceI] = faceLst[faceI]; + faceLst[newFaceI] = faceLst[facei]; } - faceMap[newFaceI] = faceI; + faceMap[newFaceI] = facei; newFaceI++; } } @@ -834,9 +834,9 @@ Foam::label Foam::MeshedSurface<Face>::triangulate List<Face>& faceLst = this->storedFaces(); // determine how many triangles will be needed - forAll(faceLst, faceI) + forAll(faceLst, facei) { - const label n = faceLst[faceI].nTriangles(); + const label n = faceLst[facei].nTriangles(); if (maxTri < n) { maxTri = n; @@ -872,16 +872,16 @@ Foam::label Foam::MeshedSurface<Face>::triangulate // triangulate without points // simple face triangulation around f[0] label newFaceI = 0; - forAll(faceLst, faceI) + forAll(faceLst, facei) { - const Face& f = faceLst[faceI]; + const Face& f = faceLst[facei]; for (label fp = 1; fp < f.size() - 1; ++fp) { label fp1 = f.fcIndex(fp); newFaces[newFaceI] = triFace(f[0], f[fp], f[fp1]); - faceMap[newFaceI] = faceI; + faceMap[newFaceI] = facei; newFaceI++; } } @@ -892,10 +892,10 @@ Foam::label Foam::MeshedSurface<Face>::triangulate List<face> tmpTri(maxTri); label newFaceI = 0; - forAll(faceLst, faceI) + forAll(faceLst, facei) { // 'face' not '<Face>' - const face& f = faceLst[faceI]; + const face& f = faceLst[facei]; label nTmp = 0; f.triangles(this->points(), nTmp, tmpTri); @@ -905,7 +905,7 @@ Foam::label Foam::MeshedSurface<Face>::triangulate ( static_cast<labelUList&>(tmpTri[triI]) ); - faceMap[newFaceI] = faceI; + faceMap[newFaceI] = facei; newFaceI++; } } @@ -962,13 +962,13 @@ Foam::MeshedSurface<Face> Foam::MeshedSurface<Face>::subsetMesh // Renumber face node labels List<Face> newFaces(faceMap.size()); - forAll(faceMap, faceI) + 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]; + Face& f = newFaces[facei]; forAll(f, fp) { f[fp] = oldToNew[f[fp]]; @@ -989,9 +989,9 @@ Foam::MeshedSurface<Face> Foam::MeshedSurface<Face>::subsetMesh 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) + if (faceMap[facei] < origEndI) { ++newFaceI; } @@ -1068,9 +1068,9 @@ void Foam::MeshedSurface<Face>::transfer List<Face>& oldFaces = surf.storedFaces(); List<Face> newFaces(faceMap.size()); - forAll(faceMap, faceI) + forAll(faceMap, facei) { - newFaces[faceMap[faceI]].transfer(oldFaces[faceI]); + newFaces[faceMap[facei]].transfer(oldFaces[facei]); } reset diff --git a/src/surfMesh/MeshedSurface/MeshedSurfaceCore.C b/src/surfMesh/MeshedSurface/MeshedSurfaceCore.C index 9d579ee59016818198dbcf667f805464dcaa3ded..0708bc3f5d49a808bfcdbaffe1736859802ce458 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurfaceCore.C +++ b/src/surfMesh/MeshedSurface/MeshedSurfaceCore.C @@ -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 @@ -42,11 +42,11 @@ namespace Foam // transcribe from face -> triFace List<face>& origFaces = surf.storedFaces(); List<triFace> newFaces(origFaces.size()); - forAll(origFaces, faceI) + forAll(origFaces, facei) { - newFaces[faceI] = triFace + newFaces[facei] = triFace ( - static_cast<const labelUList&>(origFaces[faceI]) + static_cast<const labelUList&>(origFaces[facei]) ); } surf.clear(); diff --git a/src/surfMesh/MeshedSurface/MeshedSurfaceZones.C b/src/surfMesh/MeshedSurface/MeshedSurfaceZones.C index f99d18179a6c329db4c47a3a9111f48fa1a33a8b..767d1e5b9c62d8d72590ad26d53a23f9c721b841 100644 --- a/src/surfMesh/MeshedSurface/MeshedSurfaceZones.C +++ b/src/surfMesh/MeshedSurface/MeshedSurfaceZones.C @@ -87,10 +87,10 @@ void Foam::MeshedSurface<Face>::sortFacesAndStore // sorted faces List<Face> newFaces(faceMap.size()); - forAll(faceMap, faceI) + forAll(faceMap, facei) { // use transfer to recover memory where possible - newFaces[faceI].transfer(oldFaces[faceMap[faceI]]); + newFaces[facei].transfer(oldFaces[faceMap[facei]]); } this->storedFaces().transfer(newFaces); } diff --git a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C index 10a973eb053477fc186556a8fe525fa20d7db865..fa72e70fb2a20f65ee6b7a722c876389da0453ac 100644 --- a/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C +++ b/src/surfMesh/UnsortedMeshedSurface/UnsortedMeshedSurface.C @@ -410,9 +410,9 @@ void Foam::UnsortedMeshedSurface<Face>::remapFaces { List<label> newZones(faceMap.size()); - forAll(faceMap, faceI) + forAll(faceMap, facei) { - newZones[faceI] = zoneIds_[faceMap[faceI]]; + newZones[facei] = zoneIds_[faceMap[facei]]; } zoneIds_.transfer(newZones); } @@ -461,9 +461,9 @@ Foam::surfZoneList Foam::UnsortedMeshedSurface<Face>::sortedZones // step 1: get zone sizes and store (origId => zoneI) Map<label> lookup; - forAll(zoneIds_, faceI) + forAll(zoneIds_, facei) { - const label origId = zoneIds_[faceI]; + const label origId = zoneIds_[facei]; Map<label>::iterator fnd = lookup.find(origId); if (fnd != lookup.end()) @@ -514,10 +514,10 @@ Foam::surfZoneList Foam::UnsortedMeshedSurface<Face>::sortedZones // step 3: build the re-ordering faceMap.setSize(zoneIds_.size()); - forAll(zoneIds_, faceI) + forAll(zoneIds_, facei) { - label zoneI = lookup[zoneIds_[faceI]]; - faceMap[faceI] = zoneLst[zoneI].start() + zoneLst[zoneI].size()++; + label zoneI = lookup[zoneIds_[facei]]; + faceMap[facei] = zoneLst[zoneI].start() + zoneLst[zoneI].size()++; } // with reordered faces registered in faceMap @@ -553,19 +553,19 @@ Foam::UnsortedMeshedSurface<Face>::subsetMesh List<Face> newFaces(faceMap.size()); List<label> newZones(faceMap.size()); - forAll(faceMap, faceI) + 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]; + Face& f = newFaces[facei]; forAll(f, fp) { 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 6730b4c8ce4e342d6d1161229316bd7f901feb35..55d0d6ef5f68954814880ee4021425604a8f98ca 100644 --- a/src/surfMesh/surfZone/surfZone/surfZoneIOList.C +++ b/src/surfMesh/surfZone/surfZone/surfZoneIOList.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 @@ -61,7 +61,7 @@ Foam::surfZoneIOList::surfZoneIOList PtrList<entry> dictEntries(is); zones.setSize(dictEntries.size()); - label faceI = 0; + label facei = 0; forAll(zones, zoneI) { const dictionary& dict = dictEntries[zoneI].dict(); @@ -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 @@ -92,7 +92,7 @@ Foam::surfZoneIOList::surfZoneIOList << exit(FatalError); } - faceI += zoneSize; + facei += zoneSize; } // Check state of IOstream diff --git a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C index 60301d6776a79af3386ff5cc4f68c4072d20c8f4..18676aa853b54e51c3cdc4c32c70bbf31a976ce5 100644 --- a/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/ac3d/AC3DsurfaceFormat.C @@ -176,11 +176,11 @@ bool Foam::fileFormats::AC3DsurfaceFormat<Face>::read { label nFaces = parse<int>(args); - for (label faceI = 0; faceI < nFaces; ++faceI) + for (label facei = 0; facei < nFaces; ++facei) { static string errorMsg = string(" while reading face ") - + Foam::name(faceI) + " on zone " + + Foam::name(facei) + " on zone " + Foam::name(zoneI) + " from file " + filename; @@ -388,8 +388,8 @@ void Foam::fileFormats::AC3DsurfaceFormat<Face>::write forAll(zone, localFaceI) { - const label faceI = faceMap[faceIndex++]; - include.insert(faceI); + const label facei = faceMap[faceIndex++]; + include.insert(facei); } UnsortedMeshedSurface<Face> subm = surf.subsetMesh(include); diff --git a/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.C b/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.C index bc5b582cdc4cad7d237b71f5647ccf5e104deb83..e991c89beb8fc87c342fd5fa88ce2ce1d4e35871 100644 --- a/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/ftr/FTRsurfaceFormat.C @@ -69,11 +69,11 @@ bool Foam::fileFormats::FTRsurfaceFormat<Face>::read List<label> zoneIds(facesRead.size()); // disentangle faces/keys - already triangulated - forAll(facesRead, faceI) + forAll(facesRead, facei) { // unfortunately cannot transfer to save memory - faceLst[faceI] = facesRead[faceI]; - zoneIds[faceI] = facesRead[faceI].key(); + faceLst[facei] = facesRead[facei]; + zoneIds[facei] = facesRead[facei].key(); } this->storedFaces().transfer(faceLst); diff --git a/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.C b/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.C index bf55ff46e2678f45a8cf0192371ff77ac1e06101..e23ecb38542ccab6fb864f3fdce0247db35f977c 100644 --- a/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/gts/GTSsurfaceFormat.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 @@ -114,7 +114,7 @@ bool Foam::fileFormats::GTSsurfaceFormat<Face>::read // Read triangles. Convert references to edges into pointlabels label maxZone = 0; - forAll(faceLst, faceI) + forAll(faceLst, facei) { label e0Label, e1Label, e2Label; label zoneI = 0; @@ -153,7 +153,7 @@ bool Foam::fileFormats::GTSsurfaceFormat<Face>::read if (common01 == -1) { FatalErrorInFunction - << "Edges 0 and 1 of triangle " << faceI + << "Edges 0 and 1 of triangle " << facei << " do not share a point.\n" << " edge0:" << e0 << nl << " edge1:" << e1 @@ -167,7 +167,7 @@ bool Foam::fileFormats::GTSsurfaceFormat<Face>::read if (common12 == -1) { FatalErrorInFunction - << "Edges 1 and 2 of triangle " << faceI + << "Edges 1 and 2 of triangle " << facei << " do not share a point.\n" << " edge1:" << e1 << nl << " edge2:" << e2 @@ -179,7 +179,7 @@ bool Foam::fileFormats::GTSsurfaceFormat<Face>::read if (common12 != e1Far || e2Far != e0Far) { FatalErrorInFunction - << "Edges of triangle " << faceI + << "Edges of triangle " << facei << " reference more than three points.\n" << " edge0:" << e0 << nl << " edge1:" << e1 << nl @@ -187,8 +187,8 @@ bool Foam::fileFormats::GTSsurfaceFormat<Face>::read << exit(FatalError); } - faceLst[faceI] = triFace(e0Far, common01, e1Far); - zoneIds[faceI] = zoneI; + faceLst[facei] = triFace(e0Far, common01, e1Far); + zoneIds[facei] = zoneI; } @@ -231,9 +231,9 @@ void Foam::fileFormats::GTSsurfaceFormat<Face>::write if (!MeshedSurface<Face>::isTri()) { label nNonTris = 0; - forAll(faceLst, faceI) + forAll(faceLst, facei) { - if (faceLst[faceI].size() != 3) + if (faceLst[facei].size() != 3) { ++nNonTris; } @@ -333,9 +333,9 @@ void Foam::fileFormats::GTSsurfaceFormat<Face>::write if (!MeshedSurface<Face>::isTri()) { label nNonTris = 0; - forAll(faceLst, faceI) + forAll(faceLst, facei) { - if (faceLst[faceI].size() != 3) + if (faceLst[facei].size() != 3) { ++nNonTris; } @@ -401,14 +401,14 @@ void Foam::fileFormats::GTSsurfaceFormat<Face>::write // Write faces in terms of edges. const labelListList& faceEs = surf.faceEdges(); - forAll(faceLst, faceI) + forAll(faceLst, facei) { - const labelList& fEdges = faceEs[faceI]; + const labelList& fEdges = faceEs[facei]; os << fEdges[0] + 1 << ' ' << fEdges[1] + 1 << ' ' << fEdges[2] + 1 << ' ' - << zoneIds[faceI] << endl; + << zoneIds[facei] << endl; } } diff --git a/src/surfMesh/surfaceFormats/obj/OBJstream.C b/src/surfMesh/surfaceFormats/obj/OBJstream.C index 793c97a37e581321f62a8cfeb0f94839b24b1121..695e51852885e342e881b84026fba94d2a79308d 100644 --- a/src/surfMesh/surfaceFormats/obj/OBJstream.C +++ b/src/surfMesh/surfaceFormats/obj/OBJstream.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 @@ -354,9 +354,9 @@ Foam::Ostream& Foam::OBJstream::write } else { - forAll(localFaces, faceI) + forAll(localFaces, facei) { - const face& f = localFaces[faceI]; + const face& f = localFaces[facei]; write('f'); forAll(f, i) { diff --git a/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.C b/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.C index 8157f3ae0e55b94429f5ad16e09be2d06d55e8a0..285d4e95cc09c9f82e5fbf2f55ebfdbacf7eff73 100644 --- a/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/off/OFFsurfaceFormat.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 @@ -97,7 +97,7 @@ bool Foam::fileFormats::OFFsurfaceFormat<Face>::read // use a DynamicList for possible on-the-fly triangulation DynamicList<Face> dynFaces(nElems); - for (label faceI = 0; faceI < nElems; ++faceI) + for (label facei = 0; facei < nElems; ++facei) { line = this->getLineNoComment(is); diff --git a/src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormat.C b/src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormat.C index cb8646e7c2fe14cd989f21ef984acf950c53ce7a..1ebc0c12fff282240f84ccc3bd487ae2711c8cfe 100644 --- a/src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/ofs/OFSsurfaceFormat.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 @@ -215,7 +215,7 @@ void Foam::fileFormats::OFSsurfaceFormat<Face>::write os << "\n// faces:" << nl << faceLst.size() << token::BEGIN_LIST << nl; - label faceI = 0; + label facei = 0; forAll(zones, zoneI) { // Print all faces belonging to this zone @@ -223,7 +223,7 @@ void Foam::fileFormats::OFSsurfaceFormat<Face>::write forAll(zone, localFaceI) { - os << faceLst[faceMap[faceI++]] << nl; + os << faceLst[faceMap[facei++]] << nl; } } os << token::END_LIST << nl; diff --git a/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.C b/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.C index 7d8bb709f417107837f2dec01867e63c33687ccd..a5433a197aceb572069059dca879f07aaf133558 100644 --- a/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/starcd/STARCDsurfaceFormat.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,14 +207,14 @@ bool Foam::fileFormats::STARCDsurfaceFormat<Face>::read label nTri = 0; f.triangles(this->points(), nTri, triFaces); - forAll(triFaces, faceI) + forAll(triFaces, facei) { // a triangular face, but not yet a triFace dynFaces.append ( triFace ( - static_cast<labelUList&>(triFaces[faceI]) + static_cast<labelUList&>(triFaces[facei]) ) ); dynZones.append(zoneI); diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.C b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.C index 349296e21bb3c7635666ee36ed195ab9051179c2..42be796eb58baa47e4f4c310c4cc23a525485a76 100644 --- a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormat.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 @@ -147,10 +147,10 @@ bool Foam::fileFormats::STLsurfaceFormat<Face>::read if (reader.sorted()) { // already sorted - generate directly - forAll(faceLst, faceI) + forAll(faceLst, facei) { - const label startPt = 3*faceI; - faceLst[faceI] = triFace(startPt, startPt+1, startPt+2); + const label startPt = 3*facei; + faceLst[facei] = triFace(startPt, startPt+1, startPt+2); } } else @@ -161,10 +161,10 @@ bool Foam::fileFormats::STLsurfaceFormat<Face>::read sortedOrder(zoneIds, faceMap); // generate sorted faces - forAll(faceMap, faceI) + forAll(faceMap, facei) { - const label startPt = 3*faceMap[faceI]; - faceLst[faceI] = triFace(startPt, startPt+1, startPt+2); + const label startPt = 3*faceMap[facei]; + faceLst[facei] = triFace(startPt, startPt+1, startPt+2); } } zoneIds.clear(); @@ -227,8 +227,8 @@ void Foam::fileFormats::STLsurfaceFormat<Face>::writeAscii { forAll(zone, localFaceI) { - const label faceI = faceMap[faceIndex++]; - writeShell(os, pointLst, faceLst[faceI]); + const label facei = faceMap[faceIndex++]; + writeShell(os, pointLst, faceLst[facei]); } } else @@ -281,9 +281,9 @@ void Foam::fileFormats::STLsurfaceFormat<Face>::writeBinary else { // count triangles for on-the-fly triangulation - forAll(faceLst, faceI) + forAll(faceLst, facei) { - nTris += faceLst[faceI].size() - 2; + nTris += faceLst[facei].size() - 2; } } @@ -347,9 +347,9 @@ void Foam::fileFormats::STLsurfaceFormat<Face>::writeAscii const List<Face>& faceLst = surf.faces(); os << "solid " << surf.zoneToc()[0].name() << endl; - forAll(faceLst, faceI) + forAll(faceLst, facei) { - writeShell(os, pointLst, faceLst[faceI]); + writeShell(os, pointLst, faceLst[facei]); } os << "endsolid " << surf.zoneToc()[0].name() << endl; } @@ -400,9 +400,9 @@ void Foam::fileFormats::STLsurfaceFormat<Face>::writeBinary else { // count triangles for on-the-fly triangulation - forAll(faceLst, faceI) + forAll(faceLst, facei) { - nTris += faceLst[faceI].size() - 2; + nTris += faceLst[facei].size() - 2; } } @@ -410,14 +410,14 @@ void Foam::fileFormats::STLsurfaceFormat<Face>::writeBinary STLsurfaceFormatCore::writeHeaderBINARY(os, nTris); // always write unsorted - forAll(faceLst, faceI) + forAll(faceLst, facei) { writeShell ( os, pointLst, - faceLst[faceI], - zoneIds[faceI] + faceLst[facei], + zoneIds[facei] ); } } diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatCore.C b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatCore.C index 87c6a11abc0c1bbd7da2163b447836990c40e8fd..022b6df5a9e802abde0ea4bbf2a6cf797647df1f 100644 --- a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatCore.C +++ b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatCore.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 @@ -142,7 +142,7 @@ bool Foam::fileFormats::STLsurfaceFormatCore::readBINARY label ptI = 0; label zoneI = -1; - forAll(zoneIds_, faceI) + forAll(zoneIds_, facei) { // Read an STL triangle STLtriangle stlTri(is); @@ -172,7 +172,7 @@ bool Foam::fileFormats::STLsurfaceFormatCore::readBINARY dynSizes.append(0); } - zoneIds_[faceI] = zoneI; + zoneIds_[facei] = zoneI; dynSizes[zoneI]++; #ifdef DEBUG_STLBINARY diff --git a/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.C b/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.C index 2335ce303546632d60f47b7cdad208d9c0f1757c..d090d0923c5f68fafe0eaff9ee7b618cc20b70ff 100644 --- a/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/tri/TRIsurfaceFormat.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,10 +94,10 @@ bool Foam::fileFormats::TRIsurfaceFormat<Face>::read if (reader.sorted()) { // already sorted - generate directly - forAll(faceLst, faceI) + forAll(faceLst, facei) { - const label startPt = 3*faceI; - faceLst[faceI] = triFace(startPt, startPt+1, startPt+2); + const label startPt = 3*facei; + faceLst[facei] = triFace(startPt, startPt+1, startPt+2); } } else @@ -108,10 +108,10 @@ bool Foam::fileFormats::TRIsurfaceFormat<Face>::read sortedOrder(zoneIds, faceMap); // generate sorted faces - forAll(faceMap, faceI) + forAll(faceMap, facei) { - const label startPt = 3*faceMap[faceI]; - faceLst[faceI] = triFace(startPt, startPt+1, startPt+2); + const label startPt = 3*faceMap[facei]; + faceLst[facei] = triFace(startPt, startPt+1, startPt+2); } } zoneIds.clear(); @@ -202,9 +202,9 @@ void Foam::fileFormats::TRIsurfaceFormat<Face>::write { const List<label>& zoneIds = surf.zoneIds(); - forAll(faceLst, faceI) + forAll(faceLst, facei) { - writeShell(os, pointLst, faceLst[faceI], zoneIds[faceI]); + writeShell(os, pointLst, faceLst[facei], zoneIds[facei]); } } else diff --git a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C index a252a4732b0aee1b22d7d47f04b65b3d6379464f..3c26763c03644ad5de6ee114479f6d1ec54bb8d5 100644 --- a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.C +++ b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormat.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 @@ -38,9 +38,9 @@ void Foam::fileFormats::VTKsurfaceFormat<Face>::writeHeaderPolygons { label nNodes = 0; - forAll(faceLst, faceI) + forAll(faceLst, facei) { - nNodes += faceLst[faceI].size(); + nNodes += faceLst[facei].size(); } os << nl @@ -152,9 +152,9 @@ bool Foam::fileFormats::VTKsurfaceFormat<Face>::read label nTri = 0; if (mustTriangulate) { - forAll(faces, faceI) + forAll(faces, facei) { - nTri += faces[faceI].size()-2; + nTri += faces[facei].size()-2; } } @@ -162,15 +162,15 @@ bool Foam::fileFormats::VTKsurfaceFormat<Face>::read { DynamicList<Face> dynFaces(nTri); DynamicList<label> dynZones(nTri); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; for (label fp1 = 1; fp1 < f.size() - 1; fp1++) { label fp2 = f.fcIndex(fp1); dynFaces.append(triFace(f[0], f[fp1], f[fp2])); - dynZones.append(zones[faceI]); + dynZones.append(zones[facei]); } } @@ -189,17 +189,17 @@ bool Foam::fileFormats::VTKsurfaceFormat<Face>::read else { DynamicList<Face> dynFaces(faces.size()); - forAll(faces, faceI) + forAll(faces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; dynFaces.append(Face(f)); } // Count labelList zoneSizes(nZones, 0); - forAll(zones, faceI) + forAll(zones, facei) { - zoneSizes[zones[faceI]]++; + zoneSizes[zones[facei]]++; } this->sortFacesAndStore(dynFaces.xfer(), zones.xfer(), sorted); @@ -307,9 +307,9 @@ void Foam::fileFormats::VTKsurfaceFormat<Face>::write writeHeader(os, surf.points()); writeHeaderPolygons(os, faceLst); - forAll(faceLst, faceI) + forAll(faceLst, facei) { - const Face& f = faceLst[faceI]; + const Face& f = faceLst[facei]; os << f.size(); forAll(f, fp) diff --git a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatCore.C b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatCore.C index c298448cb6a5977cefe0b7054da8e038ff212128..513d5f08a50fc19db4c27cc4660bfab1b7f8deff 100644 --- a/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatCore.C +++ b/src/surfMesh/surfaceFormats/vtk/VTKsurfaceFormatCore.C @@ -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 @@ -105,11 +105,11 @@ void Foam::fileFormats::VTKsurfaceFormatCore::writeTail << "FIELD attributes 1" << nl << "region 1 " << zoneIds.size() << " float" << nl; - forAll(zoneIds, faceI) + forAll(zoneIds, facei) { - if (faceI) + if (facei) { - if (faceI % 20) + if (facei % 20) { os << ' '; } @@ -118,7 +118,7 @@ void Foam::fileFormats::VTKsurfaceFormatCore::writeTail os << nl; } } - os << zoneIds[faceI] + 1; + os << zoneIds[facei] + 1; } os << nl; } diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C index 1b424d1ccf0ebf50b5ca0893024bc233ddff6e77..bf9682d9584b4e7ba841d7391fe6915144cd96b3 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/chemistryModel/chemistryModel.C @@ -574,10 +574,10 @@ Foam::chemistryModel<CompType, ThermoType>::Sh() const forAll(Y_, i) { - forAll(Sh, cellI) + forAll(Sh, celli) { const scalar hi = specieThermo_[i].Hc(); - Sh[cellI] -= hi*RR_[i][cellI]; + Sh[celli] -= hi*RR_[i][celli]; } } } diff --git a/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C b/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C index c3eaf9c0e908baf207a2536274d35710d6fc1402..faaccea7484a7b057be59774882bec4e2f5ac086 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C +++ b/src/thermophysicalModels/laminarFlameSpeed/RaviPetersen/RaviPetersen.C @@ -345,9 +345,9 @@ Foam::laminarFlameSpeedModels::RaviPetersen::operator()() const volScalarField& Su0 = tSu0.ref(); - forAll(Su0, cellI) + forAll(Su0, celli) { - Su0[cellI] = speed(EqR[cellI], p[cellI], Tu[cellI]); + Su0[celli] = speed(EqR[celli], p[celli], Tu[celli]); } return tSu0; diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C index 095bd4f69f81b536cfe01154c402f41b8e81b4dd..a1f34762959184c7226d8ef16d2233e48e56c1e6 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C @@ -168,7 +168,7 @@ updateCoeffs() label lambdaId = -1; dom.setRayIdLambdaId(dimensionedInternalField().name(), rayId, lambdaId); - const label patchI = patch().index(); + const label patchi = patch().index(); if (dom.nLambda() != 1) { @@ -185,50 +185,50 @@ updateCoeffs() const scalarField nAve(n & ray.dAve()); - ray.Qr().boundaryFieldRef()[patchI] += Iw*nAve; + ray.Qr().boundaryFieldRef()[patchi] += Iw*nAve; const scalarField temissivity = emissivity(); - scalarField& Qem = ray.Qem().boundaryFieldRef()[patchI]; - scalarField& Qin = ray.Qin().boundaryFieldRef()[patchI]; + scalarField& Qem = ray.Qem().boundaryFieldRef()[patchi]; + scalarField& Qin = ray.Qin().boundaryFieldRef()[patchi]; const vector& myRayId = dom.IRay(rayId).d(); // Use updated Ir while iterating over rays // avoids to used lagged Qin - scalarField Ir = dom.IRay(0).Qin().boundaryField()[patchI]; + scalarField Ir = dom.IRay(0).Qin().boundaryField()[patchi]; for (label rayI=1; rayI < dom.nRay(); rayI++) { - Ir += dom.IRay(rayI).Qin().boundaryField()[patchI]; + Ir += dom.IRay(rayI).Qin().boundaryField()[patchi]; } - forAll(Iw, faceI) + forAll(Iw, facei) { - if ((-n[faceI] & myRayId) > 0.0) + if ((-n[facei] & myRayId) > 0.0) { // direction out of the wall - refGrad()[faceI] = 0.0; - valueFraction()[faceI] = 1.0; - refValue()[faceI] = + refGrad()[facei] = 0.0; + valueFraction()[facei] = 1.0; + refValue()[facei] = ( - Ir[faceI]*(scalar(1.0) - temissivity[faceI]) - + temissivity[faceI]*physicoChemical::sigma.value() - * pow4(Tp[faceI]) + Ir[facei]*(scalar(1.0) - temissivity[facei]) + + temissivity[facei]*physicoChemical::sigma.value() + * pow4(Tp[facei]) )/pi; // Emmited heat flux from this ray direction - Qem[faceI] = refValue()[faceI]*nAve[faceI]; + Qem[facei] = refValue()[facei]*nAve[facei]; } else { // direction into the wall - valueFraction()[faceI] = 0.0; - refGrad()[faceI] = 0.0; - refValue()[faceI] = 0.0; //not used + valueFraction()[facei] = 0.0; + refGrad()[facei] = 0.0; + refValue()[facei] = 0.0; //not used // Incident heat flux on this ray direction - Qin[faceI] = Iw[faceI]*nAve[faceI]; + Qin[facei] = Iw[facei]*nAve[facei]; } } diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C index d8a7b6245d13b770147182f3fadca000947baaa9..01f9c430744fd2de307deb498db3d090c2a6de8a 100644 --- a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C +++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C @@ -169,7 +169,7 @@ updateCoeffs() label lambdaId = -1; dom.setRayIdLambdaId(dimensionedInternalField().name(), rayId, lambdaId); - const label patchI = patch().index(); + const label patchi = patch().index(); if (dom.nLambda() == 0) { @@ -186,54 +186,54 @@ updateCoeffs() const scalarField nAve(n & ray.dAve()); - ray.Qr().boundaryFieldRef()[patchI] += Iw*nAve; + ray.Qr().boundaryFieldRef()[patchi] += Iw*nAve; const scalarField Eb ( - dom.blackBody().bLambda(lambdaId).boundaryField()[patchI] + dom.blackBody().bLambda(lambdaId).boundaryField()[patchi] ); scalarField temissivity = emissivity(); - scalarField& Qem = ray.Qem().boundaryFieldRef()[patchI]; - scalarField& Qin = ray.Qin().boundaryFieldRef()[patchI]; + scalarField& Qem = ray.Qem().boundaryFieldRef()[patchi]; + scalarField& Qin = ray.Qin().boundaryFieldRef()[patchi]; // Use updated Ir while iterating over rays // avoids to used lagged Qin - scalarField Ir = dom.IRay(0).Qin().boundaryField()[patchI]; + scalarField Ir = dom.IRay(0).Qin().boundaryField()[patchi]; for (label rayI=1; rayI < dom.nRay(); rayI++) { - Ir += dom.IRay(rayI).Qin().boundaryField()[patchI]; + Ir += dom.IRay(rayI).Qin().boundaryField()[patchi]; } - forAll(Iw, faceI) + forAll(Iw, facei) { const vector& d = dom.IRay(rayId).d(); - if ((-n[faceI] & d) > 0.0) + if ((-n[facei] & d) > 0.0) { // direction out of the wall - refGrad()[faceI] = 0.0; - valueFraction()[faceI] = 1.0; - refValue()[faceI] = + refGrad()[facei] = 0.0; + valueFraction()[facei] = 1.0; + refValue()[facei] = ( - Ir[faceI]*(1.0 - temissivity[faceI]) - + temissivity[faceI]*Eb[faceI] + Ir[facei]*(1.0 - temissivity[facei]) + + temissivity[facei]*Eb[facei] )/pi; // Emmited heat flux from this ray direction - Qem[faceI] = refValue()[faceI]*nAve[faceI]; + Qem[facei] = refValue()[facei]*nAve[facei]; } else { // direction into the wall - valueFraction()[faceI] = 0.0; - refGrad()[faceI] = 0.0; - refValue()[faceI] = 0.0; //not used + valueFraction()[facei] = 0.0; + refGrad()[facei] = 0.0; + refValue()[facei] = 0.0; //not used // Incident heat flux on this ray direction - Qin[faceI] = Iw[faceI]*nAve[faceI]; + Qin[facei] = Iw[facei]*nAve[facei]; } } diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C index 81dca262d51ca05831587b22cff16f939094a7fb..60f009b75661e41e65fedeb618c916d00386f498 100644 --- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C +++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C @@ -52,15 +52,15 @@ void Foam::radiation::viewFactor::initialise() const volScalarField::GeometricBoundaryField& Qrp = Qr_.boundaryField(); label count = 0; - forAll(Qrp, patchI) + forAll(Qrp, patchi) { - //const polyPatch& pp = mesh_.boundaryMesh()[patchI]; - const fvPatchScalarField& QrPatchI = Qrp[patchI]; + //const polyPatch& pp = mesh_.boundaryMesh()[patchi]; + const fvPatchScalarField& QrPatchI = Qrp[patchi]; if ((isA<fixedValueFvPatchScalarField>(QrPatchI))) { selectedPatches_[count] = QrPatchI.patch().index(); - nLocalCoarseFaces_ += coarsePatches[patchI].size(); + nLocalCoarseFaces_ += coarsePatches[patchi].size(); count++; } } @@ -377,12 +377,12 @@ void Foam::radiation::viewFactor::insertMatrixElements scalarSquareMatrix& Fmatrix ) { - forAll(viewFactors, faceI) + forAll(viewFactors, facei) { - const scalarList& vf = viewFactors[faceI]; - const labelList& globalFaces = globalFaceFaces[faceI]; + 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]; @@ -455,10 +455,10 @@ void Foam::radiation::viewFactor::calculate() // Temperature, emissivity and external flux area weighting forAll(fineFaces, j) { - label faceI = fineFaces[j]; - Tave[coarseI] += (Tp[faceI]*sf[faceI])/area; - Eave[coarseI] += (eb[faceI]*sf[faceI])/area; - Hoiave[coarseI] += (Hoi[faceI]*sf[faceI])/area; + label facei = fineFaces[j]; + Tave[coarseI] += (Tp[facei]*sf[facei])/area; + Eave[coarseI] += (eb[facei]*sf[facei])/area; + Hoiave[coarseI] += (Hoi[facei]*sf[facei])/area; } } } @@ -644,10 +644,10 @@ void Foam::radiation::viewFactor::calculate() const labelList& fineFaces = coarseToFine[coarseFaceID]; forAll(fineFaces, k) { - label faceI = fineFaces[k]; + label facei = fineFaces[k]; - Qrp[faceI] = q[globalCoarse]; - heatFlux += Qrp[faceI]*sf[faceI]; + Qrp[facei] = q[globalCoarse]; + heatFlux += Qrp[facei]*sf[facei]; } globCoarseId ++; } diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C index 5d7e9070ef02a48010648a7b830863e29e714088..a2776a561cdb93de9b4f00833e6912f3f5eb8463 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/greyMeanAbsorptionEmission/greyMeanAbsorptionEmission.C @@ -215,7 +215,7 @@ Foam::radiation::greyMeanAbsorptionEmission::aCont(const label bandI) const scalarField& a = ta.ref().internalField(); - forAll(a, cellI) + forAll(a, celli) { forAllConstIter(HashTable<label>, speciesNames_, iter) { @@ -227,33 +227,33 @@ Foam::radiation::greyMeanAbsorptionEmission::aCont(const label bandI) const const volScalarField& ft = mesh_.lookupObject<volScalarField>("ft"); - const List<scalar>& Ynft = lookUpTablePtr_().lookUp(ft[cellI]); + const List<scalar>& Ynft = lookUpTablePtr_().lookUp(ft[celli]); //moles x pressure [atm] - Xipi = Ynft[specieIndex_[n]]*paToAtm(p[cellI]); + Xipi = Ynft[specieIndex_[n]]*paToAtm(p[celli]); } else { scalar invWt = 0.0; forAll(mixture.Y(), s) { - invWt += mixture.Y(s)[cellI]/mixture.W(s); + invWt += mixture.Y(s)[celli]/mixture.W(s); } label index = mixture.species()[iter.key()]; - scalar Xk = mixture.Y(index)[cellI]/(mixture.W(index)*invWt); + scalar Xk = mixture.Y(index)[celli]/(mixture.W(index)*invWt); - Xipi = Xk*paToAtm(p[cellI]); + Xipi = Xk*paToAtm(p[celli]); } - const absorptionCoeffs::coeffArray& b = coeffs_[n].coeffs(T[cellI]); + const absorptionCoeffs::coeffArray& b = coeffs_[n].coeffs(T[celli]); - scalar Ti = T[cellI]; + scalar Ti = T[celli]; // negative temperature exponents if (coeffs_[n].invTemp()) { - Ti = 1.0/T[cellI]; + Ti = 1.0/T[celli]; } - a[cellI] += + a[celli] += Xipi *( ((((b[5]*Ti + b[4])*Ti + b[3])*Ti + b[2])*Ti + b[1])*Ti diff --git a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C index 3dea24f248b707ef7e12a6468db52389987a2905..cd5421507169b1419df2a5ebdfefb5ba7e30792d 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/singleStepReactingMixture/singleStepReactingMixture.C @@ -159,24 +159,24 @@ void Foam::singleStepReactingMixture<ThermoType>::fresCorrect() const label speciei = reaction.rhs()[i].index; if (speciei != inertIndex_) { - forAll(fres_[speciei], cellI) + forAll(fres_[speciei], celli) { - if (fres_[fuelIndex_][cellI] > 0.0) + if (fres_[fuelIndex_][celli] > 0.0) { // rich mixture - fres_[speciei][cellI] = + fres_[speciei][celli] = Yprod0_[speciei] - * (1.0 + YO2[cellI]/s_.value() - YFuel[cellI]); + * (1.0 + YO2[celli]/s_.value() - YFuel[celli]); } else { // lean mixture - fres_[speciei][cellI] = + fres_[speciei][celli] = Yprod0_[speciei] * ( 1.0 - - YO2[cellI]/s_.value()*stoicRatio_.value() - + YFuel[cellI]*stoicRatio_.value() + - YO2[celli]/s_.value()*stoicRatio_.value() + + YFuel[celli]*stoicRatio_.value() ); } } diff --git a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H index 0cb1ee1444f634d55a3ca7b04a4a4eaf3a70af43..752debc2303ea703e27ef173b7c939cc8f93fbb6 100644 --- a/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H +++ b/src/thermophysicalModels/solidChemistryModel/basicSolidChemistryModel/basicSolidChemistryModel.H @@ -155,8 +155,8 @@ public: //- Return specie Table for gases virtual const speciesTable& gasTable() const = 0; - //- Set reacting status of cell, cellI - virtual void setCellReacting(const label cellI, const bool active) = 0; + //- Set reacting status of cell, celli + virtual void setCellReacting(const label celli, const bool active) = 0; //- Calculates the reaction rates virtual void calculate() = 0; diff --git a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C index 54992d7efba1ada383c3c9bb7767cf6fcf0c57b7..8817c2f5debfc66f9f14c8a3449fa2cacc31136b 100644 --- a/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/pyrolysisChemistryModel/pyrolysisChemistryModel.C @@ -188,7 +188,7 @@ pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::omega scalar pf, cf, pr, cr; label lRef, rRef; - const label cellI = cellCounter_; + const label celli = cellCounter_; scalarField om(nEqns(), 0.0); @@ -217,7 +217,7 @@ pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::omega if (updateC0) { - Ys0_[si][cellI] += sr*omegai; + Ys0_[si][celli] += sr*omegai; } } forAll(R.grhs(), g) @@ -249,7 +249,7 @@ Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::omega { scalarField c1(nSpecie_, 0.0); - label cellI = cellCounter_; + label celli = cellCounter_; for (label i=0; i<nSpecie_; i++) { @@ -266,8 +266,8 @@ Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::omega const scalar exp = R.lhs()[si].exponent; kf *= - pow(c1[si]/Ys0_[si][cellI], exp) - *(Ys0_[si][cellI]); + pow(c1[si]/Ys0_[si][celli], exp) + *(Ys0_[si][celli]); } return kf; @@ -641,9 +641,9 @@ Foam::pyrolysisChemistryModel<CompType, SolidThermo, GasThermo>::gasHs const GasThermo& mixture = gasThermo_[index]; - forAll(gasHs, cellI) + forAll(gasHs, celli) { - gasHs[cellI] = mixture.Hs(p[cellI], T[cellI]); + gasHs[celli] = mixture.Hs(p[celli], T[celli]); } return tHs; diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C index 8bf5ea932099bfa68411db0522d00f5058258700..e723ff90ed3956dd2833c9deeb1a4489abf1c805 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.C @@ -140,10 +140,10 @@ Foam::solidChemistryModel<CompType, SolidThermo>::Sh() const forAll(Ys_, i) { - forAll(Sh, cellI) + forAll(Sh, celli) { scalar hf = solidThermo_[i].Hc(); - Sh[cellI] -= hf*RRs_[i][cellI]; + Sh[celli] -= hf*RRs_[i][celli]; } } } @@ -187,11 +187,11 @@ Foam::solidChemistryModel<CompType, SolidThermo>::dQ() const template<class CompType, class SolidThermo> void Foam::solidChemistryModel<CompType, SolidThermo>::setCellReacting ( - const label cellI, + const label celli, const bool active ) { - reactingCells_[cellI] = active; + reactingCells_[celli] = active; } // ************************************************************************* // diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H index f762114fbf751ae0eab3b8dcf3207b28d35a2532..b19a5ead6f1df6ce6d8cf5d805ce74289cd88aff 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistryModel/solidChemistryModel.H @@ -101,8 +101,8 @@ protected: //- Write access to source terms for solids inline PtrList<DimensionedField<scalar, volMesh>>& RRs(); - //- Set reacting status of cell, cellI - void setCellReacting(const label cellI, const bool active); + //- Set reacting status of cell, celli + void setCellReacting(const label celli, const bool active); public: diff --git a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C index f67b6cdd459bd1c4c9d2311d46aebc8c0f29833e..c5fa19aeb1b82771fcf7f9f271b17b554f300d67 100644 --- a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C +++ b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C @@ -143,11 +143,11 @@ void Foam::mixerFvMesh::addZonesAndModifiers() labelList movingCells(nCells()); label nMovingCells = 0; - forAll(rs, cellI) + forAll(rs, celli) { - if (rs[cellI] == originRegion) + if (rs[celli] == originRegion) { - movingCells[nMovingCells] = cellI; + movingCells[nMovingCells] = celli; nMovingCells++; } } @@ -217,14 +217,14 @@ void Foam::mixerFvMesh::calcMovingMasks() const const labelList& cellAddr = cellZones()["movingCells"]; - forAll(cellAddr, cellI) + forAll(cellAddr, celli) { - const cell& curCell = c[cellAddr[cellI]]; + const cell& curCell = c[cellAddr[celli]]; - forAll(curCell, faceI) + forAll(curCell, facei) { // Mark all the points as moving - const face& curFace = f[curCell[faceI]]; + const face& curFace = f[curCell[facei]]; forAll(curFace, pointI) { @@ -241,9 +241,9 @@ void Foam::mixerFvMesh::calcMovingMasks() const const labelList& innerSliderAddr = faceZones()[innerSliderZoneName]; - forAll(innerSliderAddr, faceI) + forAll(innerSliderAddr, facei) { - const face& curFace = f[innerSliderAddr[faceI]]; + const face& curFace = f[innerSliderAddr[facei]]; forAll(curFace, pointI) { @@ -259,9 +259,9 @@ void Foam::mixerFvMesh::calcMovingMasks() const const labelList& outerSliderAddr = faceZones()[outerSliderZoneName]; - forAll(outerSliderAddr, faceI) + forAll(outerSliderAddr, facei) { - const face& curFace = f[outerSliderAddr[faceI]]; + const face& curFace = f[outerSliderAddr[facei]]; forAll(curFace, pointI) { diff --git a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C index 747a1c0edf21695b04533e8d9eadbb36710d07f0..eaa569fb973a342a8280de8da8c10ef1505d23f8 100644 --- a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C +++ b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C @@ -114,38 +114,38 @@ void Foam::movingConeTopoFvMesh::addZonesAndModifiers() boolList flipZone2(fc.size(), false); label nZoneFaces2 = 0; - forAll(fc, faceI) + forAll(fc, facei) { if ( - fc[faceI].x() > -0.003501 - && fc[faceI].x() < -0.003499 + fc[facei].x() > -0.003501 + && fc[facei].x() < -0.003499 ) { - if ((fa[faceI] & vector(1, 0, 0)) < 0) + if ((fa[facei] & vector(1, 0, 0)) < 0) { flipZone1[nZoneFaces1] = true; } - zone1[nZoneFaces1] = faceI; - Info<< "face " << faceI << " for zone 1. Flip: " + zone1[nZoneFaces1] = facei; + Info<< "face " << facei << " for zone 1. Flip: " << flipZone1[nZoneFaces1] << endl; nZoneFaces1++; } else if ( - fc[faceI].x() > -0.00701 - && fc[faceI].x() < -0.00699 + fc[facei].x() > -0.00701 + && fc[facei].x() < -0.00699 ) { - zone2[nZoneFaces2] = faceI; + zone2[nZoneFaces2] = facei; - if ((fa[faceI] & vector(1, 0, 0)) > 0) + if ((fa[facei] & vector(1, 0, 0)) > 0) { flipZone2[nZoneFaces2] = true; } - Info<< "face " << faceI << " for zone 2. Flip: " + Info<< "face " << facei << " for zone 2. Flip: " << flipZone2[nZoneFaces2] << endl; nZoneFaces2++; } diff --git a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMesh.C b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMesh.C index a2fb50dc40306689ca42b44ad7bf92cc1079539c..a2411f21831d29fbe1f2c46881539012a1d09193 100644 --- a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMesh.C +++ b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMesh.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 @@ -93,18 +93,18 @@ bool Foam::rawTopoChangerFvMesh::update() const label nOldInternal = topoChangeMap().oldPatchStarts()[0]; const labelList& faceMap = topoChangeMap().faceMap(); - for (label faceI = 0; faceI < nInternalFaces(); faceI++) + for (label facei = 0; facei < nInternalFaces(); facei++) { - if (faceMap[faceI] >= 0) + if (faceMap[facei] >= 0) { - mappedFace[faceI] = 1; + mappedFace[facei] = 1; } } - for (label faceI = nInternalFaces(); faceI < nFaces(); faceI++) + for (label facei = nInternalFaces(); facei < nFaces(); facei++) { - if (faceMap[faceI] >= 0 && faceMap[faceI] >= nOldInternal) + if (faceMap[facei] >= 0 && faceMap[facei] >= nOldInternal) { - mappedFace[faceI] = 1; + mappedFace[facei] = 1; } } diff --git a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C index 0dee7077b7981cabfa06f45d953fffae7807b914..fbad1eed48bea80fe84d4ce6eb84603c25716db6 100644 --- a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C +++ b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C @@ -38,11 +38,11 @@ void Foam::rawTopoChangerFvMesh::setUnmappedValues { //Pout<< "Checking field " << fld.name() << endl; - forAll(fld.boundaryField(), patchI) + forAll(fld.boundaryField(), patchi) { PatchField<Type>& fvp = const_cast<PatchField<Type>&> ( - fld.boundaryField()[patchI] + fld.boundaryField()[patchi] ); const label start = fvp.patch().start(); @@ -53,8 +53,8 @@ void Foam::rawTopoChangerFvMesh::setUnmappedValues //Pout<< "** Resetting unassigned value on patch " // << fvp.patch().name() // << " localface:" << i - // << " to:" << baseFld.boundaryField()[patchI][i] << endl; - fvp[i] = baseFld.boundaryField()[patchI][i]; + // << " to:" << baseFld.boundaryField()[patchi][i] << endl; + fvp[i] = baseFld.boundaryField()[patchi][i]; } } } diff --git a/src/triSurface/meshTriangulation/meshTriangulation.C b/src/triSurface/meshTriangulation/meshTriangulation.C index f8efd181bdfa0c036fc2c57350b12d76ce0108e7..ddcf0ec715c10543c64370840c0b1d6c7e143f89 100644 --- a/src/triSurface/meshTriangulation/meshTriangulation.C +++ b/src/triSurface/meshTriangulation/meshTriangulation.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,13 +33,13 @@ bool Foam::meshTriangulation::isInternalFace ( const primitiveMesh& mesh, const boolList& includedCell, - const label faceI + const label facei ) { - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - label own = mesh.faceOwner()[faceI]; - label nei = mesh.faceNeighbour()[faceI]; + label own = mesh.faceOwner()[facei]; + label nei = mesh.faceNeighbour()[facei]; if (includedCell[own] && includedCell[nei]) { @@ -75,25 +75,25 @@ void Foam::meshTriangulation::getFaces nFaces = 0; nInternalFaces = 0; - forAll(includedCell, cellI) + forAll(includedCell, celli) { // Include faces of cut cells only. - if (includedCell[cellI]) + if (includedCell[celli]) { - const labelList& cFaces = mesh.cells()[cellI]; + const labelList& cFaces = mesh.cells()[celli]; forAll(cFaces, i) { - label faceI = cFaces[i]; + label facei = cFaces[i]; - if (!faceIsCut[faceI]) + if (!faceIsCut[facei]) { // First visit of face. nFaces++; - faceIsCut[faceI] = true; + faceIsCut[facei] = true; // See if would become internal or external face - if (isInternalFace(mesh, includedCell, faceI)) + if (isInternalFace(mesh, includedCell, facei)) { nInternalFaces++; } @@ -110,7 +110,7 @@ void Foam::meshTriangulation::getFaces void Foam::meshTriangulation::insertTriangles ( const triFaceList& faceTris, - const label faceI, + const label facei, const label regionI, const bool reverse, @@ -140,7 +140,7 @@ void Foam::meshTriangulation::insertTriangles tri.region() = regionI; - faceMap_[triI] = faceI; + faceMap_[triI] = facei; triI++; } @@ -195,21 +195,21 @@ Foam::meshTriangulation::meshTriangulation if (faceCentreDecomposition) { - forAll(faceIsCut, faceI) + forAll(faceIsCut, facei) { - if (faceIsCut[faceI]) + if (faceIsCut[facei]) { - nTotTri += faces[faceI].size(); + nTotTri += faces[facei].size(); } } } else { - forAll(faceIsCut, faceI) + forAll(faceIsCut, facei) { - if (faceIsCut[faceI]) + if (faceIsCut[facei]) { - nTotTri += faces[faceI].nTriangles(points); + nTotTri += faces[facei].nTriangles(points); } } } @@ -228,9 +228,9 @@ Foam::meshTriangulation::meshTriangulation newPoints[pointI] = mesh.points()[pointI]; } // Face centres - forAll(faces, faceI) + forAll(faces, facei) { - newPoints[mesh.nPoints() + faceI] = mesh.faceCentres()[faceI]; + newPoints[mesh.nPoints() + facei] = mesh.faceCentres()[facei]; } } @@ -246,26 +246,26 @@ Foam::meshTriangulation::meshTriangulation // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Triangulate internal faces - forAll(faceIsCut, faceI) + forAll(faceIsCut, facei) { - if (faceIsCut[faceI] && isInternalFace(mesh, includedCell, faceI)) + if (faceIsCut[facei] && isInternalFace(mesh, includedCell, facei)) { // Face was internal to the mesh and will be 'internal' to // the surface. // Triangulate face - const face& f = faces[faceI]; + const face& f = faces[facei]; forAll(f, fp) { - faceMap_[triI] = faceI; + faceMap_[triI] = facei; triangles[triI++] = labelledTri ( f[fp], f.nextLabel(fp), - mesh.nPoints() + faceI, // face centre + mesh.nPoints() + facei, // face centre internalFacesPatch ); } @@ -275,22 +275,22 @@ Foam::meshTriangulation::meshTriangulation // Triangulate external faces - forAll(faceIsCut, faceI) + forAll(faceIsCut, facei) { - if (faceIsCut[faceI] && !isInternalFace(mesh, includedCell, faceI)) + if (faceIsCut[facei] && !isInternalFace(mesh, includedCell, facei)) { // Face will become outside of the surface. - label patchI = -1; + label patchi = -1; bool reverse = false; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - patchI = internalFacesPatch; + patchi = internalFacesPatch; // Check orientation. Check which side of the face gets // included (note: only one side is). - if (includedCell[mesh.faceOwner()[faceI]]) + if (includedCell[mesh.faceOwner()[facei]]) { reverse = false; } @@ -303,28 +303,28 @@ Foam::meshTriangulation::meshTriangulation { // Face was already outside so orientation ok. - patchI = patches.whichPatch(faceI); + patchi = patches.whichPatch(facei); reverse = false; } // Triangulate face - const face& f = faces[faceI]; + const face& f = faces[facei]; if (reverse) { forAll(f, fp) { - faceMap_[triI] = faceI; + faceMap_[triI] = facei; triangles[triI++] = labelledTri ( f.nextLabel(fp), f[fp], - mesh.nPoints() + faceI, // face centre - patchI + mesh.nPoints() + facei, // face centre + patchi ); } } @@ -332,15 +332,15 @@ Foam::meshTriangulation::meshTriangulation { forAll(f, fp) { - faceMap_[triI] = faceI; + faceMap_[triI] = facei; triangles[triI++] = labelledTri ( f[fp], f.nextLabel(fp), - mesh.nPoints() + faceI, // face centre - patchI + mesh.nPoints() + facei, // face centre + patchi ); } } @@ -353,22 +353,22 @@ Foam::meshTriangulation::meshTriangulation // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Triangulate internal faces - forAll(faceIsCut, faceI) + forAll(faceIsCut, facei) { - if (faceIsCut[faceI] && isInternalFace(mesh, includedCell, faceI)) + if (faceIsCut[facei] && isInternalFace(mesh, includedCell, facei)) { // Face was internal to the mesh and will be 'internal' to // the surface. // Triangulate face. Fall back to naive triangulation if failed. - faceTriangulation faceTris(points, faces[faceI], true); + faceTriangulation faceTris(points, faces[facei], true); if (faceTris.empty()) { WarningInFunction - << "Could not find triangulation for face " << faceI - << " vertices " << faces[faceI] << " coords " - << IndirectList<point>(points, faces[faceI])() << endl; + << "Could not find triangulation for face " << facei + << " vertices " << faces[facei] << " coords " + << IndirectList<point>(points, faces[facei])() << endl; } else { @@ -376,7 +376,7 @@ Foam::meshTriangulation::meshTriangulation insertTriangles ( faceTris, - faceI, + facei, internalFacesPatch, false, // no reverse @@ -390,22 +390,22 @@ Foam::meshTriangulation::meshTriangulation // Triangulate external faces - forAll(faceIsCut, faceI) + forAll(faceIsCut, facei) { - if (faceIsCut[faceI] && !isInternalFace(mesh, includedCell, faceI)) + if (faceIsCut[facei] && !isInternalFace(mesh, includedCell, facei)) { // Face will become outside of the surface. - label patchI = -1; + label patchi = -1; bool reverse = false; - if (mesh.isInternalFace(faceI)) + if (mesh.isInternalFace(facei)) { - patchI = internalFacesPatch; + patchi = internalFacesPatch; // Check orientation. Check which side of the face gets // included (note: only one side is). - if (includedCell[mesh.faceOwner()[faceI]]) + if (includedCell[mesh.faceOwner()[facei]]) { reverse = false; } @@ -418,20 +418,20 @@ Foam::meshTriangulation::meshTriangulation { // Face was already outside so orientation ok. - patchI = patches.whichPatch(faceI); + patchi = patches.whichPatch(facei); reverse = false; } // Triangulate face - faceTriangulation faceTris(points, faces[faceI], true); + faceTriangulation faceTris(points, faces[facei], true); if (faceTris.empty()) { WarningInFunction - << "Could not find triangulation for face " << faceI - << " vertices " << faces[faceI] << " coords " - << IndirectList<point>(points, faces[faceI])() << endl; + << "Could not find triangulation for face " << facei + << " vertices " << faces[facei] << " coords " + << IndirectList<point>(points, faces[facei])() << endl; } else { @@ -439,8 +439,8 @@ Foam::meshTriangulation::meshTriangulation insertTriangles ( faceTris, - faceI, - patchI, + facei, + patchi, reverse, // whether to reverse triangles, @@ -461,14 +461,14 @@ Foam::meshTriangulation::meshTriangulation geometricSurfacePatchList surfPatches(patches.size()); - forAll(patches, patchI) + forAll(patches, patchi) { - surfPatches[patchI] = + surfPatches[patchi] = geometricSurfacePatch ( - patches[patchI].physicalType(), - patches[patchI].name(), - patchI + patches[patchi].physicalType(), + patches[patchi].name(), + patchi ); } diff --git a/src/triSurface/meshTriangulation/meshTriangulation.H b/src/triSurface/meshTriangulation/meshTriangulation.H index 047ef6480f6854c53b577d57acb68f8eee9074ae..c1f87bc0eb71099776af0d9f02ffcae897a3e4d6 100644 --- a/src/triSurface/meshTriangulation/meshTriangulation.H +++ b/src/triSurface/meshTriangulation/meshTriangulation.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 @@ class meshTriangulation ( const primitiveMesh&, const boolList& includedCell, - const label faceI + const label facei ); //- Find boundary faces of subset. @@ -91,7 +91,7 @@ class meshTriangulation void insertTriangles ( const triFaceList&, - const label faceI, + const label facei, const label regionI, const bool reverse, diff --git a/src/triSurface/tools/labelledTri/sortLabelledTri.C b/src/triSurface/tools/labelledTri/sortLabelledTri.C index a8d868f80f7ae76c98a7060aeca4dc817164f9aa..8ee98169f40f9a901d413edb82927e332ebc5f99 100644 --- a/src/triSurface/tools/labelledTri/sortLabelledTri.C +++ b/src/triSurface/tools/labelledTri/sortLabelledTri.C @@ -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 @@ -54,9 +54,9 @@ sortLabelledTri::sortLabelledTri(const triSurface& surf) { // Set the face label - forAll(surf, faceI) + forAll(surf, facei) { - operator[](faceI).index_ = faceI; + operator[](facei).index_ = facei; } // Sort according to region number. diff --git a/src/triSurface/triSurface/interfaces/AC3D/readAC.C b/src/triSurface/triSurface/interfaces/AC3D/readAC.C index 2ff59bfb071f413b726a2c3bcc6c318a8dc93b35..8d300f08a1ac5ff2549c48655deb79a023504b39 100644 --- a/src/triSurface/triSurface/interfaces/AC3D/readAC.C +++ b/src/triSurface/triSurface/interfaces/AC3D/readAC.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 @@ -172,18 +172,18 @@ bool triSurface::readAC(const fileName& ACfileName) // Start of vertices for object/patch label patchStartVert = 0; - for (label patchI = 0; patchI < nPatches; patchI++) + for (label patchi = 0; patchi < nPatches; patchi++) { readUpto ( "OBJECT", ACfile, args, - " while reading patch " + Foam::name(patchI) + " while reading patch " + Foam::name(patchi) ); // Object global values - string patchName = string("patch") + name(patchI); + string patchName = string("patch") + name(patchi); label nVerts = 0; tensor rot(I); vector loc(0, 0, 0); @@ -197,7 +197,7 @@ bool triSurface::readAC(const fileName& ACfileName) { FatalErrorInFunction << "Did not read up to \"kids 0\" while reading patch " - << patchI << " from file " << ACfileName + << patchi << " from file " << ACfileName << exit(FatalError); } @@ -220,7 +220,7 @@ bool triSurface::readAC(const fileName& ACfileName) WarningInFunction << "rot (rotation tensor) command not implemented" << "Line:" << cmd << ' ' << args << endl - << "while reading patch " << patchI << endl; + << "while reading patch " << patchi << endl; } else if (cmd == "loc") { @@ -254,7 +254,7 @@ bool triSurface::readAC(const fileName& ACfileName) { static string errorMsg = string(" while reading face ") - + name(triI) + " on patch " + name(patchI) + + name(triI) + " on patch " + name(patchi) + " from file " + ACfileName; readUpto("SURF", ACfile, args, errorMsg); @@ -269,7 +269,7 @@ bool triSurface::readAC(const fileName& ACfileName) << "Can only read surfaces with 3 vertices." << endl << "Detected " << size << " when reading triangle " - << triI << " of patch " << patchI + << triI << " of patch " << patchi << exit(FatalError); } @@ -292,7 +292,7 @@ bool triSurface::readAC(const fileName& ACfileName) v0 + patchStartVert, v1 + patchStartVert, v2 + patchStartVert, - patchI + patchi ) ); } @@ -312,16 +312,16 @@ bool triSurface::readAC(const fileName& ACfileName) FatalErrorInFunction << "Can only read objects without kids." << " Encountered " << nKids << " kids when" - << " reading patch " << patchI + << " reading patch " << patchi << exit(FatalError); } - patches[patchI] = + patches[patchi] = geometricSurfacePatch ( "empty", word(patchName), - patchI + patchi ); // Stop reading current patch diff --git a/src/triSurface/triSurface/interfaces/AC3D/writeAC.C b/src/triSurface/triSurface/interfaces/AC3D/writeAC.C index b5ab7114bd1ead565002eef445ee9ff6f04f4e7e..eec3cec436755cc6c7e4391ead12d20cfdf19983 100644 --- a/src/triSurface/triSurface/interfaces/AC3D/writeAC.C +++ b/src/triSurface/triSurface/interfaces/AC3D/writeAC.C @@ -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 @@ -59,11 +59,11 @@ void Foam::triSurface::writeAC(Ostream& os) const os << "AC3Db" << endl; - forAll(myPatches, patchI) + forAll(myPatches, patchi) { - const word& pName = myPatches[patchI].name(); + const word& pName = myPatches[patchi].name(); - label colourI = patchI % 8; + label colourI = patchi % 8; label colourCompI = 3 * colourI; os << "MATERIAL \"" << pName << "Mat\" rgb " @@ -82,9 +82,9 @@ void Foam::triSurface::writeAC(Ostream& os) const label faceIndex = 0; - forAll(myPatches, patchI) + forAll(myPatches, patchi) { - const surfacePatch& sp = myPatches[patchI]; + const surfacePatch& sp = myPatches[patchi]; os << "OBJECT poly" << endl << "name \"" << sp.name() << '"' << endl; @@ -95,9 +95,9 @@ void Foam::triSurface::writeAC(Ostream& os) const forAll(sp, patchFaceI) { - const label faceI = faceMap[faceIndex++]; + const label facei = faceMap[faceIndex++]; - include[faceI] = true; + include[facei] = true; } labelList pointMap; @@ -118,12 +118,12 @@ void Foam::triSurface::writeAC(Ostream& os) const os << "numsurf " << patch.localFaces().size() << endl; - forAll(patch.localFaces(), faceI) + forAll(patch.localFaces(), facei) { - const labelledTri& f = patch.localFaces()[faceI]; + const labelledTri& f = patch.localFaces()[facei]; os << "SURF 0x20" << endl // polygon - << "mat " << patchI << endl + << "mat " << patchi << endl << "refs " << f.size() << endl; os << f[0] << " 0 0" << endl; diff --git a/src/triSurface/triSurface/interfaces/DX/writeDX.C b/src/triSurface/triSurface/interfaces/DX/writeDX.C index d5087a629d90f5574d7e388688cd0da59f72fce9..65d9d08a2c749498c84dedeb2b16574bc564459e 100644 --- a/src/triSurface/triSurface/interfaces/DX/writeDX.C +++ b/src/triSurface/triSurface/interfaces/DX/writeDX.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 @@ -48,10 +48,10 @@ void triSurface::writeDXGeometry // Print patch names as comment os << "# Patches:" << endl; - forAll(myPatches, patchI) + forAll(myPatches, patchi) { - os << "# " << patchI << " " - << myPatches[patchI].name() << endl; + os << "# " << patchi << " " + << myPatches[patchi].name() << endl; } os << nl << endl; @@ -75,19 +75,19 @@ void triSurface::writeDXGeometry { label faceIndex = 0; - forAll(myPatches, patchI) + forAll(myPatches, patchi) { // Print all faces belonging to this patch for ( label patchFaceI = 0; - patchFaceI < myPatches[patchI].size(); + patchFaceI < myPatches[patchi].size(); patchFaceI++ ) { - const label faceI = faceMap[faceIndex++]; - const labelledTri& f = localFaces()[faceI]; + const label facei = faceMap[faceIndex++]; + const labelledTri& f = localFaces()[facei]; os << f[0] << ' ' << f[1] << ' ' << f[2] << endl; } @@ -95,9 +95,9 @@ void triSurface::writeDXGeometry } else { - forAll(*this, faceI) + forAll(*this, facei) { - const labelledTri& f = localFaces()[faceI]; + const labelledTri& f = localFaces()[facei]; os << f[0] << ' ' << f[1] << ' ' << f[2] << endl; } @@ -134,11 +134,11 @@ void triSurface::writeDX(const bool writeSorted, Ostream& os) const labelList faceMap; surfacePatchList myPatches(calcPatches(faceMap)); - forAll(myPatches, patchI) + forAll(myPatches, patchi) { - forAll(myPatches[patchI], patchFaceI) + forAll(myPatches[patchi], patchFaceI) { - os << patchI << endl; + os << patchi << endl; } } } @@ -146,9 +146,9 @@ void triSurface::writeDX(const bool writeSorted, Ostream& os) const { // Write face number as data - forAll(*this, faceI) + forAll(*this, facei) { - os << faceI << endl; + os << facei << endl; } } @@ -170,9 +170,9 @@ void triSurface::writeDX(const scalarField& field, Ostream& os) const // Connections dependent data os << "object 3 class array type float rank 0 items " << field.size() << " data follows" << endl; - forAll(field, faceI) + forAll(field, facei) { - os << field[faceI] << endl; + os << field[facei] << endl; } os << endl << "attribute \"dep\" string \"connections\"" << endl << endl; @@ -213,11 +213,11 @@ void triSurface::writeDX(const vectorField& field, Ostream& os) const // Connections dependent data os << "object 3 class array type float rank 1 shape 3 items " << field.size() << " data follows" << endl; - forAll(field, faceI) + forAll(field, facei) { - os << field[faceI].x() << ' ' - << field[faceI].y() << ' ' - << field[faceI].z() << endl; + os << field[facei].x() << ' ' + << field[facei].y() << ' ' + << field[facei].z() << endl; } os << endl << "attribute \"dep\" string \"connections\"" << endl << endl; diff --git a/src/triSurface/triSurface/interfaces/GTS/writeGTS.C b/src/triSurface/triSurface/interfaces/GTS/writeGTS.C index 67b4c86338475657eaa657b49aef4a6acad14ae9..4639d6d01dce0f5fba9fa0d976adf3bccfc59b96 100644 --- a/src/triSurface/triSurface/interfaces/GTS/writeGTS.C +++ b/src/triSurface/triSurface/interfaces/GTS/writeGTS.C @@ -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 @@ -43,10 +43,10 @@ void triSurface::writeGTS(const bool writeSorted, Ostream& os) const surfacePatchList myPatches(calcPatches(faceMap)); // Print patch names as comment - forAll(myPatches, patchI) + forAll(myPatches, patchi) { - os << "# " << patchI << " " - << myPatches[patchI].name() << endl; + os << "# " << patchi << " " + << myPatches[patchi].name() << endl; } os << "#" << endl; @@ -82,36 +82,36 @@ void triSurface::writeGTS(const bool writeSorted, Ostream& os) const if (writeSorted) { label faceIndex = 0; - forAll(myPatches, patchI) + forAll(myPatches, patchi) { for ( label patchFaceI = 0; - patchFaceI < myPatches[patchI].size(); + patchFaceI < myPatches[patchi].size(); patchFaceI++ ) { - const label faceI = faceMap[faceIndex++]; + const label facei = faceMap[faceIndex++]; - const labelList& fEdges = faceEdges()[faceI]; + const labelList& fEdges = faceEdges()[facei]; os << fEdges[0] + 1 << ' ' << fEdges[1] + 1 << ' ' << fEdges[2] + 1 << ' ' - << (*this)[faceI].region() << endl; + << (*this)[facei].region() << endl; } } } else { - forAll(faceEs, faceI) + forAll(faceEs, facei) { - const labelList& fEdges = faceEdges()[faceI]; + const labelList& fEdges = faceEdges()[facei]; os << fEdges[0] + 1 << ' ' << fEdges[1] + 1 << ' ' << fEdges[2] + 1 << ' ' - << (*this)[faceI].region() << endl; + << (*this)[facei].region() << endl; } } } diff --git a/src/triSurface/triSurface/interfaces/NAS/readNAS.C b/src/triSurface/triSurface/interfaces/NAS/readNAS.C index ad15baf6ba2936b561766809bf247c10e6b44668..5e5e59166b8bd8a9f87f6549097ce67b21194dac 100644 --- a/src/triSurface/triSurface/interfaces/NAS/readNAS.C +++ b/src/triSurface/triSurface/interfaces/NAS/readNAS.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 @@ -212,19 +212,19 @@ bool triSurface::readNAS(const fileName& fName) // Convert group into patch Map<label>::const_iterator iter = groupToPatch.find(groupId); - label patchI; + label patchi; if (iter == groupToPatch.end()) { - patchI = nPatches++; - groupToPatch.insert(groupId, patchI); - Info<< "patch " << patchI << " => group " << groupId << endl; + patchi = nPatches++; + groupToPatch.insert(groupId, patchi); + Info<< "patch " << patchi << " => group " << groupId << endl; } else { - patchI = iter(); + patchi = iter(); } - faces.append(labelledTri(a, b, c, patchI)); + faces.append(labelledTri(a, b, c, patchi)); } else if (cmd == "CQUAD4") { @@ -237,20 +237,20 @@ bool triSurface::readNAS(const fileName& fName) // Convert group into patch Map<label>::const_iterator iter = groupToPatch.find(groupId); - label patchI; + label patchi; if (iter == groupToPatch.end()) { - patchI = nPatches++; - groupToPatch.insert(groupId, patchI); - Info<< "patch " << patchI << " => group " << groupId << endl; + patchi = nPatches++; + groupToPatch.insert(groupId, patchi); + Info<< "patch " << patchi << " => group " << groupId << endl; } else { - patchI = iter(); + patchi = iter(); } - faces.append(labelledTri(a, b, c, patchI)); - faces.append(labelledTri(c, d, a, patchI)); + faces.append(labelledTri(a, b, c, patchi)); + faces.append(labelledTri(c, d, a, patchi)); } else if (cmd == "PSHELL") { @@ -340,13 +340,13 @@ bool triSurface::readNAS(const fileName& fName) forAllConstIter(Map<word>, groupToName, iter) { - label patchI = groupToPatch[iter.key()]; + label patchi = groupToPatch[iter.key()]; - patches[patchI] = geometricSurfacePatch + patches[patchi] = geometricSurfacePatch ( "empty", iter(), - patchI + patchi ); } diff --git a/src/triSurface/triSurface/interfaces/OBJ/writeOBJ.C b/src/triSurface/triSurface/interfaces/OBJ/writeOBJ.C index ee260ea6442348a28bd2a83045e57334b42e3eb5..e4ce56f60a8c2ea47e68f650789edca5e2436d31 100644 --- a/src/triSurface/triSurface/interfaces/OBJ/writeOBJ.C +++ b/src/triSurface/triSurface/interfaces/OBJ/writeOBJ.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 @@ -50,10 +50,10 @@ void triSurface::writeOBJ(const bool writeSorted, Ostream& os) const const pointField& ps = points(); // Print patch names as comment - forAll(myPatches, patchI) + forAll(myPatches, patchi) { - os << "# " << patchI << " " - << myPatches[patchI].name() << nl; + os << "# " << patchi << " " + << myPatches[patchi].name() << nl; } os << "#" << nl; @@ -75,26 +75,26 @@ void triSurface::writeOBJ(const bool writeSorted, Ostream& os) const { label faceIndex = 0; - forAll(myPatches, patchI) + forAll(myPatches, patchi) { // Print all faces belonging to this patch - os << "g " << myPatches[patchI].name() << nl; + os << "g " << myPatches[patchi].name() << nl; for ( label patchFaceI = 0; - patchFaceI < myPatches[patchI].size(); + patchFaceI < myPatches[patchi].size(); patchFaceI++ ) { - const label faceI = faceMap[faceIndex++]; + const label facei = faceMap[faceIndex++]; os << "f " - << operator[](faceI)[0] + 1 << ' ' - << operator[](faceI)[1] + 1 << ' ' - << operator[](faceI)[2] + 1 - //<< " # " << operator[](faceI).region() + << operator[](facei)[0] + 1 << ' ' + << operator[](facei)[1] + 1 << ' ' + << operator[](facei)[2] + 1 + //<< " # " << operator[](facei).region() << nl; } } @@ -103,30 +103,30 @@ void triSurface::writeOBJ(const bool writeSorted, Ostream& os) const { // Get patch (=compact region) per face labelList patchIDs(size()); - forAll(myPatches, patchI) + forAll(myPatches, patchi) { - label faceI = myPatches[patchI].start(); + label facei = myPatches[patchi].start(); - forAll(myPatches[patchI], i) + forAll(myPatches[patchi], i) { - patchIDs[faceMap[faceI++]] = patchI; + patchIDs[faceMap[facei++]] = patchi; } } label prevPatchI = -1; - forAll(*this, faceI) + forAll(*this, facei) { - if (prevPatchI != patchIDs[faceI]) + if (prevPatchI != patchIDs[facei]) { - prevPatchI = patchIDs[faceI]; - os << "g " << myPatches[patchIDs[faceI]].name() << nl; + prevPatchI = patchIDs[facei]; + os << "g " << myPatches[patchIDs[facei]].name() << nl; } os << "f " - << operator[](faceI)[0] + 1 << ' ' - << operator[](faceI)[1] + 1 << ' ' - << operator[](faceI)[2] + 1 + << operator[](facei)[0] + 1 << ' ' + << operator[](facei)[1] + 1 << ' ' + << operator[](facei)[2] + 1 << nl; } } diff --git a/src/triSurface/triSurface/interfaces/OFF/readOFF.C b/src/triSurface/triSurface/interfaces/OFF/readOFF.C index 232c1a7aec9fba5f6d37fc6590f3cd471d3396f2..290d7b0405778b531c6a25a39c9eeea1c9136b33 100644 --- a/src/triSurface/triSurface/interfaces/OFF/readOFF.C +++ b/src/triSurface/triSurface/interfaces/OFF/readOFF.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 @@ -79,7 +79,7 @@ bool Foam::triSurface::readOFF(const fileName& OFFfileName) // Read faces & triangulate them, DynamicList<labelledTri> tris(nElems); - for (label faceI = 0; faceI < nElems; faceI++) + for (label facei = 0; facei < nElems; facei++) { line = getLineNoComment(OFFfile); { diff --git a/src/triSurface/triSurface/interfaces/OFF/writeOFF.C b/src/triSurface/triSurface/interfaces/OFF/writeOFF.C index 894c64256e6dcf06629da3b8261f582bf474c19d..1f7b9d83efdd9eb608e6cfa5e859b62a0c3febe8 100644 --- a/src/triSurface/triSurface/interfaces/OFF/writeOFF.C +++ b/src/triSurface/triSurface/interfaces/OFF/writeOFF.C @@ -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 @@ -43,10 +43,10 @@ void triSurface::writeOFF(const bool writeSorted, Ostream& os) const surfacePatchList myPatches(calcPatches(faceMap)); // Print patch names as comment - forAll(myPatches, patchI) + forAll(myPatches, patchi) { - os << "# " << patchI << " " - << myPatches[patchI].name() << endl; + os << "# " << patchi << " " + << myPatches[patchi].name() << endl; } os << nl << endl; @@ -72,37 +72,37 @@ void triSurface::writeOFF(const bool writeSorted, Ostream& os) const { label faceIndex = 0; - forAll(myPatches, patchI) + forAll(myPatches, patchi) { // Print all faces belonging to this patch for ( label patchFaceI = 0; - patchFaceI < myPatches[patchI].size(); + patchFaceI < myPatches[patchi].size(); patchFaceI++ ) { - const label faceI = faceMap[faceIndex++]; + const label facei = faceMap[faceIndex++]; os << "3 " - << operator[](faceI)[0] << ' ' - << operator[](faceI)[1] << ' ' - << operator[](faceI)[2] << ' ' - << operator[](faceI).region() + << operator[](facei)[0] << ' ' + << operator[](facei)[1] << ' ' + << operator[](facei)[2] << ' ' + << operator[](facei).region() << endl; } } } else { - forAll(*this, faceI) + forAll(*this, facei) { os << "3 " - << operator[](faceI)[0] << ' ' - << operator[](faceI)[1] << ' ' - << operator[](faceI)[2] << ' ' - << operator[](faceI).region() + << operator[](facei)[0] << ' ' + << operator[](facei)[1] << ' ' + << operator[](facei)[2] << ' ' + << operator[](facei).region() << endl; } } diff --git a/src/triSurface/triSurface/interfaces/SMESH/writeSMESH.C b/src/triSurface/triSurface/interfaces/SMESH/writeSMESH.C index 8a02e6a45cc5326c8f33103b2eba6259cef4b7ed..5d8d81aadcfa86131b385dc764ddae20b703bd49 100644 --- a/src/triSurface/triSurface/interfaces/SMESH/writeSMESH.C +++ b/src/triSurface/triSurface/interfaces/SMESH/writeSMESH.C @@ -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 @@ -59,24 +59,24 @@ void triSurface::writeSMESH(const bool writeSorted, Ostream& os) const label faceIndex = 0; - forAll(myPatches, patchI) + forAll(myPatches, patchi) { // Print all faces belonging to this patch for ( label patchFaceI = 0; - patchFaceI < myPatches[patchI].size(); + patchFaceI < myPatches[patchi].size(); patchFaceI++ ) { - const label faceI = faceMap[faceIndex++]; + const label facei = faceMap[faceIndex++]; os << "3 " // triangles - << operator[](faceI)[0] << ' ' - << operator[](faceI)[1] << ' ' - << operator[](faceI)[2] << ' ' - << operator[](faceI).region() // region number + << operator[](facei)[0] << ' ' + << operator[](facei)[1] << ' ' + << operator[](facei)[2] << ' ' + << operator[](facei).region() // region number << endl; } } @@ -88,13 +88,13 @@ void triSurface::writeSMESH(const bool writeSorted, Ostream& os) const { os << size() << " 1" << endl; // 1 attribute: region number - forAll(*this, faceI) + forAll(*this, facei) { os << "3 " - << operator[](faceI)[0] << ' ' - << operator[](faceI)[1] << ' ' - << operator[](faceI)[2] << ' ' - << operator[](faceI).region() // region number + << operator[](facei)[0] << ' ' + << operator[](facei)[1] << ' ' + << operator[](facei)[2] << ' ' + << operator[](facei).region() // region number << endl; } diff --git a/src/triSurface/triSurface/interfaces/STL/writeSTL.C b/src/triSurface/triSurface/interfaces/STL/writeSTL.C index ea3bc3984551534c797a678aecb9d90ae3a12b05..a5b74edc252590392b5e1c134e67c9f90b2f6406 100644 --- a/src/triSurface/triSurface/interfaces/STL/writeSTL.C +++ b/src/triSurface/triSurface/interfaces/STL/writeSTL.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 @@ -40,10 +40,10 @@ void Foam::triSurface::writeSTLASCII(const bool writeSorted, Ostream& os) const if (writeSorted) { label faceIndex = 0; - forAll(myPatches, patchI) + forAll(myPatches, patchi) { // Print all faces belonging to this region - const surfacePatch& patch = myPatches[patchI]; + const surfacePatch& patch = myPatches[patchi]; os << "solid " << patch.name() << endl; @@ -54,15 +54,15 @@ void Foam::triSurface::writeSTLASCII(const bool writeSorted, Ostream& os) const patchFaceI++ ) { - const label faceI = faceMap[faceIndex++]; + const label facei = faceMap[faceIndex++]; - const vector& n = faceNormals()[faceI]; + const vector& n = faceNormals()[facei]; os << " facet normal " << n.x() << ' ' << n.y() << ' ' << n.z() << nl << " outer loop" << endl; - const labelledTri& f = (*this)[faceI]; + const labelledTri& f = (*this)[facei]; const point& pa = points()[f[0]]; const point& pb = points()[f[1]]; const point& pc = points()[f[2]]; @@ -84,21 +84,21 @@ void Foam::triSurface::writeSTLASCII(const bool writeSorted, Ostream& os) const { // Get patch (=compact region) per face labelList patchIDs(size()); - forAll(myPatches, patchI) + forAll(myPatches, patchi) { - label faceI = myPatches[patchI].start(); + label facei = myPatches[patchi].start(); - forAll(myPatches[patchI], i) + forAll(myPatches[patchi], i) { - patchIDs[faceMap[faceI++]] = patchI; + patchIDs[faceMap[facei++]] = patchi; } } label currentPatchI = -1; - forAll(*this, faceI) + forAll(*this, facei) { - if (currentPatchI != patchIDs[faceI]) + if (currentPatchI != patchIDs[facei]) { if (currentPatchI != -1) { @@ -106,17 +106,17 @@ void Foam::triSurface::writeSTLASCII(const bool writeSorted, Ostream& os) const os << "endsolid " << myPatches[currentPatchI].name() << nl; } - currentPatchI = patchIDs[faceI]; + currentPatchI = patchIDs[facei]; os << "solid " << myPatches[currentPatchI].name() << nl; } - const vector& n = faceNormals()[faceI]; + const vector& n = faceNormals()[facei]; os << " facet normal " << n.x() << ' ' << n.y() << ' ' << n.z() << nl << " outer loop" << endl; - const labelledTri& f = (*this)[faceI]; + const labelledTri& f = (*this)[facei]; const point& pa = points()[f[0]]; const point& pb = points()[f[1]]; const point& pc = points()[f[2]]; @@ -151,12 +151,12 @@ void Foam::triSurface::writeSTLBINARY(std::ostream& os) const const vectorField& normals = faceNormals(); - forAll(*this, faceI) + forAll(*this, facei) { - const labelledTri& f = (*this)[faceI]; + const labelledTri& f = (*this)[facei]; // Convert vector into STL single precision - STLpoint n(normals[faceI]); + STLpoint n(normals[facei]); STLpoint pa(points()[f[0]]); STLpoint pb(points()[f[1]]); STLpoint pc(points()[f[2]]); diff --git a/src/triSurface/triSurface/interfaces/TRI/writeTRI.C b/src/triSurface/triSurface/interfaces/TRI/writeTRI.C index 01ec75d655b50a1aa893b6422b8c3b015dffe0c1..7c8ace5b0fb5278d61e859409f43032e386f2fef 100644 --- a/src/triSurface/triSurface/interfaces/TRI/writeTRI.C +++ b/src/triSurface/triSurface/interfaces/TRI/writeTRI.C @@ -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 @@ -47,20 +47,20 @@ void triSurface::writeTRI(const bool writeSorted, Ostream& os) const { label faceIndex = 0; - forAll(myPatches, patchI) + forAll(myPatches, patchi) { for ( label patchFaceI = 0; - patchFaceI < myPatches[patchI].size(); + patchFaceI < myPatches[patchi].size(); patchFaceI++ ) { - const label faceI = faceMap[faceIndex++]; + const label facei = faceMap[faceIndex++]; - const point& p1 = ps[operator[](faceI)[0]]; - const point& p2 = ps[operator[](faceI)[1]]; - const point& p3 = ps[operator[](faceI)[2]]; + const point& p1 = ps[operator[](facei)[0]]; + const point& p2 = ps[operator[](facei)[1]]; + const point& p3 = ps[operator[](facei)[2]]; os << p1.x() << token::SPACE << p1.y() << token::SPACE @@ -74,18 +74,18 @@ void triSurface::writeTRI(const bool writeSorted, Ostream& os) const << p3.y() << token::SPACE << p3.z() << token::SPACE - << "0x" << hex << operator[](faceI).region() << dec + << "0x" << hex << operator[](facei).region() << dec << endl; } } } else { - forAll(*this, faceI) + forAll(*this, facei) { - const point& p1 = ps[operator[](faceI)[0]]; - const point& p2 = ps[operator[](faceI)[1]]; - const point& p3 = ps[operator[](faceI)[2]]; + const point& p1 = ps[operator[](facei)[0]]; + const point& p2 = ps[operator[](facei)[1]]; + const point& p3 = ps[operator[](facei)[2]]; os << p1.x() << token::SPACE << p1.y() << token::SPACE @@ -99,7 +99,7 @@ void triSurface::writeTRI(const bool writeSorted, Ostream& os) const << p3.y() << token::SPACE << p3.z() << token::SPACE - << "0x" << hex << operator[](faceI).region() << dec + << "0x" << hex << operator[](facei).region() << dec << endl; } } diff --git a/src/triSurface/triSurface/interfaces/VTK/writeVTK.C b/src/triSurface/triSurface/interfaces/VTK/writeVTK.C index 0f351d6fa68f3d7ef87a98e1872b789b447ca5a4..409c1429632f1b3639374290833a9d704597e11e 100644 --- a/src/triSurface/triSurface/interfaces/VTK/writeVTK.C +++ b/src/triSurface/triSurface/interfaces/VTK/writeVTK.C @@ -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 @@ -71,14 +71,14 @@ void triSurface::writeVTK(const bool writeSorted, Ostream& os) const { label faceIndex = 0; - forAll(myPatches, patchI) + forAll(myPatches, patchi) { // Print all faces belonging to this patch for ( label patchFaceI = 0; - patchFaceI < myPatches[patchI].size(); + patchFaceI < myPatches[patchi].size(); patchFaceI++ ) { @@ -91,12 +91,12 @@ void triSurface::writeVTK(const bool writeSorted, Ostream& os) const os << ' '; } - const label faceI = faceMap[faceIndex++]; + const label facei = faceMap[faceIndex++]; os << "3 " - << operator[](faceI)[0] << ' ' - << operator[](faceI)[1] << ' ' - << operator[](faceI)[2]; + << operator[](facei)[0] << ' ' + << operator[](facei)[1] << ' ' + << operator[](facei)[2]; } } os << nl; @@ -110,12 +110,12 @@ void triSurface::writeVTK(const bool writeSorted, Ostream& os) const faceIndex = 0; - forAll(myPatches, patchI) + forAll(myPatches, patchi) { for ( label patchFaceI = 0; - patchFaceI < myPatches[patchI].size(); + patchFaceI < myPatches[patchi].size(); patchFaceI++ ) { @@ -128,18 +128,18 @@ void triSurface::writeVTK(const bool writeSorted, Ostream& os) const os << ' '; } - const label faceI = faceMap[faceIndex++]; + const label facei = faceMap[faceIndex++]; - os << operator[](faceI).region(); + os << operator[](facei).region(); } } os << nl; } else { - forAll(*this, faceI) + forAll(*this, facei) { - if (faceI > 0 && (faceI % 10) == 0) + if (facei > 0 && (facei % 10) == 0) { os << nl; } @@ -148,9 +148,9 @@ void triSurface::writeVTK(const bool writeSorted, Ostream& os) const os << ' '; } os << "3 " - << operator[](faceI)[0] << ' ' - << operator[](faceI)[1] << ' ' - << operator[](faceI)[2]; + << operator[](facei)[0] << ' ' + << operator[](facei)[1] << ' ' + << operator[](facei)[2]; } os << nl; @@ -158,9 +158,9 @@ void triSurface::writeVTK(const bool writeSorted, Ostream& os) const os << "FIELD attributes 1" << nl; os << "region 1 " << size() << " float" << nl; - forAll(*this, faceI) + forAll(*this, facei) { - if (faceI > 0 && (faceI % 10) == 0) + if (facei > 0 && (facei % 10) == 0) { os << nl; } @@ -168,7 +168,7 @@ void triSurface::writeVTK(const bool writeSorted, Ostream& os) const { os << ' '; } - os << operator[](faceI).region(); + os << operator[](facei).region(); } os << nl; } diff --git a/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C b/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C index c404a3864062c5193a333cf5b0b82da7b4485e02..a4d6f5a48741d1a90f07b0c08d7afe9d74843eb6 100644 --- a/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.C +++ b/src/triSurface/triSurface/surfacePatch/surfacePatchIOList.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 @@ -72,37 +72,37 @@ Foam::surfacePatchIOList::surfacePatchIOList PtrList<entry> patchEntries(is); patches.setSize(patchEntries.size()); - label faceI = 0; + label facei = 0; - forAll(patches, patchI) + forAll(patches, patchi) { - const dictionary& dict = patchEntries[patchI].dict(); + const dictionary& dict = patchEntries[patchi].dict(); label patchSize = readLabel(dict.lookup("nFaces")); label startFaceI = readLabel(dict.lookup("startFace")); - patches[patchI] = + patches[patchi] = surfacePatch ( word(dict.lookup("geometricType")), - patchEntries[patchI].keyword(), + patchEntries[patchi].keyword(), patchSize, startFaceI, - patchI + patchi ); - if (startFaceI != faceI) + if (startFaceI != facei) { FatalErrorInFunction - << "Patches are not ordered. Start of patch " << patchI + << "Patches are not ordered. Start of patch " << patchi << " does not correspond to sum of preceding patches." << endl << "while reading " << io.objectPath() << exit(FatalError); } - faceI += patchSize; + facei += patchSize; } // Check state of IOstream @@ -147,9 +147,9 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const surfacePatchIOList& patches) { os << patches.size() << nl << token::BEGIN_LIST; - forAll(patches, patchI) + forAll(patches, patchi) { - patches[patchI].writeDict(os); + patches[patchi].writeDict(os); } os << token::END_LIST; diff --git a/src/triSurface/triSurface/triSurface.C b/src/triSurface/triSurface/triSurface.C index 7946ae338ff33516b59c0c5f4c7947a92f00d233..8077974443a786920fcbabb20dca9682a1971cba 100644 --- a/src/triSurface/triSurface/triSurface.C +++ b/src/triSurface/triSurface/triSurface.C @@ -98,19 +98,19 @@ Foam::List<Foam::labelledTri> Foam::triSurface::convertToTri { List<labelledTri> triFaces(faces.size()); - forAll(triFaces, faceI) + forAll(triFaces, facei) { - const face& f = faces[faceI]; + const face& f = faces[facei]; if (f.size() != 3) { FatalErrorInFunction - << "Face at position " << faceI + << "Face at position " << facei << " does not have three vertices:" << f << abort(FatalError); } - labelledTri& tri = triFaces[faceI]; + labelledTri& tri = triFaces[facei]; tri[0] = f[0]; tri[1] = f[1]; @@ -130,11 +130,11 @@ Foam::List<Foam::labelledTri> Foam::triSurface::convertToTri { List<labelledTri> triFaces(faces.size()); - forAll(triFaces, faceI) + forAll(triFaces, facei) { - const triFace& f = faces[faceI]; + const triFace& f = faces[facei]; - labelledTri& tri = triFaces[faceI]; + labelledTri& tri = triFaces[facei]; tri[0] = f[0]; tri[1] = f[1]; @@ -185,9 +185,9 @@ void Foam::triSurface::checkTriangles(const bool verbose) // Simple check on indices ok. const label maxPointI = points().size() - 1; - forAll(*this, faceI) + forAll(*this, facei) { - const triSurface::FaceType& f = (*this)[faceI]; + const triSurface::FaceType& f = (*this)[facei]; forAll(f, fp) { @@ -211,20 +211,20 @@ void Foam::triSurface::checkTriangles(const bool verbose) boolList valid(size(), true); bool hasInvalid = false; - forAll(*this, faceI) + forAll(*this, facei) { - const labelledTri& f = (*this)[faceI]; + const labelledTri& f = (*this)[facei]; if ((f[0] == f[1]) || (f[0] == f[2]) || (f[1] == f[2])) { // 'degenerate' triangle check - valid[faceI] = false; + valid[facei] = false; hasInvalid = true; if (verbose) { WarningInFunction - << "triangle " << faceI + << "triangle " << facei << " does not have three unique vertices:\n"; printTriangle(Warning, " ", f, points()); } @@ -232,7 +232,7 @@ void Foam::triSurface::checkTriangles(const bool verbose) else { // duplicate triangle check - const labelList& fEdges = faceEdges()[faceI]; + const labelList& fEdges = faceEdges()[facei]; // Check if faceNeighbours use same points as this face. // Note: discards normal information - sides of baffle are merged. @@ -245,7 +245,7 @@ void Foam::triSurface::checkTriangles(const bool verbose) { label neighbour = eFaces[i]; - if (neighbour > faceI) + if (neighbour > facei) { // lower numbered faces already checked const labelledTri& n = (*this)[neighbour]; @@ -257,14 +257,14 @@ void Foam::triSurface::checkTriangles(const bool verbose) && ((f[2] == n[0]) || (f[2] == n[1]) || (f[2] == n[2])) ) { - valid[faceI] = false; + valid[facei] = false; hasInvalid = true; if (verbose) { WarningInFunction << "triangles share the same vertices:\n" - << " face 1 :" << faceI << endl; + << " face 1 :" << facei << endl; printTriangle(Warning, " ", f, points()); Warning @@ -286,11 +286,11 @@ void Foam::triSurface::checkTriangles(const bool verbose) { // Pack label newFaceI = 0; - forAll(*this, faceI) + forAll(*this, facei) { - if (valid[faceI]) + if (valid[facei]) { - const labelledTri& f = (*this)[faceI]; + const labelledTri& f = (*this)[facei]; (*this)[newFaceI++] = f; } } @@ -493,9 +493,9 @@ Foam::surfacePatchList Foam::triSurface::calcPatches(labelList& faceMap) const // Sort according to region numbers of labelledTri SortableList<label> sortedRegion(size()); - forAll(sortedRegion, faceI) + forAll(sortedRegion, facei) { - sortedRegion[faceI] = operator[](faceI).region(); + sortedRegion[facei] = operator[](facei).region(); } sortedRegion.sort(); @@ -517,9 +517,9 @@ Foam::surfacePatchList Foam::triSurface::calcPatches(labelList& faceMap) const surfacePatchList newPatches(maxRegion + 1); // Fill patch sizes - forAll(*this, faceI) + forAll(*this, facei) { - label region = operator[](faceI).region(); + label region = operator[](facei).region(); newPatches[region].size()++; } @@ -580,11 +580,11 @@ void Foam::triSurface::setDefaultPatches() // Take over names and types (but not size) patches_.setSize(newPatches.size()); - forAll(newPatches, patchI) + forAll(newPatches, patchi) { - patches_[patchI].index() = patchI; - patches_[patchI].name() = newPatches[patchI].name(); - patches_[patchI].geometricType() = newPatches[patchI].geometricType(); + patches_[patchi].index() = patchi; + patches_[patchi].name() = newPatches[patchi].name(); + patches_[patchi].geometricType() = newPatches[patchi].geometricType(); } } @@ -829,18 +829,18 @@ void Foam::triSurface::cleanup(const bool verbose) } -// Finds area, starting at faceI, delimited by borderEdge. Marks all visited +// Finds area, starting at facei, delimited by borderEdge. Marks all visited // faces (from face-edge-face walk) with currentZone. void Foam::triSurface::markZone ( const boolList& borderEdge, - const label faceI, + const label facei, const label currentZone, labelList& faceZone ) const { // List of faces whose faceZone has been set. - labelList changedFaces(1, faceI); + labelList changedFaces(1, facei); while (true) { @@ -849,9 +849,9 @@ void Foam::triSurface::markZone forAll(changedFaces, i) { - label faceI = changedFaces[i]; + label facei = changedFaces[i]; - const labelList& fEdges = faceEdges()[faceI]; + const labelList& fEdges = faceEdges()[facei]; forAll(fEdges, i) { @@ -876,7 +876,7 @@ void Foam::triSurface::markZone << "Zones " << faceZone[nbrFaceI] << " at face " << nbrFaceI << " connects to zone " << currentZone - << " at face " << faceI + << " at face " << facei << abort(FatalError); } } @@ -950,7 +950,7 @@ void Foam::triSurface::subsetMeshMap { const List<labelledTri>& locFaces = localFaces(); - label faceI = 0; + label facei = 0; label pointI = 0; faceMap.setSize(locFaces.size()); @@ -964,7 +964,7 @@ void Foam::triSurface::subsetMeshMap if (include[oldFaceI]) { // Store new faces compact - faceMap[faceI++] = oldFaceI; + faceMap[facei++] = oldFaceI; // Renumber labels for face const triSurface::FaceType& f = locFaces[oldFaceI]; @@ -982,7 +982,7 @@ void Foam::triSurface::subsetMeshMap } // Trim - faceMap.setSize(faceI); + faceMap.setSize(facei); pointMap.setSize(pointI); } @@ -1073,9 +1073,9 @@ void Foam::triSurface::writeStats(Ostream& os) const label nPoints = 0; boundBox bb = boundBox::invertedBox; - forAll(*this, faceI) + forAll(*this, facei) { - const triSurface::FaceType& f = operator[](faceI); + const triSurface::FaceType& f = operator[](facei); forAll(f, fp) { diff --git a/src/triSurface/triSurface/triSurface.H b/src/triSurface/triSurface/triSurface.H index 1d8629f3606086b6cbe89414dbe225f5cce87304..a66d9775d34f0342afe5da13579f3a9472508ac2 100644 --- a/src/triSurface/triSurface/triSurface.H +++ b/src/triSurface/triSurface/triSurface.H @@ -345,12 +345,12 @@ public: void cleanup(const bool verbose); //- Fill faceZone with currentZone for every face reachable - // from faceI without crossing edge marked in borderEdge. + // from facei without crossing edge marked in borderEdge. // Note: faceZone has to be sized nFaces before calling this fun. void markZone ( const boolList& borderEdge, - const label faceI, + const label facei, const label currentZone, labelList& faceZone ) const;