diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C index abff13475e..f216859b08 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C @@ -36,18 +36,17 @@ void Foam::BlendedInterfacialModel::correctFixedFluxBCs GeometricField& field ) const { - forAll(phase1_.phi()().boundaryField(), patchI) + forAll(phase1_.phi()().boundaryField(), patchi) { if ( isA ( - phase1_.phi()().boundaryField()[patchI] + phase1_.phi()().boundaryField()[patchi] ) ) { - field.boundaryField()[patchI] - = Zero; + field.boundaryField()[patchi] = Zero; } } } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C index 0d78e02ac8..ecf674e6e0 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/BlendedInterfacialModel/BlendedInterfacialModel.C @@ -36,18 +36,17 @@ void Foam::BlendedInterfacialModel::correctFixedFluxBCs GeometricField& field ) const { - forAll(pair_.phase1().phi().boundaryField(), patchI) + forAll(pair_.phase1().phi().boundaryField(), patchi) { if ( isA ( - pair_.phase1().phi().boundaryField()[patchI] + pair_.phase1().phi().boundaryField()[patchi] ) ) { - field.boundaryField()[patchI] - = Zero; + field.boundaryField()[patchi] = Zero; } } } diff --git a/applications/test/PatchTools/Test-PatchTools.C b/applications/test/PatchTools/Test-PatchTools.C index 094ea00f10..ec193ec3f5 100644 --- a/applications/test/PatchTools/Test-PatchTools.C +++ b/applications/test/PatchTools/Test-PatchTools.C @@ -208,8 +208,8 @@ int main(int argc, char *argv[]) #include "createMesh.H" const word patchName = args[1]; - label patchI = mesh.boundaryMesh().findPatchID(patchName); - const polyPatch& pp = mesh.boundaryMesh()[patchI]; + label patchi = mesh.boundaryMesh().findPatchID(patchName); + const polyPatch& pp = mesh.boundaryMesh()[patchi]; const indirectPrimitivePatch& cpp = mesh.globalData().coupledPatch(); diff --git a/applications/test/extendedStencil/Test-ExtendedStencil2.C b/applications/test/extendedStencil/Test-ExtendedStencil2.C index 03d5283233..b1928bc6d2 100644 --- a/applications/test/extendedStencil/Test-ExtendedStencil2.C +++ b/applications/test/extendedStencil/Test-ExtendedStencil2.C @@ -156,9 +156,9 @@ int main(int argc, char *argv[]) } // Insert my boundary values label nCompact = fld.size(); - forAll(fld.boundaryField(), patchI) + forAll(fld.boundaryField(), patchi) { - const fvPatchField& pfld = fld.boundaryField()[patchI]; + const fvPatchField& pfld = fld.boundaryField()[patchi]; forAll(pfld, i) { diff --git a/applications/test/mappedPatch/Test-MappedPatch.C b/applications/test/mappedPatch/Test-MappedPatch.C index ba3e06c8a5..603c5e2062 100644 --- a/applications/test/mappedPatch/Test-MappedPatch.C +++ b/applications/test/mappedPatch/Test-MappedPatch.C @@ -60,11 +60,11 @@ int main(int argc, char *argv[]) calculatedFvPatchVectorField::typeName ); - forAll(mesh.boundaryMesh(), patchI) + forAll(mesh.boundaryMesh(), patchi) { - if (isA(mesh.boundaryMesh()[patchI])) + if (isA(mesh.boundaryMesh()[patchi])) { - patchFieldTypes[patchI] = + patchFieldTypes[patchi] = mappedFixedValueFvPatchVectorField::typeName; } } @@ -89,23 +89,23 @@ int main(int argc, char *argv[]) cc.internalField() = mesh.C().internalField(); cc.boundaryFieldRef().updateCoeffs(); - forAll(cc.boundaryField(), patchI) + forAll(cc.boundaryField(), patchi) { if ( isA ( - cc.boundaryField()[patchI] + cc.boundaryField()[patchi] ) ) { - Pout<< "Detected a mapped patch:" << patchI << endl; + Pout<< "Detected a mapped patch:" << patchi << endl; - OFstream str(mesh.boundaryMesh()[patchI].name() + ".obj"); + OFstream str(mesh.boundaryMesh()[patchi].name() + ".obj"); Pout<< "Writing mapped values to " << str.name() << endl; label vertI = 0; - const fvPatchVectorField& fvp = cc.boundaryField()[patchI]; + const fvPatchVectorField& fvp = cc.boundaryField()[patchi]; forAll(fvp, i) { diff --git a/applications/test/mesh/Test-mesh.C b/applications/test/mesh/Test-mesh.C index d9c6dd431b..d7d5895089 100644 --- a/applications/test/mesh/Test-mesh.C +++ b/applications/test/mesh/Test-mesh.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,18 +66,18 @@ int main(int argc, char *argv[]) const polyBoundaryMesh& pbm = mesh.boundaryMesh(); faceListList boundaryFaces(pbm.size()); - forAll(pbm, patchI) + forAll(pbm, patchi) { - boundaryFaces[patchI] = pbm[patchI]; + boundaryFaces[patchi] = pbm[patchi]; } wordList boundaryPatchNames(pbm.names()); PtrList boundaryDicts(pbm.size()); - forAll(pbm, patchI) + forAll(pbm, patchi) { OStringStream os; - os << pbm[patchI]; + os << pbm[patchi]; IStringStream is(os.str()); - boundaryDicts.set(patchI, new dictionary(is)); + boundaryDicts.set(patchi, new dictionary(is)); } word defaultBoundaryPatchName = "defaultFaces"; diff --git a/applications/test/patchRegion/Test-patchRegion.C b/applications/test/patchRegion/Test-patchRegion.C index c5c7c82cd1..d25573fe76 100644 --- a/applications/test/patchRegion/Test-patchRegion.C +++ b/applications/test/patchRegion/Test-patchRegion.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 @@ -59,8 +59,8 @@ int main(int argc, char *argv[]) const polyBoundaryMesh& pbm = mesh.boundaryMesh(); - label patchI = pbm.findPatchID(patchName); - const polyPatch& patch = pbm[patchI]; + label patchi = pbm.findPatchID(patchName); + const polyPatch& patch = pbm[patchi]; Info<< "Patch:" << patch.name() << endl; diff --git a/applications/test/router/Test-processorRouter.C b/applications/test/router/Test-processorRouter.C index 2c6e5b1e6d..62fd7f2a9d 100644 --- a/applications/test/router/Test-processorRouter.C +++ b/applications/test/router/Test-processorRouter.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,9 +52,9 @@ labelList procNeighbours(const polyMesh& mesh) label nNeighbours = 0; - forAll(mesh.boundaryMesh(), patchI) + forAll(mesh.boundaryMesh(), patchi) { - if (isA(mesh.boundaryMesh()[patchI])) + if (isA(mesh.boundaryMesh()[patchi])) { nNeighbours++; } @@ -64,11 +64,11 @@ labelList procNeighbours(const polyMesh& mesh) nNeighbours = 0; - forAll(mesh.boundaryMesh(), patchI) + forAll(mesh.boundaryMesh(), patchi) { - if (isA(mesh.boundaryMesh()[patchI])) + if (isA(mesh.boundaryMesh()[patchi])) { - const polyPatch& patch = mesh.boundaryMesh()[patchI]; + const polyPatch& patch = mesh.boundaryMesh()[patchi]; const processorPolyPatch& procPatch = refCast(patch); diff --git a/applications/test/volPointInterpolation/Test-volPointInterpolation.C b/applications/test/volPointInterpolation/Test-volPointInterpolation.C index 96ffeeac37..1e171ee689 100644 --- a/applications/test/volPointInterpolation/Test-volPointInterpolation.C +++ b/applications/test/volPointInterpolation/Test-volPointInterpolation.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,11 +70,11 @@ int main(int argc, char *argv[]) const pointBoundaryMesh& pbm = pMesh.boundary(); Info<< "pointMesh boundary" << nl; - forAll(pbm, patchI) + forAll(pbm, patchi) { - Info<< "patch=" << pbm[patchI].name() - << ", type=" << pbm[patchI].type() - << ", coupled=" << pbm[patchI].coupled() + Info<< "patch=" << pbm[patchi].name() + << ", type=" << pbm[patchi].type() + << ", coupled=" << pbm[patchi].coupled() << endl; } @@ -83,10 +83,10 @@ int main(int argc, char *argv[]) pointScalarField pp(pInterp.interpolate(p)); Info<< pp.name() << " boundary" << endl; - forAll(pp.boundaryField(), patchI) + forAll(pp.boundaryField(), patchi) { - Info<< pbm[patchI].name() << " coupled=" - << pp.boundaryField()[patchI].coupled()<< endl; + Info<< pbm[patchi].name() << " coupled=" + << pp.boundaryField()[patchi].coupled()<< endl; } pp.write(); diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C index 0f6ad2efe3..c6b184c231 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C @@ -126,7 +126,7 @@ void subsetVolFields ( const fvMeshSubset& subsetter, const IOobjectList& objectsList, - const label patchI, + const label patchi, const Type& exposedValue, const word GeomVolType, PtrList>& subFields @@ -152,15 +152,15 @@ void subsetVolFields subFields.set(i, subsetter.interpolate(volField)); - // Explicitly set exposed faces (in patchI) to exposedValue. - if (patchI >= 0) + // Explicitly set exposed faces (in patchi) to exposedValue. + if (patchi >= 0) { fvPatchField& fld = - subFields[i++].boundaryField()[patchI]; + subFields[i++].boundaryFieldRef()[patchi]; label newStart = fld.patch().patch().start(); - label oldPatchI = subsetter.patchMap()[patchI]; + label oldPatchI = subsetter.patchMap()[patchi]; if (oldPatchI == -1) { @@ -198,7 +198,7 @@ void subsetSurfaceFields ( const fvMeshSubset& subsetter, const IOobjectList& objectsList, - const label patchI, + const label patchi, const Type& exposedValue, const word GeomSurfType, PtrList>& subFields @@ -225,15 +225,15 @@ void subsetSurfaceFields subFields.set(i, subsetter.interpolate(volField)); - // Explicitly set exposed faces (in patchI) to exposedValue. - if (patchI >= 0) + // Explicitly set exposed faces (in patchi) to exposedValue. + if (patchi >= 0) { fvsPatchField& fld = - subFields[i++].boundaryField()[patchI]; + subFields[i++].boundaryFieldRef()[patchi]; label newStart = fld.patch().patch().start(); - label oldPatchI = subsetter.patchMap()[patchI]; + label oldPatchI = subsetter.patchMap()[patchi]; if (oldPatchI == -1) { @@ -291,16 +291,19 @@ void initCreatedPatches { GeoField& field = const_cast(*fieldIter()); - forAll(field.boundaryField(), patchi) + typename GeoField::GeometricBoundaryField& fieldBf = + field.boundaryFieldRef(); + + forAll(fieldBf, patchi) { if (map.oldPatchSizes()[patchi] == 0) { // Not mapped. - field.boundaryField()[patchi] = initValue; + fieldBf[patchi] = initValue; - if (field.boundaryField()[patchi].fixesValue()) + if (fieldBf[patchi].fixesValue()) { - field.boundaryField()[patchi] == initValue; + fieldBf[patchi] == initValue; } } } @@ -526,9 +529,9 @@ void createBaffles // Wrapper around find patch. Also makes sure same patch in parallel. label findPatch(const polyBoundaryMesh& patches, const word& patchName) { - label patchI = patches.findPatchID(patchName); + label patchi = patches.findPatchID(patchName); - if (patchI == -1) + if (patchi == -1) { FatalErrorInFunction << "Illegal patch " << patchName @@ -538,20 +541,20 @@ label findPatch(const polyBoundaryMesh& patches, const word& patchName) // Check same patch for all procs { - label newPatch = patchI; + label newPatch = patchi; reduce(newPatch, minOp