diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/BlendedInterfacialModel/BlendedInterfacialModel.C
index abff13475e1b4159174791dfbf93c96542deafa4..f216859b08e0938ebf566e1bae06d68d94a27dd9 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<ModelType>::correctFixedFluxBCs
     GeometricField& field
 ) const
 {
-    forAll(phase1_.phi()().boundaryField(), patchI)
+    forAll(phase1_.phi()().boundaryField(), patchi)
     {
         if
         (
             isA<fixedValueFvsPatchScalarField>
             (
-                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 0d78e02ac88060cf386cfda4991b9ffacb744f87..ecf674e6e0bfc04a049002207956a4942f0cea25 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<modelType>::correctFixedFluxBCs
     GeometricField& field
 ) const
 {
-    forAll(pair_.phase1().phi().boundaryField(), patchI)
+    forAll(pair_.phase1().phi().boundaryField(), patchi)
     {
         if
         (
             isA<fixedValueFvsPatchScalarField>
             (
-                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 094ea00f108f86bd7259a68ac2e5a94a4d5c6aa8..ec193ec3f587872fd9f0e83d7fc7d9c1449e1a85 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 03d5283233c36b1d34cd8be8c95ddb01328ab73a..b1928bc6d2fbc731c90e10ffb094356ec00cd432 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<vector>& pfld = fld.boundaryField()[patchI];
+                const fvPatchField<vector>& pfld = fld.boundaryField()[patchi];
 
                 forAll(pfld, i)
                 {
diff --git a/applications/test/mappedPatch/Test-MappedPatch.C b/applications/test/mappedPatch/Test-MappedPatch.C
index ba3e06c8a52b2503889578b0291434e7f58b3f65..603c5e20620c145201c1d1726928db49e6c3f660 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<mappedPolyPatch>(mesh.boundaryMesh()[patchI]))
+        if (isA<mappedPolyPatch>(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<mappedFixedValueFvPatchVectorField>
             (
-                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 d9c6dd431b1fa6812bf8e28ad5de4fa43bbef21d..d7d5895089480a7ad5aab2a12131bba9c8f57baf 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<dictionary> 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 c5c7c82cd1c7c41817d40123ed262c04f2650ba2..d25573fe76201b5eb3d9549502be47fc920392ab 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 2c6e5b1e6dc6466d27712a87f1794d923bb6a318..62fd7f2a9d9b990205bfc03576564d23eea25931 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<processorPolyPatch>(mesh.boundaryMesh()[patchI]))
+        if (isA<processorPolyPatch>(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<processorPolyPatch>(mesh.boundaryMesh()[patchI]))
+        if (isA<processorPolyPatch>(mesh.boundaryMesh()[patchi]))
         {
-            const polyPatch& patch = mesh.boundaryMesh()[patchI];
+            const polyPatch& patch = mesh.boundaryMesh()[patchi];
 
             const processorPolyPatch& procPatch =
                 refCast<const processorPolyPatch>(patch);
diff --git a/applications/test/volPointInterpolation/Test-volPointInterpolation.C b/applications/test/volPointInterpolation/Test-volPointInterpolation.C
index 96ffeeac377449a728a529de0f7c92180592cb22..1e171ee689d421b32a958dbfa27fc28b29aab67e 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 0f6ad2efe3bcbba2244d4be9cb10e82e4e829039..c6b184c231dc4122c530ad746a4499ec6b525eb0 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<GeometricField<Type, fvPatchField, volMesh>>& 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<Type>& 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<GeometricField<Type, fvsPatchField, surfaceMesh>>& 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<Type>& 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<GeoField&>(*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<label>());
 
-        if (newPatch != patchI)
+        if (newPatch != patchi)
         {
             FatalErrorInFunction
                 << "Patch " << patchName
                 << " should have the same patch index on all processors." << nl
-                << "On my processor it has index " << patchI
+                << "On my processor it has index " << patchi
                 << " ; on some other processor it has index " << newPatch
                 << exit(FatalError);
         }
     }
-    return patchI;
+    return patchi;
 }
 
 
@@ -641,7 +644,7 @@ int main(int argc, char *argv[])
     {
         faceSet fSet(mesh, setsAndPatches[setI][0]);
 
-        label patchI = findPatch
+        label patchi = findPatch
         (
             mesh.boundaryMesh(),
             setsAndPatches[setI][1]
@@ -658,7 +661,7 @@ int main(int argc, char *argv[])
                     << " but also in patch " << wantedPatch[iter.key()]
                     << exit(FatalError);
             }
-            wantedPatch[iter.key()] = patchI;
+            wantedPatch[iter.key()] = patchi;
         }
     }
 
@@ -683,7 +686,7 @@ int main(int argc, char *argv[])
         );
 
         faceSet fSet(mesh, coupledAndPatches[setI][0]);
-        label patchI = findPatch(patches, coupledAndPatches[setI][1]);
+        label patchi = findPatch(patches, coupledAndPatches[setI][1]);
 
         forAllConstIter(faceSet, fSet, iter)
         {
@@ -696,7 +699,7 @@ int main(int argc, char *argv[])
                     << " but also in patch " << coupledWantedPatch[iter.key()]
                     << exit(FatalError);
             }
-                coupledWantedPatch[iter.key()] = patchI;
+                coupledWantedPatch[iter.key()] = patchi;
                 cyclicWantedPatch_half0[iter.key()] = cyclicId;
                 cyclicWantedPatch_half1[iter.key()] = cyclicSlaveId;
         }
diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C b/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C
index e3f8bc4169f68b4dc18612d6b959623e2123158f..84bdceac5841dec0dedb6a404b496c40c439f10d 100644
--- a/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C
+++ b/applications/utilities/mesh/advanced/autoRefineMesh/snappyRefineMesh.C
@@ -193,24 +193,24 @@ scalar getEdgeStats(const primitiveMesh& mesh, const direction excludeCmpt)
 // Adds empty patch if not yet there. Returns patchID.
 label addPatch(polyMesh& mesh, const word& patchName)
 {
-    label patchI = mesh.boundaryMesh().findPatchID(patchName);
+    label patchi = mesh.boundaryMesh().findPatchID(patchName);
 
-    if (patchI == -1)
+    if (patchi == -1)
     {
         const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
         List<polyPatch*> newPatches(patches.size() + 1);
 
         // Add empty patch as 0th entry (Note: only since subsetMesh wants this)
-        patchI = 0;
+        patchi = 0;
 
-        newPatches[patchI] =
+        newPatches[patchi] =
             new emptyPolyPatch
             (
                 Foam::word(patchName),
                 0,
                 mesh.nInternalFaces(),
-                patchI,
+                patchi,
                 patches,
                 emptyPolyPatch::typeName
             );
@@ -232,15 +232,15 @@ label addPatch(polyMesh& mesh, const word& patchName)
         mesh.removeBoundary();
         mesh.addPatches(newPatches);
 
-        Info<< "Created patch oldInternalFaces at " << patchI << endl;
+        Info<< "Created patch oldInternalFaces at " << patchi << endl;
     }
     else
     {
-        Info<< "Reusing patch oldInternalFaces at " << patchI << endl;
+        Info<< "Reusing patch oldInternalFaces at " << patchi << endl;
     }
 
 
-    return patchI;
+    return patchi;
 }
 
 
@@ -482,7 +482,7 @@ void subsetMesh
 (
     polyMesh& mesh,
     const label writeMesh,
-    const label patchI,                 // patchID for exposed faces
+    const label patchi,                 // patchID for exposed faces
     const labelHashSet& cellsToRemove,
     cellSet& cutCells,
     labelIOList& refLevel
@@ -503,7 +503,7 @@ void subsetMesh
     (
         cellLabels,
         exposedFaces,
-        labelList(exposedFaces.size(), patchI),
+        labelList(exposedFaces.size(), patchi),
         meshMod
     );
 
diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C
index fee877a8bc31f3596771a1b0ffc035b7ffee214b..e6e8740576c4faf169ca0725f20187fa00003a13 100644
--- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C
+++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C
@@ -221,9 +221,9 @@ int main(int argc, char *argv[])
 
     List<polyPatch*> p(patches.size());
 
-    forAll(p, patchI)
+    forAll(p, patchi)
     {
-        p[patchI] = patches[patchI].clone(fMesh.boundaryMesh()).ptr();
+        p[patchi] = patches[patchi].clone(fMesh.boundaryMesh()).ptr();
     }
 
     fMesh.addFvPatches(p);
@@ -294,15 +294,17 @@ int main(int argc, char *argv[])
         }
     }
 
+    volScalarField::GeometricBoundaryField& postRefLevelBf =
+        postRefLevel.boundaryFieldRef();
 
     // For volScalarField: set boundary values to same as cell.
     // Note: could also put
     // zeroGradient b.c. on postRefLevel and do evaluate.
-    forAll(postRefLevel.boundaryField(), patchI)
+    forAll(postRefLevel.boundaryField(), patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
-        fvPatchScalarField& bField = postRefLevel.boundaryField()[patchI];
+        fvPatchScalarField& bField = postRefLevelBf[patchi];
 
         Info<< "Setting field for patch "<< endl;
 
diff --git a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C
index b95acd79786a3c5cf386cf6ba6a9f148a5414b24..ac9c2c8abcce7a4de97362221fbd661c2d495f68 100644
--- a/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C
+++ b/applications/utilities/mesh/conversion/Optional/ccm26ToFoam/ccm26ToFoam.C
@@ -931,38 +931,38 @@ int main(int argc, char *argv[])
 
     label meshFaceI = foamPatchStarts[0];
 
-    forAll(newPatches, patchI)
+    forAll(newPatches, patchi)
     {
-        const word& patchName = foamPatchNames[patchI];
-        const word& patchType = foamPatchTypes[patchI];
+        const word& patchName = foamPatchNames[patchi];
+        const word& patchType = foamPatchTypes[patchi];
 
         Pout<< "Patch:" << patchName << " start at:" << meshFaceI
-            << " size:" << foamPatchSizes[patchI]
-            << " end at:" << meshFaceI+foamPatchSizes[patchI]
+            << " size:" << foamPatchSizes[patchi]
+            << " end at:" << meshFaceI+foamPatchSizes[patchi]
             << endl;
 
         if (patchType == "wall")
         {
-            newPatches[patchI] =
+            newPatches[patchi] =
                 new wallPolyPatch
                 (
                     patchName,
-                    foamPatchSizes[patchI],
+                    foamPatchSizes[patchi],
                     meshFaceI,
-                    patchI,
+                    patchi,
                     mesh.boundaryMesh(),
                     patchType
                 );
         }
         else if (patchType == "symmetryplane")
         {
-            newPatches[patchI] =
+            newPatches[patchi] =
                 new symmetryPolyPatch
                 (
                     patchName,
-                    foamPatchSizes[patchI],
+                    foamPatchSizes[patchi],
                     meshFaceI,
-                    patchI,
+                    patchi,
                     mesh.boundaryMesh(),
                     patchType
                 );
@@ -970,13 +970,13 @@ int main(int argc, char *argv[])
         else if (patchType == "empty")
         {
             // Note: not ccm name, introduced by us above.
-            newPatches[patchI] =
+            newPatches[patchi] =
                 new emptyPolyPatch
                 (
                     patchName,
-                    foamPatchSizes[patchI],
+                    foamPatchSizes[patchi],
                     meshFaceI,
-                    patchI,
+                    patchi,
                     mesh.boundaryMesh(),
                     patchType
                 );
@@ -985,19 +985,19 @@ int main(int argc, char *argv[])
         {
             // All other ccm types become straight polyPatch:
             // 'inlet', 'outlet', ...
-            newPatches[patchI] =
+            newPatches[patchi] =
                 new polyPatch
                 (
                     patchName,
-                    foamPatchSizes[patchI],
+                    foamPatchSizes[patchi],
                     meshFaceI,
-                    patchI,
+                    patchi,
                     mesh.boundaryMesh(),
                     word::null
                 );
         }
 
-        meshFaceI += foamPatchSizes[patchI];
+        meshFaceI += foamPatchSizes[patchi];
     }
 
     if (meshFaceI != foamOwner.size())
diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
index 9a2129912795542ee273cf7519d988e293edc059..6ea4017d7f3b5688689d0c72b46101e7a9b420a1 100644
--- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
+++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
@@ -485,18 +485,18 @@ int main(int argc, char *argv[])
     faceListList boundary(slPatchCells.size());
     wordList patchNames(slPatchCells.size());
 
-    forAll(slPatchCells, patchI)
+    forAll(slPatchCells, patchi)
     {
         SLList<face> patchFaces;
 
-        SLList<label>::iterator cellIter(slPatchCells[patchI].begin());
-        SLList<label>::iterator faceIter(slPatchCellFaces[patchI].begin());
+        SLList<label>::iterator cellIter(slPatchCells[patchi].begin());
+        SLList<label>::iterator faceIter(slPatchCellFaces[patchi].begin());
 
         for
         (
             ;
-            cellIter != slPatchCells[patchI].end()
-         && faceIter != slPatchCellFaces[patchI].end();
+            cellIter != slPatchCells[patchi].end()
+         && faceIter != slPatchCellFaces[patchi].end();
             ++cellIter, ++faceIter
         )
         {
@@ -513,8 +513,8 @@ int main(int argc, char *argv[])
             );
         }
 
-        boundary[patchI] = patchFaces;
-        patchNames[patchI] = word("patch") + name(patchI + 1);
+        boundary[patchi] = patchFaces;
+        patchNames[patchi] = word("patch") + name(patchi + 1);
     }
 
 
@@ -522,10 +522,10 @@ int main(int argc, char *argv[])
     // Lookup the face labels for all the boundary faces
     //
     labelListList boundaryFaceLabels(boundary.size());
-    forAll(boundary, patchI)
+    forAll(boundary, patchi)
     {
-        const faceList& bFaces = boundary[patchI];
-        labelList& bFaceLabels = boundaryFaceLabels[patchI];
+        const faceList& bFaces = boundary[patchi];
+        labelList& bFaceLabels = boundaryFaceLabels[patchi];
         bFaceLabels.setSize(bFaces.size());
         forAll(bFaces, i)
         {
@@ -538,24 +538,24 @@ int main(int argc, char *argv[])
     // faces go into faceZones and external faces go into patches.
     List<faceList> patchFaces(slPatchCells.size());
     labelList patchNFaces(slPatchCells.size(), 0);
-    forAll(boundary, patchI)
+    forAll(boundary, patchi)
     {
-        const faceList& bFaces = boundary[patchI];
-        const labelList& bFaceLabels = boundaryFaceLabels[patchI];
+        const faceList& bFaces = boundary[patchi];
+        const labelList& bFaceLabels = boundaryFaceLabels[patchi];
 
-        patchFaces[patchI].setSize(bFaces.size());
+        patchFaces[patchi].setSize(bFaces.size());
 
         forAll(bFaces, i)
         {
             if (!dummyMesh().isInternalFace(bFaceLabels[i]))
             {
-                patchFaces[patchI][patchNFaces[patchI]++] = bFaces[i];
+                patchFaces[patchi][patchNFaces[patchi]++] = bFaces[i];
             }
         }
-        patchFaces[patchI].setSize(patchNFaces[patchI]);
+        patchFaces[patchi].setSize(patchNFaces[patchi]);
 
-        Info<< "Patch " << patchI << " named " << patchNames[patchI]
-            << ": " << boundary[patchI].size() << " faces" << endl;
+        Info<< "Patch " << patchi << " named " << patchNames[patchi]
+            << ": " << boundary[patchi].size() << " faces" << endl;
     }
 
     // We no longer need the dummyMesh
@@ -583,14 +583,14 @@ int main(int argc, char *argv[])
     );
 
     // Add information to dictionary
-    forAll(patchNames, patchI)
+    forAll(patchNames, patchi)
     {
-        if (!patchDicts.set(patchI))
+        if (!patchDicts.set(patchi))
         {
-            patchDicts.set(patchI, new dictionary());
+            patchDicts.set(patchi, new dictionary());
         }
         // Add but not overwrite
-        patchDicts[patchI].add("type", polyPatch::typeName, false);
+        patchDicts[patchi].add("type", polyPatch::typeName, false);
     }
 
 
@@ -619,27 +619,27 @@ int main(int argc, char *argv[])
         DynamicList<cellZone*> cz;
 
         // FaceZones
-        forAll(boundaryFaceLabels, patchI)
+        forAll(boundaryFaceLabels, patchi)
         {
-            if (boundaryFaceLabels[patchI].size())
+            if (boundaryFaceLabels[patchi].size())
             {
                 // Re-do the boundaryFaceLabels since the boundary face
                 // labels will be different on the pShapeMesh.
-                const faceList& bFaces = boundary[patchI];
-                labelList& bFaceLabels = boundaryFaceLabels[patchI];
+                const faceList& bFaces = boundary[patchi];
+                labelList& bFaceLabels = boundaryFaceLabels[patchi];
                 forAll(bFaceLabels, i)
                 {
                     bFaceLabels[i] = findFace(pShapeMesh, bFaces[i]);
                 }
 
-                Info<< "Creating faceZone " <<  patchNames[patchI]
+                Info<< "Creating faceZone " <<  patchNames[patchi]
                     << " with " << bFaceLabels.size() << " faces" << endl;
 
                 fz.append
                 (
                     new faceZone
                     (
-                        patchNames[patchI],
+                        patchNames[patchi],
                         bFaceLabels,
                         boolList(bFaceLabels.size(), false),
                         fz.size(),
diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C
index c3d2fef0732a0170350d1c55a3310fc4be598379..1d9af1a8732c8f384d28eee8cdc0ba3492d6f206 100644
--- a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C
+++ b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.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,14 +103,14 @@ int main(int argc, char *argv[])
     {
         label no, blkNo, patchLabel;
 
-        forAll(cfxPatchTypes, patchI)
+        forAll(cfxPatchTypes, patchi)
         {
             // Grab patch type and name
-            cfxFile >> cfxPatchTypes[patchI] >> cfxPatchNames[patchI] >> no;
+            cfxFile >> cfxPatchTypes[patchi] >> cfxPatchNames[patchi] >> no;
 
             // Grab patch range
-            patchRanges[patchI].setSize(6);
-            labelList& curRange = patchRanges[patchI];
+            patchRanges[patchi].setSize(6);
+            labelList& curRange = patchRanges[patchi];
 
             forAll(curRange, rI)
             {
@@ -122,9 +122,9 @@ int main(int argc, char *argv[])
             // 0 = solid (3-D patch),
             // 1 = high i, 2 = high j, 3 = high k
             // 4 = low i, 5 = low j, 6 = low k
-            cfxFile >> patchDirections[patchI] >> blkNo >> patchLabel;
+            cfxFile >> patchDirections[patchi] >> blkNo >> patchLabel;
 
-            patchMasterBlocks[patchI] = blkNo - 1;
+            patchMasterBlocks[patchi] = blkNo - 1;
         }
     }
 
@@ -178,9 +178,9 @@ int main(int argc, char *argv[])
 
     faceListList rawPatches(npatch);
 
-    forAll(rawPatches, patchI)
+    forAll(rawPatches, patchi)
     {
-        const word& patchType = cfxPatchTypes[patchI];
+        const word& patchType = cfxPatchTypes[patchi];
 
         // reject volume patches
         if
@@ -189,17 +189,17 @@ int main(int argc, char *argv[])
          || patchType == "SOLCON" || patchType == "USER3D"
         )
         {
-            patchMasterBlocks[patchI] = -1;
-            rawPatches[patchI].setSize(0);
+            patchMasterBlocks[patchi] = -1;
+            rawPatches[patchi].setSize(0);
         }
         else
         {
             // read and create a 2-D patch
-            rawPatches[patchI] =
-                blocks[patchMasterBlocks[patchI]].patchFaces
+            rawPatches[patchi] =
+                blocks[patchMasterBlocks[patchi]].patchFaces
                 (
-                    patchDirections[patchI],
-                    patchRanges[patchI]
+                    patchDirections[patchi],
+                    patchRanges[patchi]
                 );
 
         }
@@ -580,30 +580,30 @@ int main(int argc, char *argv[])
 
     label nCreatedPatches = 0;
 
-    forAll(rawPatches, patchI)
+    forAll(rawPatches, patchi)
     {
-        if (rawPatches[patchI].size() && cfxPatchTypes[patchI] != "BLKBDY")
+        if (rawPatches[patchi].size() && cfxPatchTypes[patchi] != "BLKBDY")
         {
             // Check if this name has been already created
             label existingPatch = -1;
 
             for (label oldPatchI = 0; oldPatchI < nCreatedPatches; oldPatchI++)
             {
-                if (patchNames[oldPatchI] == cfxPatchNames[patchI])
+                if (patchNames[oldPatchI] == cfxPatchNames[patchi])
                 {
                     existingPatch = oldPatchI;
                     break;
                 }
             }
 
-            const faceList& curRawPatch = rawPatches[patchI];
-            label curBlock = patchMasterBlocks[patchI];
+            const faceList& curRawPatch = rawPatches[patchi];
+            label curBlock = patchMasterBlocks[patchi];
 
             if (existingPatch >= 0)
             {
-                Info<< "CFX patch " << patchI
-                    << ", of type " << cfxPatchTypes[patchI]
-                    << ", name " << cfxPatchNames[patchI]
+                Info<< "CFX patch " << patchi
+                    << ", of type " << cfxPatchTypes[patchi]
+                    << ", name " << cfxPatchNames[patchi]
                     << " already exists as OpenFOAM patch " << existingPatch
                     << ".  Adding faces." << endl;
 
@@ -653,48 +653,48 @@ int main(int argc, char *argv[])
                     }
                 }
 
-                Info<< "CFX patch " << patchI
-                    << ", of type " << cfxPatchTypes[patchI]
-                    << ", name " << cfxPatchNames[patchI]
+                Info<< "CFX patch " << patchi
+                    << ", of type " << cfxPatchTypes[patchi]
+                    << ", name " << cfxPatchNames[patchi]
                     << " converted into OpenFOAM patch " << nCreatedPatches
                     << " type ";
 
-                if (cfxPatchTypes[patchI] == "WALL")
+                if (cfxPatchTypes[patchi] == "WALL")
                 {
                     Info<< "wall." << endl;
 
                     patchTypes[nCreatedPatches] = wallPolyPatch::typeName;
-                    patchNames[nCreatedPatches] = cfxPatchNames[patchI];
+                    patchNames[nCreatedPatches] = cfxPatchNames[patchi];
                     nCreatedPatches++;
                 }
-                else if (cfxPatchTypes[patchI] == "SYMMET")
+                else if (cfxPatchTypes[patchi] == "SYMMET")
                 {
                     Info<< "symmetryPlane." << endl;
 
                     patchTypes[nCreatedPatches] = symmetryPolyPatch::typeName;
-                    patchNames[nCreatedPatches] = cfxPatchNames[patchI];
+                    patchNames[nCreatedPatches] = cfxPatchNames[patchi];
                     nCreatedPatches++;
                 }
                 else if
                 (
-                    cfxPatchTypes[patchI] == "INLET"
-                 || cfxPatchTypes[patchI] == "OUTLET"
-                 || cfxPatchTypes[patchI] == "PRESS"
-                 || cfxPatchTypes[patchI] == "CNDBDY"
-                 || cfxPatchTypes[patchI] == "USER2D"
+                    cfxPatchTypes[patchi] == "INLET"
+                 || cfxPatchTypes[patchi] == "OUTLET"
+                 || cfxPatchTypes[patchi] == "PRESS"
+                 || cfxPatchTypes[patchi] == "CNDBDY"
+                 || cfxPatchTypes[patchi] == "USER2D"
                 )
                 {
                     Info<< "generic." << endl;
 
                     patchTypes[nCreatedPatches] = polyPatch::typeName;
-                    patchNames[nCreatedPatches] = cfxPatchNames[patchI];
+                    patchNames[nCreatedPatches] = cfxPatchNames[patchi];
                     nCreatedPatches++;
                 }
                 else
                 {
                     FatalErrorInFunction
                         << "Unrecognised CFX patch type "
-                        << cfxPatchTypes[patchI]
+                        << cfxPatchTypes[patchi]
                         << abort(FatalError);
                 }
             }
@@ -719,14 +719,14 @@ int main(int argc, char *argv[])
     );
 
     // Add information to dictionary
-    forAll(patchNames, patchI)
+    forAll(patchNames, patchi)
     {
-        if (!patchDicts.set(patchI))
+        if (!patchDicts.set(patchi))
         {
-            patchDicts.set(patchI, new dictionary());
+            patchDicts.set(patchi, new dictionary());
         }
         // Add but not overwrite
-        patchDicts[patchI].add("type", patchTypes[patchI], false);
+        patchDicts[patchi].add("type", patchTypes[patchi], false);
     }
 
     polyMesh pShapeMesh
diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
index 3300ba9778666021b4665d0c34706eb648bb6cc7..690afc084ef6aa57bc604eba912caedfbfd2c7e7 100644
--- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
+++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
@@ -1377,9 +1377,9 @@ int main(int argc, char *argv[])
     label nBoundaries = 0;
 
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const faceList& bFaces = patches[patchI];
+        const faceList& bFaces = patches[patchi];
 
         label sz = bFaces.size();
         labelList meshFaces(sz,-1);
@@ -1402,7 +1402,7 @@ int main(int argc, char *argv[])
 
         if
         (
-            patchTypes[patchI] != "internal"
+            patchTypes[patchi] != "internal"
          && !pShapeMesh.isInternalFace(meshFaces[0])
         )
         {
@@ -1418,7 +1418,7 @@ int main(int argc, char *argv[])
                 {
                     FatalErrorInFunction
                         << "Face " << faceI << " on new patch "
-                        << patchNames[patchI]
+                        << patchNames[patchi]
                         << " is not an external face of the mesh." << endl
                         << exit(FatalError);
                 }
@@ -1427,7 +1427,7 @@ int main(int argc, char *argv[])
                 {
                     FatalErrorInFunction
                         << "Face " << faceI << " on new patch "
-                        << patchNames[patchI]
+                        << patchNames[patchi]
                         << " has already been marked for repatching to"
                         << " patch "
                         << facePatchID[faceI - pShapeMesh.nInternalFaces()]
@@ -1438,8 +1438,8 @@ int main(int argc, char *argv[])
 
             //add to boundary patch
 
-            Info<< "Adding new patch " << patchNames[patchI]
-                << " of type " << patchTypes[patchI]
+            Info<< "Adding new patch " << patchNames[patchi]
+                << " of type " << patchTypes[patchi]
                 << " as patch " << nBoundaries << endl;
 
             // Add patch to new patch list
@@ -1447,8 +1447,8 @@ int main(int argc, char *argv[])
             (
                 polyPatch::New
                 (
-                    patchTypes[patchI],
-                    patchNames[patchI],
+                    patchTypes[patchi],
+                    patchNames[patchi],
                     sz,
                     cMeshFace,
                     nBoundaries,
@@ -1460,7 +1460,7 @@ int main(int argc, char *argv[])
         }
         else
         {
-            Info<< "Patch " << patchNames[patchI]
+            Info<< "Patch " << patchNames[patchi]
                  << " is internal to the mesh "
                  << " and is not being added to the boundary."
                  << endl;
@@ -1535,12 +1535,12 @@ int main(int argc, char *argv[])
     // Re-do face matching to write sets
     if (writeSets)
     {
-        forAll(patches, patchI)
+        forAll(patches, patchi)
         {
-            const faceList& bFaces = patches[patchI];
+            const faceList& bFaces = patches[patchi];
             label sz = bFaces.size();
 
-            faceSet pFaceSet(pShapeMesh, patchNames[patchI], sz);
+            faceSet pFaceSet(pShapeMesh, patchNames[patchi], sz);
 
             forAll(bFaces, j)
             {
@@ -1548,7 +1548,7 @@ int main(int argc, char *argv[])
                 label cMeshFace = findFace(pShapeMesh, f);
                 pFaceSet.insert(cMeshFace);
             }
-            Info<< "Writing patch " << patchNames[patchI]
+            Info<< "Writing patch " << patchNames[patchi]
                 << " of size " << sz << " to faceSet" << endl;
 
             pFaceSet.instance() = pShapeMesh.instance();
diff --git a/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C b/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C
index 0353caf74b5c813f5e17b71ecbf91ef2c216eca9..12dfbcb9a928195afc2db3c72e81e0ebe648aeca 100644
--- a/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.C
+++ b/applications/utilities/mesh/conversion/foamMeshToFluent/fluentFvMesh.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
@@ -157,31 +157,31 @@ void Foam::fluentFvMesh::writeFluentMesh() const
     label nWrittenFaces = own.size();
 
     // Writing boundary faces
-    forAll(boundary(), patchI)
+    forAll(boundary(), patchi)
     {
-        const faceUList& patchFaces = boundaryMesh()[patchI];
+        const faceUList& patchFaces = boundaryMesh()[patchi];
 
         const labelList& patchFaceCells =
-            boundaryMesh()[patchI].faceCells();
+            boundaryMesh()[patchi].faceCells();
 
         // The face group will be offset by 10 from the patch label
 
         // Write header
         fluentMeshFile
-            << "(13 (" << patchI + 10 << " " << nWrittenFaces + 1
+            << "(13 (" << patchi + 10 << " " << nWrittenFaces + 1
             << " " << nWrittenFaces + patchFaces.size() << " ";
 
         nWrittenFaces += patchFaces.size();
 
         // Write patch type
-        if (isA<wallFvPatch>(boundary()[patchI]))
+        if (isA<wallFvPatch>(boundary()[patchi]))
         {
             fluentMeshFile << 3;
         }
         else if
         (
-            isA<symmetryPlaneFvPatch>(boundary()[patchI])
-         || isA<symmetryFvPatch>(boundary()[patchI])
+            isA<symmetryPlaneFvPatch>(boundary()[patchi])
+         || isA<symmetryFvPatch>(boundary()[patchi])
         )
         {
             fluentMeshFile << 7;
@@ -275,20 +275,20 @@ void Foam::fluentFvMesh::writeFluentMesh() const
     fluentMeshFile << "(39 (2 interior interior-1)())" << std::endl;
 
     // Writing boundary patch types
-    forAll(boundary(), patchI)
+    forAll(boundary(), patchi)
     {
         fluentMeshFile
-            << "(39 (" << patchI + 10 << " ";
+            << "(39 (" << patchi + 10 << " ";
 
         // Write patch type
-        if (isA<wallFvPatch>(boundary()[patchI]))
+        if (isA<wallFvPatch>(boundary()[patchi]))
         {
             fluentMeshFile << "wall ";
         }
         else if
         (
-            isA<symmetryPlaneFvPatch>(boundary()[patchI])
-         || isA<symmetryFvPatch>(boundary()[patchI])
+            isA<symmetryPlaneFvPatch>(boundary()[patchi])
+         || isA<symmetryFvPatch>(boundary()[patchi])
         )
         {
             fluentMeshFile << "symmetry ";
@@ -299,7 +299,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
         }
 
         fluentMeshFile
-            << boundary()[patchI].name() << ")())" << std::endl;
+            << boundary()[patchi].name() << ")())" << std::endl;
     }
 }
 
diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
index 6821af8fba136ccaedb679828d9df4adfa033fe5..79873bfcd51cd419f8cac1b767bc9f1d4957bbb4 100644
--- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
+++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
@@ -780,12 +780,12 @@ int main(int argc, char *argv[])
 
     faceListList boundary(patchCells.size());
 
-    forAll(patchCells, patchI)
+    forAll(patchCells, patchi)
     {
-        labelList& curCells = patchCells[patchI];
-        labelList& curFaces = patchCellFaces[patchI];
+        labelList& curCells = patchCells[patchi];
+        labelList& curFaces = patchCellFaces[patchi];
 
-        faceList& patchFaces = boundary[patchI];
+        faceList& patchFaces = boundary[patchi];
         patchFaces.setSize(curCells.size());
 
         forAll(curCells, faceI)
@@ -831,14 +831,14 @@ int main(int argc, char *argv[])
     );
 
     // Add information to dictionary
-    forAll(patchNames, patchI)
+    forAll(patchNames, patchi)
     {
-        if (!patchDicts.set(patchI))
+        if (!patchDicts.set(patchi))
         {
-            patchDicts.set(patchI, new dictionary());
+            patchDicts.set(patchi, new dictionary());
         }
         // Add but not overwrite
-        patchDicts[patchI].add("type", polyPatch::typeName, false);
+        patchDicts[patchi].add("type", polyPatch::typeName, false);
     }
 
     polyMesh pShapeMesh
diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C
index 5de646c441850202b1b541dbacaa2545cf594ba3..4c05fb4a6ab73ab9aeb84a8a92525bf73046da4d 100644
--- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C
+++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C
@@ -505,28 +505,28 @@ void readCells
 
             Map<label>::iterator regFnd = physToPatch.find(regPhys);
 
-            label patchI = -1;
+            label patchi = -1;
             if (regFnd == physToPatch.end())
             {
                 // New region. Allocate patch for it.
-                patchI = patchFaces.size();
+                patchi = patchFaces.size();
 
-                patchFaces.setSize(patchI + 1);
-                patchToPhys.setSize(patchI + 1);
+                patchFaces.setSize(patchi + 1);
+                patchToPhys.setSize(patchi + 1);
 
                 Info<< "Mapping region " << regPhys << " to Foam patch "
-                    << patchI << endl;
-                physToPatch.insert(regPhys, patchI);
-                patchToPhys[patchI] = regPhys;
+                    << patchi << endl;
+                physToPatch.insert(regPhys, patchi);
+                patchToPhys[patchi] = regPhys;
             }
             else
             {
                 // Existing patch for region
-                patchI = regFnd();
+                patchi = regFnd();
             }
 
             // Add triangle to correct patchFaces.
-            patchFaces[patchI].append(triPoints);
+            patchFaces[patchi].append(triPoints);
         }
         else if (elmType == MSHQUAD)
         {
@@ -538,28 +538,28 @@ void readCells
 
             Map<label>::iterator regFnd = physToPatch.find(regPhys);
 
-            label patchI = -1;
+            label patchi = -1;
             if (regFnd == physToPatch.end())
             {
                 // New region. Allocate patch for it.
-                patchI = patchFaces.size();
+                patchi = patchFaces.size();
 
-                patchFaces.setSize(patchI + 1);
-                patchToPhys.setSize(patchI + 1);
+                patchFaces.setSize(patchi + 1);
+                patchToPhys.setSize(patchi + 1);
 
                 Info<< "Mapping region " << regPhys << " to Foam patch "
-                    << patchI << endl;
-                physToPatch.insert(regPhys, patchI);
-                patchToPhys[patchI] = regPhys;
+                    << patchi << endl;
+                physToPatch.insert(regPhys, patchi);
+                patchToPhys[patchi] = regPhys;
             }
             else
             {
                 // Existing patch for region
-                patchI = regFnd();
+                patchi = regFnd();
             }
 
             // Add quad to correct patchFaces.
-            patchFaces[patchI].append(quadPoints);
+            patchFaces[patchi].append(quadPoints);
         }
         else if (elmType == MSHTET)
         {
@@ -707,9 +707,9 @@ void readCells
 
     cells.setSize(cellI);
 
-    forAll(patchFaces, patchI)
+    forAll(patchFaces, patchi)
     {
-        patchFaces[patchI].shrink();
+        patchFaces[patchi].shrink();
     }
 
 
@@ -880,22 +880,22 @@ int main(int argc, char *argv[])
 
     wordList boundaryPatchNames(boundaryFaces.size());
 
-    forAll(boundaryPatchNames, patchI)
+    forAll(boundaryPatchNames, patchi)
     {
-        label physReg = patchToPhys[patchI];
+        label physReg = patchToPhys[patchi];
 
         Map<word>::const_iterator iter = physicalNames.find(physReg);
 
         if (iter != physicalNames.end())
         {
-            boundaryPatchNames[patchI] = iter();
+            boundaryPatchNames[patchi] = iter();
         }
         else
         {
-            boundaryPatchNames[patchI] = word("patch") + name(patchI);
+            boundaryPatchNames[patchi] = word("patch") + name(patchi);
         }
-        Info<< "Patch " << patchI << " gets name "
-            << boundaryPatchNames[patchI] << endl;
+        Info<< "Patch " << patchi << " gets name "
+            << boundaryPatchNames[patchi] << endl;
     }
     Info<< endl;
 
@@ -938,11 +938,11 @@ int main(int argc, char *argv[])
 
 
     // Go through all the patchFaces and find corresponding face in pp.
-    forAll(patchFaces, patchI)
+    forAll(patchFaces, patchi)
     {
-        const DynamicList<face>& pFaces = patchFaces[patchI];
+        const DynamicList<face>& pFaces = patchFaces[patchi];
 
-        Info<< "Finding faces of patch " << patchI << endl;
+        Info<< "Finding faces of patch " << patchi << endl;
 
         forAll(pFaces, i)
         {
@@ -955,7 +955,7 @@ int main(int argc, char *argv[])
             {
                 label meshFaceI = pp.start() + patchFaceI;
 
-                repatcher.changePatchID(meshFaceI, patchI);
+                repatcher.changePatchID(meshFaceI, patchi);
             }
             else
             {
@@ -965,7 +965,7 @@ int main(int argc, char *argv[])
 
                 if (meshFaceI != -1)
                 {
-                    zoneFaces[patchI].append(meshFaceI);
+                    zoneFaces[patchi].append(meshFaceI);
                 }
                 else
                 {
@@ -1104,11 +1104,11 @@ int main(int argc, char *argv[])
     {
         List<polyPatch*> newPatchPtrList((mesh.boundaryMesh().size() - 1));
         label newPatchI = 0;
-        forAll(mesh.boundaryMesh(), patchI)
+        forAll(mesh.boundaryMesh(), patchi)
         {
-            if (patchI != defaultPatchID)
+            if (patchi != defaultPatchID)
             {
-                const polyPatch& patch = mesh.boundaryMesh()[patchI];
+                const polyPatch& patch = mesh.boundaryMesh()[patchi];
 
                 newPatchPtrList[newPatchI] = patch.clone
                 (
diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
index 7a94b27299716fe1a781ecdc7f32a13940d78785..67c07921ee999478b2af286c1a0d0a6f2167d79f 100644
--- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
+++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
@@ -625,16 +625,16 @@ void readDOFS
 // Returns -1 or group that all of the vertices of f are in,
 label findPatch(const List<labelHashSet>& dofGroups, const face& f)
 {
-    forAll(dofGroups, patchI)
+    forAll(dofGroups, patchi)
     {
-        if (dofGroups[patchI].found(f[0]))
+        if (dofGroups[patchi].found(f[0]))
         {
             bool allInGroup = true;
 
             // Check rest of face
             for (label fp = 1; fp < f.size(); fp++)
             {
-                if (!dofGroups[patchI].found(f[fp]))
+                if (!dofGroups[patchi].found(f[fp]))
                 {
                     allInGroup = false;
                     break;
@@ -643,7 +643,7 @@ label findPatch(const List<labelHashSet>& dofGroups, const face& f)
 
             if (allInGroup)
             {
-                return patchI;
+                return patchi;
             }
         }
     }
@@ -937,22 +937,22 @@ int main(int argc, char *argv[])
             << " DOF sets to detect boundary faces."<< endl;
 
         // Renumber vertex numbers on contraints
-        forAll(dofVertIndices, patchI)
+        forAll(dofVertIndices, patchi)
         {
-            inplaceRenumber(unvToFoam, dofVertIndices[patchI]);
+            inplaceRenumber(unvToFoam, dofVertIndices[patchi]);
         }
 
 
         // Build labelHashSet of points per dofGroup/patch
         List<labelHashSet> dofGroups(dofVertIndices.size());
 
-        forAll(dofVertIndices, patchI)
+        forAll(dofVertIndices, patchi)
         {
-            const labelList& foamVerts = dofVertIndices[patchI];
+            const labelList& foamVerts = dofVertIndices[patchi];
 
             forAll(foamVerts, i)
             {
-                dofGroups[patchI].insert(foamVerts[i]);
+                dofGroups[patchi].insert(foamVerts[i]);
             }
         }
 
@@ -966,11 +966,11 @@ int main(int argc, char *argv[])
 
             forAll(shapeFaces, i)
             {
-                label patchI = findPatch(dofGroups, shapeFaces[i]);
+                label patchi = findPatch(dofGroups, shapeFaces[i]);
 
-                if (patchI != -1)
+                if (patchi != -1)
                 {
-                    dynPatchFaces[patchI].append(shapeFaces[i]);
+                    dynPatchFaces[patchi].append(shapeFaces[i]);
                 }
             }
         }
@@ -978,9 +978,9 @@ int main(int argc, char *argv[])
         // Transfer
         patchFaceVerts.setSize(dynPatchFaces.size());
 
-        forAll(dynPatchFaces, patchI)
+        forAll(dynPatchFaces, patchi)
         {
-            patchFaceVerts[patchI].transfer(dynPatchFaces[patchI]);
+            patchFaceVerts[patchi].transfer(dynPatchFaces[patchi]);
         }
     }
     else
@@ -1005,12 +1005,12 @@ int main(int argc, char *argv[])
             boundaryFaceToIndex.insert(boundaryFaceIndices[i], i);
         }
 
-        forAll(patchFaceVerts, patchI)
+        forAll(patchFaceVerts, patchi)
         {
-            Info << patchI << ": " << patchNames[patchI] << " is " << flush;
+            Info << patchi << ": " << patchNames[patchi] << " is " << flush;
 
-            faceList& patchFaces = patchFaceVerts[patchI];
-            const labelList& faceIndices = patchFaceIndices[patchI];
+            faceList& patchFaces = patchFaceVerts[patchi];
+            const labelList& faceIndices = patchFaceIndices[patchi];
 
             patchFaces.setSize(faceIndices.size());
 
@@ -1037,14 +1037,14 @@ int main(int argc, char *argv[])
 
             if (cnt != patchFaces.size() || duplicateFaces)
             {
-                isAPatch[patchI] = false;
+                isAPatch[patchi] = false;
 
                 if (verbose)
                 {
                     if (cnt != patchFaces.size())
                     {
                         WarningInFunction
-                            << "For patch " << patchI << " there were "
+                            << "For patch " << patchi << " there were "
                             << patchFaces.size()-cnt
                             << " faces not used because they seem"
                             << " to be internal. "
@@ -1055,7 +1055,7 @@ int main(int argc, char *argv[])
                     {
                         WarningInFunction
                             << "Patch "
-                            << patchI << " has faces that are already "
+                            << patchi << " has faces that are already "
                             << " in use on other boundary-patches,"
                             << " Assuming faceZoneset." << endl;
                     }
@@ -1075,13 +1075,13 @@ int main(int argc, char *argv[])
                                 << "The face index " << faceIndices[i]
                                 << " was not found amongst the cells."
                                 << " This kills the theory that "
-                                << patchNames[patchI] << " is a cell zone"
+                                << patchNames[patchi] << " is a cell zone"
                                 << endl
                                 << abort(FatalError);
                         }
                         theCells[i] = cellCorrespondence[faceIndices[i]];
                     }
-                    cellZones.insert(patchNames[patchI], theCells);
+                    cellZones.insert(patchNames[patchi], theCells);
                 }
                 else
                 {
@@ -1091,7 +1091,7 @@ int main(int argc, char *argv[])
                     {
                         theFaces[i] = boundaryFaceToIndex[faceIndices[i]];
                     }
-                    faceZones.insert(patchNames[patchI],theFaces);
+                    faceZones.insert(patchNames[patchi],theFaces);
                 }
             }
             else
@@ -1140,14 +1140,14 @@ int main(int argc, char *argv[])
     DynamicList<word> usedPatchNames;
     DynamicList<faceList> usedPatchFaceVerts;
 
-    forAll(patchNames, patchI)
+    forAll(patchNames, patchi)
     {
-        if (isAPatch[patchI])
+        if (isAPatch[patchi])
         {
-            Info<< "    " << patchNames[patchI] << '\t'
-                << patchFaceVerts[patchI].size() << nl;
-            usedPatchNames.append(patchNames[patchI]);
-            usedPatchFaceVerts.append(patchFaceVerts[patchI]);
+            Info<< "    " << patchNames[patchi] << '\t'
+                << patchFaceVerts[patchi].size() << nl;
+            usedPatchNames.append(patchNames[patchi]);
+            usedPatchFaceVerts.append(patchFaceVerts[patchi]);
         }
     }
     usedPatchNames.shrink();
diff --git a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H
index adbd36b6577e716f94e83813d59447c7595c8c90..994f0c57a776496ad9d4989c5e1204a1de81aa17 100644
--- a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H
+++ b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H
@@ -546,14 +546,14 @@ preservePatchTypes
     defaultFacesType
 );
 // Add information to dictionary
-forAll(patchNames, patchI)
+forAll(patchNames, patchi)
 {
-    if (!patchDicts.set(patchI))
+    if (!patchDicts.set(patchi))
     {
-        patchDicts.set(patchI, new dictionary());
+        patchDicts.set(patchi, new dictionary());
     }
     // Add but not overwrite
-    patchDicts[patchI].add("type", patchTypes[patchI], false);
+    patchDicts[patchi].add("type", patchTypes[patchi], false);
 }
 
 // Build the mesh and write it out
diff --git a/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C b/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C
index e00422072380f925fc0cba1c8fb2f23366e58d4f..199bb7cdba56addb646d9341c13e72291c633cf5 100644
--- a/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C
+++ b/applications/utilities/mesh/conversion/netgenNeutralToFoam/netgenNeutralToFoam.C
@@ -167,18 +167,18 @@ int main(int argc, char *argv[])
 
     forAll(boundaryFaces, faceI)
     {
-        label patchI(readLabel(str));
+        label patchi(readLabel(str));
 
-        if (patchI < 0)
+        if (patchi < 0)
         {
             FatalErrorInFunction
-                << "Invalid boundary region number " << patchI
+                << "Invalid boundary region number " << patchi
                 << " on line " << str.lineNumber()
                 << exit(FatalError);
         }
 
 
-        maxPatch = max(maxPatch, patchI);
+        maxPatch = max(maxPatch, patchi);
 
         triFace tri(readLabel(str)-1, readLabel(str)-1, readLabel(str)-1);
 
@@ -187,7 +187,7 @@ int main(int argc, char *argv[])
         boundaryFaces[faceI][0] = tri[0];
         boundaryFaces[faceI][1] = tri[1];
         boundaryFaces[faceI][2] = tri[2];
-        boundaryPatch[faceI] = patchI;
+        boundaryPatch[faceI] = patchi;
 
         vertsToBoundary.insert(tri, faceI);
     }
@@ -254,9 +254,9 @@ int main(int argc, char *argv[])
 
     wordList patchNames(nPatches);
 
-    forAll(patchNames, patchI)
+    forAll(patchNames, patchi)
     {
-        patchNames[patchI] = word("patch") + name(patchI);
+        patchNames[patchi] = word("patch") + name(patchi);
     }
 
     wordList patchTypes(nPatches, polyPatch::typeName);
@@ -270,22 +270,22 @@ int main(int argc, char *argv[])
 
         forAll(boundaryPatch, faceI)
         {
-            label patchI = boundaryPatch[faceI];
+            label patchi = boundaryPatch[faceI];
 
-            allPatchFaces[patchI].append(boundaryFaces[faceI]);
+            allPatchFaces[patchi].append(boundaryFaces[faceI]);
         }
 
         Info<< "Patches:" << nl
             << "\tNeutral Boundary\tPatch name\tSize" << nl
             << "\t----------------\t----------\t----" << endl;
 
-        forAll(allPatchFaces, patchI)
+        forAll(allPatchFaces, patchi)
         {
-            Info<< '\t' << patchI << "\t\t\t"
-                << patchNames[patchI] << "\t\t"
-                << allPatchFaces[patchI].size() << endl;
+            Info<< '\t' << patchi << "\t\t\t"
+                << patchNames[patchi] << "\t\t"
+                << allPatchFaces[patchi].size() << endl;
 
-            patchFaces[patchI].transfer(allPatchFaces[patchI]);
+            patchFaces[patchi].transfer(allPatchFaces[patchi]);
         }
 
         Info<< endl;
diff --git a/applications/utilities/mesh/conversion/sammToFoam/createBoundaryFaces.C b/applications/utilities/mesh/conversion/sammToFoam/createBoundaryFaces.C
index b9ec74dabe347a45aeecc3c6872d59a472730b95..20aeb4245d50f9cc635c6daeb6aa3c002f53405f 100644
--- a/applications/utilities/mesh/conversion/sammToFoam/createBoundaryFaces.C
+++ b/applications/utilities/mesh/conversion/sammToFoam/createBoundaryFaces.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
@@ -70,9 +70,9 @@ bool Foam::sammMesh::sammEqualFace
 
 void Foam::sammMesh::createBoundaryFaces()
 {
-    forAll(boundary_, patchI)
+    forAll(boundary_, patchi)
     {
-        faceList& patchFaces = boundary_[patchI];
+        faceList& patchFaces = boundary_[patchi];
 
         const labelListList& PointCells = pointCells();
 
diff --git a/applications/utilities/mesh/conversion/sammToFoam/createPolyBoundary.C b/applications/utilities/mesh/conversion/sammToFoam/createPolyBoundary.C
index 25c444717708a32289cbbdfbdf322fc8cc663d2e..e996362e2fa9ec5dc51f2bfd92f3d01a4877857e 100644
--- a/applications/utilities/mesh/conversion/sammToFoam/createPolyBoundary.C
+++ b/applications/utilities/mesh/conversion/sammToFoam/createPolyBoundary.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,11 +41,11 @@ void Foam::sammMesh::createPolyBoundary()
 
     const labelListList& PointCells = pointCells();
 
-    forAll(boundary_, patchI)
+    forAll(boundary_, patchi)
     {
-        const faceList& curShapePatch = boundary_[patchI];
+        const faceList& curShapePatch = boundary_[patchi];
 
-        polyBoundaryPatchStartIndices_[patchI] = nCreatedFaces;
+        polyBoundaryPatchStartIndices_[patchi] = nCreatedFaces;
 
         forAll(curShapePatch, faceI)
         {
@@ -120,21 +120,21 @@ Foam::List<Foam::polyPatch* > Foam::sammMesh::polyBoundaryPatches
 {
     List<polyPatch* > p(boundary_.size());
 
-    forAll(boundary_, patchI)
+    forAll(boundary_, patchi)
     {
-        const faceList& curShapePatch = boundary_[patchI];
+        const faceList& curShapePatch = boundary_[patchi];
 
-        p[patchI] = polyPatch::New
+        p[patchi] = polyPatch::New
         (
-            patchTypes_[patchI],
-            patchNames_[patchI],
+            patchTypes_[patchi],
+            patchNames_[patchi],
             curShapePatch.size(),
-            polyBoundaryPatchStartIndices_[patchI],
-            patchI,
+            polyBoundaryPatchStartIndices_[patchi],
+            patchi,
             pMesh.boundaryMesh()
         ).ptr();
 
-        p[patchI]->physicalType() = patchPhysicalTypes_[patchI];
+        p[patchi]->physicalType() = patchPhysicalTypes_[patchi];
     }
 
     return p;
diff --git a/applications/utilities/mesh/conversion/sammToFoam/readBoundary.C b/applications/utilities/mesh/conversion/sammToFoam/readBoundary.C
index 86aa2d6c1e28d02368eb132956a35156177222f5..fcf3ef67873f9e1e276dbcadf8cfc305dba0dd96 100644
--- a/applications/utilities/mesh/conversion/sammToFoam/readBoundary.C
+++ b/applications/utilities/mesh/conversion/sammToFoam/readBoundary.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
@@ -243,13 +243,13 @@ void Foam::sammMesh::readBoundary()
         defaultFacesType_
     );
 
-    forAll(patchDicts, patchI)
+    forAll(patchDicts, patchi)
     {
-        if (patchDicts.set(patchI))
+        if (patchDicts.set(patchi))
         {
-            const dictionary& dict = patchDicts[patchI];
-            dict.readIfPresent("type", patchTypes_[patchI]);
-            dict.readIfPresent("physicalType", patchPhysicalTypes_[patchI]);
+            const dictionary& dict = patchDicts[patchi];
+            dict.readIfPresent("type", patchTypes_[patchi]);
+            dict.readIfPresent("physicalType", patchPhysicalTypes_[patchi]);
         }
     }
 }
diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C b/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C
index 976274c6a99838819246f14c850f94f825798d18..2cf2ba46737a042f4d5f820ab947c41a579dd4fe 100644
--- a/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C
+++ b/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.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,13 +97,13 @@ void Foam::starMesh::markBoundaryFaces()
     boundaryCellIDs_.setSize(boundary_.size());
     boundaryCellFaceIDs_.setSize(boundary_.size());
 
-    forAll(boundary_, patchI)
+    forAll(boundary_, patchi)
     {
-        const faceList& patchFaces = boundary_[patchI];
+        const faceList& patchFaces = boundary_[patchi];
 
         // set size of patch lists
-        labelList& curBoundaryCellIDs = boundaryCellIDs_[patchI];
-        labelList& curBoundaryCellFaceIDs = boundaryCellFaceIDs_[patchI];
+        labelList& curBoundaryCellIDs = boundaryCellIDs_[patchi];
+        labelList& curBoundaryCellFaceIDs = boundaryCellFaceIDs_[patchi];
 
         curBoundaryCellIDs.setSize(patchFaces.size());
         curBoundaryCellFaceIDs.setSize(patchFaces.size());
@@ -178,13 +178,13 @@ void Foam::starMesh::markBoundaryFaces()
 void Foam::starMesh::collectBoundaryFaces()
 {
     Info<< "Collecting boundary faces" << endl;
-    forAll(boundary_, patchI)
+    forAll(boundary_, patchi)
     {
-        faceList& patchFaces = boundary_[patchI];
+        faceList& patchFaces = boundary_[patchi];
 
         // set size of patch lists
-        const labelList& curBoundaryCellIDs = boundaryCellIDs_[patchI];
-        const labelList& curBoundaryCellFaceIDs = boundaryCellFaceIDs_[patchI];
+        const labelList& curBoundaryCellIDs = boundaryCellIDs_[patchi];
+        const labelList& curBoundaryCellFaceIDs = boundaryCellFaceIDs_[patchi];
 
         forAll(curBoundaryCellIDs, faceI)
         {
diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C b/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C
index b6847359398fe3dab4d22e58cbf2eb0c7e2243a9..de2d5dff263bce520d44786146cade4b25a39ba5 100644
--- a/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C
+++ b/applications/utilities/mesh/conversion/star3ToFoam/createPolyBoundary.C
@@ -41,11 +41,11 @@ void Foam::starMesh::createPolyBoundary()
 
     const labelListList& PointCells = pointCells();
 
-    forAll(boundary_, patchI)
+    forAll(boundary_, patchi)
     {
-        const faceList& curShapePatch = boundary_[patchI];
+        const faceList& curShapePatch = boundary_[patchi];
 
-        polyBoundaryPatchStartIndices_[patchI] = nCreatedFaces;
+        polyBoundaryPatchStartIndices_[patchi] = nCreatedFaces;
 
         forAll(curShapePatch, faceI)
         {
@@ -295,15 +295,15 @@ Foam::starMesh::polyBoundaryPatches(const polyMesh& pMesh)
 {
     List<polyPatch*> p(boundary_.size());
 
-    forAll(boundary_, patchI)
+    forAll(boundary_, patchi)
     {
-        p[patchI] = polyPatch::New
+        p[patchi] = polyPatch::New
         (
-            patchTypes_[patchI],
-            patchNames_[patchI],
-            boundary_[patchI].size(),
-            polyBoundaryPatchStartIndices_[patchI],
-            patchI,
+            patchTypes_[patchi],
+            patchNames_[patchi],
+            boundary_[patchi].size(),
+            polyBoundaryPatchStartIndices_[patchi],
+            patchi,
             pMesh.boundaryMesh()
         ).ptr();
     }
diff --git a/applications/utilities/mesh/conversion/star3ToFoam/readBoundary.C b/applications/utilities/mesh/conversion/star3ToFoam/readBoundary.C
index 10b80fbcd7b86212d0c53468f787e0a68d8e0961..aaef0db69a09b231d13412bfab1425b53ee17981 100644
--- a/applications/utilities/mesh/conversion/star3ToFoam/readBoundary.C
+++ b/applications/utilities/mesh/conversion/star3ToFoam/readBoundary.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
@@ -241,13 +241,13 @@ void Foam::starMesh::readBoundary()
         defaultFacesType_
     );
 
-    forAll(patchDicts, patchI)
+    forAll(patchDicts, patchi)
     {
-        if (patchDicts.set(patchI))
+        if (patchDicts.set(patchi))
         {
-            const dictionary& dict = patchDicts[patchI];
-            dict.readIfPresent("type", patchTypes_[patchI]);
-            dict.readIfPresent("physicalType", patchPhysicalTypes_[patchI]);
+            const dictionary& dict = patchDicts[patchi];
+            dict.readIfPresent("type", patchTypes_[patchi]);
+            dict.readIfPresent("physicalType", patchPhysicalTypes_[patchi]);
         }
     }
 }
diff --git a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C
index b7bcf072ad7f310ccbbae9f5492cf58601502a3d..e28880fbcaa0ab103286cd5cd76129af8d91125c 100644
--- a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C
+++ b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C
@@ -431,27 +431,27 @@ int main(int argc, char *argv[])
 
 
                         // Get Foam patchID and update region->patch table.
-                        label patchI = 0;
+                        label patchi = 0;
 
                         Map<label>::iterator patchFind =
                             regionToPatch.find(region);
 
                         if (patchFind == regionToPatch.end())
                         {
-                            patchI = nPatches;
+                            patchi = nPatches;
 
                             Info<< "Mapping tetgen region " << region
                                 << " to Foam patch "
-                                << patchI << endl;
+                                << patchi << endl;
 
                             regionToPatch.insert(region, nPatches++);
                         }
                         else
                         {
-                            patchI = patchFind();
+                            patchi = patchFind();
                         }
 
-                        boundaryPatch[faceI] = patchI;
+                        boundaryPatch[faceI] = patchi;
 
                         // Skip remaining attributes
                         for (label i = 1; i < nFaceAttr; i++)
@@ -486,9 +486,9 @@ int main(int argc, char *argv[])
         faceListList patchFaces(nPatches);
         wordList patchNames(nPatches);
 
-        forAll(patchNames, patchI)
+        forAll(patchNames, patchi)
         {
-            patchNames[patchI] = word("patch") + name(patchI);
+            patchNames[patchi] = word("patch") + name(patchi);
         }
 
         wordList patchTypes(nPatches, polyPatch::typeName);
@@ -502,19 +502,19 @@ int main(int argc, char *argv[])
 
         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;
 
-        forAll(allPatchFaces, patchI)
+        forAll(allPatchFaces, patchi)
         {
-            Info<< "    " << patchNames[patchI] << " : "
-                << allPatchFaces[patchI].size() << endl;
+            Info<< "    " << patchNames[patchi] << " : "
+                << allPatchFaces[patchi].size() << endl;
 
-            patchFaces[patchI].transfer(allPatchFaces[patchI]);
+            patchFaces[patchi].transfer(allPatchFaces[patchi]);
         }
 
         Info<< endl;
diff --git a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C
index 3b0a2269339a16d2e19b5662647e979902c03fde..4129e7e56e4136efa0c972ce513b737be3f77dbf 100644
--- a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C
+++ b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.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
@@ -222,9 +222,9 @@ void writePatchCentres
 {
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         fileName faceFile
         (
@@ -251,9 +251,9 @@ void writePatchFaces
 {
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         fileName faceFile
         (
@@ -294,9 +294,9 @@ void writePatchBoundaryEdges
 {
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         fileName edgeFile
         (
diff --git a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C
index 628c2b920bfa34ce4b9910a6ab39cd0a9c565f6d..3ccb09b610e916441872d2030257e6d5abc52799 100644
--- a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C
+++ b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C
@@ -358,11 +358,11 @@ int main(int argc, char *argv[])
             << "Patches" << nl
             << "----------------" << nl;
 
-        forAll(patches, patchI)
+        forAll(patches, patchi)
         {
-            const polyPatch& p = patches[patchI];
+            const polyPatch& p = patches[patchi];
 
-            Info<< "  " << "patch " << patchI
+            Info<< "  " << "patch " << patchi
                 << " (start: " << p.start()
                 << " size: " << p.size()
                 << ") name: " << p.name()
diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C
index 324e7cbad45362254a66ec9bce17bf0445fffbf3..db21b254acc5dfbb7f83f29b156aa8d2b2f5b7dc 100644
--- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C
+++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C
@@ -229,11 +229,11 @@ void changeFrontBackPatches
 
     DynamicList<polyPatch*> newPatches(patches.size());
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp(patches[patchI]);
+        const polyPatch& pp(patches[patchi]);
 
-        if (patchI == frontPatchI || patchI == backPatchI)
+        if (patchi == frontPatchI || patchi == backPatchI)
         {
             newPatches.append
             (
@@ -397,10 +397,10 @@ int main(int argc, char *argv[])
             {
                 label meshFaceI = meshFaces[i];
 
-                label patchI = patches.whichPatch(meshFaceI);
+                label patchi = patches.whichPatch(meshFaceI);
                 label own = mesh.faceOwner()[meshFaceI];
                 label nei = -1;
-                if (patchI == -1)
+                if (patchi == -1)
                 {
                     nei = mesh.faceNeighbour()[meshFaceI];
                 }
@@ -420,7 +420,7 @@ int main(int argc, char *argv[])
                     own,                            // owner
                     nei,                            // neighbour
                     true,                           // face flip
-                    patchI,                         // patch for face
+                    patchi,                         // patch for face
                     zoneI,                          // zone for face
                     zoneFlip                        // face flip in zone
                 );
@@ -521,11 +521,11 @@ int main(int argc, char *argv[])
         if (nAdded > 0)
         {
             DynamicList<polyPatch*> newPatches(nPatches);
-            forAll(mesh.boundaryMesh(), patchI)
+            forAll(mesh.boundaryMesh(), patchi)
             {
                 newPatches.append
                 (
-                    mesh.boundaryMesh()[patchI].clone
+                    mesh.boundaryMesh()[patchi].clone
                     (
                         mesh.boundaryMesh()
                     ).ptr()
@@ -533,14 +533,14 @@ int main(int argc, char *argv[])
             }
             for
             (
-                label patchI = mesh.boundaryMesh().size();
-                patchI < nPatches;
-                patchI++
+                label patchi = mesh.boundaryMesh().size();
+                patchi < nPatches;
+                patchi++
             )
             {
-                label nbrProcI = patchToNbrProc[patchI];
+                label nbrProcI = patchToNbrProc[patchi];
 
-                Pout<< "Adding patch " << patchI
+                Pout<< "Adding patch " << patchi
                     << " between " << Pstream::myProcNo()
                     << " and " << nbrProcI
                     << endl;
@@ -551,7 +551,7 @@ int main(int argc, char *argv[])
                     (
                         0,                  // size
                         mesh.nFaces(),      // start
-                        patchI,             // index
+                        patchi,             // index
                         mesh.boundaryMesh(),// polyBoundaryMesh
                         Pstream::myProcNo(),// myProcNo
                         nbrProcI            // neighbProcNo
diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C
index 8c5c0c458c63efbbf4bc2db0be3629b73ffcd879..0e5421aedff6bdbac762ea46a782d78bc0fb83fe 100644
--- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C
+++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C
@@ -164,29 +164,29 @@ label addPatch
     DynamicList<polyPatch*>& newPatches
 )
 {
-    label patchI = findPatchID(newPatches, patchName);
+    label patchi = findPatchID(newPatches, patchName);
 
-    if (patchI != -1)
+    if (patchi != -1)
     {
-        if (isA<PatchType>(*newPatches[patchI]))
+        if (isA<PatchType>(*newPatches[patchi]))
         {
             // Already there
-            return patchI;
+            return patchi;
         }
         else
         {
             FatalErrorInFunction
                 << "Already have patch " << patchName
-                << " but of type " << newPatches[patchI]->type()
+                << " but of type " << newPatches[patchi]->type()
                 << exit(FatalError);
         }
     }
 
 
-    patchI = newPatches.size();
+    patchi = newPatches.size();
 
     label startFaceI = 0;
-    if (patchI > 0)
+    if (patchi > 0)
     {
         const polyPatch& pp = *newPatches.last();
         startFaceI = pp.start()+pp.size();
@@ -201,12 +201,12 @@ label addPatch
             patchName,
             0,                          // size
             startFaceI,                 // nFaces
-            patchI,
+            patchi,
             patches
         ).ptr()
     );
 
-    return patchI;
+    return patchi;
 }
 
 
@@ -219,29 +219,29 @@ label addPatch
     DynamicList<polyPatch*>& newPatches
 )
 {
-    label patchI = findPatchID(newPatches, patchName);
+    label patchi = findPatchID(newPatches, patchName);
 
-    if (patchI != -1)
+    if (patchi != -1)
     {
-        if (isA<PatchType>(*newPatches[patchI]))
+        if (isA<PatchType>(*newPatches[patchi]))
         {
             // Already there
-            return patchI;
+            return patchi;
         }
         else
         {
             FatalErrorInFunction
                 << "Already have patch " << patchName
-                << " but of type " << newPatches[patchI]->type()
+                << " but of type " << newPatches[patchi]->type()
                 << exit(FatalError);
         }
     }
 
 
-    patchI = newPatches.size();
+    patchi = newPatches.size();
 
     label startFaceI = 0;
-    if (patchI > 0)
+    if (patchi > 0)
     {
         const polyPatch& pp = *newPatches.last();
         startFaceI = pp.start()+pp.size();
@@ -258,12 +258,12 @@ label addPatch
         (
             patchName,
             patchDict,
-            patchI,
+            patchi,
             patches
         ).ptr()
     );
 
-    return patchI;
+    return patchi;
 }
 
 
@@ -287,60 +287,60 @@ void deleteEmptyPatches(fvMesh& mesh)
     // Add all the non-empty, non-processor patches
     forAll(masterNames, masterI)
     {
-        label patchI = patches.findPatchID(masterNames[masterI]);
+        label patchi = patches.findPatchID(masterNames[masterI]);
 
-        if (patchI != -1)
+        if (patchi != -1)
         {
-            if (isA<processorPolyPatch>(patches[patchI]))
+            if (isA<processorPolyPatch>(patches[patchi]))
             {
                 // Similar named processor patch? Not 'possible'.
-                if (patches[patchI].size() == 0)
+                if (patches[patchi].size() == 0)
                 {
-                    Pout<< "Deleting processor patch " << patchI
-                        << " name:" << patches[patchI].name()
+                    Pout<< "Deleting processor patch " << patchi
+                        << " name:" << patches[patchi].name()
                         << endl;
-                    oldToNew[patchI] = --notUsedI;
+                    oldToNew[patchi] = --notUsedI;
                 }
                 else
                 {
-                    oldToNew[patchI] = usedI++;
+                    oldToNew[patchi] = usedI++;
                 }
             }
             else
             {
                 // Common patch.
-                if (returnReduce(patches[patchI].size(), sumOp<label>()) == 0)
+                if (returnReduce(patches[patchi].size(), sumOp<label>()) == 0)
                 {
-                    Pout<< "Deleting patch " << patchI
-                        << " name:" << patches[patchI].name()
+                    Pout<< "Deleting patch " << patchi
+                        << " name:" << patches[patchi].name()
                         << endl;
-                    oldToNew[patchI] = --notUsedI;
+                    oldToNew[patchi] = --notUsedI;
                 }
                 else
                 {
-                    oldToNew[patchI] = usedI++;
+                    oldToNew[patchi] = usedI++;
                 }
             }
         }
     }
 
     // Add remaining patches at the end
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        if (oldToNew[patchI] == -1)
+        if (oldToNew[patchi] == -1)
         {
             // Unique to this processor. Note: could check that these are
             // only processor patches.
-            if (patches[patchI].size() == 0)
+            if (patches[patchi].size() == 0)
             {
-                Pout<< "Deleting processor patch " << patchI
-                    << " name:" << patches[patchI].name()
+                Pout<< "Deleting processor patch " << patchi
+                    << " name:" << patches[patchi].name()
                     << endl;
-                oldToNew[patchI] = --notUsedI;
+                oldToNew[patchi] = --notUsedI;
             }
             else
             {
-                oldToNew[patchI] = usedI++;
+                oldToNew[patchi] = usedI++;
             }
         }
     }
@@ -533,12 +533,12 @@ label findUncoveredPatchFace
     forAll(eFaces, i)
     {
         label faceI = eFaces[i];
-        label patchI = pbm.whichPatch(faceI);
+        label patchi = pbm.whichPatch(faceI);
 
         if
         (
-            patchI != -1
-        && !pbm[patchI].coupled()
+            patchi != -1
+        && !pbm[patchi].coupled()
         && !extrudeFaceSet.found(faceI)
         )
         {
@@ -569,12 +569,12 @@ label findUncoveredCyclicPatchFace
     forAll(eFaces, i)
     {
         label faceI = eFaces[i];
-        label patchI = pbm.whichPatch(faceI);
+        label patchi = pbm.whichPatch(faceI);
 
         if
         (
-            patchI != -1
-        &&  isA<cyclicPolyPatch>(pbm[patchI])
+            patchi != -1
+        &&  isA<cyclicPolyPatch>(pbm[patchi])
         && !extrudeFaceSet.found(faceI)
         )
         {
@@ -1181,20 +1181,20 @@ void setCouplingInfo
 
     forAll(zoneToPatch, zoneI)
     {
-        label patchI = zoneToPatch[zoneI];
+        label patchi = zoneToPatch[zoneI];
 
-        if (patchI != -1)
+        if (patchi != -1)
         {
-            const polyPatch& pp = patches[patchI];
+            const polyPatch& pp = patches[patchi];
 
             if (isA<mappedWallPolyPatch>(pp))
             {
-                newPatches[patchI] = new mappedWallPolyPatch
+                newPatches[patchi] = new mappedWallPolyPatch
                 (
                     pp.name(),
                     pp.size(),
                     pp.start(),
-                    patchI,
+                    patchi,
                     sampleRegion,                           // sampleRegion
                     mode,                                   // sampleMode
                     pp.name(),                              // samplePatch
@@ -1205,11 +1205,11 @@ void setCouplingInfo
         }
     }
 
-    forAll(newPatches, patchI)
+    forAll(newPatches, patchi)
     {
-        if (!newPatches[patchI])
+        if (!newPatches[patchi])
         {
-            newPatches[patchI] = patches[patchI].clone(patches).ptr();
+            newPatches[patchi] = patches[patchi].clone(patches).ptr();
         }
     }
 
@@ -1956,14 +1956,14 @@ int main(int argc, char *argv[])
     DynamicList<polyPatch*> regionPatches(patches.size());
     // Copy all non-local patches since these are used on boundary edges of
     // the extrusion
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        if (!isA<processorPolyPatch>(patches[patchI]))
+        if (!isA<processorPolyPatch>(patches[patchi]))
         {
             label newPatchI = regionPatches.size();
             regionPatches.append
             (
-                patches[patchI].clone
+                patches[patchi].clone
                 (
                     patches,
                     newPatchI,
@@ -2008,9 +2008,9 @@ int main(int argc, char *argv[])
 
         // Clone existing patches
         DynamicList<polyPatch*> newPatches(patches.size());
-        forAll(patches, patchI)
+        forAll(patches, patchi)
         {
-            newPatches.append(patches[patchI].clone(patches).ptr());
+            newPatches.append(patches[patchi].clone(patches).ptr());
         }
 
         // Add new patches
@@ -2126,10 +2126,10 @@ int main(int argc, char *argv[])
 //    // Add all the newPatches to the mesh and fields
 //    // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //    {
-//        forAll(newPatches, patchI)
+//        forAll(newPatches, patchi)
 //        {
-//            Pout<< "Adding patch " << patchI
-//                << " name:" << newPatches[patchI]->name()
+//            Pout<< "Adding patch " << patchi
+//                << " name:" << newPatches[patchi]->name()
 //                << endl;
 //        }
 //        //label nOldPatches = mesh.boundary().size();
@@ -2139,12 +2139,12 @@ int main(int argc, char *argv[])
 //        //// Add calculated fvPatchFields for the added patches
 //        //for
 //        //(
-//        //    label patchI = nOldPatches;
-//        //    patchI < mesh.boundary().size();
-//        //    patchI++
+//        //    label patchi = nOldPatches;
+//        //    patchi < mesh.boundary().size();
+//        //    patchi++
 //        //)
 //        //{
-//        //    Pout<< "ADDing calculated to patch " << patchI
+//        //    Pout<< "ADDing calculated to patch " << patchi
 //        //        << endl;
 //        //    addCalculatedPatchFields(mesh);
 //        //}
@@ -2408,10 +2408,10 @@ int main(int argc, char *argv[])
     );
 
     // Add the new patches
-    forAll(regionPatches, patchI)
+    forAll(regionPatches, patchi)
     {
-        polyPatch* ppPtr = regionPatches[patchI];
-        regionPatches[patchI] = ppPtr->clone(regionMesh.boundaryMesh()).ptr();
+        polyPatch* ppPtr = regionPatches[patchi];
+        regionPatches[patchi] = ppPtr->clone(regionMesh.boundaryMesh()).ptr();
         delete ppPtr;
     }
     regionMesh.clearOut();
@@ -2474,20 +2474,20 @@ int main(int argc, char *argv[])
     List<pointField> topOffsets(zoneNames.size());
     List<pointField> bottomOffsets(zoneNames.size());
 
-    forAll(regionMesh.boundaryMesh(), patchI)
+    forAll(regionMesh.boundaryMesh(), patchi)
     {
-        const polyPatch& pp = regionMesh.boundaryMesh()[patchI];
+        const polyPatch& pp = regionMesh.boundaryMesh()[patchi];
 
         if (isA<mappedWallPolyPatch>(pp))
         {
-            if (findIndex(interRegionTopPatch, patchI) != -1)
+            if (findIndex(interRegionTopPatch, patchi) != -1)
             {
-                label zoneI = findIndex(interRegionTopPatch, patchI);
+                label zoneI = findIndex(interRegionTopPatch, patchi);
                 topOffsets[zoneI] = calcOffset(extrudePatch, extruder, pp);
             }
-            else if (findIndex(interRegionBottomPatch, patchI) != -1)
+            else if (findIndex(interRegionBottomPatch, patchi) != -1)
             {
-                label zoneI = findIndex(interRegionBottomPatch, patchI);
+                label zoneI = findIndex(interRegionBottomPatch, patchi);
                 bottomOffsets[zoneI] = calcOffset(extrudePatch, extruder, pp);
             }
         }
diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C
index 5f6de0801d8bd2668e2ac65da4cf5eddcd9c9c72..be552aada4ddb0d0bf918a7a38b4aafc87ad66ae 100644
--- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C
+++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.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
@@ -117,11 +117,11 @@ void Foam::extrude2DMesh::addFrontBackPatches()
     // Add patch.
     List<polyPatch*> newPatches(patches.size() + 2);
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
-        newPatches[patchI] =
+        newPatches[patchi] =
             pp.clone
             (
                 patches,
@@ -323,15 +323,15 @@ void Foam::extrude2DMesh::setRefinement
         }
     }
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
         for (label layer=0; layer < nLayers; layer++)
         {
             label currentLayerOffset = layer*mesh_.nPoints();
             label nextLayerOffset = currentLayerOffset + mesh_.nPoints();
 
-            label startFaceI = patches[patchI].start();
-            label endFaceI = startFaceI + patches[patchI].size();
+            label startFaceI = patches[patchi].start();
+            label endFaceI = startFaceI + patches[patchi].size();
 
             for (label faceI = startFaceI; faceI < endFaceI; faceI++)
             {
@@ -361,7 +361,7 @@ void Foam::extrude2DMesh::setRefinement
                     -1,                                      // masterEdgeID
                     nFaces++,                                // masterFaceID
                     false,                                   // flipFaceFlux
-                    patchI,                                  // patchID
+                    patchi,                                  // patchID
                     zoneID,                                  // zoneID
                     zoneFlip                                 // zoneFlip
                 );
diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C
index 9f57be29290afeee424a03881965a097e2cf5eb4..306de8feea77ade63e2977d286d831526cf38f31 100644
--- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C
+++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/patchToPoly2DMesh/patchToPoly2DMesh.C
@@ -2,7 +2,7 @@
   =========                 |
   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
    \\    /   O peration     |
-    \\  /    A nd           | Copyright (C) 2011-2015 OpenFOAM Foundation
+    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
      \\/     M anipulation  |
 -------------------------------------------------------------------------------
 License
@@ -152,11 +152,11 @@ void Foam::patchToPoly2DMesh::addPatchFacesToFaces()
     label offset = patch_.nInternalEdges();
     face f(2);
 
-    forAll(patchNames_, patchI)
+    forAll(patchNames_, patchi)
     {
         forAllConstIter(EdgeMap<label>, mapEdgesRegion_, eIter)
         {
-            if (eIter() == patchI)
+            if (eIter() == patchi)
             {
                 f[0] = meshPoints[eIter.key().start()];
                 f[1] = meshPoints[eIter.key().end()];
@@ -333,10 +333,10 @@ void Foam::patchToPoly2DMesh::createMesh()
     createPolyMeshComponents();
 
     label startFace = patch_.nInternalEdges();
-    forAll(patchNames_, patchI)
+    forAll(patchNames_, patchi)
     {
-        patchStarts_[patchI] = startFace;
-        startFace += patchSizes_[patchI];
+        patchStarts_[patchi] = startFace;
+        startFace += patchSizes_[patchi];
     }
 }
 
diff --git a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C
index a6916b70763a7625dc76bc9798796973baba3da2..ef9bfb77042a64975a942e788a0d19f83d350f7d 100644
--- a/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C
+++ b/applications/utilities/mesh/generation/extrude2DMesh/extrude2DMeshApp.C
@@ -208,14 +208,14 @@ int main(int argc, char *argv[])
         Info<< "Constructing patches." << endl;
         List<polyPatch*> patches(poly2DMesh.patchNames().size());
 
-        forAll(patches, patchI)
+        forAll(patches, patchi)
         {
-            patches[patchI] = new polyPatch
+            patches[patchi] = new polyPatch
             (
-                poly2DMesh.patchNames()[patchI],
-                poly2DMesh.patchSizes()[patchI],
-                poly2DMesh.patchStarts()[patchI],
-                patchI,
+                poly2DMesh.patchNames()[patchi],
+                poly2DMesh.patchSizes()[patchi],
+                poly2DMesh.patchStarts()[patchi],
+                patchi,
                 mesh().boundaryMesh(),
                 polyPatch::typeName
             );
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C
index c563b183303b7953f1fecc63fb1bd77bbd8fb377..80b1b78a57cbdd4c275bbedbba0ad5415a870deb 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C
@@ -947,9 +947,9 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findOffsetPatchFaces
         mesh.nCells()/1000
     );
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& patch = patches[patchI];
+        const polyPatch& patch = patches[patchi];
 
         const faceList& localFaces = patch.localFaces();
         const pointField& localPoints = patch.localPoints();
@@ -1079,11 +1079,11 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::checkPolyMeshQuality
 
         const polyBoundaryMesh& patches = pMesh.boundaryMesh();
 
-        forAll(patches, patchI)
+        forAll(patches, patchi)
         {
-            if (patches[patchI].coupled())
+            if (patches[patchi].coupled())
             {
-                const labelUList& owners = patches[patchI].faceCells();
+                const labelUList& owners = patches[patchi].faceCells();
 
                 forAll(owners, i)
                 {
@@ -1535,16 +1535,16 @@ Foam::label Foam::conformalVoronoiMesh::createPatchInfo
 
     const PtrList<dictionary>& patchInfo = geometryToConformTo_.patchInfo();
 
-    forAll(patchNames, patchI)
+    forAll(patchNames, patchi)
     {
-        if (patchInfo.set(patchI))
+        if (patchInfo.set(patchi))
         {
-            patchDicts.set(patchI, new dictionary(patchInfo[patchI]));
+            patchDicts.set(patchi, new dictionary(patchInfo[patchi]));
         }
         else
         {
-            patchDicts.set(patchI, new dictionary());
-            patchDicts[patchI].set
+            patchDicts.set(patchi, new dictionary());
+            patchDicts[patchi].set
             (
                 "type",
                 wallPolyPatch::typeName
@@ -1734,14 +1734,14 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
     const label nPatches = patchNames.size();
 
     labelList procNeighbours(nPatches, label(-1));
-    forAll(procNeighbours, patchI)
+    forAll(procNeighbours, patchi)
     {
-        if (patchDicts[patchI].found("neighbProcNo"))
+        if (patchDicts[patchi].found("neighbProcNo"))
         {
-            procNeighbours[patchI] =
+            procNeighbours[patchi] =
             (
-                patchDicts[patchI].found("neighbProcNo")
-              ? readLabel(patchDicts[patchI].lookup("neighbProcNo"))
+                patchDicts[patchi].found("neighbProcNo")
+              ? readLabel(patchDicts[patchi].lookup("neighbProcNo"))
               : -1
             );
         }
@@ -2347,9 +2347,9 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches
 
     // Return     patchPointPairSlaves.setSize(nPatches);
     patchPointPairSlaves.setSize(nPatches);
-    forAll(patchPPSlaves, patchI)
+    forAll(patchPPSlaves, patchi)
     {
-        patchPointPairSlaves[patchI].transfer(patchPPSlaves[patchI]);
+        patchPointPairSlaves[patchi].transfer(patchPPSlaves[patchi]);
     }
 
     if (foamyHexMeshControls().objOutput())
@@ -2458,13 +2458,13 @@ void Foam::conformalVoronoiMesh::sortProcPatches
         return;
     }
 
-    forAll(patchSortingIndices, patchI)
+    forAll(patchSortingIndices, patchi)
     {
-        faceList& faces = patchFaces[patchI];
-        labelList& owner = patchOwners[patchI];
-        DynamicList<label>& slaves = patchPointPairSlaves[patchI];
+        faceList& faces = patchFaces[patchi];
+        labelList& owner = patchOwners[patchi];
+        DynamicList<label>& slaves = patchPointPairSlaves[patchi];
         DynamicList<Pair<labelPair>>& sortingIndices
-            = patchSortingIndices[patchI];
+            = patchSortingIndices[patchi];
 
         if (!sortingIndices.empty())
         {
@@ -2477,7 +2477,7 @@ void Foam::conformalVoronoiMesh::sortProcPatches
             {
                 FatalErrorInFunction
                     << "patch size and size of sorting indices is inconsistent "
-                    << " for patch " << patchI << nl
+                    << " for patch " << patchi << nl
                     << " faces.size() " << faces.size() << nl
                     << " owner.size() " << owner.size() << nl
                     << " slaves.size() " << slaves.size() << nl
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C
index 079484757477983bf3f3c2458d46f212aec1870f..e415d748f9f09ac25a90b2b91debfd3bd1dce121 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C
@@ -152,10 +152,10 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
 
         dualPatchStarts.setSize(patchDicts.size());
 
-        forAll(dualPatchStarts, patchI)
+        forAll(dualPatchStarts, patchi)
         {
-            dualPatchStarts[patchI] =
-                readLabel(patchDicts[patchI].lookup("startFace"));
+            dualPatchStarts[patchi] =
+                readLabel(patchDicts[patchi].lookup("startFace"));
         }
     }
 
@@ -229,9 +229,9 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
 //            vertexToDualAddressing[vertI] = cellI+1;
 //        }
 //
-//        forAll(patchToDelaunayVertex, patchI)
+//        forAll(patchToDelaunayVertex, patchi)
 //        {
-//            const labelList& patchVertices = patchToDelaunayVertex[patchI];
+//            const labelList& patchVertices = patchToDelaunayVertex[patchi];
 //
 //            forAll(patchVertices, i)
 //            {
@@ -241,7 +241,7 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
 //                {
 //                    FatalErrorInFunction
 //                        << "Delaunay vertex " << vertI
-//                        << " from patch " << patchI
+//                        << " from patch " << patchi
 //                        << " local index " << i
 //                        << " is already mapped to cell "
 //                        << vertexToDualAddressing[vertI]-1
@@ -250,7 +250,7 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance)
 //
 //                // Vertex might be used by multiple faces. Which one to
 //                // use? For now last one wins.
-//                label dualFaceI = dualPatchStarts[patchI]+i;
+//                label dualFaceI = dualPatchStarts[patchi]+i;
 //                vertexToDualAddressing[vertI] = -dualFaceI-1;
 //            }
 //        }
@@ -419,37 +419,37 @@ Foam::autoPtr<Foam::fvMesh> Foam::conformalVoronoiMesh::createDummyMesh
 
     List<polyPatch*> patches(patchDicts.size());
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
         if
         (
-            patchDicts.set(patchI)
+            patchDicts.set(patchi)
          && (
-                word(patchDicts[patchI].lookup("type"))
+                word(patchDicts[patchi].lookup("type"))
              == processorPolyPatch::typeName
             )
         )
         {
-            patches[patchI] = new processorPolyPatch
+            patches[patchi] = new processorPolyPatch
             (
                 0,          //patchSizes[p],
                 0,          //patchStarts[p],
-                patchI,
+                patchi,
                 mesh.boundaryMesh(),
-                readLabel(patchDicts[patchI].lookup("myProcNo")),
-                readLabel(patchDicts[patchI].lookup("neighbProcNo")),
+                readLabel(patchDicts[patchi].lookup("myProcNo")),
+                readLabel(patchDicts[patchi].lookup("neighbProcNo")),
                 coupledPolyPatch::COINCIDENTFULLMATCH
             );
         }
         else
         {
-            patches[patchI] = polyPatch::New
+            patches[patchi] = polyPatch::New
             (
-                patchDicts[patchI].lookup("type"),
-                patchNames[patchI],
+                patchDicts[patchi].lookup("type"),
+                patchNames[patchi],
                 0,          //patchSizes[p],
                 0,          //patchStarts[p],
-                patchI,
+                patchi,
                 mesh.boundaryMesh()
             ).ptr();
         }
@@ -473,22 +473,22 @@ void Foam::conformalVoronoiMesh::checkProcessorPatchesMatch
         labelList(Pstream::nProcs(), -1)
     );
 
-    forAll(patchDicts, patchI)
+    forAll(patchDicts, patchi)
     {
         if
         (
-            patchDicts.set(patchI)
+            patchDicts.set(patchi)
          && (
-                word(patchDicts[patchI].lookup("type"))
+                word(patchDicts[patchi].lookup("type"))
              == processorPolyPatch::typeName
             )
         )
         {
             const label procNeighb =
-                readLabel(patchDicts[patchI].lookup("neighbProcNo"));
+                readLabel(patchDicts[patchi].lookup("neighbProcNo"));
 
             procPatchSizes[Pstream::myProcNo()][procNeighb]
-                = readLabel(patchDicts[patchI].lookup("nFaces"));
+                = readLabel(patchDicts[patchi].lookup("nFaces"));
         }
     }
 
@@ -502,15 +502,15 @@ void Foam::conformalVoronoiMesh::checkProcessorPatchesMatch
         {
             const labelList& patchSizes = procPatchSizes[procI];
 
-            forAll(patchSizes, patchI)
+            forAll(patchSizes, patchi)
             {
-                if (patchSizes[patchI] != procPatchSizes[patchI][procI])
+                if (patchSizes[patchi] != procPatchSizes[patchi][procI])
                 {
                     allMatch = false;
 
-                    Info<< indent << "Patches " << procI << " and " << patchI
-                        << " have different sizes: " << patchSizes[patchI]
-                        << " and " << procPatchSizes[patchI][procI] << endl;
+                    Info<< indent << "Patches " << procI << " and " << patchi
+                        << " have different sizes: " << patchSizes[patchi]
+                        << " and " << procPatchSizes[patchi][procI] << endl;
                 }
             }
         }
@@ -621,9 +621,9 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches
     const fvMesh& sortMesh = sortMeshPtr();
 
     // Change the transform type on processors to coincident full match.
-//    forAll(sortMesh.boundaryMesh(), patchI)
+//    forAll(sortMesh.boundaryMesh(), patchi)
 //    {
-//        const polyPatch& patch = sortMesh.boundaryMesh()[patchI];
+//        const polyPatch& patch = sortMesh.boundaryMesh()[patchi];
 //
 //        if (isA<processorPolyPatch>(patch))
 //        {
@@ -644,9 +644,9 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches
     PstreamBuffers pBufs(Pstream::nonBlocking);
 
     // Send ordering
-    forAll(sortMesh.boundaryMesh(), patchI)
+    forAll(sortMesh.boundaryMesh(), patchi)
     {
-        const polyPatch& pp = sortMesh.boundaryMesh()[patchI];
+        const polyPatch& pp = sortMesh.boundaryMesh()[patchi];
 
         if (isA<processorPolyPatch>(pp))
         {
@@ -658,8 +658,8 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches
                     SubList<face>
                     (
                         faces,
-                        readLabel(patchDicts[patchI].lookup("nFaces")),
-                        readLabel(patchDicts[patchI].lookup("startFace"))
+                        readLabel(patchDicts[patchi].lookup("nFaces")),
+                        readLabel(patchDicts[patchi].lookup("startFace"))
                     ),
                     points
                 )
@@ -674,16 +674,16 @@ void Foam::conformalVoronoiMesh::reorderProcessorPatches
     // Receive and calculate ordering
     bool anyChanged = false;
 
-    forAll(sortMesh.boundaryMesh(), patchI)
+    forAll(sortMesh.boundaryMesh(), patchi)
     {
-        const polyPatch& pp = sortMesh.boundaryMesh()[patchI];
+        const polyPatch& pp = sortMesh.boundaryMesh()[patchi];
 
         if (isA<processorPolyPatch>(pp))
         {
             const label nPatchFaces =
-                readLabel(patchDicts[patchI].lookup("nFaces"));
+                readLabel(patchDicts[patchi].lookup("nFaces"));
             const label patchStartFace =
-                readLabel(patchDicts[patchI].lookup("startFace"));
+                readLabel(patchDicts[patchi].lookup("startFace"));
 
             labelList patchFaceMap(nPatchFaces, label(-1));
             labelList patchFaceRotation(nPatchFaces, label(0));
@@ -1355,9 +1355,9 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findRemainingProtrusionSet
 
     labelHashSet protrudingBoundaryPoints;
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& patch = patches[patchI];
+        const polyPatch& patch = patches[patchi];
 
         forAll(patch.localPoints(), pLPI)
         {
diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C
index 9bb7e33f95878b275f1d0142fe8a4546a90a2472..c9c14ff59887facbd9b048c7d86f9878cf1e5d2a 100644
--- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C
+++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.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
@@ -51,9 +51,9 @@ void Foam::conformalVoronoiMesh::calcNeighbourCellCentres
 
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         const labelUList& faceCells = pp.faceCells();
 
@@ -82,14 +82,14 @@ void Foam::conformalVoronoiMesh::selectSeparatedCoupledFaces
 {
     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())
@@ -323,9 +323,9 @@ void Foam::conformalVoronoiMesh::calcFaceZones
 
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         const labelUList& faceCells = pp.faceCells();
 
@@ -501,9 +501,9 @@ void Foam::conformalVoronoiMesh::calcFaceZones
 
 //    labelList neiCellSurface(mesh.nFaces()-mesh.nInternalFaces());
 //
-//    forAll(patches, patchI)
+//    forAll(patches, patchi)
 //    {
-//        const polyPatch& pp = patches[patchI];
+//        const polyPatch& pp = patches[patchi];
 //
 //        if (pp.coupled())
 //        {
@@ -517,9 +517,9 @@ void Foam::conformalVoronoiMesh::calcFaceZones
 //    }
 //    syncTools::swapBoundaryFaceList(mesh, neiCellSurface);
 //
-//    forAll(patches, patchI)
+//    forAll(patches, patchi)
 //    {
-//        const polyPatch& pp = patches[patchI];
+//        const polyPatch& pp = patches[patchi];
 //
 //        if (pp.coupled())
 //        {
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C
index 6b2f44a6d6fbc28a14d27c925b169869ff273e7e..cb61f8e4d9e5aacde3d6e85a7026ecfa1661a230 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyHexMeshBackgroundMesh/foamyHexMeshBackgroundMesh.C
@@ -644,10 +644,10 @@ int main(int argc, char *argv[])
                 surfaces
             );
             // Patch fields
-            forAll(fvm.C().boundaryField(), patchI)
+            forAll(fvm.C().boundaryField(), patchi)
             {
-                const pointField& cc = fvm.C().boundaryField()[patchI];
-                fvPatchScalarField& fld = cellDistance.boundaryField()[patchI];
+                const pointField& cc = fvm.C().boundaryField()[patchi];
+                fvPatchScalarField& fld = cellDistance.boundaryField()[patchi];
                 scalarField patchDistSqr
                 (
                     fld.patch().patchInternalField(distSqr)
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.C
index 3896131c1f21a6eadc3508552e8a21e0f8c1136c..d370880aeeef287f2808df9d85dd88a5522d99f6 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/CV2DIO.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
@@ -280,10 +280,10 @@ void Foam::CV2D::calcDual
 
     extractPatches(patchNames, patchSizes, mapEdgesRegion, indirectPatchEdge);
 
-    forAll(patchNames, patchI)
+    forAll(patchNames, patchi)
     {
-        Info<< "Patch " << patchNames[patchI]
-            << " has size " << patchSizes[patchI] << endl;
+        Info<< "Patch " << patchNames[patchi]
+            << " has size " << patchSizes[patchi] << endl;
     }
 
     // Create dual faces
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.C
index 066bc8205c268a233f8dd90e2c71044cd59713f9..9a507967d0c3324f19c86ea16b958074f1a3fdb4 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/foamyQuadMesh.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
@@ -165,15 +165,15 @@ int main(int argc, char *argv[])
     List<polyPatch*> patches(poly2DMesh.patchNames().size());
     label countPatches = 0;
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        if (poly2DMesh.patchSizes()[patchI] != 0)
+        if (poly2DMesh.patchSizes()[patchi] != 0)
         {
             patches[countPatches] = new polyPatch
             (
-                poly2DMesh.patchNames()[patchI],
-                poly2DMesh.patchSizes()[patchI],
-                poly2DMesh.patchStarts()[patchI],
+                poly2DMesh.patchNames()[patchi],
+                poly2DMesh.patchSizes()[patchi],
+                poly2DMesh.patchStarts()[patchi],
                 countPatches,
                 pMesh.boundaryMesh(),
                 word::null
diff --git a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C
index e8caabad93c9ec0e086976345cc0b5f1d1cb598a..2534b933bdee185a724c1efef42bbdbb2a8ecf4f 100644
--- a/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C
+++ b/applications/utilities/mesh/generation/foamyMesh/foamyQuadMesh/shortEdgeFilter2D.C
@@ -578,10 +578,10 @@ void Foam::shortEdgeFilter2D::writeInfo(Ostream& os)
         << "    edgeAttachedToBoundaryFactor: " << edgeAttachedToBoundaryFactor_
         << endl;
 
-    forAll(patchNames_, patchI)
+    forAll(patchNames_, patchi)
     {
-        os  << "    Patch " << patchNames_[patchI]
-            << ", size " << patchSizes_[patchI] << endl;
+        os  << "    Patch " << patchNames_[patchi]
+            << ", size " << patchSizes_[patchi] << endl;
     }
 
     os  << "    There are " << mapEdgesRegion_.size()
diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
index 37f508633bb0900af4ffb60cb2c2bed1bab8dc9b..ad0f7ade304f1c3ad37afcb4108239bcf8e9feb4 100644
--- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
+++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C
@@ -411,10 +411,10 @@ void extractSurface
     labelList patchToCompactZone(bMesh.size(), -1);
     forAllConstIter(HashTable<label>, compactZoneID, iter)
     {
-        label patchI = bMesh.findPatchID(iter.key());
-        if (patchI != -1)
+        label patchi = bMesh.findPatchID(iter.key());
+        if (patchi != -1)
         {
-            patchToCompactZone[patchI] = iter();
+            patchToCompactZone[patchi] = iter();
         }
     }
 
@@ -1164,11 +1164,11 @@ int main(int argc, char *argv[])
                 {
                     label globalRegionI = surfaces.globalRegion(surfI, i);
 
-                    label patchI;
+                    label patchi;
 
                     if (surfacePatchInfo.set(globalRegionI))
                     {
-                        patchI = meshRefiner.addMeshedPatch
+                        patchi = meshRefiner.addMeshedPatch
                         (
                             regNames[i],
                             surfacePatchInfo[globalRegionI]
@@ -1179,7 +1179,7 @@ int main(int argc, char *argv[])
                         dictionary patchInfo;
                         patchInfo.set("type", wallPolyPatch::typeName);
 
-                        patchI = meshRefiner.addMeshedPatch
+                        patchi = meshRefiner.addMeshedPatch
                         (
                             regNames[i],
                             patchInfo
@@ -1187,12 +1187,12 @@ int main(int argc, char *argv[])
                     }
 
                     Info<< setf(ios_base::left)
-                        << setw(6) << patchI
-                        << setw(20) << mesh.boundaryMesh()[patchI].type()
+                        << setw(6) << patchi
+                        << setw(20) << mesh.boundaryMesh()[patchi].type()
                         << setw(30) << regNames[i] << nl;
 
-                    globalToMasterPatch[globalRegionI] = patchI;
-                    globalToSlavePatch[globalRegionI] = patchI;
+                    globalToMasterPatch[globalRegionI] = patchi;
+                    globalToSlavePatch[globalRegionI] = patchi;
                 }
             }
             else
@@ -1204,11 +1204,11 @@ int main(int argc, char *argv[])
 
                     // Add master side patch
                     {
-                        label patchI;
+                        label patchi;
 
                         if (surfacePatchInfo.set(globalRegionI))
                         {
-                            patchI = meshRefiner.addMeshedPatch
+                            patchi = meshRefiner.addMeshedPatch
                             (
                                 regNames[i],
                                 surfacePatchInfo[globalRegionI]
@@ -1219,7 +1219,7 @@ int main(int argc, char *argv[])
                             dictionary patchInfo;
                             patchInfo.set("type", wallPolyPatch::typeName);
 
-                            patchI = meshRefiner.addMeshedPatch
+                            patchi = meshRefiner.addMeshedPatch
                             (
                                 regNames[i],
                                 patchInfo
@@ -1227,20 +1227,20 @@ int main(int argc, char *argv[])
                         }
 
                         Info<< setf(ios_base::left)
-                            << setw(6) << patchI
-                            << setw(20) << mesh.boundaryMesh()[patchI].type()
+                            << setw(6) << patchi
+                            << setw(20) << mesh.boundaryMesh()[patchi].type()
                             << setw(30) << regNames[i] << nl;
 
-                        globalToMasterPatch[globalRegionI] = patchI;
+                        globalToMasterPatch[globalRegionI] = patchi;
                     }
                     // Add slave side patch
                     {
                         const word slaveName = regNames[i] + "_slave";
-                        label patchI;
+                        label patchi;
 
                         if (surfacePatchInfo.set(globalRegionI))
                         {
-                            patchI = meshRefiner.addMeshedPatch
+                            patchi = meshRefiner.addMeshedPatch
                             (
                                 slaveName,
                                 surfacePatchInfo[globalRegionI]
@@ -1251,7 +1251,7 @@ int main(int argc, char *argv[])
                             dictionary patchInfo;
                             patchInfo.set("type", wallPolyPatch::typeName);
 
-                            patchI = meshRefiner.addMeshedPatch
+                            patchi = meshRefiner.addMeshedPatch
                             (
                                 slaveName,
                                 patchInfo
@@ -1259,11 +1259,11 @@ int main(int argc, char *argv[])
                         }
 
                         Info<< setf(ios_base::left)
-                            << setw(6) << patchI
-                            << setw(20) << mesh.boundaryMesh()[patchI].type()
+                            << setw(6) << patchi
+                            << setw(20) << mesh.boundaryMesh()[patchi].type()
                             << setw(30) << slaveName << nl;
 
-                        globalToSlavePatch[globalRegionI] = patchI;
+                        globalToSlavePatch[globalRegionI] = patchi;
                     }
                 }
             }
@@ -1491,13 +1491,13 @@ int main(int argc, char *argv[])
         }
         else
         {
-            forAll(bMesh, patchI)
+            forAll(bMesh, patchi)
             {
-                const polyPatch& patch = bMesh[patchI];
+                const polyPatch& patch = bMesh[patchi];
 
                 if (!isA<processorPolyPatch>(patch))
                 {
-                    includePatches.insert(patchI);
+                    includePatches.insert(patchi);
                 }
             }
         }
diff --git a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C
index f35f70b45b00e45a8685703a8535de85f583be7b..42c3bea20ae8e674f5db59fc5718ef5dd4fac653 100644
--- a/applications/utilities/mesh/manipulation/autoPatch/autoPatch.C
+++ b/applications/utilities/mesh/manipulation/autoPatch/autoPatch.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
@@ -183,9 +183,9 @@ int main(int argc, char *argv[])
     newPatchI = 0;
 
     // Copy old patches
-    forAll(mesh.boundaryMesh(), patchI)
+    forAll(mesh.boundaryMesh(), patchi)
     {
-        const polyPatch& patch = mesh.boundaryMesh()[patchI];
+        const polyPatch& patch = mesh.boundaryMesh()[patchi];
 
         newPatchPtrList[newPatchI] =
             patch.clone
@@ -200,9 +200,9 @@ int main(int argc, char *argv[])
     }
 
     // Add new ones with empty size.
-    for (label patchI = newPatchI; patchI < patches.size(); patchI++)
+    for (label patchi = newPatchI; patchi < patches.size(); patchi++)
     {
-        const boundaryPatch& bp = patches[patchI];
+        const boundaryPatch& bp = patches[patchi];
 
         newPatchPtrList[newPatchI] = polyPatch::New
         (
diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C
index 5b7bb7708f5e71a98e43fe8322827c49b3dfaf31..3f5cae18326d96ea915cf72fa0e0e437e59aab4a 100644
--- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C
+++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C
@@ -21,17 +21,17 @@ Foam::label Foam::findOppositeWedge
 
     scalar wppCosAngle = wpp.cosAngle();
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
         if
         (
-            patchI != wpp.index()
-         && patches[patchI].size()
-         && isA<wedgePolyPatch>(patches[patchI])
+            patchi != wpp.index()
+         && patches[patchi].size()
+         && isA<wedgePolyPatch>(patches[patchi])
         )
         {
             const wedgePolyPatch& pp =
-                refCast<const wedgePolyPatch>(patches[patchI]);
+                refCast<const wedgePolyPatch>(patches[patchi]);
 
             // Calculate (cos of) angle to wpp (not pp!) centre normal
             scalar ppCosAngle = wpp.centreNormal() & pp.n();
@@ -43,7 +43,7 @@ Foam::label Foam::findOppositeWedge
              && mag(ppCosAngle - wppCosAngle) >= 1e-3
             )
             {
-                return patchI;
+                return patchi;
             }
         }
     }
@@ -67,12 +67,12 @@ bool Foam::checkWedges
 
 
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        if (patches[patchI].size() && isA<wedgePolyPatch>(patches[patchI]))
+        if (patches[patchi].size() && isA<wedgePolyPatch>(patches[patchi]))
         {
             const wedgePolyPatch& pp =
-                refCast<const wedgePolyPatch>(patches[patchI]);
+                refCast<const wedgePolyPatch>(patches[patchi]);
 
             scalar wedgeAngle = acos(pp.cosAngle());
 
@@ -340,13 +340,13 @@ bool Foam::checkCoupledPoints
     List<pointField> nbrPoints(fcs.size() - mesh.nInternalFaces());
 
     // Exchange zero point
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        if (patches[patchI].coupled())
+        if (patches[patchi].coupled())
         {
             const coupledPolyPatch& cpp = refCast<const coupledPolyPatch>
             (
-                patches[patchI]
+                patches[patchi]
             );
 
             forAll(cpp, i)
@@ -375,12 +375,12 @@ bool Foam::checkCoupledPoints
     scalar avgMismatch = 0;
     label nCoupledPoints = 0;
 
-    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.owner())
             {
diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C
index e093787090c4fd52d2d7845d3fc5854ef51ed84f..58c25e9e8d625b73fde30901e630dbde9f2b175e 100644
--- a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C
+++ b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C
@@ -53,11 +53,11 @@ Foam::label Foam::checkTopology
     // Check that empty patches cover all sides of the mesh
     {
         label nEmpty = 0;
-        forAll(mesh.boundaryMesh(), patchI)
+        forAll(mesh.boundaryMesh(), patchi)
         {
-            if (isA<emptyPolyPatch>(mesh.boundaryMesh()[patchI]))
+            if (isA<emptyPolyPatch>(mesh.boundaryMesh()[patchi]))
             {
-                nEmpty += mesh.boundaryMesh()[patchI].size();
+                nEmpty += mesh.boundaryMesh()[patchi].size();
             }
         }
         reduce(nEmpty, sumOp<label>());
@@ -229,11 +229,11 @@ Foam::label Foam::checkTopology
             nInternalFaces[mesh.faceNeighbour()[faceI]]++;
         }
         const polyBoundaryMesh& patches = mesh.boundaryMesh();
-        forAll(patches, patchI)
+        forAll(patches, patchi)
         {
-            if (patches[patchI].coupled())
+            if (patches[patchi].coupled())
             {
-                const labelUList& owners = patches[patchI].faceCells();
+                const labelUList& owners = patches[patchi].faceCells();
 
                 forAll(owners, i)
                 {
@@ -387,9 +387,9 @@ Foam::label Foam::checkTopology
         }
         Info<< endl;
 
-        forAll(patches, patchI)
+        forAll(patches, patchi)
         {
-            const polyPatch& pp = patches[patchI];
+            const polyPatch& pp = patches[patchi];
 
             if (!isA<processorPolyPatch>(pp))
             {
diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C
index b53d29c836f430896a73074269527224678dd082..bdab94fa8781467c27994c94711ffa87b5715ab8 100644
--- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C
+++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.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
@@ -290,9 +290,9 @@ void createFaces
         // For warning once per patch.
         labelHashSet patchWarned;
 
-        forAll(pbm, patchI)
+        forAll(pbm, patchi)
         {
-            const polyPatch& pp = pbm[patchI];
+            const polyPatch& pp = pbm[patchi];
 
             label newPatchI = newMasterPatches[i];
 
@@ -311,7 +311,7 @@ void createFaces
 
                     if (zoneFaceI != -1)
                     {
-                        if (patchWarned.insert(patchI))
+                        if (patchWarned.insert(patchi))
                         {
                             WarningInFunction
                                 << "Found boundary face (in patch "
@@ -699,14 +699,14 @@ int main(int argc, char *argv[])
             forAllConstIter(dictionary, patchSources, iter)
             {
                 const word patchName(iter().dict()["name"]);
-                label patchI = pbm.findPatchID(patchName);
+                label patchi = pbm.findPatchID(patchName);
                 if (master)
                 {
-                    newMasterPatches.append(patchI);
+                    newMasterPatches.append(patchi);
                 }
                 else
                 {
-                    newSlavePatches.append(patchI);
+                    newSlavePatches.append(patchi);
                 }
                 master = !master;
             }
@@ -761,9 +761,9 @@ int main(int argc, char *argv[])
 
         forAllConstIter(HashSet<word>, bafflePatches, iter)
         {
-            label patchI = mesh.boundaryMesh().findPatchID(iter.key());
+            label patchi = mesh.boundaryMesh().findPatchID(iter.key());
 
-            const fvPatchMapper& pm = mapper.boundaryMap()[patchI];
+            const fvPatchMapper& pm = mapper.boundaryMap()[patchi];
 
             if (pm.sizeBeforeMapping() == 0)
             {
@@ -775,7 +775,7 @@ int main(int argc, char *argv[])
                         << "You might have to edit these fields." << endl;
                 }
 
-                fvMeshTools::zeroPatchFields(mesh, patchI);
+                fvMeshTools::zeroPatchFields(mesh, patchi);
             }
         }
     }
@@ -796,7 +796,7 @@ int main(int argc, char *argv[])
                 forAllConstIter(dictionary, patchSources, iter)
                 {
                     const word patchName(iter().dict()["name"]);
-                    label patchI = pbm.findPatchID(patchName);
+                    label patchi = pbm.findPatchID(patchName);
 
                     if (iter().dict().found("patchFields"))
                     {
@@ -809,7 +809,7 @@ int main(int argc, char *argv[])
                         fvMeshTools::setPatchFields
                         (
                             mesh,
-                            patchI,
+                            patchi,
                             patchFieldsDict
                         );
                     }
@@ -863,20 +863,20 @@ int main(int argc, char *argv[])
                         const word masterPatchName(groupName + "_master");
                         const word slavePatchName(groupName + "_slave");
 
-                        label patchIMaster = pbm.findPatchID(masterPatchName);
-                        label patchISlave = pbm.findPatchID(slavePatchName);
+                        label patchiMaster = pbm.findPatchID(masterPatchName);
+                        label patchiSlave = pbm.findPatchID(slavePatchName);
 
                         fvMeshTools::setPatchFields
                         (
                             mesh,
-                            patchIMaster,
+                            patchiMaster,
                             patchFieldsDict
                         );
 
                         fvMeshTools::setPatchFields
                         (
                             mesh,
-                            patchISlave,
+                            patchiSlave,
                             patchFieldsDict
                         );
                     }
diff --git a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.C b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.C
index e7439d52f68ed987b84f1bddbb799ca3706eb58c..1210269b18f2bc7a1c6971a4479038bb7d11d0f9 100644
--- a/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.C
+++ b/applications/utilities/mesh/manipulation/createBaffles/faceSelection/searchableSurfaceSelection.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
@@ -115,9 +115,9 @@ void Foam::faceSelections::searchableSurfaceSelection::select
 
     const polyBoundaryMesh& pbm = mesh_.boundaryMesh();
 
-    forAll(pbm, patchI)
+    forAll(pbm, patchi)
     {
-        const polyPatch& pp = pbm[patchI];
+        const polyPatch& pp = pbm[patchi];
 
         if (pp.coupled())
         {
@@ -155,9 +155,9 @@ void Foam::faceSelections::searchableSurfaceSelection::select
             faceToFlip[faceI] = ((normals[faceI] & d) < 0);
         }
     }
-    forAll(pbm, patchI)
+    forAll(pbm, patchi)
     {
-        const polyPatch& pp = pbm[patchI];
+        const polyPatch& pp = pbm[patchi];
 
         if (pp.coupled())
         {
diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C
index da6b2ec09c676a73a5a095ddac8eee382d5d9646..9313dd09e190ca5a98ae028bdb401d24e28a076d 100644
--- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C
+++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.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,9 +107,9 @@ void filterPatches(polyMesh& mesh, const HashSet<word>& addedPatchNames)
     label nOldPatches = returnReduce(patches.size(), sumOp<label>());
 
     // Copy old patches.
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         // Note: reduce possible since non-proc patches guaranteed in same order
         if (!isA<processorPolyPatch>(pp))
@@ -143,14 +143,14 @@ void filterPatches(polyMesh& mesh, const HashSet<word>& addedPatchNames)
             {
                 Info<< "Removing zero-sized patch " << pp.name()
                     << " type " << pp.type()
-                    << " at position " << patchI << endl;
+                    << " at position " << patchi << endl;
             }
         }
     }
     // Copy non-empty processor patches
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         if (isA<processorPolyPatch>(pp))
         {
@@ -170,7 +170,7 @@ void filterPatches(polyMesh& mesh, const HashSet<word>& addedPatchNames)
             else
             {
                 Info<< "Removing empty processor patch " << pp.name()
-                    << " at position " << patchI << endl;
+                    << " at position " << patchi << endl;
             }
         }
     }
@@ -199,16 +199,16 @@ void dumpCyclicMatch(const fileName& prefix, const polyMesh& mesh)
 {
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
         if
         (
-            isA<cyclicPolyPatch>(patches[patchI])
-         && refCast<const cyclicPolyPatch>(patches[patchI]).owner()
+            isA<cyclicPolyPatch>(patches[patchi])
+         && refCast<const cyclicPolyPatch>(patches[patchi]).owner()
         )
         {
             const cyclicPolyPatch& cycPatch =
-                refCast<const cyclicPolyPatch>(patches[patchI]);
+                refCast<const cyclicPolyPatch>(patches[patchi]);
 
             // Dump patches
             {
@@ -319,9 +319,9 @@ void syncPoints
     {
         // Send
 
-        forAll(patches, patchI)
+        forAll(patches, patchi)
         {
-            const polyPatch& pp = patches[patchI];
+            const polyPatch& pp = patches[patchi];
 
             if
             (
@@ -356,9 +356,9 @@ void syncPoints
 
         // Receive and set.
 
-        forAll(patches, patchI)
+        forAll(patches, patchi)
         {
-            const polyPatch& pp = patches[patchI];
+            const polyPatch& pp = patches[patchi];
 
             if
             (
@@ -407,9 +407,9 @@ void syncPoints
     }
 
     // Do the cyclics.
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         if
         (
@@ -558,9 +558,9 @@ int main(int argc, char *argv[])
         label startFaceI = mesh.nInternalFaces();
 
         // Copy old patches.
-        forAll(patches, patchI)
+        forAll(patches, patchi)
         {
-            const polyPatch& pp = patches[patchI];
+            const polyPatch& pp = patches[patchi];
 
             if (!isA<processorPolyPatch>(pp))
             {
@@ -569,7 +569,7 @@ int main(int argc, char *argv[])
                     pp.clone
                     (
                         patches,
-                        patchI,
+                        patchi,
                         pp.size(),
                         startFaceI
                     ).ptr()
@@ -619,9 +619,9 @@ int main(int argc, char *argv[])
         }
 
         // Copy old patches.
-        forAll(patches, patchI)
+        forAll(patches, patchi)
         {
-            const polyPatch& pp = patches[patchI];
+            const polyPatch& pp = patches[patchi];
 
             if (isA<processorPolyPatch>(pp))
             {
@@ -630,7 +630,7 @@ int main(int argc, char *argv[])
                     pp.clone
                     (
                         patches,
-                        patchI,
+                        patchi,
                         pp.size(),
                         startFaceI
                     ).ptr()
@@ -771,9 +771,9 @@ int main(int argc, char *argv[])
         // For cyclic patches:
         // - for separated ones use user specified offset vector
 
-        forAll(mesh.boundaryMesh(), patchI)
+        forAll(mesh.boundaryMesh(), patchi)
         {
-            const polyPatch& pp = mesh.boundaryMesh()[patchI];
+            const polyPatch& pp = mesh.boundaryMesh()[patchi];
 
             if (pp.size() && isA<coupledPolyPatch>(pp))
             {
diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C b/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C
index 41e2aac937422799aa99d9e23899d9a69c339806..d41b206fd6bd50102130b51010a2bd7917306bdb 100644
--- a/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.C
+++ b/applications/utilities/mesh/manipulation/mergeMeshes/mergePolyMesh.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
@@ -50,14 +50,14 @@ Foam::label Foam::mergePolyMesh::patchIndex(const polyPatch& p)
 
     bool nameFound = false;
 
-    forAll(patchNames_, patchI)
+    forAll(patchNames_, patchi)
     {
-        if (patchNames_[patchI] == pName)
+        if (patchNames_[patchi] == pName)
         {
-            if (word(patchDicts_[patchI]["type"]) == pType)
+            if (word(patchDicts_[patchi]["type"]) == pType)
             {
                 // Found name and types match
-                return patchI;
+                return patchi;
             }
             else
             {
@@ -134,12 +134,12 @@ Foam::mergePolyMesh::mergePolyMesh(const IOobject& io)
     // Insert the original patches into the list
     wordList curPatchNames = boundaryMesh().names();
 
-    forAll(boundaryMesh(), patchI)
+    forAll(boundaryMesh(), patchi)
     {
-        patchNames_.append(boundaryMesh()[patchI].name());
+        patchNames_.append(boundaryMesh()[patchi].name());
 
         OStringStream os;
-        boundaryMesh()[patchI].write(os);
+        boundaryMesh()[patchi].write(os);
         patchDicts_.append(dictionary(IStringStream(os.str())()));
     }
 
@@ -275,9 +275,9 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
     // Gather the patch indices
     labelList patchIndices(bm.size());
 
-    forAll(patchIndices, patchI)
+    forAll(patchIndices, patchi)
     {
-        patchIndices[patchI] = patchIndex(bm[patchI]);
+        patchIndices[patchi] = patchIndex(bm[patchi]);
     }
 
     // Temporary: update number of allowable patches. This should be
@@ -400,32 +400,32 @@ void Foam::mergePolyMesh::merge()
         const polyBoundaryMesh& oldPatches = boundaryMesh();
 
         // Note.  Re-using counter in two for loops
-        label patchI = 0;
+        label patchi = 0;
 
-        for (patchI = 0; patchI < oldPatches.size(); patchI++)
+        for (patchi = 0; patchi < oldPatches.size(); patchi++)
         {
-            newPatches[patchI] = oldPatches[patchI].clone(oldPatches).ptr();
+            newPatches[patchi] = oldPatches[patchi].clone(oldPatches).ptr();
         }
 
         Info<< "Adding new patches. " << endl;
 
         label endOfLastPatch =
-            oldPatches[patchI - 1].start() + oldPatches[patchI - 1].size();
+            oldPatches[patchi - 1].start() + oldPatches[patchi - 1].size();
 
-        for (; patchI < patchNames_.size(); patchI++)
+        for (; patchi < patchNames_.size(); patchi++)
         {
             // Add a patch
-            dictionary dict(patchDicts_[patchI]);
+            dictionary dict(patchDicts_[patchi]);
             dict.set("nFaces", 0);
             dict.set("startFace", endOfLastPatch);
 
-            newPatches[patchI] =
+            newPatches[patchi] =
             (
                 polyPatch::New
                 (
-                    patchNames_[patchI],
+                    patchNames_[patchi],
                     dict,
-                    patchI,
+                    patchi,
                     oldPatches
                 ).ptr()
             );
diff --git a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C
index 6db0d3abc634a6969262c6d7e949569c73658985..23a6a2f1d328eed7dad7614dead9a08095a1b432 100644
--- a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C
+++ b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.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
@@ -171,16 +171,16 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces)
         if (duplicates[bFaceI] != -1)
         {
             label faceI = mesh.nInternalFaces() + bFaceI;
-            label patchI = patches.whichPatch(faceI);
+            label patchi = patches.whichPatch(faceI);
 
-            if (isA<processorPolyPatch>(patches[patchI]))
+            if (isA<processorPolyPatch>(patches[patchi]))
             {
                 FatalErrorInFunction
                     << "Duplicate face " << faceI
                     << " is on a processorPolyPatch."
                     << "This is not allowed." << nl
                     << "Face:" << faceI
-                    << " is on patch:" << patches[patchI].name()
+                    << " 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 c52953e196f01544d87c8741b3bdb917920e349b..0b87ff1d5af0f630a3a2462e0dc927cac91b4e45 100644
--- a/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.C
+++ b/applications/utilities/mesh/manipulation/mirrorMesh/mirrorFvMesh.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
@@ -149,9 +149,9 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
     // as internal
     boolListList insertedBouFace(oldPatches.size());
 
-    forAll(oldPatches, patchI)
+    forAll(oldPatches, patchi)
     {
-        const polyPatch& curPatch = oldPatches[patchI];
+        const polyPatch& curPatch = oldPatches[patchi];
 
         if (curPatch.coupled())
         {
@@ -162,7 +162,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
                 << " createPatch afterwards." << endl;
         }
 
-        boolList& curInsBouFace = insertedBouFace[patchI];
+        boolList& curInsBouFace = insertedBouFace[patchi];
 
         curInsBouFace.setSize(curPatch.size());
         curInsBouFace = false;
@@ -249,11 +249,11 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
     labelList newPatchStarts(boundary().size(), -1);
     label nNewPatches = 0;
 
-    forAll(boundaryMesh(), patchI)
+    forAll(boundaryMesh(), patchi)
     {
-        const label curPatchSize = boundaryMesh()[patchI].size();
-        const label curPatchStart = boundaryMesh()[patchI].start();
-        const boolList& curInserted = insertedBouFace[patchI];
+        const label curPatchSize = boundaryMesh()[patchi].size();
+        const label curPatchStart = boundaryMesh()[patchi].start();
+        const boolList& curInserted = insertedBouFace[patchi];
 
         newPatchStarts[nNewPatches] = nNewFaces;
 
@@ -303,7 +303,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
         // If patch exists, grab the name and type of the original patch
         if (nNewFaces > newPatchStarts[nNewPatches])
         {
-            newToOldPatch[nNewPatches] = patchI;
+            newToOldPatch[nNewPatches] = patchi;
 
             newPatchSizes[nNewPatches] =
                 nNewFaces - newPatchStarts[nNewPatches];
@@ -378,14 +378,14 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
     // Add the boundary patches
     List<polyPatch*> p(newPatchSizes.size());
 
-    forAll(p, patchI)
+    forAll(p, patchi)
     {
-        p[patchI] = boundaryMesh()[newToOldPatch[patchI]].clone
+        p[patchi] = boundaryMesh()[newToOldPatch[patchi]].clone
         (
             pMesh.boundaryMesh(),
-            patchI,
-            newPatchSizes[patchI],
-            newPatchStarts[patchI]
+            patchi,
+            newPatchSizes[patchi],
+            newPatchStarts[patchi]
         ).ptr();
     }
 
diff --git a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C
index 2fac9f25c06e80d3101d7eb52b80cf826ae0ad99..b5f521862d353db26dc02fdb16d5cdb950e59f0e 100644
--- a/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.C
+++ b/applications/utilities/mesh/manipulation/moveDynamicMesh/moveDynamicMesh.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,12 +71,12 @@ void writeWeights(const polyMesh& mesh)
 
     const word tmName(mesh.time().timeName());
 
-    forAll(pbm, patchI)
+    forAll(pbm, patchi)
     {
-        if (isA<cyclicAMIPolyPatch>(pbm[patchI]))
+        if (isA<cyclicAMIPolyPatch>(pbm[patchi]))
         {
             const cyclicAMIPolyPatch& cpp =
-                refCast<const cyclicAMIPolyPatch>(pbm[patchI]);
+                refCast<const cyclicAMIPolyPatch>(pbm[patchi]);
 
             if (cpp.owner())
             {
diff --git a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C
index 5595138322f86b443f56bac466c1fa64048b8e80..a758ff1f7eea70f8733663421ed7f7d7127fd8d3 100644
--- a/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C
+++ b/applications/utilities/mesh/manipulation/orientFaceZone/orientFaceZone.C
@@ -102,12 +102,12 @@ int main(int argc, char *argv[])
         forAll(faceLabels, faceI)
         {
             const label meshFaceI = faceLabels[faceI];
-            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]
             )
             {
@@ -312,12 +312,12 @@ int main(int argc, char *argv[])
         forAll(faceLabels, i)
         {
             const label meshFaceI = faceLabels[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]
             )
             {
diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C
index ff34c2a92de9af067c2e419b20c90200df7e7a4f..69938e50bd47ec5e13b9088b66d8a5076abd530a 100644
--- a/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C
+++ b/applications/utilities/mesh/manipulation/polyDualMesh/meshDualiser.C
@@ -319,7 +319,7 @@ Foam::label Foam::meshDualiser::addBoundaryFace
     const label masterFaceI,
 
     const label dualCellI,
-    const label patchI,
+    const label patchi,
     const DynamicList<label>& verts,
     polyTopoChange& meshMod
 ) const
@@ -349,7 +349,7 @@ Foam::label Foam::meshDualiser::addBoundaryFace
         masterEdgeI,    // masterEdgeID
         masterFaceI,    // masterFaceID
         false,          // flipFaceFlux
-        patchI,         // patchID
+        patchi,         // patchID
         zoneID,         // zoneID
         zoneFlip        // zoneFlip
     );
@@ -640,7 +640,7 @@ void Foam::meshDualiser::createFaceFromInternalFace
 // (pointFaces()). Gets starting face and marks off visited faces in donePFaces.
 void Foam::meshDualiser::createFacesAroundBoundaryPoint
 (
-    const label patchI,
+    const label patchi,
     const label patchPointI,
     const label startFaceI,
     polyTopoChange& meshMod,
@@ -648,7 +648,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
 ) const
 {
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
-    const polyPatch& pp = patches[patchI];
+    const polyPatch& pp = patches[patchi];
     const labelList& pFaces = pp.pointFaces()[patchPointI];
     const labelList& own = mesh_.faceOwner();
 
@@ -713,7 +713,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
             if (faceI < pp.start() || faceI >= pp.start()+pp.size())
             {
                 FatalErrorInFunction
-                    << "Walked from face on patch:" << patchI
+                    << "Walked from face on patch:" << patchi
                     << " to face:" << faceI
                     << " fc:" << mesh_.faceCentres()[faceI]
                     << " on patch:" << patches.whichPatch(faceI)
@@ -746,7 +746,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
             -1,         // masterEdgeI
             faceI,      // masterFaceI
             dualCellI,
-            patchI,
+            patchi,
             verts,
             meshMod
         );
@@ -800,7 +800,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
                     -1,     // masterEdgeI
                     faceI,  // masterFaceI
                     findDualCell(own[faceI], pointI),
-                    patchI,
+                    patchi,
                     verts.shrink(),
                     meshMod
                 );
@@ -845,7 +845,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
                 -1,             // masterEdgeI
                 startFaceI,     // masterFaceI
                 findDualCell(own[faceI], pointI),
-                patchI,
+                patchi,
                 verts.shrink(),
                 meshMod
             );
@@ -1390,9 +1390,9 @@ void Foam::meshDualiser::setRefinement
     // These need to be closed.
     const polyBoundaryMesh& patches = mesh_.boundaryMesh();
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         const labelListList& pointFaces = pp.pointFaces();
 
@@ -1411,14 +1411,14 @@ void Foam::meshDualiser::setRefinement
 
                     //Pout<< "Walking around point:" << pointI
                     //    << " coord:" << mesh_.points()[pointI]
-                    //    << " on patch:" << patchI
+                    //    << " on patch:" << patchi
                     //    << " startFace:" << startFaceI
                     //    << " at:" << mesh_.faceCentres()[startFaceI]
                     //    << endl;
 
                     createFacesAroundBoundaryPoint
                     (
-                        patchI,
+                        patchi,
                         patchPointI,
                         startFaceI,
                         meshMod,
diff --git a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C
index f0c4c16d71b7b139f17417a70e077e02d90745a9..c242d6218351094e41f1115157e126c62191bddc 100644
--- a/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.C
+++ b/applications/utilities/mesh/manipulation/polyDualMesh/polyDualMeshApp.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
@@ -105,9 +105,9 @@ void simpleMarkFeatures
     // 1. Mark all edges between patches
     // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
         const labelList& meshEdges = pp.meshEdges();
 
         // All patch corner edges. These need to be feature points & edges!
diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C
index d6ad9925470f867055b557b249d95b00f6906370..5d6fe4f9ea8009edf7de056621e92abcb45af5b5 100644
--- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C
+++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C
@@ -446,12 +446,12 @@ autoPtr<mapPolyMesh> reorderMesh
     labelList oldPatchNMeshPoints(patches.size());
     labelListList patchPointMap(patches.size());
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        patchSizes[patchI] = patches[patchI].size();
-        patchStarts[patchI] = patches[patchI].start();
-        oldPatchNMeshPoints[patchI] = patches[patchI].nPoints();
-        patchPointMap[patchI] = identity(patches[patchI].nPoints());
+        patchSizes[patchi] = patches[patchi].size();
+        patchStarts[patchi] = patches[patchi].start();
+        oldPatchNMeshPoints[patchi] = patches[patchi].nPoints();
+        patchPointMap[patchi] = identity(patches[patchi].nPoints());
     }
 
     mesh.resetPrimitives
@@ -955,11 +955,11 @@ int main(int argc, char *argv[])
 
             // Collect all boundary cells on coupled patches
             label nBndCells = 0;
-            forAll(pbm, patchI)
+            forAll(pbm, patchi)
             {
-                if (pbm[patchI].coupled())
+                if (pbm[patchi].coupled())
                 {
-                    nBndCells += pbm[patchI].size();
+                    nBndCells += pbm[patchi].size();
                 }
             }
 
@@ -968,11 +968,11 @@ int main(int argc, char *argv[])
             labelList bndCells(nBndCells);
             labelList bndCellMap(nBndCells);
             nBndCells = 0;
-            forAll(pbm, patchI)
+            forAll(pbm, patchi)
             {
-                if (pbm[patchI].coupled())
+                if (pbm[patchi].coupled())
                 {
-                    const labelUList& faceCells = pbm[patchI].faceCells();
+                    const labelUList& faceCells = pbm[patchi].faceCells();
                     forAll(faceCells, i)
                     {
                         label cellI = faceCells[i];
diff --git a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C
index 36c5de626f6fb71a93949c65026faaf5a0a8c409..b7ad4319b3a896a8f02c55aa65e6d301bec8d2db 100644
--- a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C
+++ b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C
@@ -86,9 +86,9 @@ label findEdge(const primitiveMesh& mesh, const label v0, const label v1)
 // Checks whether patch present
 void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
 {
-    const label patchI = bMesh.findPatchID(name);
+    const label patchi = bMesh.findPatchID(name);
 
-    if (patchI == -1)
+    if (patchi == -1)
     {
         FatalErrorInFunction
             << "Cannot find patch " << name << nl
@@ -97,7 +97,7 @@ void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
             << exit(FatalError);
     }
 
-    if (bMesh[patchI].size())
+    if (bMesh[patchi].size())
     {
         FatalErrorInFunction
             << "Patch " << name << " is present but non-zero size"
diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C
index 2a7e0727ccfcc869841cfd56092661c160989167..4473501daba2e3f675a87fe0b1eea06a4ffa4e1d 100644
--- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C
+++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C
@@ -121,8 +121,8 @@ void renamePatches
         const_cast<polyBoundaryMesh&>(mesh.boundaryMesh());
     forAll(patchesToRename, i)
     {
-        label patchI = patchesToRename[i];
-        polyPatch& pp = polyPatches[patchI];
+        label patchi = patchesToRename[i];
+        polyPatch& pp = polyPatches[patchi];
 
         if (isA<coupledPolyPatch>(pp))
         {
@@ -177,11 +177,11 @@ void subsetVolFields
 
         // Hack: set value to 0 for introduced patches (since don't
         //       get initialised.
-        forAll(tSubFld().boundaryField(), patchI)
+        forAll(tSubFld().boundaryField(), patchi)
         {
-            if (addedPatches.found(patchI))
+            if (addedPatches.found(patchi))
             {
-                tSubFld.ref().boundaryField()[patchI] ==
+                tSubFld.ref().boundaryFieldRef()[patchi] ==
                     typename GeoField::value_type(Zero);
             }
         }
@@ -229,11 +229,11 @@ void subsetSurfaceFields
 
         // Hack: set value to 0 for introduced patches (since don't
         //       get initialised.
-        forAll(tSubFld().boundaryField(), patchI)
+        forAll(tSubFld().boundaryField(), patchi)
         {
-            if (addedPatches.found(patchI))
+            if (addedPatches.found(patchi))
             {
-                tSubFld.ref().boundaryField()[patchI] ==
+                tSubFld.ref().boundaryFieldRef()[patchi] ==
                     typename GeoField::value_type(Zero);
             }
         }
@@ -875,16 +875,16 @@ void createAndWriteRegion
     Info<< "Deleting empty patches" << endl;
 
     // Assumes all non-proc boundaries are on all processors!
-    forAll(newPatches, patchI)
+    forAll(newPatches, patchi)
     {
-        const polyPatch& pp = newPatches[patchI];
+        const polyPatch& pp = newPatches[patchi];
 
         if (!isA<processorPolyPatch>(pp))
         {
             if (returnReduce(pp.size(), sumOp<label>()) > 0)
             {
-                oldToNew[patchI] = newI;
-                if (!addedPatches.found(patchI))
+                oldToNew[patchi] = newI;
+                if (!addedPatches.found(patchi))
                 {
                     sharedPatches.append(newI);
                 }
@@ -894,24 +894,24 @@ void createAndWriteRegion
     }
 
     // Same for processor patches (but need no reduction)
-    forAll(newPatches, patchI)
+    forAll(newPatches, patchi)
     {
-        const polyPatch& pp = newPatches[patchI];
+        const polyPatch& pp = newPatches[patchi];
 
         if (isA<processorPolyPatch>(pp) && pp.size())
         {
-            oldToNew[patchI] = newI++;
+            oldToNew[patchi] = newI++;
         }
     }
 
     const label nNewPatches = newI;
 
     // Move all deleteable patches to the end
-    forAll(oldToNew, patchI)
+    forAll(oldToNew, patchi)
     {
-        if (oldToNew[patchI] == -1)
+        if (oldToNew[patchi] == -1)
         {
-            oldToNew[patchI] = newI++;
+            oldToNew[patchi] = newI++;
         }
     }
 
diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C
index d2f166a6540955b956deca71748187bd9c7818e4..eb46fe89d3670211f8cddba0547714510ee7ba8d 100644
--- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C
+++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C
@@ -173,9 +173,9 @@ label addCellZone(const polyMesh& mesh, const word& name)
 // Checks whether patch present
 void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
 {
-    const label patchI = bMesh.findPatchID(name);
+    const label patchi = bMesh.findPatchID(name);
 
-    if (patchI == -1)
+    if (patchi == -1)
     {
         FatalErrorInFunction
             << "Cannot find patch " << name << endl
@@ -184,7 +184,7 @@ void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
             << exit(FatalError);
     }
 
-    if (bMesh[patchI].empty())
+    if (bMesh[patchi].empty())
     {
         FatalErrorInFunction
             << "Patch " << name << " is present but zero size"
diff --git a/applications/utilities/miscellaneous/patchSummary/patchSummary.C b/applications/utilities/miscellaneous/patchSummary/patchSummary.C
index 0a3621ff8351dd91dea5b8cc0e4367b108fe2ca1..e98e3c8f4de62eb698e134740a1031bed68c4351 100644
--- a/applications/utilities/miscellaneous/patchSummary/patchSummary.C
+++ b/applications/utilities/miscellaneous/patchSummary/patchSummary.C
@@ -129,20 +129,20 @@ int main(int argc, char *argv[])
         {
             // Print each patch separately
 
-            forAll(bm, patchI)
+            forAll(bm, patchi)
             {
-                Info<< bm[patchI].type() << "\t: " << bm[patchI].name() << nl;
-                outputFieldList(vsf, patchI);
-                outputFieldList(vvf, patchI);
-                outputFieldList(vsptf, patchI);
-                outputFieldList(vsytf, patchI);
-                outputFieldList(vtf, patchI);
-
-                outputFieldList(psf, patchI);
-                outputFieldList(pvf, patchI);
-                outputFieldList(psptf, patchI);
-                outputFieldList(psytf, patchI);
-                outputFieldList(ptf, patchI);
+                Info<< bm[patchi].type() << "\t: " << bm[patchi].name() << nl;
+                outputFieldList(vsf, patchi);
+                outputFieldList(vvf, patchi);
+                outputFieldList(vsptf, patchi);
+                outputFieldList(vsytf, patchi);
+                outputFieldList(vtf, patchi);
+
+                outputFieldList(psf, patchi);
+                outputFieldList(pvf, patchi);
+                outputFieldList(psptf, patchi);
+                outputFieldList(psytf, patchi);
+                outputFieldList(ptf, patchi);
                 Info<< endl;
             }
         }
@@ -155,32 +155,32 @@ int main(int argc, char *argv[])
             DynamicList<HashTable<word>> fieldToTypes(bm.size());
             // Per 'group' the patches
             DynamicList<DynamicList<label>> groupToPatches(bm.size());
-            forAll(bm, patchI)
+            forAll(bm, patchi)
             {
                 HashTable<word> fieldToType;
-                collectFieldList(vsf, patchI, fieldToType);
-                collectFieldList(vvf, patchI, fieldToType);
-                collectFieldList(vsptf, patchI, fieldToType);
-                collectFieldList(vsytf, patchI, fieldToType);
-                collectFieldList(vtf, patchI, fieldToType);
-
-                collectFieldList(psf, patchI, fieldToType);
-                collectFieldList(pvf, patchI, fieldToType);
-                collectFieldList(psptf, patchI, fieldToType);
-                collectFieldList(psytf, patchI, fieldToType);
-                collectFieldList(ptf, patchI, fieldToType);
+                collectFieldList(vsf, patchi, fieldToType);
+                collectFieldList(vvf, patchi, fieldToType);
+                collectFieldList(vsptf, patchi, fieldToType);
+                collectFieldList(vsytf, patchi, fieldToType);
+                collectFieldList(vtf, patchi, fieldToType);
+
+                collectFieldList(psf, patchi, fieldToType);
+                collectFieldList(pvf, patchi, fieldToType);
+                collectFieldList(psptf, patchi, fieldToType);
+                collectFieldList(psytf, patchi, fieldToType);
+                collectFieldList(ptf, patchi, fieldToType);
 
                 label groupI = findIndex(fieldToTypes, fieldToType);
                 if (groupI == -1)
                 {
                     DynamicList<label> group(1);
-                    group.append(patchI);
+                    group.append(patchi);
                     groupToPatches.append(group);
                     fieldToTypes.append(fieldToType);
                 }
                 else
                 {
-                    groupToPatches[groupI].append(patchI);
+                    groupToPatches[groupI].append(patchi);
                 }
             }
 
@@ -227,20 +227,20 @@ int main(int argc, char *argv[])
                     // No group.
                     forAll(patchIDs, i)
                     {
-                        label patchI = patchIDs[i];
-                        Info<< bm[patchI].type()
-                            << "\t: " << bm[patchI].name() << nl;
-                        outputFieldList(vsf, patchI);
-                        outputFieldList(vvf, patchI);
-                        outputFieldList(vsptf, patchI);
-                        outputFieldList(vsytf, patchI);
-                        outputFieldList(vtf, patchI);
-
-                        outputFieldList(psf, patchI);
-                        outputFieldList(pvf, patchI);
-                        outputFieldList(psptf, patchI);
-                        outputFieldList(psytf, patchI);
-                        outputFieldList(ptf, patchI);
+                        label patchi = patchIDs[i];
+                        Info<< bm[patchi].type()
+                            << "\t: " << bm[patchi].name() << nl;
+                        outputFieldList(vsf, patchi);
+                        outputFieldList(vvf, patchi);
+                        outputFieldList(vsptf, patchi);
+                        outputFieldList(vsytf, patchi);
+                        outputFieldList(vtf, patchi);
+
+                        outputFieldList(psf, patchi);
+                        outputFieldList(pvf, patchi);
+                        outputFieldList(psptf, patchi);
+                        outputFieldList(psytf, patchi);
+                        outputFieldList(ptf, patchi);
                         Info<< endl;
                     }
                 }
diff --git a/applications/utilities/miscellaneous/patchSummary/patchSummaryTemplates.C b/applications/utilities/miscellaneous/patchSummary/patchSummaryTemplates.C
index c0cc32b25cbb744c70b5c903cc928ad629a35066..80ce7836136665a20afb7c79a7084a1de3bc0ce5 100644
--- a/applications/utilities/miscellaneous/patchSummary/patchSummaryTemplates.C
+++ b/applications/utilities/miscellaneous/patchSummary/patchSummaryTemplates.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
@@ -53,7 +53,7 @@ template<class GeoField>
 void Foam::outputFieldList
 (
     const PtrList<GeoField>& fieldList,
-    const label patchI
+    const label patchi
 )
 {
     forAll(fieldList, fieldI)
@@ -63,7 +63,7 @@ void Foam::outputFieldList
             Info<< "    " << pTraits<typename GeoField::value_type>::typeName
                 << tab << tab
                 << fieldList[fieldI].name() << tab << tab
-                << fieldList[fieldI].boundaryField()[patchI].type() << nl;
+                << fieldList[fieldI].boundaryField()[patchi].type() << nl;
         }
     }
 }
@@ -73,7 +73,7 @@ template<class GeoField>
 void Foam::collectFieldList
 (
     const PtrList<GeoField>& fieldList,
-    const label patchI,
+    const label patchi,
     HashTable<word>& fieldToType
 )
 {
@@ -84,7 +84,7 @@ void Foam::collectFieldList
             fieldToType.insert
             (
                 fieldList[fieldI].name(),
-                fieldList[fieldI].boundaryField()[patchI].type()
+                fieldList[fieldI].boundaryField()[patchi].type()
             );
         }
     }
diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C
index efcfc82ebd8372855d7a550ff3e1cc3f25faebdd..0ca380934f3a8ebaedcfee79ecab560831b97d59 100644
--- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C
+++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionMesh.C
@@ -55,16 +55,16 @@ void Foam::domainDecomposition::addInterProcFace
     List<DynamicList<DynamicList<label>>>& interPatchFaces
 ) const
 {
-    Map<label>::iterator patchIter = nbrToInterPatch[ownerProc].find(nbrProc);
+    Map<label>::iterator patchiter = nbrToInterPatch[ownerProc].find(nbrProc);
 
     // Introduce turning index only for internal faces (are duplicated).
     label ownerIndex = facei+1;
     label nbrIndex = -(facei+1);
 
-    if (patchIter != nbrToInterPatch[ownerProc].end())
+    if (patchiter != nbrToInterPatch[ownerProc].end())
     {
         // Existing interproc patch. Add to both sides.
-        label toNbrProcPatchI = patchIter();
+        label toNbrProcPatchI = patchiter();
         interPatchFaces[ownerProc][toNbrProcPatchI].append(ownerIndex);
 
         if (isInternalFace(facei))
@@ -402,11 +402,11 @@ void Foam::domainDecomposition::decomposeMesh()
 //
 //        const labelList& curProcPatchStartIndex = procPatchStartIndex_[procI];
 //
-//        forAll(curProcPatchStartIndex, patchI)
+//        forAll(curProcPatchStartIndex, patchi)
 //        {
-//            Info<< "    patch:" << patchI
-//                << "\tstart:" << curProcPatchStartIndex[patchI]
-//                << "\tsize:" << procPatchSize_[procI][patchI]
+//            Info<< "    patch:" << patchi
+//                << "\tstart:" << curProcPatchStartIndex[patchi]
+//                << "\tsize:" << procPatchSize_[procI][patchi]
 //                << endl;
 //        }
 //    }
diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C
index 76e64f8fcea7c281f889eb9b78f5332bf21ebe25..99b9ab199ef8d0dabe06535831e2b3886d3b3def 100644
--- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C
+++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C
@@ -117,9 +117,9 @@ autoPtr<faceCoupleInfo> determineCoupledFaces
           - masterMesh.nInternalFaces()
         );
 
-        forAll(masterPatches, patchI)
+        forAll(masterPatches, patchi)
         {
-            const polyPatch& pp = masterPatches[patchI];
+            const polyPatch& pp = masterPatches[patchi];
 
             if
             (
@@ -151,9 +151,9 @@ autoPtr<faceCoupleInfo> determineCoupledFaces
           - meshToAdd.nInternalFaces()
         );
 
-        forAll(addPatches, patchI)
+        forAll(addPatches, patchi)
         {
-            const polyPatch& pp = addPatches[patchI];
+            const polyPatch& pp = addPatches[patchi];
 
             if (isA<processorPolyPatch>(pp))
             {
diff --git a/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C b/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C
index 5b248783bceae389d844148b6ae1b0ae488a36bc..8b16b183f3a53293de708c9ea841fc604fd00cb9 100644
--- a/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.C
+++ b/applications/utilities/parallelProcessing/redistributePar/loadOrCreateMesh.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
@@ -136,9 +136,9 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
         List<polyPatch*> patches(patchEntries.size());
         label nPatches = 0;
 
-        forAll(patchEntries, patchI)
+        forAll(patchEntries, patchi)
         {
-            const entry& e = patchEntries[patchI];
+            const entry& e = patchEntries[patchi];
             const word type(e.dict().lookup("type"));
             const word& name = e.keyword();
 
@@ -152,7 +152,7 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
                 patchDict.set("nFaces", 0);
                 patchDict.set("startFace", 0);
 
-                patches[patchI] = polyPatch::New
+                patches[patchi] = polyPatch::New
                 (
                     name,
                     patchDict,
@@ -223,9 +223,9 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
 
         const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
-        forAll(patchEntries, patchI)
+        forAll(patchEntries, patchi)
         {
-            const entry& e = patchEntries[patchI];
+            const entry& e = patchEntries[patchi];
             const word type(e.dict().lookup("type"));
             const word& name = e.keyword();
 
@@ -234,7 +234,7 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
                 break;
             }
 
-            if (patchI >= patches.size())
+            if (patchi >= patches.size())
             {
                 FatalErrorInFunction
                     << "Non-processor patches not synchronised."
@@ -242,26 +242,26 @@ Foam::autoPtr<Foam::fvMesh> Foam::loadOrCreateMesh
                     << "Processor " << Pstream::myProcNo()
                     << " has only " << patches.size()
                     << " patches, master has "
-                    << patchI
+                    << patchi
                     << exit(FatalError);
             }
 
             if
             (
-                type != patches[patchI].type()
-             || name != patches[patchI].name()
+                type != patches[patchi].type()
+             || name != patches[patchi].name()
             )
             {
                 FatalErrorInFunction
                     << "Non-processor patches not synchronised."
                     << endl
-                    << "Master patch " << patchI
+                    << "Master patch " << patchi
                     << " name:" << type
                     << " type:" << type << endl
                     << "Processor " << Pstream::myProcNo()
-                    << " patch " << patchI
-                    << " has name:" << patches[patchI].name()
-                    << " type:" << patches[patchI].type()
+                    << " patch " << patchi
+                    << " has name:" << patches[patchi].name()
+                    << " type:" << patches[patchi].type()
                     << exit(FatalError);
             }
         }
diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C
index cd1b0c4380b8a4e4dffcfc6280563ee288a59a05..fb8feb2796f0e5963c5d2589f2cdc2fba6b385fb 100644
--- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C
+++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C
@@ -379,16 +379,16 @@ void compareFields
                 << abort(FatalError);
         }
     }
-    forAll(a.boundaryField(), patchI)
+    forAll(a.boundaryField(), patchi)
     {
         // We have real mesh cellcentre and
         // mapped original cell centre.
 
         const fvPatchVectorField& aBoundary =
-            a.boundaryField()[patchI];
+            a.boundaryField()[patchi];
 
         const fvPatchVectorField& bBoundary =
-            b.boundaryField()[patchI];
+            b.boundaryField()[patchi];
 
         if (!bBoundary.coupled())
         {
@@ -399,7 +399,7 @@ void compareFields
                     WarningInFunction
                         << "Did not map volVectorField correctly:"
                         << endl
-                        << "patch:" << patchI << " patchFace:" << i
+                        << "patch:" << patchi << " patchFace:" << i
                         << " cc:" << endl
                         << "    real    :" << aBoundary[i] << endl
                         << "    mapped  :" << bBoundary[i] << endl
@@ -576,9 +576,9 @@ int main(int argc, char *argv[])
 
         label nonProcI = -1;
 
-        forAll(patches, patchI)
+        forAll(patches, patchi)
         {
-            if (isA<processorPolyPatch>(patches[patchI]))
+            if (isA<processorPolyPatch>(patches[patchi]))
             {
                 break;
             }
diff --git a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluent.C b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluent.C
index 8427f9b1b455959a5bfa317e5039afee4eb7f220..186eb62d3d0844154609c3c01c4f59759478b66e 100644
--- a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluent.C
+++ b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/foamDataToFluent.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,9 +80,9 @@ int main(int argc, char *argv[])
         // Writing number of faces
         label nFaces = mesh.nFaces();
 
-        forAll(mesh.boundary(), patchI)
+        forAll(mesh.boundary(), patchi)
         {
-            nFaces += mesh.boundary()[patchI].size();
+            nFaces += mesh.boundary()[patchi].size();
         }
 
         fluentDataFile
diff --git a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentScalarField.C b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentScalarField.C
index 922ca18f174e91911fc5f734db543d917f08be61..bed6cb7895e1bb9b88e31634b8eeeb3b1c04f550 100644
--- a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentScalarField.C
+++ b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentScalarField.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
@@ -52,7 +52,7 @@ void writeFluentField
         << "(300 ("
         << fluentFieldIdentifier << " "  // Field identifier
         << "1 "                  // Zone ID: (cells=1, internal faces=2,
-                                 // patch faces=patchI+10)
+                                 // patch faces=patchi+10)
         << "1 "                  // Number of components (scalar=1, vector=3)
         << "0 0 "                // Unused
         << "1 " << phiInternal.size() // Start and end of list
@@ -69,9 +69,9 @@ void writeFluentField
     label nWrittenFaces = phiInternal.size();
 
     // Writing boundary faces
-    forAll(phi.boundaryField(), patchI)
+    forAll(phi.boundaryField(), patchi)
     {
-        if (isType<emptyFvPatchScalarField>(phi.boundaryField()[patchI]))
+        if (isType<emptyFvPatchScalarField>(phi.boundaryField()[patchi]))
         {
             // Form empty patch field repeat the internal field to
             // allow for the node interpolation in Fluent
@@ -79,13 +79,13 @@ void writeFluentField
 
             // Get reference to internal cells
             const labelList emptyFaceCells =
-                phi.boundaryField()[patchI].patch().patch().faceCells();
+                phi.boundaryField()[patchi].patch().patch().faceCells();
 
             // Writing cells for empty patch
             stream
                 << "(300 ("
                 << fluentFieldIdentifier << " "  // Field identifier
-                << patchI + 10 << " "            // Zone ID: patchI+10
+                << patchi + 10 << " "            // Zone ID: patchi+10
                 << "1 "             // Number of components (scalar=1, vector=3)
                 << "0 0 "                // Unused
                 << nWrittenFaces + 1 << " "
@@ -107,13 +107,13 @@ void writeFluentField
             // Regular patch
             label nWrittenFaces = phiInternal.size();
 
-            const scalarField& patchPhi = phi.boundaryField()[patchI];
+            const scalarField& patchPhi = phi.boundaryField()[patchi];
 
             // Write header
             stream
                 << "(300 ("
                 << fluentFieldIdentifier << " "  // Field identifier
-                << patchI + 10 << " "            // Zone ID: patchI+10
+                << patchi + 10 << " "            // Zone ID: patchi+10
                 << "1 "          // Number of components (scalar=1, vector=3)
                 << "0 0 "            // Unused
                 << nWrittenFaces + 1 << " " << nWrittenFaces + patchPhi.size()
diff --git a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentVectorField.C b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentVectorField.C
index f57724738ddd133a1e241e2f1a118abed560c600..7fca73ce19cfe7db22cbf909e3df2300c7b18241 100644
--- a/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentVectorField.C
+++ b/applications/utilities/postProcessing/dataConversion/foamDataToFluent/writeFluentVectorField.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
@@ -51,7 +51,7 @@ void writeFluentField
         << "(300 ("
         << fluentFieldIdentifier << " "  // Field identifier
         << "1 "                  // Zone ID: (cells=1, internal faces=2,
-                                 // patch faces=patchI+10)
+                                 // patch faces=patchi+10)
         << "3 "                  // Number of components (scalar=1, vector=3)
         << "0 0 "                // Unused
         << "1 " << phiInternal.size() // Start and end of list
@@ -72,15 +72,15 @@ void writeFluentField
     label nWrittenFaces = phiInternal.size();
 
     // Writing boundary faces
-    forAll(phi.boundaryField(), patchI)
+    forAll(phi.boundaryField(), patchi)
     {
-        const vectorField& patchPhi = phi.boundaryField()[patchI];
+        const vectorField& patchPhi = phi.boundaryField()[patchi];
 
         // Write header
         stream
             << "(300 ("
             << fluentFieldIdentifier << " "  // Field identifier
-            << patchI + 10 << " "            // Zone ID: patchI+10
+            << patchi + 10 << " "            // Zone ID: patchi+10
             << "3 "              // Number of components (scalar=1, vector=3)
             << "0 0 "            // Unused
             << nWrittenFaces + 1 << " " << nWrittenFaces + patchPhi.size()
diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C
index 612afc260adc59ea5510421ab810f1729424577c..6ac0c5b34cd811400f3f61131ce12dd930e29963 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightField.C
@@ -492,10 +492,10 @@ void ensightField
                 {
                     if (eMesh.faceToBeIncluded(faceI))
                     {
-                        label patchI = mesh.boundaryMesh().whichPatch(faceI);
-                        const polyPatch& pp = mesh.boundaryMesh()[patchI];
+                        label patchi = mesh.boundaryMesh().whichPatch(faceI);
+                        const polyPatch& pp = mesh.boundaryMesh()[patchi];
                         label patchFaceI = pp.whichFace(faceI);
-                        Type value = sf.boundaryField()[patchI][patchFaceI];
+                        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 64ce70b679632439f1af16fca978ec2fef2033b4..f4651e0086964c68f061f7b2e50afb9019a340a8 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightMesh.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
@@ -284,9 +284,9 @@ void Foam::ensightMesh::correct()
             1
         );
 
-        forAll(mesh_.boundaryMesh(), patchI)
+        forAll(mesh_.boundaryMesh(), patchi)
         {
-            const polyPatch& pp = mesh_.boundaryMesh()[patchI];
+            const polyPatch& pp = mesh_.boundaryMesh()[patchi];
             if
             (
                 isA<processorPolyPatch>(pp)
diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C
index 3cf58fde370a52fe208bb09f695502536fe6982e..5d067df07c369c14b1f3ef1ad53d000832e78c7c 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.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
@@ -129,9 +129,9 @@ labelList getSelectedPatches
 
     Info<< "Combining patches:" << endl;
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         if
         (
@@ -139,18 +139,18 @@ labelList getSelectedPatches
             || (Pstream::parRun() && isType<processorPolyPatch>(pp))
         )
         {
-            Info<< "    discarding empty/processor patch " << patchI
+            Info<< "    discarding empty/processor patch " << patchi
                 << " " << pp.name() << endl;
         }
         else if (findStrings(excludePatches, pp.name()))
         {
-            Info<< "    excluding patch " << patchI
+            Info<< "    excluding patch " << patchi
                 << " " << pp.name() << endl;
         }
         else
         {
-            patchIDs.append(patchI);
-            Info<< "    patch " << patchI << " " << pp.name() << endl;
+            patchIDs.append(patchi);
+            Info<< "    patch " << patchi << " " << pp.name() << endl;
         }
     }
     return patchIDs.shrink();
diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C
index c2ca8ac4a86c710d8f50646cdd05544470ca132b..df71e2c90bf83bd2ea31c18212d7b62d03d2886f 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/tecplotWriterTemplates.C
@@ -69,16 +69,16 @@ Foam::tmp<Field<Type>> Foam::tecplotWriter::getPatchField
 (
     const bool nearCellValue,
     const GeometricField<Type, fvPatchField, volMesh>& vfld,
-    const label patchI
+    const label patchi
 ) const
 {
     if (nearCellValue)
     {
-        return vfld.boundaryField()[patchI].patchInternalField();
+        return vfld.boundaryField()[patchi].patchInternalField();
     }
     else
     {
-        return vfld.boundaryField()[patchI];
+        return vfld.boundaryField()[patchi];
     }
 }
 
@@ -99,16 +99,16 @@ Foam::tmp<Field<Type>> Foam::tecplotWriter::getFaceField
     {
         label faceI = faceLabels[i];
 
-        label patchI = patches.whichPatch(faceI);
+        label patchi = patches.whichPatch(faceI);
 
-        if (patchI == -1)
+        if (patchi == -1)
         {
             fld[i] = sfld[faceI];
         }
         else
         {
-            label localFaceI = faceI - patches[patchI].start();
-            fld[i] = sfld.boundaryField()[patchI][localFaceI];
+            label localFaceI = faceI - patches[patchi].start();
+            fld[i] = sfld.boundaryField()[patchi][localFaceI];
         }
     }
 
diff --git a/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C b/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C
index 6e50d704717fb450f1872c89352f17e352d600e1..d5b3763b159902bd86ad465f6ccbbd721c245cb4 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToTetDualMesh/foamToTetDualMesh.C
@@ -110,12 +110,12 @@ void ReadAndMapFields
                 label bFaceI = faceI - mesh.nInternalFaces();
                 if (bFaceI >= 0)
                 {
-                    label patchI = mesh.boundaryMesh().patchID()[bFaceI];
-                    label localFaceI = mesh.boundaryMesh()[patchI].whichFace
+                    label patchi = mesh.boundaryMesh().patchID()[bFaceI];
+                    label localFaceI = mesh.boundaryMesh()[patchi].whichFace
                     (
                         faceI
                     );
-                    fld[pointI] = readField.boundaryField()[patchI][localFaceI];
+                    fld[pointI] = readField.boundaryField()[patchi][localFaceI];
                 }
                 //else
                 //{
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C
index a9b1390bb82fec466de0606c487d04da2f5508b3..1bdbe8baf4f968df56871590ab64210b35129831 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C
@@ -198,9 +198,9 @@ labelList getSelectedPatches
 
     Info<< "Combining patches:" << endl;
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         if
         (
@@ -208,18 +208,18 @@ labelList getSelectedPatches
             || (Pstream::parRun() && isType<processorPolyPatch>(pp))
         )
         {
-            Info<< "    discarding empty/processor patch " << patchI
+            Info<< "    discarding empty/processor patch " << patchi
                 << " " << pp.name() << endl;
         }
         else if (findStrings(excludePatches, pp.name()))
         {
-            Info<< "    excluding patch " << patchI
+            Info<< "    excluding patch " << patchi
                 << " " << pp.name() << endl;
         }
         else
         {
-            patchIDs.append(patchI);
-            Info<< "    patch " << patchI << " " << pp.name() << endl;
+            patchIDs.append(patchi);
+            Info<< "    patch " << patchi << " " << pp.name() << endl;
         }
     }
     return patchIDs.shrink();
@@ -890,9 +890,9 @@ int main(int argc, char *argv[])
         }
         else
         {
-            forAll(patches, patchI)
+            forAll(patches, patchi)
             {
-                const polyPatch& pp = patches[patchI];
+                const polyPatch& pp = patches[patchi];
 
                 if (!findStrings(excludePatches, pp.name()))
                 {
@@ -925,7 +925,7 @@ int main(int argc, char *argv[])
                         binary,
                         nearCellValue,
                         patchFileName,
-                        labelList(1, patchI)
+                        labelList(1, patchi)
                     );
 
                     if (!isA<emptyPolyPatch>(pp))
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.C
index 4bd419c2f42ba5c09038f48ac4de6de37631b63e..a5d5df8b437bf23fce05a6b9aa90b731751c113d 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.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
@@ -123,13 +123,13 @@ void Foam::patchWriter::writePatchIDs()
 
     forAll(patchIDs_, i)
     {
-        label patchI = patchIDs_[i];
+        label patchi = patchIDs_[i];
 
-        const polyPatch& pp = mesh.boundaryMesh()[patchI];
+        const polyPatch& pp = mesh.boundaryMesh()[patchi];
 
         if (!isA<emptyPolyPatch>(pp))
         {
-            writeFuns::insert(scalarField(pp.size(), patchI), fField);
+            writeFuns::insert(scalarField(pp.size(), patchi), fField);
         }
     }
     writeFuns::write(os_, binary_, fField);
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriterTemplates.C
index f6ea96d7b8bfe279efc6451e5e5e8986e6740df4..5e4dd33a1f1bced4d16fb79d1777760012937cbc 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriterTemplates.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriterTemplates.C
@@ -45,9 +45,9 @@ void Foam::patchWriter::write
 
         forAll(patchIDs_, j)
         {
-            label patchI = patchIDs_[j];
+            label patchi = patchIDs_[j];
 
-            const fvPatchField<Type>& pfld = fld.boundaryField()[patchI];
+            const fvPatchField<Type>& pfld = fld.boundaryField()[patchi];
 
             if (nearCellValue_)
             {
@@ -81,9 +81,9 @@ void Foam::patchWriter::write
 
         forAll(patchIDs_, j)
         {
-            label patchI = patchIDs_[j];
+            label patchi = patchIDs_[j];
 
-            const pointPatchField<Type>& pfld = fld.boundaryField()[patchI];
+            const pointPatchField<Type>& pfld = fld.boundaryField()[patchi];
 
             writeFuns::insert(pfld.patchInternalField()(), fField);
         }
@@ -110,9 +110,9 @@ void Foam::patchWriter::write
 
         forAll(patchIDs_, j)
         {
-            label patchI = patchIDs_[j];
+            label patchi = patchIDs_[j];
 
-            const fvPatchField<Type>& pfld = fld.boundaryField()[patchI];
+            const fvPatchField<Type>& pfld = fld.boundaryField()[patchi];
 
             if (nearCellValue_)
             {
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C
index c3412a1faa4d6a6738f803b07398abf546379a5d..0d490c2097f01330500d8887d1109f5f6fe30c1a 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/surfaceMeshWriterTemplates.C
@@ -43,16 +43,16 @@ Foam::tmp<Field<Type>> Foam::surfaceMeshWriter::getFaceField
     {
         label faceI = pp_.addressing()[i];
 
-        label patchI = patches.whichPatch(faceI);
+        label patchi = patches.whichPatch(faceI);
 
-        if (patchI == -1)
+        if (patchi == -1)
         {
             fld[i] = sfld[faceI];
         }
         else
         {
-            label localFaceI = faceI - patches[patchI].start();
-            fld[i] = sfld.boundaryField()[patchI][localFaceI];
+            label localFaceI = faceI - patches[patchi].start();
+            fld[i] = sfld.boundaryField()[patchi][localFaceI];
         }
     }
 
diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.C
index a71133afa7a2a4f53215b491e41bd6845d5cca58..10e72cd9262930f20193d111a85dae45f6fc86e6 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.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
@@ -89,11 +89,11 @@ void writeSurfFields
             writeFuns::insert(svf[faceI], fField);
         }
 
-        forAll(svf.boundaryField(), patchI)
+        forAll(svf.boundaryField(), patchi)
         {
-            const fvsPatchVectorField& pf = svf.boundaryField()[patchI];
+            const fvsPatchVectorField& pf = svf.boundaryField()[patchi];
 
-            const fvPatch& pp = mesh.boundary()[patchI];
+            const fvPatch& pp = mesh.boundary()[patchi];
 
             if (isA<emptyFvsPatchVectorField>(pf))
             {
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
index 836e84a6ab0ec8b9337830365b683ba9a85bde4b..c9766c8697402919b4ac2a8bb8a767c7d48d5dcb 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C
@@ -630,10 +630,10 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
 
     // always remove old actors first
 
-    forAll(patchTextActorsPtrs_, patchI)
+    forAll(patchTextActorsPtrs_, patchi)
     {
-        renderer->RemoveViewProp(patchTextActorsPtrs_[patchI]);
-        patchTextActorsPtrs_[patchI]->Delete();
+        renderer->RemoveViewProp(patchTextActorsPtrs_[patchi]);
+        patchTextActorsPtrs_[patchi]->Delete();
     }
     patchTextActorsPtrs_.clear();
 
@@ -663,9 +663,9 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
 
 
         // Loop through all patches to determine zones, and centre of each zone
-        forAll(pbMesh, patchI)
+        forAll(pbMesh, patchi)
         {
-            const polyPatch& pp = pbMesh[patchI];
+            const polyPatch& pp = pbMesh[patchi];
 
             // Only include the patch if it is selected
             if (!selectedPatches.found(pp.name()))
@@ -697,27 +697,27 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
             // Do topological analysis of patch, find disconnected regions
             patchZones pZones(pp, featEdge);
 
-            nZones[patchI] = pZones.nZones();
+            nZones[patchi] = pZones.nZones();
 
             labelList zoneNFaces(pZones.nZones(), 0);
 
             // Create storage for additional zone centres
             forAll(zoneNFaces, zoneI)
             {
-                zoneCentre[patchI].append(Zero);
+                zoneCentre[patchi].append(Zero);
             }
 
             // Do averaging per individual zone
             forAll(pp, faceI)
             {
                 label zoneI = pZones[faceI];
-                zoneCentre[patchI][zoneI] += pp[faceI].centre(pp.points());
+                zoneCentre[patchi][zoneI] += pp[faceI].centre(pp.points());
                 zoneNFaces[zoneI]++;
             }
 
-            forAll(zoneCentre[patchI], zoneI)
+            forAll(zoneCentre[patchi], zoneI)
             {
-                zoneCentre[patchI][zoneI] /= zoneNFaces[zoneI];
+                zoneCentre[patchi][zoneI] /= zoneNFaces[zoneI];
             }
         }
 
@@ -728,9 +728,9 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
 
         label displayZoneI = 0;
 
-        forAll(pbMesh, patchI)
+        forAll(pbMesh, patchi)
         {
-            displayZoneI += min(MAXPATCHZONES, nZones[patchI]);
+            displayZoneI += min(MAXPATCHZONES, nZones[patchi]);
         }
 
         if (debug)
@@ -750,18 +750,18 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
         // Actor index
         displayZoneI = 0;
 
-        forAll(pbMesh, patchI)
+        forAll(pbMesh, patchi)
         {
-            const polyPatch& pp = pbMesh[patchI];
+            const polyPatch& pp = pbMesh[patchi];
 
             label globalZoneI = 0;
 
             // Only selected patches will have a non-zero number of zones
-            label nDisplayZones = min(MAXPATCHZONES, nZones[patchI]);
+            label nDisplayZones = min(MAXPATCHZONES, nZones[patchi]);
             label increment = 1;
-            if (nZones[patchI] >= MAXPATCHZONES)
+            if (nZones[patchi] >= MAXPATCHZONES)
             {
-                increment = nZones[patchI]/MAXPATCHZONES;
+                increment = nZones[patchi]/MAXPATCHZONES;
             }
 
             for (label i = 0; i < nDisplayZones; i++)
@@ -769,7 +769,7 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
                 if (debug)
                 {
                     Info<< "patch name = " << pp.name() << nl
-                        << "anchor = " << zoneCentre[patchI][globalZoneI] << nl
+                        << "anchor = " << zoneCentre[patchi][globalZoneI] << nl
                         << "globalZoneI = " << globalZoneI << endl;
                 }
 
@@ -792,9 +792,9 @@ void Foam::vtkPV3Foam::renderPatchNames(vtkRenderer* renderer, const bool show)
 
                 txt->GetPositionCoordinate()->SetValue
                 (
-                    zoneCentre[patchI][globalZoneI].x(),
-                    zoneCentre[patchI][globalZoneI].y(),
-                    zoneCentre[patchI][globalZoneI].z()
+                    zoneCentre[patchi][globalZoneI].x(),
+                    zoneCentre[patchi][globalZoneI].y(),
+                    zoneCentre[patchi][globalZoneI].z()
                 );
 
                 // Add text to each renderer
diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C
index 1028086056d853f4dc3c821e23adb615f639ec8b..52401be615ef3d7c6db0d6c3e2cfa8627532f0f4 100644
--- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C
+++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C
@@ -295,9 +295,9 @@ void Foam::vtkPV3Foam::updateInfoPatches
 
         if (!reader_->GetShowGroupsOnly())
         {
-            forAll(patches, patchI)
+            forAll(patches, patchi)
             {
-                const polyPatch& pp = patches[patchI];
+                const polyPatch& pp = patches[patchi];
 
                 if (pp.size())
                 {
@@ -344,12 +344,12 @@ void Foam::vtkPV3Foam::updateInfoPatches
             wordList names(patchEntries.size());
             labelList sizes(patchEntries.size());
 
-            forAll(patchEntries, patchI)
+            forAll(patchEntries, patchi)
             {
-                const dictionary& patchDict = patchEntries[patchI].dict();
+                const dictionary& patchDict = patchEntries[patchi].dict();
 
-                sizes[patchI] = readLabel(patchDict.lookup("nFaces"));
-                names[patchI] = patchEntries[patchI].keyword();
+                sizes[patchi] = readLabel(patchDict.lookup("nFaces"));
+                names[patchi] = patchEntries[patchi].keyword();
             }
 
 
@@ -358,9 +358,9 @@ void Foam::vtkPV3Foam::updateInfoPatches
 
             HashTable<labelList, word> groups(patchEntries.size());
 
-            forAll(patchEntries, patchI)
+            forAll(patchEntries, patchi)
             {
-                const dictionary& patchDict = patchEntries[patchI].dict();
+                const dictionary& patchDict = patchEntries[patchi].dict();
 
                 wordList groupNames;
                 patchDict.readIfPresent("inGroups", groupNames);
@@ -373,11 +373,11 @@ void Foam::vtkPV3Foam::updateInfoPatches
                     );
                     if (iter != groups.end())
                     {
-                        iter().append(patchI);
+                        iter().append(patchi);
                     }
                     else
                     {
-                        groups.insert(groupNames[groupI], labelList(1, patchI));
+                        groups.insert(groupNames[groupI], labelList(1, patchi));
                     }
                 }
             }
@@ -432,14 +432,14 @@ void Foam::vtkPV3Foam::updateInfoPatches
 
             if (!reader_->GetShowGroupsOnly())
             {
-                forAll(names, patchI)
+                forAll(names, patchi)
                 {
                     // Valid patch if nFace > 0 - add patch to GUI list
-                    if (sizes[patchI])
+                    if (sizes[patchi])
                     {
                         arraySelection->AddArray
                         (
-                            (names[patchI] + " - patch").c_str()
+                            (names[patchi] + " - patch").c_str()
                         );
 
                         ++nPatches;
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C
index a55567dbe1e5faf6d047845ff5038d59ae644f60..2eb2e61add5b40ec71316717f0a08a0ec8740296 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoam.C
@@ -634,10 +634,10 @@ void Foam::vtkPVFoam::renderPatchNames
 
     // always remove old actors first
 
-    forAll(patchTextActorsPtrs_, patchI)
+    forAll(patchTextActorsPtrs_, patchi)
     {
-        renderer->RemoveViewProp(patchTextActorsPtrs_[patchI]);
-        patchTextActorsPtrs_[patchI]->Delete();
+        renderer->RemoveViewProp(patchTextActorsPtrs_[patchi]);
+        patchTextActorsPtrs_[patchi]->Delete();
     }
     patchTextActorsPtrs_.clear();
 
@@ -667,9 +667,9 @@ void Foam::vtkPVFoam::renderPatchNames
 
 
         // Loop through all patches to determine zones, and centre of each zone
-        forAll(pbMesh, patchI)
+        forAll(pbMesh, patchi)
         {
-            const polyPatch& pp = pbMesh[patchI];
+            const polyPatch& pp = pbMesh[patchi];
 
             // Only include the patch if it is selected
             if (!selectedPatches.found(pp.name()))
@@ -701,27 +701,27 @@ void Foam::vtkPVFoam::renderPatchNames
             // Do topological analysis of patch, find disconnected regions
             patchZones pZones(pp, featEdge);
 
-            nZones[patchI] = pZones.nZones();
+            nZones[patchi] = pZones.nZones();
 
             labelList zoneNFaces(pZones.nZones(), 0);
 
             // Create storage for additional zone centres
             forAll(zoneNFaces, zoneI)
             {
-                zoneCentre[patchI].append(Zero);
+                zoneCentre[patchi].append(Zero);
             }
 
             // Do averaging per individual zone
             forAll(pp, faceI)
             {
                 label zoneI = pZones[faceI];
-                zoneCentre[patchI][zoneI] += pp[faceI].centre(pp.points());
+                zoneCentre[patchi][zoneI] += pp[faceI].centre(pp.points());
                 zoneNFaces[zoneI]++;
             }
 
-            forAll(zoneCentre[patchI], zoneI)
+            forAll(zoneCentre[patchi], zoneI)
             {
-                zoneCentre[patchI][zoneI] /= zoneNFaces[zoneI];
+                zoneCentre[patchi][zoneI] /= zoneNFaces[zoneI];
             }
         }
 
@@ -732,9 +732,9 @@ void Foam::vtkPVFoam::renderPatchNames
 
         label displayZoneI = 0;
 
-        forAll(pbMesh, patchI)
+        forAll(pbMesh, patchi)
         {
-            displayZoneI += min(MAXPATCHZONES, nZones[patchI]);
+            displayZoneI += min(MAXPATCHZONES, nZones[patchi]);
         }
 
         if (debug)
@@ -754,18 +754,18 @@ void Foam::vtkPVFoam::renderPatchNames
         // Actor index
         displayZoneI = 0;
 
-        forAll(pbMesh, patchI)
+        forAll(pbMesh, patchi)
         {
-            const polyPatch& pp = pbMesh[patchI];
+            const polyPatch& pp = pbMesh[patchi];
 
             label globalZoneI = 0;
 
             // Only selected patches will have a non-zero number of zones
-            label nDisplayZones = min(MAXPATCHZONES, nZones[patchI]);
+            label nDisplayZones = min(MAXPATCHZONES, nZones[patchi]);
             label increment = 1;
-            if (nZones[patchI] >= MAXPATCHZONES)
+            if (nZones[patchi] >= MAXPATCHZONES)
             {
-                increment = nZones[patchI]/MAXPATCHZONES;
+                increment = nZones[patchi]/MAXPATCHZONES;
             }
 
             for (label i = 0; i < nDisplayZones; i++)
@@ -773,7 +773,7 @@ void Foam::vtkPVFoam::renderPatchNames
                 if (debug)
                 {
                     Info<< "patch name = " << pp.name() << nl
-                        << "anchor = " << zoneCentre[patchI][globalZoneI] << nl
+                        << "anchor = " << zoneCentre[patchi][globalZoneI] << nl
                         << "globalZoneI = " << globalZoneI << endl;
                 }
 
@@ -796,9 +796,9 @@ void Foam::vtkPVFoam::renderPatchNames
 
                 txt->GetPositionCoordinate()->SetValue
                 (
-                    zoneCentre[patchI][globalZoneI].x(),
-                    zoneCentre[patchI][globalZoneI].y(),
-                    zoneCentre[patchI][globalZoneI].z()
+                    zoneCentre[patchi][globalZoneI].x(),
+                    zoneCentre[patchi][globalZoneI].y(),
+                    zoneCentre[patchi][globalZoneI].z()
                 );
 
                 // Add text to each renderer
diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfo.C b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfo.C
index 9761783333a24156319df8493e95c7cce608b5b4..9bf34f6bc31fa55c9001b97f5158b58d13e8ae88 100644
--- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfo.C
+++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/vtkPVFoam/vtkPVFoamUpdateInfo.C
@@ -295,9 +295,9 @@ void Foam::vtkPVFoam::updateInfoPatches
 
         if (!reader_->GetShowGroupsOnly())
         {
-            forAll(patches, patchI)
+            forAll(patches, patchi)
             {
-                const polyPatch& pp = patches[patchI];
+                const polyPatch& pp = patches[patchi];
 
                 if (pp.size())
                 {
@@ -344,12 +344,12 @@ void Foam::vtkPVFoam::updateInfoPatches
             wordList names(patchEntries.size());
             labelList sizes(patchEntries.size());
 
-            forAll(patchEntries, patchI)
+            forAll(patchEntries, patchi)
             {
-                const dictionary& patchDict = patchEntries[patchI].dict();
+                const dictionary& patchDict = patchEntries[patchi].dict();
 
-                sizes[patchI] = readLabel(patchDict.lookup("nFaces"));
-                names[patchI] = patchEntries[patchI].keyword();
+                sizes[patchi] = readLabel(patchDict.lookup("nFaces"));
+                names[patchi] = patchEntries[patchi].keyword();
             }
 
 
@@ -358,9 +358,9 @@ void Foam::vtkPVFoam::updateInfoPatches
 
             HashTable<labelList, word> groups(patchEntries.size());
 
-            forAll(patchEntries, patchI)
+            forAll(patchEntries, patchi)
             {
-                const dictionary& patchDict = patchEntries[patchI].dict();
+                const dictionary& patchDict = patchEntries[patchi].dict();
 
                 wordList groupNames;
                 patchDict.readIfPresent("inGroups", groupNames);
@@ -373,11 +373,11 @@ void Foam::vtkPVFoam::updateInfoPatches
                     );
                     if (iter != groups.end())
                     {
-                        iter().append(patchI);
+                        iter().append(patchi);
                     }
                     else
                     {
-                        groups.insert(groupNames[groupI], labelList(1, patchI));
+                        groups.insert(groupNames[groupI], labelList(1, patchi));
                     }
                 }
             }
@@ -432,14 +432,14 @@ void Foam::vtkPVFoam::updateInfoPatches
 
             if (!reader_->GetShowGroupsOnly())
             {
-                forAll(names, patchI)
+                forAll(names, patchi)
                 {
                     // Valid patch if nFace > 0 - add patch to GUI list
-                    if (sizes[patchI])
+                    if (sizes[patchi])
                     {
                         arraySelection->AddArray
                         (
-                            (names[patchI] + " - patch").c_str()
+                            (names[patchi] + " - patch").c_str()
                         );
 
                         ++nPatches;
diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C
index 501fea6203bd25a590c2f7c593a8fe5282b5d16b..30526e17a5d038aa46f502092871c40d794afb2c 100644
--- a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C
+++ b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.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
@@ -243,9 +243,9 @@ Foam::channelIndex::channelIndex
 
     forAll(patchNames, i)
     {
-        const label patchI = patches.findPatchID(patchNames[i]);
+        const label patchi = patches.findPatchID(patchNames[i]);
 
-        if (patchI == -1)
+        if (patchi == -1)
         {
             FatalErrorInFunction
                 << "Illegal patch " << patchNames[i]
@@ -253,7 +253,7 @@ Foam::channelIndex::channelIndex
                 << exit(FatalError);
         }
 
-        nFaces += patches[patchI].size();
+        nFaces += patches[patchi].size();
     }
 
     labelList startFaces(nFaces);
diff --git a/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C b/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C
index 002501533948974bd3b1a1942ef31f85dd986c20..c6b26e6d3eab80f898c1b5b514496c67d1155d57 100644
--- a/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.C
+++ b/applications/utilities/postProcessing/miscellaneous/writeCellCentres/writeCellCentres.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,14 +114,19 @@ int main(int argc, char *argv[])
             dimensionedScalar("V", mesh.V().dimensions(), 0.0),
             calculatedFvPatchField<scalar>::typeName
         );
+
         V.dimensionedInternalField() = mesh.V();
-        forAll(V.boundaryField(), patchI)
+
+        volScalarField::GeometricBoundaryField& Vbf = V.boundaryFieldRef();
+
+        forAll(Vbf, patchi)
         {
-            V.boundaryField()[patchI] =
-                V.boundaryField()[patchI].patch().magSf();
+            Vbf[patchi] = Vbf[patchi].patch().magSf();
         }
+
         Info<< "Writing cellVolumes and patch faceAreas to " << V.name()
             << " in " << runTime.timeName() << endl;
+
         V.write();
 
     }
diff --git a/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C b/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C
index ace3dc3b9da211ae6a43d314e20b19ebee577269..0d79e42b8acf271d0ffa92ead9bccbaed1962f1f 100644
--- a/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C
+++ b/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C
@@ -39,7 +39,7 @@ void printAverage
     const fvMesh& mesh,
     const IOobject& fieldHeader,
     const scalar area,
-    const label patchI,
+    const label patchi,
     bool& done
 )
 {
@@ -57,15 +57,15 @@ void printAverage
         {
             sumField = gSum
             (
-                mesh.magSf().boundaryField()[patchI]
-              * field.boundaryField()[patchI]
+                mesh.magSf().boundaryField()[patchi]
+              * field.boundaryField()[patchi]
             ) / area;
         }
 
         Info<< "    Average of " << fieldHeader.headerClassName()
             << " over patch "
-            << mesh.boundary()[patchI].name()
-            << '[' << patchI << ']' << " = "
+            << mesh.boundary()[patchi].name()
+            << '[' << patchi << ']' << " = "
             << sumField << endl;
 
         done = true;
@@ -106,21 +106,21 @@ int main(int argc, char *argv[])
         {
             mesh.readUpdate();
 
-            const label patchI = mesh.boundaryMesh().findPatchID(patchName);
-            if (patchI < 0)
+            const label patchi = mesh.boundaryMesh().findPatchID(patchName);
+            if (patchi < 0)
             {
                 FatalError
                     << "Unable to find patch " << patchName << nl
                     << exit(FatalError);
             }
-            scalar area = gSum(mesh.magSf().boundaryField()[patchI]);
+            scalar area = gSum(mesh.magSf().boundaryField()[patchi]);
 
             bool done = false;
-            printAverage<volScalarField>(mesh, io, area, patchI, done);
-            printAverage<volVectorField>(mesh, io, area, patchI, done);
-            printAverage<volSphericalTensorField>(mesh, io, area, patchI, done);
-            printAverage<volSymmTensorField>(mesh, io, area, patchI, done);
-            printAverage<volTensorField>(mesh, io, area, patchI, done);
+            printAverage<volScalarField>(mesh, io, area, patchi, done);
+            printAverage<volVectorField>(mesh, io, area, patchi, done);
+            printAverage<volSphericalTensorField>(mesh, io, area, patchi, done);
+            printAverage<volSymmTensorField>(mesh, io, area, patchi, done);
+            printAverage<volTensorField>(mesh, io, area, patchi, done);
 
             if (!done)
             {
diff --git a/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C b/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C
index c0a96503c9b7aa901dfd09b9fa1853f3b20bf4cf..61cecad44156bc596f1a25619de044f0d09364e4 100644
--- a/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C
+++ b/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.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
@@ -38,7 +38,7 @@ void printIntegrate
 (
     const fvMesh& mesh,
     const IOobject& fieldHeader,
-    const label patchI,
+    const label patchi,
     bool& done
 )
 {
@@ -51,21 +51,21 @@ void printIntegrate
 
         Info<< "    Integral of " << fieldHeader.name()
             << " over vector area of patch "
-            << mesh.boundary()[patchI].name() << '[' << patchI << ']' << " = "
+            << mesh.boundary()[patchi].name() << '[' << patchi << ']' << " = "
             << gSum
                (
-                   mesh.Sf().boundaryField()[patchI]
-                  *field.boundaryField()[patchI]
+                   mesh.Sf().boundaryField()[patchi]
+                  *field.boundaryField()[patchi]
                )
             << nl;
 
         Info<< "    Integral of " << fieldHeader.name()
             << " over area magnitude of patch "
-            << mesh.boundary()[patchI].name() << '[' << patchI << ']' << " = "
+            << mesh.boundary()[patchi].name() << '[' << patchi << ']' << " = "
             << gSum
                (
-                   mesh.magSf().boundaryField()[patchI]
-                  *field.boundaryField()[patchI]
+                   mesh.magSf().boundaryField()[patchi]
+                  *field.boundaryField()[patchi]
                )
             << nl;
 
@@ -79,7 +79,7 @@ void printSum
 (
     const fvMesh& mesh,
     const IOobject& fieldHeader,
-    const label patchI,
+    const label patchi,
     bool& done
 )
 {
@@ -91,11 +91,11 @@ void printSum
         FieldType field(fieldHeader, mesh);
         typename FieldType::value_type sumField = gSum
         (
-            field.boundaryField()[patchI]
+            field.boundaryField()[patchi]
         );
 
         Info<< "    Integral of " << fieldHeader.name() << " over patch "
-            << mesh.boundary()[patchI].name() << '[' << patchI << ']' << " = "
+            << mesh.boundary()[patchi].name() << '[' << patchi << ']' << " = "
             << sumField << nl;
 
         done = true;
@@ -136,8 +136,8 @@ int main(int argc, char *argv[])
         {
             mesh.readUpdate();
 
-            const label patchI = mesh.boundaryMesh().findPatchID(patchName);
-            if (patchI < 0)
+            const label patchi = mesh.boundaryMesh().findPatchID(patchName);
+            if (patchi < 0)
             {
                 FatalError
                     << "Unable to find patch " << patchName << nl
@@ -146,11 +146,11 @@ int main(int argc, char *argv[])
 
             // Give patch area
             Info<< "    Area vector of patch "
-                << patchName << '[' << patchI << ']' << " = "
-                << gSum(mesh.Sf().boundaryField()[patchI]) << endl;
+                << patchName << '[' << patchi << ']' << " = "
+                << gSum(mesh.Sf().boundaryField()[patchi]) << endl;
             Info<< "    Area magnitude of patch "
-                << patchName << '[' << patchI << ']' << " = "
-                << gSum(mesh.magSf().boundaryField()[patchI]) << endl;
+                << patchName << '[' << patchi << ']' << " = "
+                << gSum(mesh.magSf().boundaryField()[patchi]) << endl;
 
             // Read field and calc integral
             bool done = false;
@@ -158,14 +158,14 @@ int main(int argc, char *argv[])
             (
                 mesh,
                 fieldHeader,
-                patchI,
+                patchi,
                 done
             );
             printIntegrate<volVectorField>
             (
                 mesh,
                 fieldHeader,
-                patchI,
+                patchi,
                 done
             );
 
@@ -174,21 +174,21 @@ int main(int argc, char *argv[])
             //(
             //    mesh,
             //    fieldHeader,
-            //    patchI,
+            //    patchi,
             //    done
             //);
             //printIntegrate<volSymmTensorField>
             //(
             //    mesh,
             //    fieldHeader,
-            //    patchI,
+            //    patchi,
             //    done
             //);
             //printIntegrate<volTensorField>
             //(
             //    mesh,
             //    fieldHeader,
-            //    patchI,
+            //    patchi,
             //    done
             //);
 
@@ -196,35 +196,35 @@ int main(int argc, char *argv[])
             (
                 mesh,
                 fieldHeader,
-                patchI,
+                patchi,
                 done
             );
             printSum<surfaceVectorField>
             (
                 mesh,
                 fieldHeader,
-                patchI,
+                patchi,
                 done
             );
             printSum<volSphericalTensorField>
             (
                 mesh,
                 fieldHeader,
-                patchI,
+                patchi,
                 done
             );
             printSum<volSymmTensorField>
             (
                 mesh,
                 fieldHeader,
-                patchI,
+                patchi,
                 done
             );
             printSum<volTensorField>
             (
                 mesh,
                 fieldHeader,
-                patchI,
+                patchi,
                 done
             );
 
diff --git a/applications/utilities/postProcessing/stressField/stressComponents/stressComponents.C b/applications/utilities/postProcessing/stressField/stressComponents/stressComponents.C
index 86ffee3d6ad428e93973aece1e758e6db8704a8b..df3d899288ab872474bfcd03a4d0df8bc84909b6 100644
--- a/applications/utilities/postProcessing/stressField/stressComponents/stressComponents.C
+++ b/applications/utilities/postProcessing/stressField/stressComponents/stressComponents.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
@@ -192,12 +192,15 @@ int main(int argc, char *argv[])
                 0.0*sigma.component(symmTensor::YZ)
             );
 
-            forAll(sigmaUn.boundaryField(), patchI)
+            volScalarField::GeometricBoundaryField& sigmaUnBf =
+                sigmaUn.boundaryFieldRef();
+
+            forAll(sigmaUn.boundaryField(), patchi)
             {
-                sigmaUn.boundaryField()[patchI] =
+                sigmaUnBf[patchi] =
                 (
-                    mesh.boundary()[patchI].nf()
-                  & sigma.boundaryField()[patchI]
+                    mesh.boundary()[patchi].nf()
+                  & sigma.boundaryField()[patchi]
                 )().component(vector::X);
             }
 
diff --git a/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C b/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C
index 620c4fdb78b096db701165e797af91951d357405..a704c2310a4256a132043086905017dc150f07c7 100644
--- a/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.C
+++ b/applications/utilities/postProcessing/velocityField/streamFunction/streamFunction.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,17 +147,17 @@ int main(int argc, char *argv[])
             {
                 found = false;
 
-                forAll(patches, patchI)
+                forAll(patches, patchi)
                 {
-                    const primitivePatch& bouFaces = patches[patchI];
+                    const primitivePatch& bouFaces = patches[patchi];
 
-                    if (!isType<emptyPolyPatch>(patches[patchI]))
+                    if (!isType<emptyPolyPatch>(patches[patchi]))
                     {
                         forAll(bouFaces, faceI)
                         {
                             if
                             (
-                                magSqr(phi.boundaryField()[patchI][faceI])
+                                magSqr(phi.boundaryField()[patchi][faceI])
                               < SMALL
                             )
                             {
@@ -177,7 +177,7 @@ int main(int argc, char *argv[])
 
                                 if (found)
                                 {
-                                    Info<< "Zero face: patch: " << patchI
+                                    Info<< "Zero face: patch: " << patchi
                                         << "    face: " << faceI << endl;
 
                                     forAll(zeroPoints, pointI)
@@ -471,7 +471,7 @@ int main(int argc, char *argv[])
 
             // Normalise the stream-function by the 2D mesh thickness
             streamFunction /= thickness;
-            streamFunction.boundaryField() = 0.0;
+            streamFunction.boundaryFieldRef() = 0.0;
             streamFunction.write();
         }
         else
diff --git a/applications/utilities/postProcessing/wall/wallGradU/wallGradU.C b/applications/utilities/postProcessing/wall/wallGradU/wallGradU.C
index 89fcc68dbc0c1f1c0bf8c05bf9a7f96f93905e66..f9d71dfe77ab93d1418832948d307db52ef8a7f6 100644
--- a/applications/utilities/postProcessing/wall/wallGradU/wallGradU.C
+++ b/applications/utilities/postProcessing/wall/wallGradU/wallGradU.C
@@ -88,16 +88,18 @@ int main(int argc, char *argv[])
                 )
             );
 
+            volVectorField::GeometricBoundaryField& wallGradUBf =
+                wallGradU.boundaryFieldRef();
+
             const fvPatchList& patches = mesh.boundary();
 
-            forAll(wallGradU.boundaryField(), patchi)
+            forAll(wallGradUBf, patchi)
             {
                 const fvPatch& currPatch = patches[patchi];
 
                 if (isA<wallFvPatch>(currPatch))
                 {
-                    wallGradU.boundaryField()[patchi] =
-                        -U.boundaryField()[patchi].snGrad();
+                    wallGradUBf[patchi] = -U.boundaryField()[patchi].snGrad();
                 }
             }
 
diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C
index d1c37e70cc48ad7dec9a9c61bb026e97cf8cca1f..9e6cc6c9d328b3d391090919fe41d4f1c62566a9 100644
--- a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C
+++ b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.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,9 +104,12 @@ int main(int argc, char *argv[])
             dimensionedScalar("wallHeatFlux", heatFlux.dimensions(), 0.0)
         );
 
-        forAll(wallHeatFlux.boundaryField(), patchi)
+        volScalarField::GeometricBoundaryField& wallHeatFluxBf =
+            wallHeatFlux.boundaryFieldRef();
+
+        forAll(wallHeatFluxBf, patchi)
         {
-            wallHeatFlux.boundaryField()[patchi] = patchHeatFlux[patchi];
+            wallHeatFluxBf[patchi] = patchHeatFlux[patchi];
         }
 
         wallHeatFlux.write();
@@ -132,9 +135,12 @@ int main(int argc, char *argv[])
                 )
             );
 
-            forAll(totalWallHeatFlux.boundaryField(), patchi)
+            volScalarField::GeometricBoundaryField& totalWallHeatFluxBf =
+                totalWallHeatFlux.boundaryFieldRef();
+
+            forAll(totalWallHeatFluxBf, patchi)
             {
-                totalWallHeatFlux.boundaryField()[patchi] =
+                totalWallHeatFluxBf[patchi] =
                     patchHeatFlux[patchi] - patchRadHeatFlux[patchi];
             }
 
diff --git a/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C b/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C
index 89c9e9e58ac67e45aeba1b14b4f393d5a44e9593..f7189d0dc22b26e84d77ddc9e3d97d881763aafa 100644
--- a/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C
+++ b/applications/utilities/postProcessing/wall/wallShearStress/wallShearStress.C
@@ -60,13 +60,16 @@ void calcIncompressible
 
     const volSymmTensorField Reff(model->devReff());
 
-    forAll(wallShearStress.boundaryField(), patchI)
+    volVectorField::GeometricBoundaryField& wallShearStressBf =
+        wallShearStress.boundaryFieldRef();
+
+    forAll(wallShearStressBf, patchi)
     {
-        wallShearStress.boundaryField()[patchI] =
+        wallShearStressBf[patchi] =
         (
-           -mesh.Sf().boundaryField()[patchI]
-           /mesh.magSf().boundaryField()[patchI]
-        ) & Reff.boundaryField()[patchI];
+           -mesh.Sf().boundaryField()[patchi]
+           /mesh.magSf().boundaryField()[patchi]
+        ) & Reff.boundaryField()[patchi];
     }
 }
 
@@ -109,13 +112,16 @@ void calcCompressible
 
     const volSymmTensorField Reff(model->devRhoReff());
 
-    forAll(wallShearStress.boundaryField(), patchI)
+    volVectorField::GeometricBoundaryField& wallShearStressBf =
+        wallShearStress.boundaryFieldRef();
+
+    forAll(wallShearStressBf, patchi)
     {
-        wallShearStress.boundaryField()[patchI] =
+        wallShearStressBf[patchi] =
         (
-           -mesh.Sf().boundaryField()[patchI]
-           /mesh.magSf().boundaryField()[patchI]
-        ) & Reff.boundaryField()[patchI];
+           -mesh.Sf().boundaryField()[patchi]
+           /mesh.magSf().boundaryField()[patchi]
+        ) & Reff.boundaryField()[patchi];
     }
 }
 
diff --git a/applications/utilities/postProcessing/wall/yPlus/yPlus.C b/applications/utilities/postProcessing/wall/yPlus/yPlus.C
index f2815ef8955b393418c8b9c4300a6db58947bc7e..6db72440b54d97c760bb90feff487550f3bf09dc 100644
--- a/applications/utilities/postProcessing/wall/yPlus/yPlus.C
+++ b/applications/utilities/postProcessing/wall/yPlus/yPlus.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,6 +68,9 @@ void calcYPlus
     const volScalarField::GeometricBoundaryField nuBf =
         turbulenceModel->nu()().boundaryField();
 
+    volScalarField::GeometricBoundaryField& yPlusBf =
+        yPlus.boundaryFieldRef();
+
     const fvPatchList& patches = mesh.boundary();
 
     forAll(patches, patchi)
@@ -82,7 +85,7 @@ void calcYPlus
                     nutBf[patchi]
                 );
 
-            yPlus.boundaryField()[patchi] = nutPf.yPlus();
+            yPlusBf[patchi] = nutPf.yPlus();
             const scalarField& Yp = yPlus.boundaryField()[patchi];
 
             Info<< "Patch " << patchi
@@ -93,7 +96,7 @@ void calcYPlus
         }
         else if (isA<wallFvPatch>(patch))
         {
-            yPlus.boundaryField()[patchi] =
+            yPlusBf[patchi] =
                 d[patchi]
                *sqrt
                 (
diff --git a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometryTemplates.C b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometryTemplates.C
index 3a62b622ef170f312f198dcb2bf130779a34b7d2..90cef63baf6fda6138c7302336b6358cab430600 100644
--- a/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometryTemplates.C
+++ b/applications/utilities/preProcessing/createExternalCoupledPatchGeometry/createExternalCoupledPatchGeometryTemplates.C
@@ -55,9 +55,9 @@ void processField
         const typename fieldType::GeometricBoundaryField& bf =
             vtf.boundaryField();
 
-        forAll(bf, patchI)
+        forAll(bf, patchi)
         {
-            if (isA<externalCoupledMixedFvPatchField<Type>>(bf[patchI]))
+            if (isA<externalCoupledMixedFvPatchField<Type>>(bf[patchi]))
             {
                 Info<< "Generating external coupled geometry for field "
                     << fieldName << endl;
@@ -65,7 +65,7 @@ void processField
                 const externalCoupledMixedFvPatchField<Type>& pf =
                     refCast<const externalCoupledMixedFvPatchField<Type>>
                     (
-                        bf[patchI]
+                        bf[patchi]
                     );
 
                 pf.writeGeometry();
diff --git a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C
index be2310aabe752f646405c83c73e8373d89b6ed42..29ecd0231ddc311c208e7a576963250c6d7d62c5 100644
--- a/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.C
+++ b/applications/utilities/preProcessing/faceAgglomerate/faceAgglomerate.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
@@ -84,11 +84,11 @@ int main(int argc, char *argv[])
 
     forAllConstIter(dictionary, agglomDict, iter)
     {
-        labelList patchIds = boundary.findIndices(iter().keyword());
-        forAll(patchIds, i)
+        labelList patchids = boundary.findIndices(iter().keyword());
+        forAll(patchids, i)
         {
-            label patchI =  patchIds[i];
-            const polyPatch& pp = boundary[patchI];
+            label patchi =  patchids[i];
+            const polyPatch& pp = boundary[patchi];
             if (!pp.coupled())
             {
                 Info << "\nAgglomerating patch : " << pp.name() << endl;
@@ -98,12 +98,12 @@ int main(int argc, char *argv[])
                     agglomDict.subDict(pp.name())
                 );
                 agglomObject.agglomerate();
-                finalAgglom[patchI] =
+                finalAgglom[patchi] =
                     agglomObject.restrictTopBottomAddressing();
 
-                if (finalAgglom[patchI].size())
+                if (finalAgglom[patchi].size())
                 {
-                    nCoarseFaces += max(finalAgglom[patchI] + 1);
+                    nCoarseFaces += max(finalAgglom[patchi] + 1);
                 }
             }
         }
@@ -111,40 +111,40 @@ int main(int argc, char *argv[])
 
 
     // - All patches which are not agglomarated are identity for finalAgglom
-    forAll(boundary, patchId)
+    forAll(boundary, patchid)
     {
-        if (finalAgglom[patchId].size() == 0)
+        if (finalAgglom[patchid].size() == 0)
         {
-            finalAgglom[patchId] = identity(boundary[patchId].size());
+            finalAgglom[patchid] = identity(boundary[patchid].size());
         }
     }
 
     // Sync agglomeration across coupled patches
     labelList nbrAgglom(mesh.nFaces() - mesh.nInternalFaces(), -1);
 
-    forAll(boundary, patchId)
+    forAll(boundary, patchid)
     {
-        const polyPatch& pp = boundary[patchId];
+        const polyPatch& pp = boundary[patchid];
         if (pp.coupled())
         {
-            finalAgglom[patchId] = identity(pp.size());
+            finalAgglom[patchid] = identity(pp.size());
             forAll(pp, i)
             {
                 nbrAgglom[pp.start() - mesh.nInternalFaces() + i] =
-                    finalAgglom[patchId][i];
+                    finalAgglom[patchid][i];
             }
         }
     }
 
     syncTools::swapBoundaryFaceList(mesh, nbrAgglom);
-    forAll(boundary, patchId)
+    forAll(boundary, patchid)
     {
-        const polyPatch& pp = boundary[patchId];
+        const polyPatch& pp = boundary[patchid];
         if (pp.coupled() && !refCast<const coupledPolyPatch>(pp).owner())
         {
             forAll(pp, i)
             {
-                finalAgglom[patchId][i] =
+                finalAgglom[patchid][i] =
                     nbrAgglom[pp.start() - mesh.nInternalFaces() + i];
             }
         }
@@ -169,14 +169,17 @@ int main(int argc, char *argv[])
             dimensionedScalar("facesAgglomeration", dimless, 0)
         );
 
+        volScalarField::GeometricBoundaryField& facesAgglomerationBf =
+            facesAgglomeration.boundaryFieldRef();
+
         label coarsePatchIndex = 0;
-        forAll(boundary, patchId)
+        forAll(boundary, patchid)
         {
-            const polyPatch& pp = boundary[patchId];
+            const polyPatch& pp = boundary[patchid];
             if (pp.size() > 0)
             {
                 fvPatchScalarField& bFacesAgglomeration =
-                    facesAgglomeration.boundaryField()[patchId];
+                    facesAgglomerationBf[patchid];
 
                 forAll(bFacesAgglomeration, j)
                 {
@@ -184,11 +187,11 @@ int main(int argc, char *argv[])
                         index.toGlobal
                         (
                             Pstream::myProcNo(),
-                            finalAgglom[patchId][j] + coarsePatchIndex
+                            finalAgglom[patchid][j] + coarsePatchIndex
                         );
                 }
 
-                coarsePatchIndex += max(finalAgglom[patchId]) + 1;
+                coarsePatchIndex += max(finalAgglom[patchid]) + 1;
             }
         }
 
diff --git a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C
index ea1559aac2a46c3fd1984702a9e28309f0d1952f..3427026e936735fa1ea6b089bbe0ede9266e374e 100644
--- a/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.C
+++ b/applications/utilities/preProcessing/foamUpgradeCyclics/foamUpgradeCyclics.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
@@ -87,15 +87,15 @@ void rewriteBoundary
 
     // Replace any 'cyclic'
     label nOldCyclics = 0;
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const dictionary& patchDict = patches[patchI].dict();
+        const dictionary& patchDict = patches[patchi].dict();
 
         if (word(patchDict["type"]) == cyclicPolyPatch::typeName)
         {
             if (!patchDict.found("neighbourPatch"))
             {
-                Info<< "Patch " << patches[patchI].keyword()
+                Info<< "Patch " << patches[patchi].keyword()
                     << " does not have 'neighbourPatch' entry; assuming it"
                     << " is of the old type." << endl;
                 nOldCyclics++;
@@ -120,21 +120,21 @@ void rewriteBoundary
     // Add new entries
     label addedPatchI = nOldPatches;
     label newPatchI = 0;
-    forAll(oldPatches, patchI)
+    forAll(oldPatches, patchi)
     {
-        const dictionary& patchDict = oldPatches[patchI].dict();
+        const dictionary& patchDict = oldPatches[patchi].dict();
 
         if
         (
             word(patchDict["type"]) == cyclicPolyPatch::typeName
         )
         {
-            const word& name = oldPatches[patchI].keyword();
+            const word& name = oldPatches[patchi].keyword();
 
             if (patchDict.found("neighbourPatch"))
             {
-                patches.set(patchI, oldPatches.set(patchI, NULL));
-                oldToNew[patchI] = newPatchI++;
+                patches.set(patchi, oldPatches.set(patchi, NULL));
+                oldToNew[patchi] = newPatchI++;
 
                 // Check if patches come from automatic conversion
                 word oldName;
@@ -178,15 +178,15 @@ void rewriteBoundary
                 nbrNames.insert(name, nbrName);
 
                 // Save current dictionary
-                const dictionary patchDict(patches[patchI].dict());
+                const dictionary patchDict(patches[patchi].dict());
 
                 // Change entry on this side
-                patches.set(patchI, oldPatches.set(patchI, NULL));
-                oldToNew[patchI] = newPatchI++;
-                dictionary& thisPatchDict = patches[patchI].dict();
+                patches.set(patchi, oldPatches.set(patchi, NULL));
+                oldToNew[patchi] = newPatchI++;
+                dictionary& thisPatchDict = patches[patchi].dict();
                 thisPatchDict.add("neighbourPatch", nbrName);
                 thisPatchDict.set("nFaces", nFaces/2);
-                patches[patchI].keyword() = thisName;
+                patches[patchi].keyword() = thisName;
 
                 // Add entry on other side
                 patches.set
@@ -207,7 +207,7 @@ void rewriteBoundary
                 patches[addedPatchI].keyword() = nbrName;
 
                 Info<< "Replaced with patches" << nl
-                    << patches[patchI].keyword() << " with" << nl
+                    << patches[patchi].keyword() << " with" << nl
                     << "    nFaces    : "
                     << readLabel(thisPatchDict.lookup("nFaces"))
                     << nl
@@ -226,8 +226,8 @@ void rewriteBoundary
         }
         else
         {
-            patches.set(patchI, oldPatches.set(patchI, NULL));
-            oldToNew[patchI] = newPatchI++;
+            patches.set(patchi, oldPatches.set(patchi, NULL));
+            oldToNew[patchi] = newPatchI++;
         }
     }
 
diff --git a/applications/utilities/preProcessing/mapFieldsPar/mapFieldsPar.C b/applications/utilities/preProcessing/mapFieldsPar/mapFieldsPar.C
index 1ef16c7d221b3b7b2de1d513525e51a6dc68c69b..ddadaffb4fd531fa81695d14a5a5ab4c1a31c390 100644
--- a/applications/utilities/preProcessing/mapFieldsPar/mapFieldsPar.C
+++ b/applications/utilities/preProcessing/mapFieldsPar/mapFieldsPar.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,11 +133,11 @@ wordList addProcessorPatches
 
     const polyBoundaryMesh& pbm = meshTarget.boundaryMesh();
 
-    forAll(pbm, patchI)
+    forAll(pbm, patchi)
     {
-        if (isA<processorPolyPatch>(pbm[patchI]))
+        if (isA<processorPolyPatch>(pbm[patchi]))
         {
-            const word& patchName = pbm[patchI].name();
+            const word& patchName = pbm[patchi].name();
             cuttingPatchTable.insert(patchName);
         }
     }
diff --git a/applications/utilities/preProcessing/setFields/setFields.C b/applications/utilities/preProcessing/setFields/setFields.C
index 9570756b4f88cbdaf20d29cafc02d759726bb1fd..019cd0e67f2be63f3a688acd476e8f71a51b934e 100644
--- a/applications/utilities/preProcessing/setFields/setFields.C
+++ b/applications/utilities/preProcessing/setFields/setFields.C
@@ -98,10 +98,12 @@ bool setCellFieldType
             }
         }
 
+        typename GeometricField<Type, fvPatchField, volMesh>::
+            GeometricBoundaryField& fieldBf = field.boundaryFieldRef();
+
         forAll(field.boundaryField(), patchi)
         {
-            field.boundaryField()[patchi] =
-                field.boundaryField()[patchi].patchInternalField();
+            fieldBf[patchi] = fieldBf[patchi].patchInternalField();
         }
 
         if (!field.write())
@@ -274,6 +276,9 @@ bool setFaceFieldType
         Pstream::listCombineGather(nChanged, plusEqOp<label>());
         Pstream::listCombineScatter(nChanged);
 
+        typename GeometricField<Type, fvPatchField, volMesh>::
+            GeometricBoundaryField& fieldBf = field.boundaryFieldRef();
+
         // Reassign.
         forAll(field.boundaryField(), patchi)
         {
@@ -282,11 +287,11 @@ bool setFaceFieldType
                 Info<< "    On patch "
                     << field.boundaryField()[patchi].patch().name()
                     << " set " << nChanged[patchi] << " values" << endl;
-                field.boundaryField()[patchi] == SubField<Type>
+                fieldBf[patchi] == SubField<Type>
                 (
                     allBoundaryValues,
-                    field.boundaryField()[patchi].size(),
-                    field.boundaryField()[patchi].patch().start()
+                    fieldBf[patchi].size(),
+                    fieldBf[patchi].patch().start()
                   - mesh.nInternalFaces()
                 );
             }
diff --git a/applications/utilities/preProcessing/viewFactorsGen/searchingEngine.H b/applications/utilities/preProcessing/viewFactorsGen/searchingEngine.H
index 8c94f372e245376133ee658e950e21b702f92a37..6c41655c1a255c9780efde63de999b89e7e25e2c 100644
--- a/applications/utilities/preProcessing/viewFactorsGen/searchingEngine.H
+++ b/applications/utilities/preProcessing/viewFactorsGen/searchingEngine.H
@@ -24,9 +24,9 @@ dict.add
 dict.add("mergeDistance", SMALL);
 
 labelHashSet includePatches;
-forAll(patches, patchI)
+forAll(patches, patchi)
 {
-    const polyPatch& pp = patches[patchI];
+    const polyPatch& pp = patches[patchi];
     if
     (
         !pp.coupled()
@@ -34,7 +34,7 @@ forAll(patches, patchI)
      && !isA<emptyPolyPatch>(pp)
     )
     {
-        includePatches.insert(patchI);
+        includePatches.insert(patchi);
     }
 }
 
diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
index 9d247dabd604dad2b141b3b20b157a6559201f9a..0f865afb401e63b7387e4a82b50c93f11759f6c3 100644
--- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
+++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C
@@ -80,8 +80,8 @@ triSurface 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;
@@ -107,8 +107,8 @@ triSurface triangulate
                 triSurfaceToAgglom[localTriFaceI++] = globalNumbering.toGlobal
                 (
                     Pstream::myProcNo(),
-                    finalAgglom[patchI][patchFaceI]
-                  + coarsePatches[patchI].start()
+                    finalAgglom[patchi][patchFaceI]
+                  + coarsePatches[patchi].start()
                 );
             }
         }
@@ -137,10 +137,10 @@ triSurface 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].index() = patchI;
+        surface.patches()[newPatchI].index() = patchi;
         surface.patches()[newPatchI].name() = patch.name();
         surface.patches()[newPatchI].geometricType() = patch.type();
 
@@ -341,16 +341,16 @@ int main(int argc, char *argv[])
     const volScalarField::GeometricBoundaryField& Qrb = Qr.boundaryField();
 
     label count = 0;
-    forAll(Qrb, patchI)
+    forAll(Qrb, patchi)
     {
-        const polyPatch& pp = patches[patchI];
-        const fvPatchScalarField& QrpI = Qrb[patchI];
+        const polyPatch& pp = patches[patchi];
+        const fvPatchScalarField& QrpI = Qrb[patchi];
 
         if ((isA<fixedValueFvPatchScalarField>(QrpI)) && (pp.size() > 0))
         {
             viewFactorsPatches[count] = QrpI.patch().index();
-            nCoarseFaces += coarsePatches[patchI].size();
-            nFineFaces += patches[patchI].size();
+            nCoarseFaces += coarsePatches[patchi].size();
+            nFineFaces += patches[patchi].size();
             count ++;
         }
     }
@@ -803,12 +803,12 @@ int main(int argc, char *argv[])
     {
         forAll(viewFactorsPatches, i)
         {
-            label patchI =  viewFactorsPatches[i];
+            label patchi =  viewFactorsPatches[i];
             forAll(viewFactorsPatches, i)
             {
                 label patchJ =  viewFactorsPatches[i];
-                Info << "F" << patchI << patchJ << ": "
-                     << sumViewFactorPatch[patchI][patchJ]/patchArea[patchI]
+                Info << "F" << patchi << patchJ << ": "
+                     << sumViewFactorPatch[patchi][patchJ]/patchArea[patchi]
                      << endl;
             }
         }
@@ -831,6 +831,9 @@ int main(int argc, char *argv[])
             dimensionedScalar("viewFactorField", dimless, 0)
         );
 
+        volScalarField::GeometricBoundaryField& viewFactorFieldBf =
+            viewFactorField.boundaryFieldRef();
+
         label compactI = 0;
         forAll(viewFactorsPatches, i)
         {
@@ -849,7 +852,7 @@ int main(int argc, char *argv[])
                 forAll(fineFaces, fineId)
                 {
                     const label faceID = fineFaces[fineId];
-                    viewFactorField.boundaryField()[patchID][faceID] = Fij;
+                    viewFactorFieldBf[patchID][faceID] = Fij;
                 }
                 compactI++;
             }
diff --git a/applications/utilities/surface/surfaceAdd/surfaceAdd.C b/applications/utilities/surface/surfaceAdd/surfaceAdd.C
index 9ac5bbbb94b0603573afa9c3d98b99f23d3e4645..3fde3717550433810b507148a16b57724d2f6131 100644
--- a/applications/utilities/surface/surfaceAdd/surfaceAdd.C
+++ b/applications/utilities/surface/surfaceAdd/surfaceAdd.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
@@ -220,13 +220,13 @@ int main(int argc, char *argv[])
             // Overwrite
             newPatches.setSize(max(nRegions1, nRegions2));
 
-            forAll(surface1.patches(), patchI)
+            forAll(surface1.patches(), patchi)
             {
-                newPatches[patchI] = surface1.patches()[patchI];
+                newPatches[patchi] = surface1.patches()[patchi];
             }
-            forAll(surface2.patches(), patchI)
+            forAll(surface2.patches(), patchi)
             {
-                newPatches[patchI] = surface2.patches()[patchI];
+                newPatches[patchi] = surface2.patches()[patchi];
             }
         }
         else
@@ -246,22 +246,22 @@ int main(int argc, char *argv[])
 
             label newPatchI = 0;
 
-            forAll(surface1.patches(), patchI)
+            forAll(surface1.patches(), patchi)
             {
-                newPatches[newPatchI++] = surface1.patches()[patchI];
+                newPatches[newPatchI++] = surface1.patches()[patchi];
             }
 
-            forAll(surface2.patches(), patchI)
+            forAll(surface2.patches(), patchi)
             {
-                newPatches[newPatchI++] = surface2.patches()[patchI];
+                newPatches[newPatchI++] = surface2.patches()[patchi];
             }
         }
 
 
         Info<< "New patches:" << nl;
-        forAll(newPatches, patchI)
+        forAll(newPatches, patchi)
         {
-            Info<< "    " << patchI << '\t' << newPatches[patchI].name() << nl;
+            Info<< "    " << patchi << '\t' << newPatches[patchi].name() << nl;
         }
         Info<< endl;
 
diff --git a/applications/utilities/surface/surfaceAutoPatch/surfaceAutoPatch.C b/applications/utilities/surface/surfaceAutoPatch/surfaceAutoPatch.C
index f53ec829635b309221fda439443aa83e1bd820eb..9280fb99a8b4458a0f99385f005bbd635314494f 100644
--- a/applications/utilities/surface/surfaceAutoPatch/surfaceAutoPatch.C
+++ b/applications/utilities/surface/surfaceAutoPatch/surfaceAutoPatch.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
@@ -106,10 +106,10 @@ int main(int argc, char *argv[])
     // Create some patches
     surf.patches().setSize(nRegions);
 
-    forAll(surf.patches(), patchI)
+    forAll(surf.patches(), patchi)
     {
-        surf.patches()[patchI].name() = "patch" + Foam::name(patchI);
-        surf.patches()[patchI].geometricType() = "empty";
+        surf.patches()[patchi].name() = "patch" + Foam::name(patchi);
+        surf.patches()[patchi].geometricType() = "empty";
     }
 
 
diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C
index fa3ab851ef361ad22b382cc02800de38e804d6d4..75cef9a83df3bc6bbe0c05d5ec0e6d938bfb2a67 100644
--- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C
+++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.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
@@ -268,10 +268,10 @@ int main(int argc, char *argv[])
 
         Info<< "Region\tSize" << nl
             << "------\t----" << nl;
-        forAll(surf.patches(), patchI)
+        forAll(surf.patches(), patchi)
         {
-            Info<< surf.patches()[patchI].name() << '\t'
-                << regionSize[patchI] << nl;
+            Info<< surf.patches()[patchi].name() << '\t'
+                << regionSize[patchi] << nl;
         }
         Info<< nl << endl;
     }
diff --git a/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C b/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C
index 580411eda6420d520de57f97db93b08434588732..2e6d1141e306c28b11484e452432c2394bc5379a 100644
--- a/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C
+++ b/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.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
@@ -129,13 +129,13 @@ int main(int argc, char *argv[])
     }
     else
     {
-        forAll(bMesh, patchI)
+        forAll(bMesh, patchi)
         {
-            const polyPatch& patch = bMesh[patchI];
+            const polyPatch& patch = bMesh[patchi];
 
             if (includeProcPatches || !isA<processorPolyPatch>(patch))
             {
-                includePatches.insert(patchI);
+                includePatches.insert(patchi);
             }
         }
     }
@@ -230,10 +230,10 @@ int main(int argc, char *argv[])
         labelList faceZoneToCompactZone(bMesh.size(), -1);
         forAllConstIter(HashTable<label>, compactZoneID, iter)
         {
-            label patchI = bMesh.findPatchID(iter.key());
-            if (patchI != -1)
+            label patchi = bMesh.findPatchID(iter.key());
+            if (patchi != -1)
             {
-                patchToCompactZone[patchI] = iter();
+                patchToCompactZone[patchi] = iter();
             }
             else
             {
diff --git a/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C b/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C
index 2825822607c2620f0d7a4f54b544fca540b599e2..dc133d613d6f0ed43ed04effeaf4ee1e1434c204 100644
--- a/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C
+++ b/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.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
@@ -63,15 +63,15 @@ int main(int argc, char *argv[])
 
     const geometricSurfacePatchList& patches = surf.patches();
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const geometricSurfacePatch& pp = patches[patchI];
+        const geometricSurfacePatch& pp = patches[patchi];
 
         word patchName = pp.name();
 
         if (patchName.empty())
         {
-            patchName = "patch" + Foam::name(patchI);
+            patchName = "patch" + Foam::name(patchi);
         }
 
         fileName outFile(surfBase + '_' + patchName + '.' + extension);
@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
         {
             const labelledTri& f = surf[faceI];
 
-            if (f.region() == patchI)
+            if (f.region() == patchi)
             {
                 includeMap[faceI] = true;
             }
diff --git a/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C b/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C
index bbcf96b96e3a57aca7b44364a4252a404e11a68b..b499bf05f5cdc0f20417e2a8458dbda3c2c44479 100644
--- a/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C
+++ b/applications/utilities/surface/surfaceToPatch/surfaceToPatch.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
@@ -46,41 +46,41 @@ using namespace Foam;
 // Adds empty patch if not yet there. Returns patchID.
 label addPatch(polyMesh& mesh, const word& patchName)
 {
-    label patchI = mesh.boundaryMesh().findPatchID(patchName);
+    label patchi = mesh.boundaryMesh().findPatchID(patchName);
 
-    if (patchI == -1)
+    if (patchi == -1)
     {
         const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
         List<polyPatch*> newPatches(patches.size() + 1);
 
-        patchI = 0;
+        patchi = 0;
 
         // Copy all old patches
         forAll(patches, i)
         {
             const polyPatch& pp = patches[i];
 
-            newPatches[patchI] =
+            newPatches[patchi] =
                 pp.clone
                 (
                     patches,
-                    patchI,
+                    patchi,
                     pp.size(),
                     pp.start()
                 ).ptr();
 
-            patchI++;
+            patchi++;
         }
 
         // Add zero-sized patch
-        newPatches[patchI] =
+        newPatches[patchi] =
             new polyPatch
             (
                 patchName,
                 0,
                 mesh.nFaces(),
-                patchI,
+                patchi,
                 patches,
                 polyPatch::typeName
             );
@@ -88,14 +88,14 @@ label addPatch(polyMesh& mesh, const word& patchName)
         mesh.removeBoundary();
         mesh.addPatches(newPatches);
 
-        Pout<< "Created patch " << patchName << " at " << patchI << endl;
+        Pout<< "Created patch " << patchName << " at " << patchi << endl;
     }
     else
     {
-        Pout<< "Reusing patch " << patchName << " at " << patchI << endl;
+        Pout<< "Reusing patch " << patchName << " at " << patchi << endl;
     }
 
-    return patchI;
+    return patchi;
 }
 
 
@@ -222,10 +222,10 @@ int main(int argc, char *argv[])
     Info<< "Before patching:" << nl
         << "    patch\tsize" << endl;
 
-    forAll(mesh.boundaryMesh(), patchI)
+    forAll(mesh.boundaryMesh(), patchi)
     {
-        Info<< "    " << mesh.boundaryMesh()[patchI].name() << '\t'
-            << mesh.boundaryMesh()[patchI].size() << nl;
+        Info<< "    " << mesh.boundaryMesh()[patchi].name() << '\t'
+            << mesh.boundaryMesh()[patchi].size() << nl;
     }
     Info<< endl;
 
@@ -313,10 +313,10 @@ int main(int argc, char *argv[])
         Info<< "After patching:" << nl
             << "    patch\tsize" << endl;
 
-        forAll(mesh.boundaryMesh(), patchI)
+        forAll(mesh.boundaryMesh(), patchi)
         {
-            Info<< "    " << mesh.boundaryMesh()[patchI].name() << '\t'
-                << mesh.boundaryMesh()[patchI].size() << endl;
+            Info<< "    " << mesh.boundaryMesh()[patchi].name() << '\t'
+                << mesh.boundaryMesh()[patchi].size() << endl;
         }
         Info<< endl;
 
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C
index 70c7403e2f96e2d6b831be872c1d3a051f3e50b5..139940c731583a494eabc965e51fec01a7db33dc 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LamBremhorstKE/LamBremhorstKE.C
@@ -219,7 +219,7 @@ void LamBremhorstKE::correct()
     tgradU.clear();
 
     // Update epsilon and G at the wall
-    epsilon_.boundaryField().updateCoeffs();
+    epsilon_.boundaryFieldRef().updateCoeffs();
 
     const volScalarField Rt(this->Rt());
     const volScalarField fMu(this->fMu(Rt));
@@ -236,7 +236,7 @@ void LamBremhorstKE::correct()
     );
 
     epsEqn.ref().relax();
-    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
     solve(epsEqn);
     bound(epsilon_, epsilonMin_);
 
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C
index 3a4bc9c2621666ee3730ce84eed1c422238c2302..9adfc03f8e7308b074134715840da401bd3176af 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienCubicKE/LienCubicKE.C
@@ -388,7 +388,7 @@ void LienCubicKE::correct()
 
 
     // Update epsilon and G at the wall
-    epsilon_.boundaryField().updateCoeffs();
+    epsilon_.boundaryFieldRef().updateCoeffs();
 
     const volScalarField f2(this->f2());
 
@@ -405,7 +405,7 @@ void LienCubicKE::correct()
     );
 
     epsEqn.ref().relax();
-    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
     solve(epsEqn);
     bound(epsilon_, epsilonMin_);
 
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C
index e91c6235647225dd9f6fa23ac49def98312396a5..682bbee971d408b2413545dbb4daa349b228708f 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/LienLeschziner/LienLeschziner.C
@@ -272,7 +272,7 @@ void LienLeschziner::correct()
     tgradU.clear();
 
     // Update epsilon and G at the wall
-    epsilon_.boundaryField().updateCoeffs();
+    epsilon_.boundaryFieldRef().updateCoeffs();
 
     const volScalarField f2(this->f2());
 
@@ -289,7 +289,7 @@ void LienLeschziner::correct()
     );
 
     epsEqn.ref().relax();
-    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
     solve(epsEqn);
     bound(epsilon_, epsilonMin_);
 
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C
index 145c863931f05ed659dc4c6c3b8c1231d26cb4fb..8c26c970a15a800d59d304659b66bca11e7ef4dd 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/ShihQuadraticKE/ShihQuadraticKE.C
@@ -273,7 +273,7 @@ void ShihQuadraticKE::correct()
 
 
     // Update epsilon and G at the wall
-    epsilon_.boundaryField().updateCoeffs();
+    epsilon_.boundaryFieldRef().updateCoeffs();
 
     // Dissipation equation
     tmp<fvScalarMatrix> epsEqn
@@ -287,7 +287,7 @@ void ShihQuadraticKE::correct()
     );
 
     epsEqn.ref().relax();
-    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
     solve(epsEqn);
     bound(epsilon_, epsilonMin_);
 
diff --git a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C
index 6b30ee9d0da76d798cb0ad1b96774c54814ce26e..ea1e8eb79b1c149c6ccbb290ecdbfb0e4df87932 100644
--- a/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C
+++ b/src/TurbulenceModels/incompressible/turbulentTransportModels/RAS/kkLOmega/kkLOmega.C
@@ -677,7 +677,7 @@ void kkLOmega::correct()
     );
 
 
-    omega_.boundaryField().updateCoeffs();
+    omega_.boundaryFieldRef().updateCoeffs();
 
     // Turbulence specific dissipation rate equation
     tmp<fvScalarMatrix> omegaEqn
@@ -699,7 +699,7 @@ void kkLOmega::correct()
     );
 
     omegaEqn.ref().relax();
-    omegaEqn.ref().boundaryManipulate(omega_.boundaryField());
+    omegaEqn.ref().boundaryManipulate(omega_.boundaryFieldRef());
 
     solve(omegaEqn);
     bound(omega_, omegaMin_);
@@ -719,7 +719,7 @@ void kkLOmega::correct()
     );
 
     klEqn.ref().relax();
-    klEqn.ref().boundaryManipulate(kl_.boundaryField());
+    klEqn.ref().boundaryManipulate(kl_.boundaryFieldRef());
 
     solve(klEqn);
     bound(kl_, kMin_);
@@ -740,7 +740,7 @@ void kkLOmega::correct()
     );
 
     ktEqn.ref().relax();
-    ktEqn.ref().boundaryManipulate(kt_.boundaryField());
+    ktEqn.ref().boundaryManipulate(kt_.boundaryFieldRef());
 
     solve(ktEqn);
     bound(kt_, kMin_);
diff --git a/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C
index 789a1688da180f0fc21d3329d8c1233ecd11a2d6..32f44822474dd81f308d578f1356a67319c8da08 100644
--- a/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C
+++ b/src/TurbulenceModels/phaseCompressible/RAS/mixtureKEpsilon/mixtureKEpsilon.C
@@ -612,8 +612,8 @@ void mixtureKEpsilon<BasicTurbulenceModel>::correct()
         tgradUl.clear();
 
         // Update k, epsilon and G at the wall
-        kl.boundaryField().updateCoeffs();
-        epsilonl.boundaryField().updateCoeffs();
+        kl.boundaryFieldRef().updateCoeffs();
+        epsilonl.boundaryFieldRef().updateCoeffs();
 
         Gc.ref().checkOut();
     }
@@ -632,8 +632,8 @@ void mixtureKEpsilon<BasicTurbulenceModel>::correct()
         tgradUg.clear();
 
         // Update k, epsilon and G at the wall
-        kg.boundaryField().updateCoeffs();
-        epsilong.boundaryField().updateCoeffs();
+        kg.boundaryFieldRef().updateCoeffs();
+        epsilong.boundaryFieldRef().updateCoeffs();
 
         Gd.ref().checkOut();
     }
@@ -667,7 +667,7 @@ void mixtureKEpsilon<BasicTurbulenceModel>::correct()
 
     epsEqn.ref().relax();
     fvOptions.constrain(epsEqn.ref());
-    epsEqn.ref().boundaryManipulate(epsilonm.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilonm.boundaryFieldRef());
     solve(epsEqn);
     fvOptions.correct(epsilonm);
     bound(epsilonm, this->epsilonMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.C b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.C
index b0338981ee638e0497792ac6ea2ce4188bc6684b..02accb9a734059a77bdb3d6b50aa8d00f230c4b9 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/LESdeltas/vanDriestDelta/vanDriestDelta.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,6 +64,8 @@ void Foam::LESModels::vanDriestDelta::calcDelta()
     );
 
     const fvPatchList& patches = mesh.boundary();
+    volScalarField::GeometricBoundaryField& ystarBf = ystar.boundaryFieldRef();
+
     forAll(patches, patchi)
     {
         if (isA<wallFvPatch>(patches[patchi]))
@@ -72,7 +74,7 @@ void Foam::LESModels::vanDriestDelta::calcDelta()
             const scalarField& nuw = nu.boundaryField()[patchi];
             const scalarField& nuSgsw = nuSgs().boundaryField()[patchi];
 
-            ystar.boundaryField()[patchi] =
+            ystarBf[patchi] =
                 nuw/sqrt((nuw + nuSgsw)*mag(Uw.snGrad()) + VSMALL);
         }
     }
diff --git a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C
index c48c901ba3614dc1bb5863473c42e191ba28f8fc..910bd390b9d6223250dab227e602d761876c2e2b 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDDES/SpalartAllmarasDDES.C
@@ -56,7 +56,7 @@ tmp<volScalarField> SpalartAllmarasDDES<BasicTurbulenceModel>::rd
             scalar(10)
         )
     );
-    tr.ref().boundaryField() == 0.0;
+    tr.ref().boundaryFieldRef() == 0.0;
 
     return tr;
 }
diff --git a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C
index 401e26d963ebb176226e1d6a19e6c90cbc6f8db4..54db6c6d78e2a7e23c219249b3b2ed44d35e8617 100644
--- a/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C
+++ b/src/TurbulenceModels/turbulenceModels/LES/SpalartAllmarasDES/SpalartAllmarasDES.C
@@ -129,7 +129,7 @@ tmp<volScalarField> SpalartAllmarasDES<BasicTurbulenceModel>::r
             scalar(10)
         )
     );
-    tr.ref().boundaryField() == 0.0;
+    tr.ref().boundaryFieldRef() == 0.0;
 
     return tr;
 }
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C
index c15fabab3df6201a0d8927fe7415941c8e1d9b8e..fc9ae3734e6bdb41f7f7afc7284235fa9c54f38f 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/LRR/LRR.C
@@ -293,7 +293,7 @@ void LRR<BasicTurbulenceModel>::correct()
     volScalarField G(this->GName(), 0.5*mag(tr(P)));
 
     // Update epsilon and G at the wall
-    epsilon_.boundaryField().updateCoeffs();
+    epsilon_.boundaryFieldRef().updateCoeffs();
 
     // Dissipation equation
     tmp<fvScalarMatrix> epsEqn
@@ -309,7 +309,7 @@ void LRR<BasicTurbulenceModel>::correct()
 
     epsEqn.ref().relax();
     fvOptions.constrain(epsEqn.ref());
-    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
     solve(epsEqn);
     fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C
index ce79ca5011e356e8121836aa098f8fd6987b51e5..d5093fd157008bf652ff1f7604e9986fb077b9a7 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/LaunderSharmaKE/LaunderSharmaKE.C
@@ -282,7 +282,7 @@ void LaunderSharmaKE<BasicTurbulenceModel>::correct()
 
     epsEqn.ref().relax();
     fvOptions.constrain(epsEqn.ref());
-    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
     solve(epsEqn);
     fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C b/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C
index 17e8f14f98399e5f9c852b986947ed767d7a601a..fbe18212c1d68bec61ada22d62139eb630ceaeff 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/RNGkEpsilon/RNGkEpsilon.C
@@ -272,7 +272,7 @@ void RNGkEpsilon<BasicTurbulenceModel>::correct()
     );
 
     // Update epsilon and G at the wall
-    epsilon_.boundaryField().updateCoeffs();
+    epsilon_.boundaryFieldRef().updateCoeffs();
 
     // Dissipation equation
     tmp<fvScalarMatrix> epsEqn
@@ -290,7 +290,7 @@ void RNGkEpsilon<BasicTurbulenceModel>::correct()
 
     epsEqn.ref().relax();
     fvOptions.constrain(epsEqn.ref());
-    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
     solve(epsEqn);
     fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C b/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C
index 7117f166234b0a53985b08d5eaa0cea8e130131d..ffde2cf1dc40e17c6080812d2e742f1572b7f2ac 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/SSG/SSG.C
@@ -303,7 +303,7 @@ void SSG<BasicTurbulenceModel>::correct()
     volScalarField G(this->GName(), 0.5*mag(tr(P)));
 
     // Update epsilon and G at the wall
-    epsilon_.boundaryField().updateCoeffs();
+    epsilon_.boundaryFieldRef().updateCoeffs();
 
     // Dissipation equation
     tmp<fvScalarMatrix> epsEqn
@@ -319,7 +319,7 @@ void SSG<BasicTurbulenceModel>::correct()
 
     epsEqn.ref().relax();
     fvOptions.constrain(epsEqn.ref());
-    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
     solve(epsEqn);
     fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C
index 22e052972905f382921df4032287a3fc15f0c29b..f30138bc4c01bcea13a3e8c12a3d1e9374dc9cc6 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/SpalartAllmaras/SpalartAllmaras.C
@@ -109,7 +109,7 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::fw
             scalar(10.0)
         )
     );
-    r.boundaryField() == 0.0;
+    r.boundaryFieldRef() == 0.0;
 
     const volScalarField g(r + Cw2_*(pow6(r) - r));
 
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C
index 8733871d7a3c77d0116c6bfeade3363abf3e6ef9..f0cf0a0b2cd4b43e28642bec51d1208899965415 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/kEpsilon/kEpsilon.C
@@ -242,7 +242,7 @@ void kEpsilon<BasicTurbulenceModel>::correct()
     tgradU.clear();
 
     // Update epsilon and G at the wall
-    epsilon_.boundaryField().updateCoeffs();
+    epsilon_.boundaryFieldRef().updateCoeffs();
 
     // Dissipation equation
     tmp<fvScalarMatrix> epsEqn
@@ -260,7 +260,7 @@ void kEpsilon<BasicTurbulenceModel>::correct()
 
     epsEqn.ref().relax();
     fvOptions.constrain(epsEqn.ref());
-    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
     solve(epsEqn);
     fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C
index 9084c5720854c907cadd5f4300f429235a7e90b6..8c720c42d6f976d4007a0ac9e530543c7372d845 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmega/kOmega.C
@@ -206,7 +206,7 @@ void kOmega<BasicTurbulenceModel>::correct()
     tgradU.clear();
 
     // Update omega and G at the wall
-    omega_.boundaryField().updateCoeffs();
+    omega_.boundaryFieldRef().updateCoeffs();
 
     // Turbulence specific dissipation rate equation
     tmp<fvScalarMatrix> omegaEqn
@@ -223,7 +223,7 @@ void kOmega<BasicTurbulenceModel>::correct()
 
     omegaEqn.ref().relax();
     fvOptions.constrain(omegaEqn.ref());
-    omegaEqn.ref().boundaryManipulate(omega_.boundaryField());
+    omegaEqn.ref().boundaryManipulate(omega_.boundaryFieldRef());
     solve(omegaEqn);
     fvOptions.correct(omega_);
     bound(omega_, this->omegaMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.C
index 1deb432d4acf1b034e7e4711d9ee8557cde28f6e..85f73846551d237bb5ec5a7c3dcf2c1b74174aba 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSST.C
@@ -414,7 +414,7 @@ void kOmegaSST<BasicTurbulenceModel>::correct()
     tgradU.clear();
 
     // Update omega and G at the wall
-    omega_.boundaryField().updateCoeffs();
+    omega_.boundaryFieldRef().updateCoeffs();
 
     volScalarField CDkOmega
     (
@@ -454,7 +454,7 @@ void kOmegaSST<BasicTurbulenceModel>::correct()
 
         omegaEqn.ref().relax();
         fvOptions.constrain(omegaEqn.ref());
-        omegaEqn.ref().boundaryManipulate(omega_.boundaryField());
+        omegaEqn.ref().boundaryManipulate(omega_.boundaryFieldRef());
         solve(omegaEqn);
         fvOptions.correct(omega_);
         bound(omega_, this->omegaMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C
index aa74f0e57b2844d422bb0f2eb6abc76de042e1ed..dccfea315a047afa470bc0a775f77419aab08e4e 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/realizableKE.C
@@ -285,7 +285,7 @@ void realizableKE<BasicTurbulenceModel>::correct()
     volScalarField G(this->GName(), nut*(tgradU() && dev(twoSymm(tgradU()))));
 
     // Update epsilon and G at the wall
-    epsilon_.boundaryField().updateCoeffs();
+    epsilon_.boundaryFieldRef().updateCoeffs();
 
     // Dissipation equation
     tmp<fvScalarMatrix> epsEqn
@@ -306,7 +306,7 @@ void realizableKE<BasicTurbulenceModel>::correct()
 
     epsEqn.ref().relax();
     fvOptions.constrain(epsEqn.ref());
-    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
     solve(epsEqn);
     fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C
index 3bbe58c3606e61ef70196f4630568f331ce72360..98f1fe8a1d49c562d53cfa7faf563219b33affb8 100644
--- a/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C
+++ b/src/TurbulenceModels/turbulenceModels/RAS/v2f/v2f.C
@@ -314,7 +314,7 @@ void v2f<BasicTurbulenceModel>::correct()
     );
 
     // Update epsilon (and possibly G) at the wall
-    epsilon_.boundaryField().updateCoeffs();
+    epsilon_.boundaryFieldRef().updateCoeffs();
 
     // Dissipation equation
     tmp<fvScalarMatrix> epsEqn
@@ -331,7 +331,7 @@ void v2f<BasicTurbulenceModel>::correct()
 
     epsEqn.ref().relax();
     fvOptions.constrain(epsEqn.ref());
-    epsEqn.ref().boundaryManipulate(epsilon_.boundaryField());
+    epsEqn.ref().boundaryManipulate(epsilon_.boundaryFieldRef());
     solve(epsEqn);
     fvOptions.correct(epsilon_);
     bound(epsilon_, this->epsilonMin_);
diff --git a/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C b/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C
index e32c7369fb44de64061b6d9b2cea6c6f9f43468c..64ca4791a96d5103b3d00f3e28262761757318c9 100644
--- a/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C
+++ b/src/TurbulenceModels/turbulenceModels/ReynoldsStress/ReynoldsStress.C
@@ -63,13 +63,15 @@ void Foam::ReynoldsStress<BasicTurbulenceModel>::correctWallShearStress
 {
     const fvPatchList& patches = this->mesh_.boundary();
 
+    volSymmTensorField::GeometricBoundaryField& RBf = R.boundaryFieldRef();
+
     forAll(patches, patchi)
     {
         const fvPatch& curPatch = patches[patchi];
 
         if (isA<wallFvPatch>(curPatch))
         {
-            symmTensorField& Rw = R.boundaryField()[patchi];
+            symmTensorField& Rw = RBf[patchi];
 
             const scalarField& nutw = this->nut_.boundaryField()[patchi];
 
diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C
index 171e47ecd4409fcac99ce989e0a6677f941ec7fd..4047bd95291e6010e0667a613163cc4fe6d3904a 100644
--- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C
+++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMeshInterpolate.C
@@ -84,7 +84,7 @@ tmp<GeometricField<Type, fvPatchField, volMesh>> singleCellFvMesh::interpolate
     //  constructor (with reference to the now correct internal field)
 
     typename GeometricField<Type, fvPatchField, volMesh>::
-        GeometricBoundaryField& bf = resF.boundaryField();
+        GeometricBoundaryField& bf = resF.boundaryFieldRef();
 
     if (agglomerate())
     {
diff --git a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.C b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.C
index 4c105b1025a120d56340bd7bc9d8d7c455ec3f9d..8c749a048957174574a41810922488b67a8a3506 100644
--- a/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.C
+++ b/src/finiteVolume/fvMesh/wallDist/patchDistMethods/meshWave/wallDistData/wallDistData.C
@@ -82,9 +82,12 @@ void Foam::wallDistData<TransferType>::correct()
     // Collect pointers to data on patches
     UPtrList<Field<Type>> patchData(mesh.boundaryMesh().size());
 
-    forAll(field_.boundaryField(), patchI)
+    typename GeometricField<Type, fvPatchField, volMesh>::
+        GeometricBoundaryField& fieldBf = field_.boundaryFieldRef();
+
+    forAll(fieldBf, patchi)
     {
-        patchData.set(patchI, &field_.boundaryField()[patchI]);
+        patchData.set(patchi, &fieldBf[patchi]);
     }
 
     // Do mesh wave
@@ -101,18 +104,19 @@ void Foam::wallDistData<TransferType>::correct()
 
     field_.transfer(wave.cellData());
 
+    typename GeometricField<Type, fvPatchField, volMesh>::
+        GeometricBoundaryField& bf = boundaryFieldRef();
+
     // Transfer values on patches into boundaryField of *this and field_
-    forAll(boundaryField(), patchI)
+    forAll(bf, patchi)
     {
-        scalarField& waveFld = wave.patchDistance()[patchI];
+        scalarField& waveFld = wave.patchDistance()[patchi];
 
-        if (!isA<emptyFvPatchScalarField>(boundaryField()[patchI]))
+        if (!isA<emptyFvPatchScalarField>(boundaryField()[patchi]))
         {
-            boundaryField()[patchI].transfer(waveFld);
-
-            Field<Type>& wavePatchData = wave.patchData()[patchI];
-
-            field_.boundaryField()[patchI].transfer(wavePatchData);
+            bf[patchi].transfer(waveFld);
+            Field<Type>& wavePatchData = wave.patchData()[patchi];
+            fieldBf[patchi].transfer(wavePatchData);
         }
     }
 
diff --git a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloudI.H b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloudI.H
index 58fec016331c7558aa642cc2618bfe08485e5275..6059bc5fda4b36afb2b6efb6d784bfdddf8ae0dc 100644
--- a/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloudI.H
+++ b/src/lagrangian/DSMC/clouds/Templates/DSMCCloud/DSMCCloudI.H
@@ -128,7 +128,7 @@ template<class ParcelType>
 inline Foam::volScalarField::GeometricBoundaryField&
 Foam::DSMCCloud<ParcelType>::qBF()
 {
-    return q_.boundaryField();
+    return q_.boundaryFieldRef();
 }
 
 
@@ -136,7 +136,7 @@ template<class ParcelType>
 inline Foam::volVectorField::GeometricBoundaryField&
 Foam::DSMCCloud<ParcelType>::fDBF()
 {
-    return fD_.boundaryField();
+    return fD_.boundaryFieldRef();
 }
 
 
@@ -144,7 +144,7 @@ template<class ParcelType>
 inline Foam::volScalarField::GeometricBoundaryField&
 Foam::DSMCCloud<ParcelType>::rhoNBF()
 {
-    return rhoN_.boundaryField();
+    return rhoN_.boundaryFieldRef();
 }
 
 
@@ -152,7 +152,7 @@ template<class ParcelType>
 inline Foam::volScalarField::GeometricBoundaryField&
 Foam::DSMCCloud<ParcelType>::rhoMBF()
 {
-    return rhoM_.boundaryField();
+    return rhoM_.boundaryFieldRef();
 }
 
 
@@ -160,7 +160,7 @@ template<class ParcelType>
 inline Foam::volScalarField::GeometricBoundaryField&
 Foam::DSMCCloud<ParcelType>::linearKEBF()
 {
-    return linearKE_.boundaryField();
+    return linearKE_.boundaryFieldRef();
 }
 
 
@@ -168,7 +168,7 @@ template<class ParcelType>
 inline Foam::volScalarField::GeometricBoundaryField&
 Foam::DSMCCloud<ParcelType>::internalEBF()
 {
-    return internalE_.boundaryField();
+    return internalE_.boundaryFieldRef();
 }
 
 
@@ -176,7 +176,7 @@ template<class ParcelType>
 inline Foam::volScalarField::GeometricBoundaryField&
 Foam::DSMCCloud<ParcelType>::iDofBF()
 {
-    return iDof_.boundaryField();
+    return iDof_.boundaryFieldRef();
 }
 
 
@@ -184,7 +184,7 @@ template<class ParcelType>
 inline Foam::volVectorField::GeometricBoundaryField&
 Foam::DSMCCloud<ParcelType>::momentumBF()
 {
-    return momentum_.boundaryField();
+    return momentum_.boundaryFieldRef();
 }
 
 
diff --git a/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C b/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C
index 65875e91fbef82627f3f5311e114416d21dc2ec0..de42c034c09052f081f440f2ab21ec97d7b2b954 100644
--- a/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C
+++ b/src/parallel/decompose/decompose/fvFieldDecomposerDecomposeFields.C
@@ -83,7 +83,7 @@ Foam::fvFieldDecomposer::decomposeField
     //  constructor (with reference to the now correct internal field)
 
     typename GeometricField<Type, fvPatchField, volMesh>::
-        GeometricBoundaryField& bf = resF.boundaryField();
+        GeometricBoundaryField& bf = resF.boundaryFieldRef();
 
     forAll(bf, patchi)
     {
@@ -253,7 +253,7 @@ Foam::fvFieldDecomposer::decomposeField
     //  constructor (with reference to the now correct internal field)
 
     typename GeometricField<Type, fvsPatchField, surfaceMesh>::
-        GeometricBoundaryField& bf = resF.boundaryField();
+        GeometricBoundaryField& bf = resF.boundaryFieldRef();
 
     forAll(boundaryAddressing_, patchi)
     {
diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C
index bf49d5b16863f3e2bbe29277b99cff9d0ec8edc3..352061ef099ea958be4b08bbe016c4deadb55218 100644
--- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C
+++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayer.C
@@ -116,16 +116,28 @@ void kinematicSingleLayer::transferPrimaryRegionSourceFields()
         InfoInFunction << endl;
     }
 
+    volScalarField::GeometricBoundaryField& rhoSpPrimaryBf =
+        rhoSpPrimary_.boundaryFieldRef();
+
+    volVectorField::GeometricBoundaryField& USpPrimaryBf =
+        USpPrimary_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& pSpPrimaryBf =
+        pSpPrimary_.boundaryFieldRef();
+
     // Convert accummulated source terms into per unit area per unit time
     const scalar deltaT = time_.deltaTValue();
-    forAll(rhoSpPrimary_.boundaryField(), patchI)
+    forAll(rhoSpPrimary_.boundaryField(), patchi)
     {
-        const scalarField& priMagSf =
-            primaryMesh().magSf().boundaryField()[patchI];
+        scalarField rpriMagSfdeltaT
+        (
+            (1.0/deltaT)
+           /primaryMesh().magSf().boundaryField()[patchi]
+        );
 
-        rhoSpPrimary_.boundaryField()[patchI] /= priMagSf*deltaT;
-        USpPrimary_.boundaryField()[patchI] /= priMagSf*deltaT;
-        pSpPrimary_.boundaryField()[patchI] /= priMagSf*deltaT;
+        rhoSpPrimaryBf[patchi] *= rpriMagSfdeltaT;
+        USpPrimaryBf[patchi] *= rpriMagSfdeltaT;
+        pSpPrimaryBf[patchi] *= rpriMagSfdeltaT;
     }
 
     // Retrieve the source fields from the primary region via direct mapped
@@ -270,10 +282,10 @@ void kinematicSingleLayer::updateSurfaceVelocities()
     // Push boundary film velocity values into internal field
     for (label i=0; i<intCoupledPatchIDs_.size(); i++)
     {
-        label patchI = intCoupledPatchIDs_[i];
-        const polyPatch& pp = regionMesh().boundaryMesh()[patchI];
+        label patchi = intCoupledPatchIDs_[i];
+        const polyPatch& pp = regionMesh().boundaryMesh()[patchi];
         UIndirectList<vector>(Uw_, pp.faceCells()) =
-            U_.boundaryField()[patchI];
+            U_.boundaryField()[patchi];
     }
     Uw_ -= nHat()*(Uw_ & nHat());
     Uw_.correctBoundaryConditions();
@@ -825,7 +837,7 @@ kinematicSingleLayer::~kinematicSingleLayer()
 
 void kinematicSingleLayer::addSources
 (
-    const label patchI,
+    const label patchi,
     const label faceI,
     const scalar massSource,
     const vector& momentumSource,
@@ -842,9 +854,9 @@ void kinematicSingleLayer::addSources
             << "    pressure = " << pressureSource << endl;
     }
 
-    rhoSpPrimary_.boundaryField()[patchI][faceI] -= massSource;
-    USpPrimary_.boundaryField()[patchI][faceI] -= momentumSource;
-    pSpPrimary_.boundaryField()[patchI][faceI] -= pressureSource;
+    rhoSpPrimary_.boundaryFieldRef()[patchi][faceI] -= massSource;
+    USpPrimary_.boundaryFieldRef()[patchi][faceI] -= momentumSource;
+    pSpPrimary_.boundaryFieldRef()[patchi][faceI] -= pressureSource;
 
     addedMassTotal_ += massSource;
 }
@@ -866,7 +878,7 @@ void kinematicSingleLayer::preEvolveRegion()
     transferPrimaryRegionSourceFields();
 
     // Reset transfer fields
-//    availableMass_ = mass();
+    //availableMass_ = mass();
     availableMass_ = netMass();
     cloudMassTrans_ == dimensionedScalar("zero", dimMass, 0.0);
     cloudDiameterTrans_ == dimensionedScalar("zero", dimLength, 0.0);
diff --git a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerTemplates.C b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerTemplates.C
index 4076a8494a3a6b64ec4b752492c6e9da60205b72..721d038619ccdbf4bf16c22b705d9a3944d5da35 100644
--- a/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerTemplates.C
+++ b/src/regionModels/surfaceFilmModels/kinematicSingleLayer/kinematicSingleLayerTemplates.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,25 +43,28 @@ void kinematicSingleLayer::constrainFilmField
     const typename Type::cmptType& value
 )
 {
+    typename Type::GeometricBoundaryField& fieldBf = field.boundaryFieldRef();
+
     forAll(intCoupledPatchIDs_, i)
     {
-        label patchI = intCoupledPatchIDs_[i];
-        field.boundaryField()[patchI] = value;
+        label patchi = intCoupledPatchIDs_[i];
+        fieldBf[patchi] = value;
         if (debug)
         {
             Info<< "Constraining " << field.name()
-                << " boundary " << field.boundaryField()[patchI].patch().name()
+                << " boundary " << field.boundaryField()[patchi].patch().name()
                 << " to " << value << endl;
         }
     }
+
     forAll(passivePatchIDs_, i)
     {
-        label patchI = passivePatchIDs_[i];
-        field.boundaryField()[patchI] = value;
+        label patchi = passivePatchIDs_[i];
+        fieldBf[patchi] = value;
         if (debug)
         {
             Info<< "Constraining " << field.name()
-                << " boundary " << field.boundaryField()[patchI].patch().name()
+                << " boundary " << field.boundaryField()[patchi].patch().name()
                 << " to " << value << endl;
         }
     }
diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C
index 0c12d61582b4ac1a41f06b3ef5b2c6afc1bd88aa..d063b2a520687ca770f26a9b2562587265f7b33e 100644
--- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C
+++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C
@@ -61,15 +61,15 @@ addToRunTimeSelectionTable(surfaceFilmModel, thermoSingleLayer, mesh);
 wordList thermoSingleLayer::hsBoundaryTypes()
 {
     wordList bTypes(T_.boundaryField().types());
-    forAll(bTypes, patchI)
+    forAll(bTypes, patchi)
     {
         if
         (
-            T_.boundaryField()[patchI].fixesValue()
-         || bTypes[patchI] == mappedFieldFvPatchField<scalar>::typeName
+            T_.boundaryField()[patchi].fixesValue()
+         || bTypes[patchi] == mappedFieldFvPatchField<scalar>::typeName
         )
         {
-            bTypes[patchI] = fixedValueFvPatchField<scalar>::typeName;
+            bTypes[patchi] = fixedValueFvPatchField<scalar>::typeName;
         }
     }
 
@@ -112,12 +112,14 @@ void thermoSingleLayer::correctHsForMappedT()
 {
     T_.correctBoundaryConditions();
 
-    forAll(T_.boundaryField(), patchI)
+    volScalarField::GeometricBoundaryField& hsBf = hs_.boundaryFieldRef();
+
+    forAll(hsBf, patchi)
     {
-        const fvPatchField<scalar>& Tp = T_.boundaryField()[patchI];
+        const fvPatchField<scalar>& Tp = T_.boundaryField()[patchi];
         if (isA<mappedFieldFvPatchField<scalar>>(Tp))
         {
-            hs_.boundaryField()[patchI] == hs(Tp, patchI);
+            hsBf[patchi] == hs(Tp, patchi);
         }
     }
 }
@@ -130,10 +132,10 @@ void thermoSingleLayer::updateSurfaceTemperatures()
     // Push boundary film temperature into wall temperature internal field
     for (label i=0; i<intCoupledPatchIDs_.size(); i++)
     {
-        label patchI = intCoupledPatchIDs_[i];
-        const polyPatch& pp = regionMesh().boundaryMesh()[patchI];
+        label patchi = intCoupledPatchIDs_[i];
+        const polyPatch& pp = regionMesh().boundaryMesh()[patchi];
         UIndirectList<scalar>(Tw_, pp.faceCells()) =
-            T_.boundaryField()[patchI];
+            T_.boundaryField()[patchi];
     }
     Tw_.correctBoundaryConditions();
 
@@ -171,14 +173,17 @@ void thermoSingleLayer::transferPrimaryRegionSourceFields()
 
     kinematicSingleLayer::transferPrimaryRegionSourceFields();
 
+    volScalarField::GeometricBoundaryField& hsSpPrimaryBf =
+        hsSpPrimary_.boundaryFieldRef();
+
     // Convert accummulated source terms into per unit area per unit time
     const scalar deltaT = time_.deltaTValue();
-    forAll(hsSpPrimary_.boundaryField(), patchI)
+    forAll(hsSpPrimaryBf, patchi)
     {
         const scalarField& priMagSf =
-            primaryMesh().magSf().boundaryField()[patchI];
+            primaryMesh().magSf().boundaryField()[patchi];
 
-        hsSpPrimary_.boundaryField()[patchI] /= priMagSf*deltaT;
+        hsSpPrimaryBf[patchi] /= priMagSf*deltaT;
     }
 
     // Retrieve the source fields from the primary region via direct mapped
@@ -579,7 +584,7 @@ thermoSingleLayer::~thermoSingleLayer()
 
 void thermoSingleLayer::addSources
 (
-    const label patchI,
+    const label patchi,
     const label faceI,
     const scalar massSource,
     const vector& momentumSource,
@@ -589,7 +594,7 @@ void thermoSingleLayer::addSources
 {
     kinematicSingleLayer::addSources
     (
-        patchI,
+        patchi,
         faceI,
         massSource,
         momentumSource,
@@ -602,7 +607,7 @@ void thermoSingleLayer::addSources
         Info<< "    energy   = " << energySource << nl << endl;
     }
 
-    hsSpPrimary_.boundaryField()[patchI][faceI] -= energySource;
+    hsSpPrimary_.boundaryFieldRef()[patchi][faceI] -= energySource;
 }
 
 
diff --git a/src/sampling/meshToMesh/meshToMeshTemplates.C b/src/sampling/meshToMesh/meshToMeshTemplates.C
index 59b1590a9d86325d516ba2d57a5ca3bc1ff7cf5c..7b80f1e6ba8162f8b72983541ff81ba4c524a067 100644
--- a/src/sampling/meshToMesh/meshToMeshTemplates.C
+++ b/src/sampling/meshToMesh/meshToMeshTemplates.C
@@ -329,13 +329,16 @@ void Foam::meshToMesh::mapSrcToTgt
 
     const PtrList<AMIPatchToPatchInterpolation>& AMIList = patchAMIs();
 
+    typename GeometricField<Type, fvPatchField, volMesh>::
+        GeometricBoundaryField& resultBf = result.boundaryFieldRef();
+
     forAll(AMIList, i)
     {
-        label srcPatchI = srcPatchID_[i];
-        label tgtPatchI = tgtPatchID_[i];
+        label srcPatchi = srcPatchID_[i];
+        label tgtPatchi = tgtPatchID_[i];
 
-        const fvPatchField<Type>& srcField = field.boundaryField()[srcPatchI];
-        fvPatchField<Type>& tgtField = result.boundaryField()[tgtPatchI];
+        const fvPatchField<Type>& srcField = field.boundaryField()[srcPatchi];
+        fvPatchField<Type>& tgtField = resultBf[tgtPatchi];
 
         // 2.3 does not do distributed mapping yet so only do if
         // running on single processor
@@ -375,8 +378,8 @@ void Foam::meshToMesh::mapSrcToTgt
 
     forAll(cuttingPatches_, i)
     {
-        label patchI = cuttingPatches_[i];
-        fvPatchField<Type>& pf = result.boundaryField()[patchI];
+        label patchi = cuttingPatches_[i];
+        fvPatchField<Type>& pf = resultBf[patchi];
         pf == pf.patchInternalField();
     }
 }
@@ -405,22 +408,22 @@ Foam::meshToMesh::mapSrcToTgt
     // entries, but these values will need to be reset
     forAll(tgtPatchID_, i)
     {
-        label srcPatchI = srcPatchID_[i];
-        label tgtPatchI = tgtPatchID_[i];
+        label srcPatchi = srcPatchID_[i];
+        label tgtPatchi = tgtPatchID_[i];
 
-        if (!tgtPatchFields.set(tgtPatchI))
+        if (!tgtPatchFields.set(tgtPatchi))
         {
             tgtPatchFields.set
             (
-                tgtPatchI,
+                tgtPatchi,
                 fvPatchField<Type>::New
                 (
-                    srcBfld[srcPatchI],
-                    tgtMesh.boundary()[tgtPatchI],
+                    srcBfld[srcPatchi],
+                    tgtMesh.boundary()[tgtPatchi],
                     DimensionedField<Type, volMesh>::null(),
                     directFvPatchFieldMapper
                     (
-                        labelList(tgtMesh.boundary()[tgtPatchI].size(), -1)
+                        labelList(tgtMesh.boundary()[tgtPatchi].size(), -1)
                     )
                 )
             );
@@ -428,19 +431,19 @@ Foam::meshToMesh::mapSrcToTgt
     }
 
     // Any unset tgtPatchFields become calculated
-    forAll(tgtPatchFields, tgtPatchI)
+    forAll(tgtPatchFields, tgtPatchi)
     {
-        if (!tgtPatchFields.set(tgtPatchI))
+        if (!tgtPatchFields.set(tgtPatchi))
         {
             // Note: use factory New method instead of direct generation of
             //       calculated so we keep constraints
             tgtPatchFields.set
             (
-                tgtPatchI,
+                tgtPatchi,
                 fvPatchField<Type>::New
                 (
                     calculatedFvPatchField<Type>::typeName,
-                    tgtMesh.boundary()[tgtPatchI],
+                    tgtMesh.boundary()[tgtPatchi],
                     DimensionedField<Type, volMesh>::null()
                 )
             );
@@ -520,11 +523,11 @@ void Foam::meshToMesh::mapTgtToSrc
 
     forAll(AMIList, i)
     {
-        label srcPatchI = srcPatchID_[i];
-        label tgtPatchI = tgtPatchID_[i];
+        label srcPatchi = srcPatchID_[i];
+        label tgtPatchi = tgtPatchID_[i];
 
-        fvPatchField<Type>& srcField = result.boundaryField()[srcPatchI];
-        const fvPatchField<Type>& tgtField = field.boundaryField()[tgtPatchI];
+        fvPatchField<Type>& srcField = result.boundaryField()[srcPatchi];
+        const fvPatchField<Type>& tgtField = field.boundaryField()[tgtPatchi];
 
         // 2.3 does not do distributed mapping yet so only do if
         // running on single processor
@@ -564,8 +567,8 @@ void Foam::meshToMesh::mapTgtToSrc
 
     forAll(cuttingPatches_, i)
     {
-        label patchI = cuttingPatches_[i];
-        fvPatchField<Type>& pf = result.boundaryField()[patchI];
+        label patchi = cuttingPatches_[i];
+        fvPatchField<Type>& pf = result.boundaryField()[patchi];
         pf == pf.patchInternalField();
     }
 }
@@ -594,22 +597,22 @@ Foam::meshToMesh::mapTgtToSrc
     // entries, but these values will need to be reset
     forAll(srcPatchID_, i)
     {
-        label srcPatchI = srcPatchID_[i];
-        label tgtPatchI = tgtPatchID_[i];
+        label srcPatchi = srcPatchID_[i];
+        label tgtPatchi = tgtPatchID_[i];
 
-        if (!srcPatchFields.set(tgtPatchI))
+        if (!srcPatchFields.set(tgtPatchi))
         {
             srcPatchFields.set
             (
-                srcPatchI,
+                srcPatchi,
                 fvPatchField<Type>::New
                 (
-                    tgtBfld[srcPatchI],
-                    srcMesh.boundary()[tgtPatchI],
+                    tgtBfld[srcPatchi],
+                    srcMesh.boundary()[tgtPatchi],
                     DimensionedField<Type, volMesh>::null(),
                     directFvPatchFieldMapper
                     (
-                        labelList(srcMesh.boundary()[srcPatchI].size(), -1)
+                        labelList(srcMesh.boundary()[srcPatchi].size(), -1)
                     )
                 )
             );
@@ -617,19 +620,19 @@ Foam::meshToMesh::mapTgtToSrc
     }
 
     // Any unset srcPatchFields become calculated
-    forAll(srcPatchFields, srcPatchI)
+    forAll(srcPatchFields, srcPatchi)
     {
-        if (!srcPatchFields.set(srcPatchI))
+        if (!srcPatchFields.set(srcPatchi))
         {
             // Note: use factory New method instead of direct generation of
             //       calculated so we keep constraints
             srcPatchFields.set
             (
-                srcPatchI,
+                srcPatchi,
                 fvPatchField<Type>::New
                 (
                     calculatedFvPatchField<Type>::typeName,
-                    srcMesh.boundary()[srcPatchI],
+                    srcMesh.boundary()[srcPatchi],
                     DimensionedField<Type, volMesh>::null()
                 )
             );
diff --git a/src/sampling/meshToMesh0/meshToMesh0Templates.C b/src/sampling/meshToMesh0/meshToMesh0Templates.C
index b36d2c55d4b2a9a4594738bc5254c3b2b3429e0a..12569cb63f1537bc7a4cf0020a5bd2219b27fae8 100644
--- a/src/sampling/meshToMesh0/meshToMesh0Templates.C
+++ b/src/sampling/meshToMesh0/meshToMesh0Templates.C
@@ -253,6 +253,9 @@ void Foam::meshToMesh0::interpolate
 {
     interpolateInternalField(toVf, fromVf, ord, cop);
 
+    typename GeometricField<Type, fvPatchField, volMesh>::
+        GeometricBoundaryField& toVfBf = toVf.boundaryFieldRef();
+
     forAll(toMesh_.boundaryMesh(), patchi)
     {
         const fvPatch& toPatch = toMesh_.boundary()[patchi];
@@ -265,7 +268,7 @@ void Foam::meshToMesh0::interpolate
                 {
                     mapField
                     (
-                        toVf.boundaryField()[patchi],
+                        toVfBf[patchi],
                         fromVf,
                         boundaryAddressing_[patchi],
                         cop
@@ -277,7 +280,7 @@ void Foam::meshToMesh0::interpolate
                 {
                     interpolateField
                     (
-                        toVf.boundaryField()[patchi],
+                        toVfBf[patchi],
                         fromVf,
                         boundaryAddressing_[patchi],
                         toPatch.Cf(),
@@ -290,7 +293,7 @@ void Foam::meshToMesh0::interpolate
                 {
                     interpolateField
                     (
-                        toVf.boundaryField()[patchi],
+                        toVfBf[patchi],
                         fromVf,
                         boundaryAddressing_[patchi],
                         toPatch.Cf(),
@@ -310,12 +313,12 @@ void Foam::meshToMesh0::interpolate
                         << exit(FatalError);
             }
 
-            if (isA<mixedFvPatchField<Type>>(toVf.boundaryField()[patchi]))
+            if (isA<mixedFvPatchField<Type>>(toVfBf[patchi]))
             {
                 refCast<mixedFvPatchField<Type>>
                 (
-                    toVf.boundaryField()[patchi]
-                ).refValue() = toVf.boundaryField()[patchi];
+                    toVfBf[patchi]
+                ).refValue() = toVfBf[patchi];
             }
         }
         else if
@@ -324,20 +327,9 @@ void Foam::meshToMesh0::interpolate
          && fromMeshPatches_.found(patchMap_.find(toPatch.name())())
         )
         {
-            /*
-            toVf.boundaryField()[patchi].map
-            (
-                fromVf.boundaryField()
-                [
-                    fromMeshPatches_.find(patchMap_.find(toPatch.name())())()
-                ],
-                boundaryAddressing_[patchi]
-            );
-            */
-
             mapField
             (
-                toVf.boundaryField()[patchi],
+                toVfBf[patchi],
                 fromVf.boundaryField()
                 [
                     fromMeshPatches_.find(patchMap_.find(toPatch.name())())()
diff --git a/src/sampling/sampledSurface/distanceSurface/distanceSurface.C b/src/sampling/sampledSurface/distanceSurface/distanceSurface.C
index 61895668a829a7bc179e4785624a6c580a91053e..3b2ed8367182c1ab1705baccef4c302535940cf2 100644
--- a/src/sampling/sampledSurface/distanceSurface/distanceSurface.C
+++ b/src/sampling/sampledSurface/distanceSurface/distanceSurface.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,12 +128,15 @@ void Foam::distanceSurface::createGeometry()
         }
     }
 
+    volScalarField::GeometricBoundaryField& cellDistanceBf =
+        cellDistance.boundaryFieldRef();
+
     // Patch fields
     {
-        forAll(fvm.C().boundaryField(), patchI)
+        forAll(fvm.C().boundaryField(), patchi)
         {
-            const pointField& cc = fvm.C().boundaryField()[patchI];
-            fvPatchScalarField& fld = cellDistance.boundaryField()[patchI];
+            const pointField& cc = fvm.C().boundaryField()[patchi];
+            fvPatchScalarField& fld = cellDistanceBf[patchi];
 
             List<pointIndexHit> nearest;
             surfPtr_().findNearest
diff --git a/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C b/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C
index b610d44d030b30eef9900a6ccd5d7e0f5280e0ea..4501be80614c6e5b5fc08261a6fd1356947fefca 100644
--- a/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C
+++ b/src/sampling/sampledSurface/isoSurface/isoSurfaceTemplates.C
@@ -76,26 +76,29 @@ Foam::isoSurface::adaptPatchFields
 
     const polyBoundaryMesh& patches = mesh.boundaryMesh();
 
-    forAll(patches, patchI)
+    typename FieldType::GeometricBoundaryField& sliceFldBf =
+        sliceFld.boundaryFieldRef();
+
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         if
         (
             isA<emptyPolyPatch>(pp)
-         && pp.size() != sliceFld.boundaryField()[patchI].size()
+         && pp.size() != sliceFldBf[patchi].size()
         )
         {
             // Clear old value. Cannot resize it since is a slice.
-            sliceFld.boundaryField().set(patchI, NULL);
+            sliceFldBf.set(patchi, NULL);
 
             // Set new value we can change
-            sliceFld.boundaryField().set
+            sliceFldBf.set
             (
-                patchI,
+                patchi,
                 new calculatedFvPatchField<Type>
                 (
-                    mesh.boundary()[patchI],
+                    mesh.boundary()[patchi],
                     sliceFld
                 )
             );
@@ -103,9 +106,9 @@ Foam::isoSurface::adaptPatchFields
             // Note: cannot use patchInternalField since uses emptyFvPatch::size
             // Do our own internalField instead.
             const labelUList& faceCells =
-                mesh.boundary()[patchI].patch().faceCells();
+                mesh.boundary()[patchi].patch().faceCells();
 
-            Field<Type>& pfld = sliceFld.boundaryField()[patchI];
+            Field<Type>& pfld = sliceFldBf[patchi];
             pfld.setSize(faceCells.size());
             forAll(faceCells, i)
             {
@@ -120,10 +123,10 @@ Foam::isoSurface::adaptPatchFields
         {
             fvPatchField<Type>& pfld = const_cast<fvPatchField<Type>&>
             (
-                sliceFld.boundaryField()[patchI]
+                sliceFldBf[patchi]
             );
 
-            const scalarField& w = mesh.weights().boundaryField()[patchI];
+            const scalarField& w = mesh.weights().boundaryField()[patchi];
 
             tmp<Field<Type>> f =
                 w*pfld.patchInternalField()
@@ -595,9 +598,9 @@ void Foam::isoSurface::generateTriPoints
     // Determine neighbouring snap status
     boolList neiSnapped(mesh_.nFaces()-mesh_.nInternalFaces(), false);
     List<Type> neiSnappedPoint(neiSnapped.size(), Type(Zero));
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         if (pp.coupled())
         {
@@ -621,9 +624,9 @@ void Foam::isoSurface::generateTriPoints
 
 
 
-    forAll(patches, patchI)
+    forAll(patches, patchi)
     {
-        const polyPatch& pp = patches[patchI];
+        const polyPatch& pp = patches[patchi];
 
         if (isA<processorPolyPatch>(pp))
         {
@@ -653,8 +656,8 @@ void Foam::isoSurface::generateTriPoints
                             snappedPoint,
                             faceI,
 
-                            cVals.boundaryField()[patchI][i],
-                            cCoords.boundaryField()[patchI][i],
+                            cVals.boundaryField()[patchi][i],
+                            cCoords.boundaryField()[patchi][i],
                             neiSnapped[faceI-mesh_.nInternalFaces()],
                             neiSnappedPoint[faceI-mesh_.nInternalFaces()],
 
@@ -677,8 +680,8 @@ void Foam::isoSurface::generateTriPoints
                             snappedPoint,
                             faceI,
 
-                            cVals.boundaryField()[patchI][i],
-                            cCoords.boundaryField()[patchI][i],
+                            cVals.boundaryField()[patchi][i],
+                            cCoords.boundaryField()[patchi][i],
                             false,
                             Type(Zero),
 
@@ -710,8 +713,8 @@ void Foam::isoSurface::generateTriPoints
                         snappedPoint,
                         faceI,
 
-                        cVals.boundaryField()[patchI][i],
-                        cCoords.boundaryField()[patchI][i],
+                        cVals.boundaryField()[patchi][i],
+                        cCoords.boundaryField()[patchi][i],
                         false,  // fc not snapped
                         Type(Zero),
 
diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C
index b2eee16e05d73e0a7cb3eb2d23b6926178dea19c..2cdecfd6f808b93f23acec72a194ee7ec3f671d1 100644
--- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C
+++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.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
@@ -134,32 +134,35 @@ void Foam::sampledCuttingPlane::createGeometry()
         }
     }
 
+    volScalarField::GeometricBoundaryField& cellDistanceBf =
+        cellDistance.boundaryFieldRef();
+
     // Patch fields
     {
-        forAll(cellDistance.boundaryField(), patchI)
+        forAll(cellDistanceBf, patchi)
         {
             if
             (
                 isA<emptyFvPatchScalarField>
                 (
-                    cellDistance.boundaryField()[patchI]
+                    cellDistanceBf[patchi]
                 )
             )
             {
-                cellDistance.boundaryField().set
+                cellDistanceBf.set
                 (
-                    patchI,
+                    patchi,
                     new calculatedFvPatchScalarField
                     (
-                        fvm.boundary()[patchI],
+                        fvm.boundary()[patchi],
                         cellDistance
                     )
                 );
 
-                const polyPatch& pp = fvm.boundary()[patchI].patch();
+                const polyPatch& pp = fvm.boundary()[patchi].patch();
                 pointField::subField cc = pp.patchSlice(fvm.faceCentres());
 
-                fvPatchScalarField& fld = cellDistance.boundaryField()[patchI];
+                fvPatchScalarField& fld = cellDistanceBf[patchi];
                 fld.setSize(pp.size());
                 forAll(fld, i)
                 {
@@ -168,8 +171,8 @@ void Foam::sampledCuttingPlane::createGeometry()
             }
             else
             {
-                const pointField& cc = fvm.C().boundaryField()[patchI];
-                fvPatchScalarField& fld = cellDistance.boundaryField()[patchI];
+                const pointField& cc = fvm.C().boundaryField()[patchi];
+                fvPatchScalarField& fld = cellDistanceBf[patchi];
 
                 forAll(fld, i)
                 {
diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C
index 1db5c4ac7ca00ef6ebcad689b4ab7b00155dd3b3..600eb592e4796a635278beff3ca32d12032c20dc 100644
--- a/src/thermophysicalModels/basic/heThermo/heThermo.C
+++ b/src/thermophysicalModels/basic/heThermo/heThermo.C
@@ -33,19 +33,19 @@ template<class BasicThermo, class MixtureType>
 void Foam::heThermo<BasicThermo, MixtureType>::
 heBoundaryCorrection(volScalarField& h)
 {
-    volScalarField::GeometricBoundaryField& hbf = h.boundaryField();
+    volScalarField::GeometricBoundaryField& hBf = h.boundaryFieldRef();
 
-    forAll(hbf, patchi)
+    forAll(hBf, patchi)
     {
-        if (isA<gradientEnergyFvPatchScalarField>(hbf[patchi]))
+        if (isA<gradientEnergyFvPatchScalarField>(hBf[patchi]))
         {
-            refCast<gradientEnergyFvPatchScalarField>(hbf[patchi]).gradient()
-                = hbf[patchi].fvPatchField::snGrad();
+            refCast<gradientEnergyFvPatchScalarField>(hBf[patchi]).gradient()
+                = hBf[patchi].fvPatchField::snGrad();
         }
-        else if (isA<mixedEnergyFvPatchScalarField>(hbf[patchi]))
+        else if (isA<mixedEnergyFvPatchScalarField>(hBf[patchi]))
         {
-            refCast<mixedEnergyFvPatchScalarField>(hbf[patchi]).refGrad()
-                = hbf[patchi].fvPatchField::snGrad();
+            refCast<mixedEnergyFvPatchScalarField>(hBf[patchi]).refGrad()
+                = hBf[patchi].fvPatchField::snGrad();
         }
     }
 }
@@ -64,9 +64,11 @@ void Foam::heThermo<BasicThermo, MixtureType>::init()
             this->cellMixture(celli).HE(pCells[celli], TCells[celli]);
     }
 
-    forAll(he_.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& heBf = he_.boundaryFieldRef();
+
+    forAll(heBf, patchi)
     {
-        he_.boundaryField()[patchi] == he
+        heBf[patchi] == he
         (
             this->p_.boundaryField()[patchi],
             this->T_.boundaryField()[patchi],
@@ -195,9 +197,11 @@ Foam::tmp<Foam::volScalarField> Foam::heThermo<BasicThermo, MixtureType>::he
             this->cellMixture(celli).HE(pCells[celli], TCells[celli]);
     }
 
-    forAll(he.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& heBf = he.boundaryFieldRef();
+
+    forAll(heBf, patchi)
     {
-        scalarField& hep = he.boundaryField()[patchi];
+        scalarField& hep = heBf[patchi];
         const scalarField& pp = p.boundaryField()[patchi];
         const scalarField& Tp = T.boundaryField()[patchi];
 
@@ -285,9 +289,11 @@ Foam::heThermo<BasicThermo, MixtureType>::hc() const
         hcCells[celli] = this->cellMixture(celli).Hc();
     }
 
-    forAll(hcf.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& hcfBf = hcf.boundaryFieldRef();
+
+    forAll(hcfBf, patchi)
     {
-        scalarField& hcp = hcf.boundaryField()[patchi];
+        scalarField& hcp = hcfBf[patchi];
 
         forAll(hcp, facei)
         {
@@ -352,11 +358,13 @@ Foam::heThermo<BasicThermo, MixtureType>::Cp() const
             this->cellMixture(celli).Cp(this->p_[celli], this->T_[celli]);
     }
 
-    forAll(this->T_.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& cpBf = cp.boundaryFieldRef();
+
+    forAll(cpBf, patchi)
     {
         const fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
         const fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
-        fvPatchScalarField& pCp = cp.boundaryField()[patchi];
+        fvPatchScalarField& pCp = cpBf[patchi];
 
         forAll(pT, facei)
         {
@@ -423,9 +431,11 @@ Foam::heThermo<BasicThermo, MixtureType>::Cv() const
             this->cellMixture(celli).Cv(this->p_[celli], this->T_[celli]);
     }
 
-    forAll(this->T_.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& cvBf = cv.boundaryFieldRef();
+
+    forAll(cvBf, patchi)
     {
-        cv.boundaryField()[patchi] = Cv
+        cvBf[patchi] = Cv
         (
             this->p_.boundaryField()[patchi],
             this->T_.boundaryField()[patchi],
@@ -482,19 +492,21 @@ Foam::heThermo<BasicThermo, MixtureType>::gamma() const
         )
     );
 
-    volScalarField& cpv = tgamma.ref();
+    volScalarField& gamma = tgamma.ref();
 
     forAll(this->T_, celli)
     {
-        cpv[celli] =
+        gamma[celli] =
             this->cellMixture(celli).gamma(this->p_[celli], this->T_[celli]);
     }
 
-    forAll(this->T_.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& gammaBf = gamma.boundaryFieldRef();
+
+    forAll(gammaBf, patchi)
     {
         const fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
         const fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
-        fvPatchScalarField& pgamma = cpv.boundaryField()[patchi];
+        fvPatchScalarField& pgamma = gammaBf[patchi];
 
         forAll(pT, facei)
         {
@@ -563,11 +575,13 @@ Foam::heThermo<BasicThermo, MixtureType>::Cpv() const
             this->cellMixture(celli).Cpv(this->p_[celli], this->T_[celli]);
     }
 
-    forAll(this->T_.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& cpvBf = cpv.boundaryFieldRef();
+
+    forAll(cpvBf, patchi)
     {
         const fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
         const fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
-        fvPatchScalarField& pCpv = cpv.boundaryField()[patchi];
+        fvPatchScalarField& pCpv = cpvBf[patchi];
 
         forAll(pT, facei)
         {
@@ -636,11 +650,14 @@ Foam::heThermo<BasicThermo, MixtureType>::CpByCpv() const
         );
     }
 
-    forAll(this->T_.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& cpByCpvBf =
+        cpByCpv.boundaryFieldRef();
+
+    forAll(cpByCpvBf, patchi)
     {
         const fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
         const fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
-        fvPatchScalarField& pCpByCpv = cpByCpv.boundaryField()[patchi];
+        fvPatchScalarField& pCpByCpv = cpByCpvBf[patchi];
 
         forAll(pT, facei)
         {
diff --git a/src/thermophysicalModels/basic/psiThermo/hePsiThermo.C b/src/thermophysicalModels/basic/psiThermo/hePsiThermo.C
index 67063b57c457bb600983f8daa685e76540318f59..43869aa1d79b9407c3abd16090792c04a22af04e 100644
--- a/src/thermophysicalModels/basic/psiThermo/hePsiThermo.C
+++ b/src/thermophysicalModels/basic/psiThermo/hePsiThermo.C
@@ -56,16 +56,32 @@ void Foam::hePsiThermo<BasicPsiThermo, MixtureType>::calculate()
         alphaCells[celli] = mixture_.alphah(pCells[celli], TCells[celli]);
     }
 
-    forAll(this->T_.boundaryField(), patchi)
-    {
-        fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
-        fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
-        fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi];
+    volScalarField::GeometricBoundaryField& pBf =
+        this->p_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& TBf =
+        this->T_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& psiBf =
+        this->psi_.boundaryFieldRef();
 
-        fvPatchScalarField& ph = this->he_.boundaryField()[patchi];
+    volScalarField::GeometricBoundaryField& heBf =
+        this->he().boundaryFieldRef();
 
-        fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi];
-        fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi];
+    volScalarField::GeometricBoundaryField& muBf =
+        this->mu_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& alphaBf =
+        this->alpha_.boundaryFieldRef();
+
+    forAll(this->T_.boundaryField(), patchi)
+    {
+        fvPatchScalarField& pp = pBf[patchi];
+        fvPatchScalarField& pT = TBf[patchi];
+        fvPatchScalarField& ppsi = psiBf[patchi];
+        fvPatchScalarField& phe = heBf[patchi];
+        fvPatchScalarField& pmu = muBf[patchi];
+        fvPatchScalarField& palpha = alphaBf[patchi];
 
         if (pT.fixesValue())
         {
@@ -74,7 +90,7 @@ void Foam::hePsiThermo<BasicPsiThermo, MixtureType>::calculate()
                 const typename MixtureType::thermoType& mixture_ =
                     this->patchFaceMixture(patchi, facei);
 
-                ph[facei] = mixture_.HE(pp[facei], pT[facei]);
+                phe[facei] = mixture_.HE(pp[facei], pT[facei]);
 
                 ppsi[facei] = mixture_.psi(pp[facei], pT[facei]);
                 pmu[facei] = mixture_.mu(pp[facei], pT[facei]);
@@ -88,7 +104,7 @@ void Foam::hePsiThermo<BasicPsiThermo, MixtureType>::calculate()
                 const typename MixtureType::thermoType& mixture_ =
                     this->patchFaceMixture(patchi, facei);
 
-                pT[facei] = mixture_.THE(ph[facei], pp[facei], pT[facei]);
+                pT[facei] = mixture_.THE(phe[facei], pp[facei], pT[facei]);
 
                 ppsi[facei] = mixture_.psi(pp[facei], pT[facei]);
                 pmu[facei] = mixture_.mu(pp[facei], pT[facei]);
diff --git a/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C
index 7db79d8fc8f46f060b040993eb213a73d64e6ee9..1a5f941b1ce7c27dbd1e5744e5cd0aa26507fa0d 100644
--- a/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C
+++ b/src/thermophysicalModels/basic/rhoThermo/heRhoThermo.C
@@ -58,17 +58,36 @@ void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::calculate()
         alphaCells[celli] = mixture_.alphah(pCells[celli], TCells[celli]);
     }
 
-    forAll(this->T_.boundaryField(), patchi)
-    {
-        fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
-        fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
-        fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi];
-        fvPatchScalarField& prho = this->rho_.boundaryField()[patchi];
+    volScalarField::GeometricBoundaryField& pBf =
+        this->p_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& TBf =
+        this->T_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& psiBf =
+        this->psi_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& rhoBf =
+        this->rho_.boundaryFieldRef();
 
-        fvPatchScalarField& ph = this->he().boundaryField()[patchi];
+    volScalarField::GeometricBoundaryField& heBf =
+        this->he().boundaryFieldRef();
 
-        fvPatchScalarField& pmu = this->mu_.boundaryField()[patchi];
-        fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi];
+    volScalarField::GeometricBoundaryField& muBf =
+        this->mu_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& alphaBf =
+        this->alpha_.boundaryFieldRef();
+
+    forAll(this->T_.boundaryField(), patchi)
+    {
+        fvPatchScalarField& pp = pBf[patchi];
+        fvPatchScalarField& pT = TBf[patchi];
+        fvPatchScalarField& ppsi = psiBf[patchi];
+        fvPatchScalarField& prho = rhoBf[patchi];
+        fvPatchScalarField& phe = heBf[patchi];
+        fvPatchScalarField& pmu = muBf[patchi];
+        fvPatchScalarField& palpha = alphaBf[patchi];
 
         if (pT.fixesValue())
         {
@@ -77,7 +96,7 @@ void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::calculate()
                 const typename MixtureType::thermoType& mixture_ =
                     this->patchFaceMixture(patchi, facei);
 
-                ph[facei] = mixture_.HE(pp[facei], pT[facei]);
+                phe[facei] = mixture_.HE(pp[facei], pT[facei]);
 
                 ppsi[facei] = mixture_.psi(pp[facei], pT[facei]);
                 prho[facei] = mixture_.rho(pp[facei], pT[facei]);
@@ -92,7 +111,7 @@ void Foam::heRhoThermo<BasicPsiThermo, MixtureType>::calculate()
                 const typename MixtureType::thermoType& mixture_ =
                     this->patchFaceMixture(patchi, facei);
 
-                pT[facei] = mixture_.THE(ph[facei], pp[facei], pT[facei]);
+                pT[facei] = mixture_.THE(phe[facei], pp[facei], pT[facei]);
 
                 ppsi[facei] = mixture_.psi(pp[facei], pT[facei]);
                 prho[facei] = mixture_.rho(pp[facei], pT[facei]);
diff --git a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C
index 8ed9f358537b1f8a56afa092781ab26842b5df3a..bb4a8da5d5daddfa9aec09b3823dc5626fa9e768 100644
--- a/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C
+++ b/src/thermophysicalModels/laminarFlameSpeed/Gulders/Gulders.C
@@ -135,11 +135,13 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi
         Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi, 0.0);
     }
 
-    forAll(Su0.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& Su0Bf = Su0.boundaryFieldRef();
+
+    forAll(Su0Bf, patchi)
     {
-        forAll(Su0.boundaryField()[patchi], facei)
+        forAll(Su0Bf[patchi], facei)
         {
-            Su0.boundaryField()[patchi][facei] =
+            Su0Bf[patchi][facei] =
                 Su0pTphi
                 (
                     p.boundaryField()[patchi][facei],
@@ -186,11 +188,13 @@ Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::Gulders::Su0pTphi
         Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi[celli], 0.0);
     }
 
-    forAll(Su0.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& Su0Bf = Su0.boundaryFieldRef();
+
+    forAll(Su0Bf, patchi)
     {
-        forAll(Su0.boundaryField()[patchi], facei)
+        forAll(Su0Bf[patchi], facei)
         {
-            Su0.boundaryField()[patchi][facei] =
+            Su0Bf[patchi][facei] =
                 Su0pTphi
                 (
                     p.boundaryField()[patchi][facei],
diff --git a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C
index 74e62e71143010b26b21bfd40edc51b7f18c219d..cce1fb4655433963e63337c0cf51e445b553fa3c 100644
--- a/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C
+++ b/src/thermophysicalModels/laminarFlameSpeed/GuldersEGR/GuldersEGR.C
@@ -135,11 +135,13 @@ Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
         Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi, 0.0);
     }
 
-    forAll(Su0.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& Su0Bf = Su0.boundaryFieldRef();
+
+    forAll(Su0Bf, patchi)
     {
-        forAll(Su0.boundaryField()[patchi], facei)
+        forAll(Su0Bf[patchi], facei)
         {
-            Su0.boundaryField()[patchi][facei] =
+            Su0Bf[patchi][facei] =
                 Su0pTphi
                 (
                     p.boundaryField()[patchi][facei],
@@ -188,11 +190,13 @@ Foam::laminarFlameSpeedModels::GuldersEGR::Su0pTphi
         Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi[celli], egr[celli]);
     }
 
-    forAll(Su0.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& Su0Bf = Su0.boundaryFieldRef();
+
+    forAll(Su0Bf, patchi)
     {
-        forAll(Su0.boundaryField()[patchi], facei)
+        forAll(Su0Bf[patchi], facei)
         {
-            Su0.boundaryField()[patchi][facei] =
+            Su0Bf[patchi][facei] =
                 Su0pTphi
                 (
                     p.boundaryField()[patchi][facei],
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C
index f07c7c5a0923b0fe445977e4ddc09d84ffcfeb02..095bd4f69f81b536cfe01154c402f41b8e81b4dd 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/greyDiffusiveRadiation/greyDiffusiveRadiationMixedFvPatchScalarField.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,12 +185,12 @@ updateCoeffs()
 
     const scalarField nAve(n & ray.dAve());
 
-    ray.Qr().boundaryField()[patchI] += Iw*nAve;
+    ray.Qr().boundaryFieldRef()[patchI] += Iw*nAve;
 
     const scalarField temissivity = emissivity();
 
-    scalarField& Qem = ray.Qem().boundaryField()[patchI];
-    scalarField& Qin = ray.Qin().boundaryField()[patchI];
+    scalarField& Qem = ray.Qem().boundaryFieldRef()[patchI];
+    scalarField& Qin = ray.Qin().boundaryFieldRef()[patchI];
 
     const vector& myRayId = dom.IRay(rayId).d();
 
diff --git a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C
index 3d768a0bd89501d5b3b452646e013a19580b6607..d8a7b6245d13b770147182f3fadca000947baaa9 100644
--- a/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.C
+++ b/src/thermophysicalModels/radiation/derivedFvPatchFields/wideBandDiffusiveRadiation/wideBandDiffusiveRadiationMixedFvPatchScalarField.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
@@ -186,7 +186,7 @@ updateCoeffs()
 
     const scalarField nAve(n & ray.dAve());
 
-    ray.Qr().boundaryField()[patchI] += Iw*nAve;
+    ray.Qr().boundaryFieldRef()[patchI] += Iw*nAve;
 
     const scalarField Eb
     (
@@ -195,8 +195,8 @@ updateCoeffs()
 
     scalarField temissivity = emissivity();
 
-    scalarField& Qem = ray.Qem().boundaryField()[patchI];
-    scalarField& Qin = ray.Qin().boundaryField()[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
diff --git a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C
index be11a729ee243b36a4b0bced247df8198ef7e44d..51357c037d8ac3aba1589daf1ba8c875d6eab5ae 100644
--- a/src/thermophysicalModels/radiation/radiationModels/P1/P1.C
+++ b/src/thermophysicalModels/radiation/radiationModels/P1/P1.C
@@ -242,12 +242,14 @@ void Foam::radiation::P1::calculate()
       - 4.0*(e_*physicoChemical::sigma*pow4(T_) ) - E_
     );
 
+    volScalarField::GeometricBoundaryField& QrBf = Qr_.boundaryFieldRef();
+
     // Calculate radiative heat flux on boundaries.
     forAll(mesh_.boundaryMesh(), patchi)
     {
         if (!G_.boundaryField()[patchi].coupled())
         {
-            Qr_.boundaryField()[patchi] =
+            QrBf[patchi] =
                 -gamma.boundaryField()[patchi]
                 *G_.boundaryField()[patchi].snGrad();
         }
diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C
index 20eca869b7262c2602bf7aa9745b5c7a1ffbf5c5..9e1fd80e69fb3fafdf603bdff8e90eb7273d6377 100644
--- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C
+++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/fvDOM/fvDOM.C
@@ -527,9 +527,9 @@ void Foam::radiation::fvDOM::updateG()
     {
         IRay_[rayI].addIntensity();
         G_ += IRay_[rayI].I()*IRay_[rayI].omega();
-        Qr_.boundaryField() += IRay_[rayI].Qr().boundaryField();
-        Qem_.boundaryField() += IRay_[rayI].Qem().boundaryField();
-        Qin_.boundaryField() += IRay_[rayI].Qin().boundaryField();
+        Qr_.boundaryFieldRef() += IRay_[rayI].Qr().boundaryField();
+        Qem_.boundaryFieldRef() += IRay_[rayI].Qem().boundaryField();
+        Qin_.boundaryFieldRef() += IRay_[rayI].Qin().boundaryField();
     }
 }
 
diff --git a/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C b/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C
index 224d8f874302b9fa2274ccc2e62fc2ba0a303774..4afda38d4a1f1ac3d98fb5a3e1e2bde4cdc32a48 100644
--- a/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C
+++ b/src/thermophysicalModels/radiation/radiationModels/fvDOM/radiativeIntensityRay/radiativeIntensityRay.C
@@ -206,7 +206,7 @@ Foam::radiation::radiativeIntensityRay::~radiativeIntensityRay()
 Foam::scalar Foam::radiation::radiativeIntensityRay::correct()
 {
     // Reset boundary heat flux to zero
-    Qr_.boundaryField() = 0.0;
+    Qr_.boundaryFieldRef() = 0.0;
 
     scalar maxResidual = -GREAT;
 
diff --git a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C
index aa2077e2be2ce899845260916845a27fc58c2953..81dca262d51ca05831587b22cff16f939094a7fb 100644
--- a/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C
+++ b/src/thermophysicalModels/radiation/radiationModels/viewFactor/viewFactor.C
@@ -407,6 +407,8 @@ void Foam::radiation::viewFactor::calculate()
     DynamicList<scalar> localCoarseEave(nLocalCoarseFaces_);
     DynamicList<scalar> localCoarseHoave(nLocalCoarseFaces_);
 
+    volScalarField::GeometricBoundaryField& QrBf = Qr_.boundaryFieldRef();
+
     forAll(selectedPatches_, i)
     {
         label patchID = selectedPatches_[i];
@@ -414,7 +416,7 @@ void Foam::radiation::viewFactor::calculate()
         const scalarField& Tp = T_.boundaryField()[patchID];
         const scalarField& sf = mesh_.magSf().boundaryField()[patchID];
 
-        fvPatchScalarField& QrPatch = Qr_.boundaryField()[patchID];
+        fvPatchScalarField& QrPatch = QrBf[patchID];
 
         greyDiffusiveViewFactorFixedValueFvPatchScalarField& Qrp =
             refCast
@@ -616,7 +618,6 @@ void Foam::radiation::viewFactor::calculate()
     Pstream::listCombineScatter(q);
     Pstream::listCombineGather(q, maxEqOp<scalar>());
 
-
     label globCoarseId = 0;
     forAll(selectedPatches_, i)
     {
@@ -624,7 +625,7 @@ void Foam::radiation::viewFactor::calculate()
         const polyPatch& pp = mesh_.boundaryMesh()[patchID];
         if (pp.size() > 0)
         {
-            scalarField& Qrp = Qr_.boundaryField()[patchID];
+            scalarField& Qrp = QrBf[patchID];
             const scalarField& sf = mesh_.magSf().boundaryField()[patchID];
             const labelList& agglom = finalAgglom_[patchID];
             label nAgglom = max(agglom)+1;
@@ -655,9 +656,9 @@ void Foam::radiation::viewFactor::calculate()
 
     if (debug)
     {
-        forAll(Qr_.boundaryField(), patchID)
+        forAll(QrBf, patchID)
         {
-            const scalarField& Qrp = Qr_.boundaryField()[patchID];
+            const scalarField& Qrp = QrBf[patchID];
             const scalarField& magSf = mesh_.magSf().boundaryField()[patchID];
             scalar heatFlux = gSum(Qrp*magSf);
 
diff --git a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C
index 5f963582dca0695fd8f13e1058cf774a240817f3..570c5cffe8ba7e910f0af227cc5be6f238b9e81f 100644
--- a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C
+++ b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/heheuPsiThermo.C
@@ -67,18 +67,40 @@ void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::calculate()
         );
     }
 
-    forAll(this->T_.boundaryField(), patchi)
-    {
-        fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
-        fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
-        fvPatchScalarField& pTu = this->Tu_.boundaryField()[patchi];
-        fvPatchScalarField& ppsi = this->psi_.boundaryField()[patchi];
+    volScalarField::GeometricBoundaryField& pBf =
+        this->p_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& TBf =
+        this->T_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& TuBf =
+        this->Tu_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& psiBf =
+        this->psi_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& heBf =
+        this->he().boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& heuBf =
+        this->heu().boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& muBf =
+        this->mu_.boundaryFieldRef();
 
-        fvPatchScalarField& ph = this->he_.boundaryField()[patchi];
-        fvPatchScalarField& pheu = this->heu_.boundaryField()[patchi];
+    volScalarField::GeometricBoundaryField& alphaBf =
+        this->alpha_.boundaryFieldRef();
 
-        fvPatchScalarField& pmu_ = this->mu_.boundaryField()[patchi];
-        fvPatchScalarField& palpha_ = this->alpha_.boundaryField()[patchi];
+    forAll(this->T_.boundaryField(), patchi)
+    {
+        fvPatchScalarField& pp = pBf[patchi];
+        fvPatchScalarField& pT = TBf[patchi];
+        fvPatchScalarField& pTu = TuBf[patchi];
+        fvPatchScalarField& ppsi = psiBf[patchi];
+        fvPatchScalarField& phe = heBf[patchi];
+        fvPatchScalarField& pheu = heuBf[patchi];
+        fvPatchScalarField& pmu = muBf[patchi];
+        fvPatchScalarField& palpha = alphaBf[patchi];
 
         if (pT.fixesValue())
         {
@@ -87,11 +109,11 @@ void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::calculate()
                 const typename MixtureType::thermoType& mixture_ =
                     this->patchFaceMixture(patchi, facei);
 
-                ph[facei] = mixture_.HE(pp[facei], pT[facei]);
+                phe[facei] = mixture_.HE(pp[facei], pT[facei]);
 
                 ppsi[facei] = mixture_.psi(pp[facei], pT[facei]);
-                pmu_[facei] = mixture_.mu(pp[facei], pT[facei]);
-                palpha_[facei] = mixture_.alphah(pp[facei], pT[facei]);
+                pmu[facei] = mixture_.mu(pp[facei], pT[facei]);
+                palpha[facei] = mixture_.alphah(pp[facei], pT[facei]);
             }
         }
         else
@@ -101,11 +123,11 @@ void Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::calculate()
                 const typename MixtureType::thermoType& mixture_ =
                     this->patchFaceMixture(patchi, facei);
 
-                pT[facei] = mixture_.THE(ph[facei], pp[facei], pT[facei]);
+                pT[facei] = mixture_.THE(phe[facei], pp[facei], pT[facei]);
 
                 ppsi[facei] = mixture_.psi(pp[facei], pT[facei]);
-                pmu_[facei] = mixture_.mu(pp[facei], pT[facei]);
-                palpha_[facei] = mixture_.alphah(pp[facei], pT[facei]);
+                pmu[facei] = mixture_.mu(pp[facei], pT[facei]);
+                palpha[facei] = mixture_.alphah(pp[facei], pT[facei]);
 
                 pTu[facei] =
                     this->patchFaceReactants(patchi, facei)
@@ -167,9 +189,11 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::heheuPsiThermo
         );
     }
 
-    forAll(this->heu_.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& heuBf = heu_.boundaryFieldRef();
+
+    forAll(heuBf, patchi)
     {
-        fvPatchScalarField& pheu = this->heu_.boundaryField()[patchi];
+        fvPatchScalarField& pheu = heuBf[patchi];
         const fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
         const fvPatchScalarField& pTu = this->Tu_.boundaryField()[patchi];
 
@@ -299,9 +323,11 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::Tb() const
         );
     }
 
-    forAll(Tb_.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& TbBf = Tb_.boundaryFieldRef();
+
+    forAll(TbBf, patchi)
     {
-        fvPatchScalarField& pTb = Tb_.boundaryField()[patchi];
+        fvPatchScalarField& pTb = TbBf[patchi];
 
         const fvPatchScalarField& ph = this->he_.boundaryField()[patchi];
         const fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
@@ -352,9 +378,11 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::psiu() const
             this->cellReactants(celli).psi(pCells[celli], TuCells[celli]);
     }
 
-    forAll(psiu.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& psiuBf = psiu.boundaryFieldRef();
+
+    forAll(psiuBf, patchi)
     {
-        fvPatchScalarField& ppsiu = psiu.boundaryField()[patchi];
+        fvPatchScalarField& ppsiu = psiuBf[patchi];
 
         const fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
         const fvPatchScalarField& pTu = this->Tu_.boundaryField()[patchi];
@@ -405,9 +433,11 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::psib() const
             this->cellReactants(celli).psi(pCells[celli], TbCells[celli]);
     }
 
-    forAll(psib.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& psibBf = psib.boundaryFieldRef();
+
+    forAll(psibBf, patchi)
     {
-        fvPatchScalarField& ppsib = psib.boundaryField()[patchi];
+        fvPatchScalarField& ppsib = psibBf[patchi];
 
         const fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
         const fvPatchScalarField& pTb = Tb_.boundaryField()[patchi];
@@ -460,9 +490,11 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::muu() const
         );
     }
 
-    forAll(muu_.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& muuBf = muu_.boundaryFieldRef();
+
+    forAll(muuBf, patchi)
     {
-        fvPatchScalarField& pMuu = muu_.boundaryField()[patchi];
+        fvPatchScalarField& pMuu = muuBf[patchi];
         const fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
         const fvPatchScalarField& pTu = this->Tu_.boundaryField()[patchi];
 
@@ -517,9 +549,11 @@ Foam::heheuPsiThermo<BasicPsiThermo, MixtureType>::mub() const
         );
     }
 
-    forAll(mub_.boundaryField(), patchi)
+    volScalarField::GeometricBoundaryField& mubBf = mub_.boundaryFieldRef();
+
+    forAll(mubBf, patchi)
     {
-        fvPatchScalarField& pMub = mub_.boundaryField()[patchi];
+        fvPatchScalarField& pMub = mubBf[patchi];
         const fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
         const fvPatchScalarField& pTb = Tb_.boundaryField()[patchi];
 
diff --git a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/psiuReactionThermo.C b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/psiuReactionThermo.C
index 45e6b01bacef40beeada1bafc364fac72df320b0..613af5725ebadbcdcfd6da87aee56bd721bee66e 100644
--- a/src/thermophysicalModels/reactionThermo/psiuReactionThermo/psiuReactionThermo.C
+++ b/src/thermophysicalModels/reactionThermo/psiuReactionThermo/psiuReactionThermo.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
@@ -74,7 +74,7 @@ wordList psiuReactionThermo::heuBoundaryTypes()
 
 void psiuReactionThermo::heuBoundaryCorrection(volScalarField& heu)
 {
-    volScalarField::GeometricBoundaryField& hbf = heu.boundaryField();
+    volScalarField::GeometricBoundaryField& hbf = heu.boundaryFieldRef();
 
     forAll(hbf, patchi)
     {
diff --git a/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C b/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C
index 7928d9bdff7c38bf4450d1d793aa2d14e6e15063..c914c4e3362b10ceb65a90c683a6fb721557abb4 100644
--- a/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C
+++ b/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C
@@ -61,14 +61,28 @@ void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::calculate()
             mixture_.Cpv(pCells[celli], TCells[celli]);
     }
 
+    volScalarField::GeometricBoundaryField& pBf =
+        this->p_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& TBf =
+        this->T_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& rhoBf =
+        this->rho_.boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& heBf =
+        this->he().boundaryFieldRef();
+
+    volScalarField::GeometricBoundaryField& alphaBf =
+        this->alpha_.boundaryFieldRef();
+
     forAll(this->T_.boundaryField(), patchi)
     {
-        fvPatchScalarField& pp = this->p_.boundaryField()[patchi];
-        fvPatchScalarField& pT = this->T_.boundaryField()[patchi];
-        fvPatchScalarField& prho = this->rho_.boundaryField()[patchi];
-        fvPatchScalarField& palpha = this->alpha_.boundaryField()[patchi];
-
-        fvPatchScalarField& ph = this->he_.boundaryField()[patchi];
+        fvPatchScalarField& pp = pBf[patchi];
+        fvPatchScalarField& pT = TBf[patchi];
+        fvPatchScalarField& prho = rhoBf[patchi];
+        fvPatchScalarField& phe = heBf[patchi];
+        fvPatchScalarField& palpha = alphaBf[patchi];
 
         if (pT.fixesValue())
         {
@@ -87,7 +101,7 @@ void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::calculate()
                     );
 
 
-                ph[facei] = mixture_.HE(pp[facei], pT[facei]);
+                phe[facei] = mixture_.HE(pp[facei], pT[facei]);
                 prho[facei] = volMixture_.rho(pp[facei], pT[facei]);
 
                 palpha[facei] =
@@ -111,7 +125,7 @@ void Foam::heSolidThermo<BasicSolidThermo, MixtureType>::calculate()
                         facei
                     );
 
-                pT[facei] = mixture_.THE(ph[facei], pp[facei] ,pT[facei]);
+                pT[facei] = mixture_.THE(phe[facei], pp[facei] ,pT[facei]);
                 prho[facei] = volMixture_.rho(pp[facei], pT[facei]);
 
                 palpha[facei] =
@@ -219,9 +233,11 @@ Foam::heSolidThermo<BasicSolidThermo, MixtureType>::Kappa() const
             ).Kappa(pCells[celli], TCells[celli]);
     }
 
-    forAll(Kappa.boundaryField(), patchi)
+    volVectorField::GeometricBoundaryField& KappaBf = Kappa.boundaryFieldRef();
+
+    forAll(KappaBf, patchi)
     {
-        vectorField& Kappap = Kappa.boundaryField()[patchi];
+        vectorField& Kappap = KappaBf[patchi];
         const scalarField& pT = this->T_.boundaryField()[patchi];
         const scalarField& pp = this->p_.boundaryField()[patchi];
 
diff --git a/src/transportModels/interfaceProperties/interfaceProperties.C b/src/transportModels/interfaceProperties/interfaceProperties.C
index ff4a6bd0648b86ca98f9e1864b1ed14931db84a5..2524f745fbc79cadcd6ec29120c0d0173b506404 100644
--- a/src/transportModels/interfaceProperties/interfaceProperties.C
+++ b/src/transportModels/interfaceProperties/interfaceProperties.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 @@ const Foam::scalar Foam::interfaceProperties::convertToRad =
 void Foam::interfaceProperties::correctContactAngle
 (
     surfaceVectorField::GeometricBoundaryField& nHatb,
-    surfaceVectorField::GeometricBoundaryField& gradAlphaf
+    const surfaceVectorField::GeometricBoundaryField& gradAlphaf
 ) const
 {
     const fvMesh& mesh = alpha1_.mesh();
@@ -128,7 +128,7 @@ void Foam::interfaceProperties::calculateK()
     //     (gradAlphaf + deltaN_*vector(0, 0, 1)
     //    *sign(gradAlphaf.component(vector::Z)))/(mag(gradAlphaf) + deltaN_)
     // );
-    correctContactAngle(nHatfv.boundaryField(), gradAlphaf.boundaryField());
+    correctContactAngle(nHatfv.boundaryFieldRef(), gradAlphaf.boundaryField());
 
     // Face unit interface normal flux
     nHatf_ = nHatfv & Sf;
diff --git a/src/transportModels/interfaceProperties/interfaceProperties.H b/src/transportModels/interfaceProperties/interfaceProperties.H
index 060d516d324041340684134847e49fce65a072d7..cc4867c63fe75c0dcce877307b87d3cf2c44ffff 100644
--- a/src/transportModels/interfaceProperties/interfaceProperties.H
+++ b/src/transportModels/interfaceProperties/interfaceProperties.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
@@ -86,7 +86,7 @@ class interfaceProperties
         void correctContactAngle
         (
             surfaceVectorField::GeometricBoundaryField& nHat,
-            surfaceVectorField::GeometricBoundaryField& gradAlphaf
+            const surfaceVectorField::GeometricBoundaryField& gradAlphaf
         ) const;
 
         //- Re-calculate the interface curvature