diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
index ec8f777542bd6cca2125d8e027d699c1d24dd83f..3b69386ed6b026c6d40515dfb8944c876310beaf 100644
--- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
+++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C
@@ -155,7 +155,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
 
     refValue() = Uwall_;
 
-    if(thermalCreep_)
+    if (thermalCreep_)
     {
         const volScalarField& vsfT =
             this->db().objectRegistry::lookupObject<volScalarField>("T");
@@ -167,7 +167,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
         refValue() -= 3.0*pnu/(4.0*pT)*transform(I - n*n, gradpT);
     }
 
-    if(curvature_)
+    if (curvature_)
     {
         const fvPatchTensorField& ptauMC =
             patch().lookupPatchField<volTensorField, tensor>("tauMC");
diff --git a/applications/solvers/incompressible/channelFoam/createGradP.H b/applications/solvers/incompressible/channelFoam/createGradP.H
index 9bb9bb0ba28f974c967e9f82a2b649fc2a032ebb..643509c46f980f765062daba334d7343792081ac 100644
--- a/applications/solvers/incompressible/channelFoam/createGradP.H
+++ b/applications/solvers/incompressible/channelFoam/createGradP.H
@@ -11,7 +11,7 @@
         runTime.path()/runTime.timeName()/"uniform"/"gradP.raw"
     );
 
-    if(gradPFile.good())
+    if (gradPFile.good())
     {
         gradPFile >> gradP;
         Info<< "Reading average pressure gradient" <<endl
diff --git a/applications/solvers/incompressible/channelFoam/writeGradP.H b/applications/solvers/incompressible/channelFoam/writeGradP.H
index c82dd534740b6c8db6258f572768b5c081a7e735..afbca9e61d05b9b63d9acda53152b5dc8e3f3711 100644
--- a/applications/solvers/incompressible/channelFoam/writeGradP.H
+++ b/applications/solvers/incompressible/channelFoam/writeGradP.H
@@ -5,7 +5,7 @@
             runTime.path()/runTime.timeName()/"uniform"/"gradP.raw"
         );
 
-        if(gradPFile.good())
+        if (gradPFile.good())
         {
             gradPFile << gradP << endl;
         }
diff --git a/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H b/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H
index 394b1cbd3eb71bc019b0cb3b5b76a4256bc838b7..f1651d8df391de08305885cf6fdc884ec7ea24bc 100644
--- a/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H
+++ b/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H
@@ -29,7 +29,7 @@
 
     for (label i=0; i<p.boundaryField().size(); i++)
     {
-        if(p.boundaryField()[i].fixesValue())
+        if (p.boundaryField()[i].fixesValue())
         {
             pcorrTypes[i] = fixedValueFvPatchScalarField::typeName;
         }
@@ -50,7 +50,7 @@
         pcorrTypes
     );
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pcorrEqn
         (
diff --git a/applications/solvers/multiphase/bubbleFoam/kEpsilon.H b/applications/solvers/multiphase/bubbleFoam/kEpsilon.H
index 576e3253abf0b9f1dc592825aab3b6e5852bb853..84dadd7acb5b80452b7992f855d7965d893ff8df 100644
--- a/applications/solvers/multiphase/bubbleFoam/kEpsilon.H
+++ b/applications/solvers/multiphase/bubbleFoam/kEpsilon.H
@@ -1,4 +1,4 @@
-if(turbulence)
+if (turbulence)
 {
     if (mesh.changing())
     {
diff --git a/applications/solvers/multiphase/bubbleFoam/pEqn.H b/applications/solvers/multiphase/bubbleFoam/pEqn.H
index 35813dd935ef015a1ea0ee9bb28479448adc7725..3e550efc65e49d1c5ea8ec54a6c360e1f7318f27 100644
--- a/applications/solvers/multiphase/bubbleFoam/pEqn.H
+++ b/applications/solvers/multiphase/bubbleFoam/pEqn.H
@@ -34,7 +34,7 @@
 
     surfaceScalarField Dp("(rho*(1|A(U)))", alphaf*rUaAf/rhoa + betaf*rUbAf/rhob);
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pEqn
         (
diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H b/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H
index f681ba65940dd3eb12b67ad38628f19537ca2c96..e4bef5a60fe65de90f85b1f0713fac45be23658b 100644
--- a/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H
+++ b/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H
@@ -42,7 +42,7 @@
 
     adjustPhi(phi, U, pcorr);
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pcorrEqn
         (
diff --git a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H
index 9d2dc23916babb9c6c94acd2b53125c8cfee1dad..e6ff71342912687a62260e06b3e493a612d15350 100644
--- a/applications/solvers/multiphase/compressibleInterFoam/pEqn.H
+++ b/applications/solvers/multiphase/compressibleInterFoam/pEqn.H
@@ -30,7 +30,7 @@
           + fvc::interpolate(rho)*(g & mesh.Sf())
         )*rUAf;
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pEqnIncomp
         (
diff --git a/applications/solvers/multiphase/interDyMFoam/correctPhi.H b/applications/solvers/multiphase/interDyMFoam/correctPhi.H
index 43b13c2b898c35350304b203936cc0124677e21b..72550e621c0b6dc381f92f591fceed084b32494f 100644
--- a/applications/solvers/multiphase/interDyMFoam/correctPhi.H
+++ b/applications/solvers/multiphase/interDyMFoam/correctPhi.H
@@ -42,7 +42,7 @@
 
     adjustPhi(phi, U, pcorr);
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pcorrEqn
         (
diff --git a/applications/solvers/multiphase/interDyMFoam/pEqn.H b/applications/solvers/multiphase/interDyMFoam/pEqn.H
index 2af289a76f31beb1654acfde23592bb299346f1c..afefb0a5f091b8131962713a5561cadcbaed2dec 100644
--- a/applications/solvers/multiphase/interDyMFoam/pEqn.H
+++ b/applications/solvers/multiphase/interDyMFoam/pEqn.H
@@ -18,7 +18,7 @@
       + fvc::interpolate(rho)*(g & mesh.Sf())
     )*rAUf;
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pEqn
         (
diff --git a/applications/solvers/multiphase/interFoam/correctPhi.H b/applications/solvers/multiphase/interFoam/correctPhi.H
index 0274b7e9ed8dc75b372db31efa743722a7dafc56..a41332ce9bdd6811eaaa1342eedc02defb1c1d1f 100644
--- a/applications/solvers/multiphase/interFoam/correctPhi.H
+++ b/applications/solvers/multiphase/interFoam/correctPhi.H
@@ -34,7 +34,7 @@
 
     adjustPhi(phi, U, pcorr);
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pcorrEqn
         (
diff --git a/applications/solvers/multiphase/interFoam/pEqn.H b/applications/solvers/multiphase/interFoam/pEqn.H
index 7aa172b858473b0f5e5c0934e5690233ef60755a..7473848c62df1a1be80e281ff8090c1f4370d2df 100644
--- a/applications/solvers/multiphase/interFoam/pEqn.H
+++ b/applications/solvers/multiphase/interFoam/pEqn.H
@@ -19,7 +19,7 @@
           + fvc::interpolate(rho)*(g & mesh.Sf())
         )*rUAf;
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pEqn
         (
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H b/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H
index 17377302f0ecd97c2ee04e98cea8bcfc88ab4921..2547dac96630aa59a6b11dc00230f5f13599e715 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H
@@ -34,7 +34,7 @@
 
     adjustPhi(phi, U, pcorr);
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pcorrEqn
         (
diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H
index 3c164cc574311612e838abda97310fd3959e9e72..519a0b9f65322945855382770f716f991b019803 100644
--- a/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H
+++ b/applications/solvers/multiphase/interPhaseChangeFoam/pEqn.H
@@ -23,7 +23,7 @@
     const volScalarField& vDotcP = vDotP[0]();
     const volScalarField& vDotvP = vDotP[1]();
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pEqn
         (
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C
index 6d32abd9c72689e30301a3e5105014d5beacd9de..0e1252bea795d8119429a9019dc248984ddb2c62 100644
--- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C
+++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/multiphaseMixture.C
@@ -125,7 +125,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::rho() const
 
     tmp<volScalarField> trho = iter()*iter().rho();
 
-    for(++iter; iter != phases_.end(); ++iter)
+    for (++iter; iter != phases_.end(); ++iter)
     {
         trho() += iter()*iter().rho();
     }
@@ -140,7 +140,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::mu() const
 
     tmp<volScalarField> tmu = iter()*iter().rho()*iter().nu();
 
-    for(++iter; iter != phases_.end(); ++iter)
+    for (++iter; iter != phases_.end(); ++iter)
     {
         tmu() += iter()*iter().rho()*iter().nu();
     }
@@ -156,7 +156,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseMixture::muf() const
     tmp<surfaceScalarField> tmuf =
         fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
 
-    for(++iter; iter != phases_.end(); ++iter)
+    for (++iter; iter != phases_.end(); ++iter)
     {
         tmuf() +=
             fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
@@ -210,7 +210,7 @@ Foam::multiphaseMixture::surfaceTensionForce() const
         PtrDictionary<phase>::const_iterator iter2 = iter1;
         ++iter2;
 
-        for(; iter2 != phases_.end(); ++iter2)
+        for (; iter2 != phases_.end(); ++iter2)
         {
             const phase& alpha2 = iter2();
 
@@ -489,7 +489,7 @@ void Foam::multiphaseMixture::solveAlphas
         if (cycleAlpha)
         {
             PtrDictionary<phase>::iterator refPhaseIter = phases_.begin();
-            for(label i=0; i<nSolves%phases_.size(); i++)
+            for (label i=0; i<nSolves%phases_.size(); i++)
             {
                 ++refPhaseIter;
             }
diff --git a/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H b/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H
index 4bec77f950d54fadbefe8507abe3ed8699476c54..7e9f30c01c01b1091c5e2a02e0af88718e5f1a48 100644
--- a/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H
+++ b/applications/solvers/multiphase/multiphaseInterFoam/pEqn.H
@@ -18,7 +18,7 @@
           + fvc::interpolate(rho)*(g & mesh.Sf())
         )*rUAf;
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pEqn
         (
diff --git a/applications/solvers/multiphase/settlingFoam/pEqn.H b/applications/solvers/multiphase/settlingFoam/pEqn.H
index b4fc05b32ab56f04646427310478e9cc92429b11..77bb0f45924a76e91afb6a146011adfe10abaafb 100644
--- a/applications/solvers/multiphase/settlingFoam/pEqn.H
+++ b/applications/solvers/multiphase/settlingFoam/pEqn.H
@@ -17,7 +17,7 @@ phi =
 surfaceScalarField phiU("phiU", phi);
 phi += fvc::interpolate(rho)*(g & mesh.Sf())*rUAf;
 
-for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
 {
     fvScalarMatrix pEqn
     (
diff --git a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H
index 7ba3cdba8a6a2badce20af6292008e62487f23b7..f1e07558cb36728e6310b4808ff3b2476455548a 100644
--- a/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H
+++ b/applications/solvers/multiphase/twoLiquidMixingFoam/pEqn.H
@@ -13,7 +13,7 @@
 
     phi = phiU + fvc::interpolate(rho)*(g & mesh.Sf())*rUAf;
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pEqn
         (
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C
index 0576f4694e583f8ba7890b051a821d1ec5a55192..7d6e41bf4cbf2ccfab0a1b14d06381d17e33aa7a 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C
@@ -78,12 +78,12 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowErgunWenYu::K
 
     forAll(Re, celli)
     {
-        if(Re[celli] > 1000.0)
+        if (Re[celli] > 1000.0)
         {
             Cds[celli] = 0.44;
         }
     }
-    
+
     // Wen and Yu (1966)
     tmp<volScalarField> tKWenYu = 0.75*Cds*phaseb_.rho()*Ur*bp/phasea_.d();
     volScalarField& KWenYu = tKWenYu();
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C
index 256d0861c036b13099ac2e9c922e0382e8381955..1be08abd3a69fb662da0d164d7dd446f347295cb 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C
@@ -77,7 +77,7 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowSchillerNaumann::K
 
     forAll(Re, celli)
     {
-        if(Re[celli] > 1000.0)
+        if (Re[celli] > 1000.0)
         {
             Cds[celli] = 0.44;
         }
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C
index 707c269c24d051cb66047a16b473b5394814c2e2..59e7bed10e0ec4012de36c3f07d8f09b1b38334f 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C
@@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::SchillerNaumann::K
 
     forAll(Re, celli)
     {
-        if(Re[celli] > 1000.0)
+        if (Re[celli] > 1000.0)
         {
             Cds[celli] = 0.44;
         }
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C
index 76465069333b86295590a3e9d1af7fe5a091bc5b..febe1d11f09b1b843b741647651d35dde1366662 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C
@@ -77,7 +77,7 @@ Foam::tmp<Foam::volScalarField> Foam::WenYu::K
 
     forAll(Re, celli)
     {
-        if(Re[celli] > 1000.0)
+        if (Re[celli] > 1000.0)
         {
             Cds[celli] = 0.44;
         }
diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H
index ad48745519b6c530920f5e73da1ebe681c4ff843..57a25a299d3eb84cf4ac078a8aa69cefbfa9fcf5 100644
--- a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H
+++ b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H
@@ -47,7 +47,7 @@
 
     surfaceScalarField Dp("(rho*(1|A(U)))", alphaf*rUaAf/rhoa + betaf*rUbAf/rhob);
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pEqn
         (
diff --git a/applications/test/PackedList2/PackedListTest2.C b/applications/test/PackedList2/PackedListTest2.C
index d6e8c93bc2623014afd054353d636ffb98496e51..bb61f6e308aa82dc5fe8489fd12c713346acff6f 100644
--- a/applications/test/PackedList2/PackedListTest2.C
+++ b/applications/test/PackedList2/PackedListTest2.C
@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
     sum = 0;
     for (label iter = 0; iter < nIters; ++iter)
     {
-        for(unsigned int i = 0; i < stlVector.size(); i++)
+        for (unsigned int i = 0; i < stlVector.size(); i++)
         {
             sum += stlVector[i];
         }
diff --git a/applications/test/extendedStencil/testExtendedStencil.C b/applications/test/extendedStencil/testExtendedStencil.C
index 876576b29eab8666ae74c85e9801fb00c7f22324..e8cde9051bc369cf5830dd34da1da14db25ccc9e 100644
--- a/applications/test/extendedStencil/testExtendedStencil.C
+++ b/applications/test/extendedStencil/testExtendedStencil.C
@@ -188,11 +188,11 @@ int main(int argc, char *argv[])
 //        (
 //            mesh
 //        );
-//        
+//
 //        Info<< "cellFaceCell:" << endl;
 //        writeStencilStats(addressing.stencil());
-//        
-//        
+//
+//
 //        //// Do some interpolation.
 //        //{
 //        //    const labelListList& stencil = addressing.stencil();
@@ -226,7 +226,7 @@ int main(int argc, char *argv[])
 //            mesh.C(),
 //            stencilPoints
 //        );
-//        
+//
 //        forAll(stencilPoints, faceI)
 //        {
 //            if (stencilPoints[faceI].size() >= 15)
@@ -443,10 +443,10 @@ int main(int argc, char *argv[])
         (
             mesh
         );
-        
+
         Info<< "cellFaceCell:" << endl;
         writeStencilStats(addressing.stencil());
-        
+
         // Collect stencil face centres
         List<List<point> > stencilPoints(mesh.nCells());
         addressing.collectData
@@ -454,7 +454,7 @@ int main(int argc, char *argv[])
             mesh.Cf(),
             stencilPoints
         );
-        
+
         forAll(stencilPoints, cellI)
         {
             writeStencilOBJ
@@ -477,7 +477,7 @@ int main(int argc, char *argv[])
 //        vf,
 //        stencilData
 //    );
-//    for(label faci = 0; faci < mesh.nInternalFaces(); faci++)
+//    for (label faci = 0; faci < mesh.nInternalFaces(); faci++)
 //    {
 //        const scalarList& stData = stencilData[faceI];
 //        const scalarList& stWeight = fit[faceI];
diff --git a/applications/test/router/processorRouter.C b/applications/test/router/processorRouter.C
index e94025ff2b6ad0616022767d5343aafd3d62e0fd..5f68822cf30a55a476a3d8a5af6834ce30a1e1ce 100644
--- a/applications/test/router/processorRouter.C
+++ b/applications/test/router/processorRouter.C
@@ -71,7 +71,7 @@ labelList procNeighbours(const polyMesh& mesh)
         {
             const polyPatch& patch = mesh.boundaryMesh()[patchI];
 
-            const processorPolyPatch& procPatch = 
+            const processorPolyPatch& procPatch =
                 refCast<const processorPolyPatch>(patch);
 
             label procId = procPatch.neighbProcNo() - Pstream::firstSlave() + 1;
@@ -96,7 +96,7 @@ point meshCentre(const polyMesh& mesh)
 
 int main(int argc, char *argv[])
 {
-#   include "setRootCase.H"    
+#   include "setRootCase.H"
 #   include "createTime.H"
 #   include "createMesh.H"
 
@@ -230,7 +230,7 @@ int main(int argc, char *argv[])
                     // Dump route as lines.
                     labelList route(cellRouter.getRoute(-(pathI + 1)));
 
-                    for(label elemI = 1; elemI < route.size(); elemI++)
+                    for (label elemI = 1; elemI < route.size(); elemI++)
                     {
                         objFile
                             << "l " << route[elemI-1]+1 << ' '
diff --git a/applications/test/router/router.C b/applications/test/router/router.C
index 1af001a81f97174474d242e37206e5255038f4e8..a4747396964d397a50b4458d639f9f8385bcaeb1 100644
--- a/applications/test/router/router.C
+++ b/applications/test/router/router.C
@@ -38,7 +38,7 @@ Foam::label Foam::router::count(const label weight) const
     {
         cnt += weights_[nodeI];
     }
-    
+
     return cnt;
 }
 
@@ -315,7 +315,7 @@ bool Foam::router::route(const labelList& path, const label pathValue)
     setWeights(0, path[0]);
 
     // Check if all endPoints can be reached
-    for(label leafI = 1; leafI < path.size(); leafI++)
+    for (label leafI = 1; leafI < path.size(); leafI++)
     {
         if (weights_[path[leafI]] == labelMax)
         {
@@ -329,7 +329,7 @@ bool Foam::router::route(const labelList& path, const label pathValue)
     }
 
     // Search back from all endpoints to start and fix weights
-    for(label leafI = 1; leafI < path.size(); leafI++)
+    for (label leafI = 1; leafI < path.size(); leafI++)
     {
         fixWeights
         (
@@ -370,7 +370,7 @@ bool Foam::router::route(const labelList& path, const label pathValue)
         {
             weights_[nodeI] = 0;
         }
-    }    
+    }
 
     return true;
 }
diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
index c985d3ab4f4b0c07f8e04e1b7c9f333f263bdb16..bcdf44f265f9c4f6568dca11c61e6e50d08410fd 100644
--- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
+++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
@@ -264,7 +264,7 @@ int main(int argc, char *argv[])
     }
 
     yyFlexLexer lexer(&ansysStream);
-    while(lexer.yylex() != 0)
+    while (lexer.yylex() != 0)
     {}
 
     Info<< "Creating points" << endl;
diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
index 6ccb2697f4fb8810b72224a10f3ab584da335d94..cf46939eaeb73fa17130c965cdbe545695e420aa 100644
--- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
+++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L
@@ -813,7 +813,7 @@ int main(int argc, char *argv[])
 
     yyFlexLexer lexer(&fluentStream.stdStream());
 
-    while(lexer.yylex() != 0)
+    while (lexer.yylex() != 0)
     {}
 
     Info<< "\nFINISHED LEXING\n\n";
@@ -973,7 +973,7 @@ int main(int argc, char *argv[])
 
             // Set the owner of these faces to -1 so that they do not get
             // added to the mesh
-            for(label facei = start; facei <= end; facei++)
+            for (label facei = start; facei <= end; facei++)
             {
                 owner[facei] = -1;
             }
diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
index bcba234fe149785d1dfb267932e4cc1347dff64b..3460a213e87598728a01fba28dc801bbea4bd383 100644
--- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
+++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L
@@ -898,7 +898,7 @@ int main(int argc, char *argv[])
     }
 
     yyFlexLexer lexer(&fluentStream);
-    while(lexer.yylex() != 0)
+    while (lexer.yylex() != 0)
     {}
 
     Info<< "\n\nFINISHED LEXING\n\n\n";
@@ -1388,7 +1388,7 @@ int main(int argc, char *argv[])
                 meshFaces[j] = cMeshFace;
                 pFaceSet.insert(cMeshFace);
             }
-            if(writeSets)
+            if (writeSets)
             {
                 Info<< "Writing patch " << patchNames[patchI]
                     << " of size " << sz << " to faceSet." << endl;
@@ -1404,7 +1404,11 @@ int main(int argc, char *argv[])
         //it will be put in a default wall boundary
         //internal boundaries are simply ignored
 
-        if(patchTypes[patchI] != "internal" && !pShapeMesh.isInternalFace(meshFaces[0]))
+        if
+        (
+            patchTypes[patchI] != "internal"
+         && !pShapeMesh.isInternalFace(meshFaces[0])
+        )
         {
             //first face is external and has valid non-internal type
 
@@ -1423,7 +1427,7 @@ int main(int argc, char *argv[])
                         << exit(FatalError);
                 }
 
-                if(facePatchID[faceI - pShapeMesh.nInternalFaces()]!= -1)
+                if (facePatchID[faceI - pShapeMesh.nInternalFaces()]!= -1)
                 {
                     FatalErrorIn(args.executable())
                         << "Face " << faceI << " on new patch "
@@ -1475,7 +1479,7 @@ int main(int argc, char *argv[])
         DynamicList<label> defaultBoundaryFaces(facePatchID.size());
         forAll(facePatchID, idI)
         {
-            if(facePatchID[idI] == -1)
+            if (facePatchID[idI] == -1)
             {
                 defaultBoundaryFaces.append(idI);
                 facePatchID[idI] = nBoundaries;
@@ -1575,50 +1579,50 @@ int main(int argc, char *argv[])
             boundaryZones[pI].append(bPatches[pI].name());
         }
 
-	    label cnt=0;
-	    SLList<label>::iterator cg = cellGroupZoneID.begin();
-	    SLList<label>::iterator start = cellGroupStartIndex.begin();
-	    SLList<label>::iterator end = cellGroupEndIndex.begin();
+        label cnt=0;
+        SLList<label>::iterator cg = cellGroupZoneID.begin();
+        SLList<label>::iterator start = cellGroupStartIndex.begin();
+        SLList<label>::iterator end = cellGroupEndIndex.begin();
 
-	    for (; cg != cellGroupZoneID.end(); ++cg, ++start, ++end)
-	    {
-	        const word& name = patchNameIDs[cg()];
-	        const word& type = patchTypeIDs[cg()];
+        for (; cg != cellGroupZoneID.end(); ++cg, ++start, ++end)
+        {
+            const word& name = patchNameIDs[cg()];
+            const word& type = patchTypeIDs[cg()];
 
-	        Info<< "Writing cell zone: " << name
+            Info<< "Writing cell zone: " << name
                 << " of type " << type << " starting at " << start() - 1
                 << " ending at " << end() - 1 << " to cellSet." << endl;
 
-	        labelList cls(end() - start() + 1);
+            labelList cls(end() - start() + 1);
 
             // Mark zone cells, used for finding faces
             boolList zoneCell(pShapeMesh.nCells(), false);
 
-	        // shift cell indizes by 1
-	        label nr=0;
-	        for (label celli = (start() - 1); celli < end(); celli++)
+            // shift cell indizes by 1
+            label nr=0;
+            for (label celli = (start() - 1); celli < end(); celli++)
             {
                 cls[nr]=celli;
                 zoneCell[celli] = true;
                 nr++;
-	        }
+            }
 
-	        cz[cnt] = new cellZone
-	        (
+            cz[cnt] = new cellZone
+            (
                 name,
                 cls,
                 cnt,
                 pShapeMesh.cellZones()
-	        );
+            );
 
             DynamicList<label> zoneFaces(pShapeMesh.nFaces());
             forAll(pShapeMesh.faceNeighbour(), faceI)
             {
                 label nei = pShapeMesh.faceNeighbour()[faceI];
                 label own = pShapeMesh.faceOwner()[faceI];
-                if(nei != -1)
+                if (nei != -1)
                 {
-                    if(zoneCell[nei] && zoneCell[own])
+                    if (zoneCell[nei] && zoneCell[own])
                     {
                         zoneFaces.append(faceI);
                     }
@@ -1641,7 +1645,7 @@ int main(int argc, char *argv[])
                 const labelList& faceCells = bPatches[pI].faceCells();
                 forAll(faceCells, fcI)
                 {
-                    if(zoneCell[faceCells[fcI] ])
+                    if (zoneCell[faceCells[fcI] ])
                     {
                         boundaryZones[pI].append(name);
                         break;
@@ -1649,8 +1653,8 @@ int main(int argc, char *argv[])
                 }
             }
 
-	        cnt++;
-	    }
+            cnt++;
+        }
 
         pShapeMesh.addZones(pz, fz, cz);
 
@@ -1715,7 +1719,7 @@ int main(int argc, char *argv[])
                 cellSet internal(pShapeMesh, name, end() - start());
 
                 // shift cell indizes by 1
-                for(label celli=start() - 1; celli<=end() - 1; celli++)
+                for (label celli = start() - 1; celli <= end() - 1; celli++)
                 {
                     internal.insert(celli);
                 }
diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
index 4f8708710d1898fe80e9dea19f881ab73910c326..bc88b46c1e0333331f431c3498f5f2414208ea07 100644
--- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
+++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
@@ -665,7 +665,7 @@ int main(int argc, char *argv[])
     }
 
     yyFlexLexer lexer(&gambitStream);
-    while(lexer.yylex() != 0)
+    while (lexer.yylex() != 0)
     {}
 
     Info<< "Finished lexing" << endl;
diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C
index 2365f418d792ed78f2c932001d801d8bcfde3896..16977b92c6788d7761cd4da49b40de7c6f036609 100644
--- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C
+++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C
@@ -314,14 +314,14 @@ void readPhysNames(IFstream& inFile, Map<word>& physicalNames)
         IStringStream lineStr(line);
         label nSpaces = lineStr.str().count(' ');
 
-        if(nSpaces == 1)
+        if (nSpaces == 1)
         {
             lineStr >> regionI >> regionName;
 
             Info<< "    " << regionI << '\t'
                 << string::validate<word>(regionName) << endl;
         }
-        else if(nSpaces == 2)
+        else if (nSpaces == 2)
         {
             // >= Gmsh2.4 physical types has tag in front.
             label physType;
diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
index 3192f610ad25a4afb766cfee9d125940934ff242..f289e8bb389a3e91b243cfb0022e94b90c9f8479 100644
--- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
+++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C
@@ -412,7 +412,7 @@ void readPatches
     Sout<< "Starting reading patches at line " << is.lineNumber() << '.'
         << endl;
 
-    while(true)
+    while (true)
     {
         string line;
         is.getLine(line);
diff --git a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H
index ba2b615df18aa7cc6b32de4133ae0d65be446987..92c7b7c355f558bf0c3a0251bd41caba7ec0b618 100644
--- a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H
+++ b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H
@@ -20,7 +20,7 @@ pointField points(nPoints);
 label i4;
 labelList idface(nPoints), fv(nPoints);
 
-for(label i=0; i<nPoints; i++)
+for (label i=0; i<nPoints; i++)
 {
     scalar ffv;
     kivaFile
@@ -44,7 +44,7 @@ labelList i1tab(nPoints), i3tab(nPoints), i8tab(nPoints), idreg(nPoints),
 
 label nBfaces = 0;
 
-for(label i=0; i<nPoints; i++)
+for (label i=0; i<nPoints; i++)
 {
     label i1, i3, i8;
     scalar ff, fbcl, fbcf, fbcb;
@@ -85,7 +85,7 @@ if (mTable == 0)
 
 labelList imtab(nPoints), jmtab(nPoints), kmtab(nPoints);
 
-for(label i=0; i<nPoints; i++)
+for (label i=0; i<nPoints; i++)
 {
     label im, jm, km;
     kivaFile >> i4 >> im >> jm >> km;
@@ -115,7 +115,7 @@ forAll (pointMap, i)
 }
 
 // Initialise all cells to hex and search and set map for collocated points
-for(label i=0; i<nPoints; i++)
+for (label i=0; i<nPoints; i++)
 {
     if (f[i] > 0.0)
     {
@@ -237,7 +237,7 @@ List<SLList<face> > pFaces[nBCs];
 face quadFace(4);
 face triFace(3);
 
-for(label i=0; i<nPoints; i++)
+for (label i=0; i<nPoints; i++)
 {
     if (f[i] > 0)
     {
diff --git a/applications/utilities/mesh/conversion/polyDualMesh/meshDualiser.C b/applications/utilities/mesh/conversion/polyDualMesh/meshDualiser.C
index dfc1fbb20e651bb85c0ea2edee738d3e111234ae..52898444ae4bacd21d0885035d2778e5e3f7d02c 100644
--- a/applications/utilities/mesh/conversion/polyDualMesh/meshDualiser.C
+++ b/applications/utilities/mesh/conversion/polyDualMesh/meshDualiser.C
@@ -1410,7 +1410,7 @@ void Foam::meshDualiser::setRefinement
                     meshMod
                 );
             }
-            while(fp != 0);
+            while (fp != 0);
         }
     }
 
diff --git a/applications/utilities/mesh/conversion/starToFoam/createCoupleMatches.C b/applications/utilities/mesh/conversion/starToFoam/createCoupleMatches.C
index f2fcc8c7c8a40637d9ed78971e497fbcef3bdc4b..d1a074c391b10456fd73e29f25f1a9627131be5c 100644
--- a/applications/utilities/mesh/conversion/starToFoam/createCoupleMatches.C
+++ b/applications/utilities/mesh/conversion/starToFoam/createCoupleMatches.C
@@ -545,7 +545,7 @@ void starMesh::createCoupleMatches()
                     points_[masterEdges[masterEdgeI].start()];
 
                 // loop until the next label to add is -1
-                for(;;)
+                for (;;)
                 {
                     label nextPointLabel = -1;
                     label usedI = -1;
@@ -739,7 +739,7 @@ void starMesh::createCoupleMatches()
                     points_[slaveEdges[slaveEdgeI].start()];
 
                 // loop until the next label to add is -1
-                for(;;)
+                for (;;)
                 {
                     label nextPointLabel = -1;
                     label usedI = -1;
diff --git a/applications/utilities/mesh/manipulation/checkMesh/printMeshStats.C b/applications/utilities/mesh/manipulation/checkMesh/printMeshStats.C
index 269656594c5c6524c6508c7c602967ac419173df..462d1531f8d3139c111934a82580be07eb40c6c3 100644
--- a/applications/utilities/mesh/manipulation/checkMesh/printMeshStats.C
+++ b/applications/utilities/mesh/manipulation/checkMesh/printMeshStats.C
@@ -96,7 +96,7 @@ void Foam::printMeshStats(const polyMesh& mesh, const bool allTopology)
     label nTetWedge = 0;
     label nUnknown = 0;
 
-    for(label cellI = 0; cellI < mesh.nCells(); cellI++)
+    for (label cellI = 0; cellI < mesh.nCells(); cellI++)
     {
         if (hex.isA(mesh, cellI))
         {
diff --git a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/writeFunctions.C b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/writeFunctions.C
index f44d4499013033c25c686134b6fef7e5878befbe..d4dcdbbcf15622c5435dbbb40ceb507ac0bce997 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/writeFunctions.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/writeFunctions.C
@@ -75,7 +75,7 @@ void writeBytes(char* start, int nBytes)
 
     cout<< start << " : ";
 
-    for(int i = 0; i < nBytes; i++)
+    for (int i = 0; i < nBytes; i++)
     {
         cout<< " " << start[i];
     }
diff --git a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/write_binary_uns.c b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/write_binary_uns.c
index 105d042792fe4c7ed0c08c92e7e8b48c31ecd1e0..6cd3eb6620b4ebfed7b19341a08af33118e25f6a 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/write_binary_uns.c
+++ b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/write_binary_uns.c
@@ -423,7 +423,7 @@ int main()
 
 	fwrite(ibuf, sizeof(int), 3, outfp);
 
-	for(i = 0; i < num_faces_trim_cell; ++i) /* loop over the faces */
+	for (i = 0; i < num_faces_trim_cell; ++i) /* loop over the faces */
 	    fwrite(trim_cell_face[i], sizeof(int), trim_cell_face[i][0] + 1,
 		   outfp);
 
@@ -433,7 +433,7 @@ int main()
 
 	fwrite(ibuf, sizeof(int), 3, outfp);
 
-	for(i = 0; i < num_faces_hang_cell; ++i) /* loop over the faces */
+	for (i = 0; i < num_faces_hang_cell; ++i) /* loop over the faces */
 	    fwrite(hang_cell_face[i], sizeof(int), hang_cell_face[i][0] + 1,
 		   outfp);
 
@@ -519,7 +519,7 @@ int main()
 	ibuf[0] = A_WALL; /* wall value */
 	ibuf[1] = 0; /* number of hanging nodes */
 
-	for(i = 0; i < num_faces_trim_cell; ++i) /* write out face info */
+	for (i = 0; i < num_faces_trim_cell; ++i) /* write out face info */
 	{
 	    fwrite(ibuf, sizeof(int), 1, outfp); /* write wall value */
 	    fwrite(trim_cell_face[i], sizeof(int), trim_cell_face[i][0] + 1,
@@ -541,7 +541,7 @@ int main()
 	ibuf[2] = 1; /* number of hanging nodes for face 3 */
 	ibuf[3] = 31; /* the node number for the hanging node on face 3*/
 
-	for(i = 0; i < 2; ++i) /* write out face info for first 2 faces */
+	for (i = 0; i < 2; ++i) /* write out face info for first 2 faces */
 	{
 	    fwrite(ibuf, sizeof(int), 1, outfp); /* write wall value */
 	    fwrite(hang_cell_face[i], sizeof(int), hang_cell_face[i][0] + 1,
@@ -555,7 +555,7 @@ int main()
 	fwrite(&ibuf[2], sizeof(int), 2, outfp);
 
 	/* write out face info for last 3 faces */
-	for(i = 3; i < num_faces_hang_cell; ++i)
+	for (i = 3; i < num_faces_hang_cell; ++i)
 	{
 	    fwrite(ibuf, sizeof(int), 1, outfp); /* write wall value */
 	    fwrite(hang_cell_face[i], sizeof(int), hang_cell_face[i][0] + 1,
diff --git a/applications/utilities/postProcessing/dataConversion/foamToGMV/foamToGMV.C b/applications/utilities/postProcessing/dataConversion/foamToGMV/foamToGMV.C
index 40179616fc487a9dc909c98e13c3fe6323444fec..d9b807e316dac412d18d71bbd88e4612b92f9f41 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToGMV/foamToGMV.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToGMV/foamToGMV.C
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
     Info<< TimeList << endl;
     label nTimes = TimeList.size();
 
-    for(label n=1; n < nTimes; n++)
+    for (label n=1; n < nTimes; n++)
     {
         if (TimeList[n].value() > startTime)
         {
diff --git a/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutput.H b/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutput.H
index 03523ed2de769888547857e6e52898efc7a75d30..124bab141197f36f8e01883dd9fc0ca991a14ffe 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutput.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutput.H
@@ -24,7 +24,7 @@ for (label i=0; i < nTypes; i++)
         {
             volScalarField gmvScalarField(fieldObject, mesh);
             gmvFile << fieldName << " 0" << nl;
-            for(label indx=0;indx<mesh.nCells();indx++)
+            for (label indx=0;indx<mesh.nCells();indx++)
             {
                 gmvFile << gmvScalarField[indx] << " ";
             }
diff --git a/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutputHeader.H b/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutputHeader.H
index ff904f9a709d804131986edffdbbccdc9c400c2c..46fa702ea1cf0f08c205170608bc5561ff55374c 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutputHeader.H
+++ b/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutputHeader.H
@@ -4,29 +4,29 @@ const cellShapeList& cells = mesh.cellShapes();
 
 gmvFile << "gmvinput " << format << nl;
 gmvFile << "nodes   " << nPoints << nl;
-for(label indx=0;indx<nPoints;indx++)
+for (label indx=0;indx<nPoints;indx++)
 {
     gmvFile << points[indx].x() << " ";
 }
 gmvFile << nl;
-for(label indx=0;indx<nPoints;indx++)
+for (label indx=0;indx<nPoints;indx++)
 {
     gmvFile << points[indx].y() << " ";
 }
 gmvFile << nl;
-for(label indx=0;indx<nPoints;indx++)
+for (label indx=0;indx<nPoints;indx++)
 {
     gmvFile << points[indx].z() << " ";
 }
 gmvFile << nl;
 gmvFile << "cells   " << cells.size() << nl;
-for(label indx=0;indx<cells.size();indx++)
+for (label indx=0;indx<cells.size();indx++)
 {
     label nNodes = cells[indx].size();
     if (nNodes == 8)
     {
         gmvFile << "hex     " << 8 << " ";
-        for(label ip=0; ip<nNodes; ip++)
+        for (label ip=0; ip<nNodes; ip++)
         {
             gmvFile << cells[indx][ip] + 1 << " ";        
         }
@@ -35,7 +35,7 @@ for(label indx=0;indx<cells.size();indx++)
     else if (nNodes == 4)
     {
         gmvFile << "tet     " << 4 << " ";
-        for(label ip=0; ip<nNodes; ip++)
+        for (label ip=0; ip<nNodes; ip++)
         {
             gmvFile << cells[indx][ip] + 1 << " ";        
         }
@@ -44,7 +44,7 @@ for(label indx=0;indx<cells.size();indx++)
     else if (nNodes == 6)
     {
         gmvFile << "prism   " << 6 << " ";
-        for(label ip=0; ip<nNodes; ip++)
+        for (label ip=0; ip<nNodes; ip++)
         {
             gmvFile << cells[indx][ip] + 1 << " ";        
         }
diff --git a/applications/utilities/postProcessing/dataConversion/foamToGMV/itoa.C b/applications/utilities/postProcessing/dataConversion/foamToGMV/itoa.C
index 391d2c041c3d51f5c2faf9ffaa3d028b5e28e3f0..73df488b11bf62bdcb1bcc73b4b09b3da4cf1333 100644
--- a/applications/utilities/postProcessing/dataConversion/foamToGMV/itoa.C
+++ b/applications/utilities/postProcessing/dataConversion/foamToGMV/itoa.C
@@ -44,7 +44,7 @@ word itoa(const label n)
 
     label leftOfN = n;
 
-    for(label i=0; i<length; i++)
+    for (label i=0; i<length; i++)
     {
         label j = label(leftOfN/pow(10, length-i-1));
         leftOfN -= j*pow(10,length-i-1);
diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_gold_part_build_info.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_gold_part_build_info.H
index 3805a1e498eedc1fe52c677a388461c069f8d779..3d278c03675119d899014a6dd415d084999a5360 100644
--- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_gold_part_build_info.H
+++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_gold_part_build_info.H
@@ -32,7 +32,7 @@ int USERD_get_gold_part_build_info
 
     strncpy(part_descriptions[0], meshName, Z_BUFL);
 
-    for(label i=0; i<nPatches; i++)
+    for (label i=0; i<nPatches; i++)
     {
         word patchName(meshPtr->boundary()[i].name());
         strncpy(part_descriptions[i+1], patchName.c_str(), Z_BUFL);
@@ -104,7 +104,7 @@ int USERD_get_gold_part_build_info
 
     const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
 
-    for(label i=0; i<nPatches; i++)
+    for (label i=0; i<nPatches; i++)
     {
         label nTri03 = 0;
         label nQuad04 = 0;
diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nfaced_conn.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nfaced_conn.H
index 74289710fc6ad278afb1fc79d65f69e7c88e36f0..436d68d2591796cf55892afdc489faf3f8f97cd4 100644
--- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nfaced_conn.H
+++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nfaced_conn.H
@@ -36,11 +36,11 @@ int USERD_get_nfaced_conn
                 {}
                 else
                 {
-                    for(label i=0; i<nFacesInCell; i++)
+                    for (label i=0; i<nFacesInCell; i++)
                     {
                         label facei = cells[n][i];
                         label nPoints = faces[facei].size();
-                        for(label j=0; j<nPoints; j++)
+                        for (label j=0; j<nPoints; j++)
                         {
                             nfaced_conn_array[nPoint++] = faces[facei][j] + 1;
                         }
@@ -49,11 +49,11 @@ int USERD_get_nfaced_conn
             }
             else
             {
-                for(label i=0; i<nFacesInCell; i++)
+                for (label i=0; i<nFacesInCell; i++)
                 {
                     label facei = cells[n][i];
                     label nPoints = faces[facei].size();
-                    for(label j=0; j<nPoints; j++)
+                    for (label j=0; j<nPoints; j++)
                     {
                         nfaced_conn_array[nPoint++] = faces[facei][j] + 1;
                     }
diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nfaced_nodes_per_face.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nfaced_nodes_per_face.H
index 4629c57c38714f6dd9f70e87425d3550d5a76634..335f928516a0f92fc2aa0b0f7f2df0fc5aaa151f 100644
--- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nfaced_nodes_per_face.H
+++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nfaced_nodes_per_face.H
@@ -38,7 +38,7 @@ int USERD_get_nfaced_nodes_per_face
                 {}
                 else
                 {
-                    for(label i=0; i<nFacesInCell; i++)
+                    for (label i=0; i<nFacesInCell; i++)
                     {
                         label facei = cells[n][i];
                         label nFacePoints = faces[facei].size();
@@ -48,7 +48,7 @@ int USERD_get_nfaced_nodes_per_face
             }
             else
             {
-                for(label i=0; i<nFacesInCell; i++)
+                for (label i=0; i<nFacesInCell; i++)
                 {
                     label facei = cells[n][i];
                     label nFacePoints = faces[facei].size();
diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nsided_conn.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nsided_conn.H
index d5baece99bde15d016315c156c3fe5e10636c4dc..c99361c3fb077e25fee9eab4e8077e717be36e3d 100644
--- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nsided_conn.H
+++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_nsided_conn.H
@@ -30,7 +30,7 @@ int USERD_get_nsided_conn
             label nPoints = bMesh[patchi][facei].size();
             if ((nPoints != 3) && (nPoints != 4))
             {
-                for(label i=0; i<nPoints; i++)
+                for (label i=0; i<nPoints; i++)
                 {
                     nsided_conn_array[np++] = bMesh[patchi][facei][i] + 1;
                 }
diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_elements_by_type.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_elements_by_type.H
index cd13e108f91b871e3649d5bc5e2d5f7c9530f820..d90f3643fc7aa8d4de4e143f265f49fafe855e1a 100644
--- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_elements_by_type.H
+++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_elements_by_type.H
@@ -193,7 +193,7 @@ int USERD_get_part_elements_by_type
                 label nPoints = bMesh[patchi][n].size();
                 if (nPoints == 3)
                 {
-                    for(label i=0; i<nPoints; i++)
+                    for (label i=0; i<nPoints; i++)
                     {
                         label ip = bMesh[patchi][n][i];
                         conn_array[nTri03][i] = ip + 1;
@@ -209,7 +209,7 @@ int USERD_get_part_elements_by_type
                 label nPoints = bMesh[patchi][n].size();
                 if (nPoints == 4)
                 {
-                    for(label i=0; i<nPoints; i++)
+                    for (label i=0; i<nPoints; i++)
                     {
                         label ip = bMesh[patchi][n][i];
                         conn_array[nQuad04][i] = ip + 1;
diff --git a/applications/utilities/postProcessing/graphics/fieldview9Reader/fieldview9Reader.C b/applications/utilities/postProcessing/graphics/fieldview9Reader/fieldview9Reader.C
index 17f1dfcb2eec7d1172caa099e4f5b9d519b44322..a658631a9f1b9793c27c803c0c89f3afa324b657 100644
--- a/applications/utilities/postProcessing/graphics/fieldview9Reader/fieldview9Reader.C
+++ b/applications/utilities/postProcessing/graphics/fieldview9Reader/fieldview9Reader.C
@@ -314,7 +314,7 @@ static void storeScalarField
         Info<< "Storing " << nTotPoints << " of dummy values of " << fieldName
             << endl;
 
-        for(label i = 0; i < nPoints; i++)
+        for (label i = 0; i < nPoints; i++)
         {
             vars[pointI++] = 0.0;
         }
@@ -388,7 +388,7 @@ static void storeVectorField
 
         for (direction d = 0; d < vector::nComponents; d++)
         {
-            for(label i = 0; i < nPoints; i++)
+            for (label i = 0; i < nPoints; i++)
             {
                 vars[pointI++] = 0.0;
             }
diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C
index d283ec66afc37ba554e37ddcb6d84df7dc5ce105..1a8253b25d7b1532e886923cff3f9e7ff5759c6a 100644
--- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C
+++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C
@@ -550,7 +550,7 @@ int main(int argc, char *argv[])
 
         fileName surfFileNameBase(surfFileName.name());
 
-        for(label zone = 0; zone < numZones; zone++)
+        for (label zone = 0; zone < numZones; zone++)
         {
             boolList includeMap(surf.size(), false);
 
diff --git a/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C b/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C
index 146f8d1213e17c75d11b0525b1f302e9d723e22f..ea4f795edad7203a2e5095ae7c63221aff3132ec 100644
--- a/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C
+++ b/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C
@@ -131,19 +131,19 @@ int main(int argc, char *argv[])
 
     // rearrange the vertex list
     ::List< ::Vector> temp_list;
-    for(int i=0;i<vert.num;i++)
+    for (int i=0;i<vert.num;i++)
     {
         temp_list.Add(vert[i]);
     }
-    for(int i=0;i<vert.num;i++)
+    for (int i=0;i<vert.num;i++)
     {
         vert[permutation[i]]=temp_list[i];
     }
 
     // update the changes in the entries in the triangle list
-    for(int i=0;i<tri.num;i++)
+    for (int i=0;i<tri.num;i++)
     {
-        for(int j=0;j<3;j++)
+        for (int j=0;j<3;j++)
         {
             tri[i].v[j] = permutation[tri[i].v[j]];
         }
@@ -181,7 +181,7 @@ int main(int argc, char *argv[])
     // Convert vert into pointField.
     pointField newPoints(vert.num);
 
-    for(int i=0; i<vert.num; i++)
+    for (int i=0; i<vert.num; i++)
     {
         const ::Vector & v = vert[i];
 
diff --git a/applications/utilities/surface/surfacePointMerge/surfacePointMerge.C b/applications/utilities/surface/surfacePointMerge/surfacePointMerge.C
index 2ad5af8c571ddd225da8d9ddc4923443f1ef25f2..f206f6e931eed12b13ec8d832df2ace5e6caef4b 100644
--- a/applications/utilities/surface/surfacePointMerge/surfacePointMerge.C
+++ b/applications/utilities/surface/surfacePointMerge/surfacePointMerge.C
@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
 
     triSurface cleanSurf(surf1);
 
-    while(true)
+    while (true)
     {
         label nOldVert = cleanSurf.nPoints();
 
diff --git a/applications/utilities/surface/surfaceSmooth/surfaceSmooth.C b/applications/utilities/surface/surfaceSmooth/surfaceSmooth.C
index 55a7231e33258114881e05b23f38e62cf4883d36..bce23c9846897dd0f98b7314e7277a27b9ed6b2a 100644
--- a/applications/utilities/surface/surfaceSmooth/surfaceSmooth.C
+++ b/applications/utilities/surface/surfaceSmooth/surfaceSmooth.C
@@ -78,7 +78,7 @@ int main(int argc, char *argv[])
     const labelListList& pointEdges = surf1.pointEdges();
 
 
-    for(label iter = 0; iter < iters; iter++)
+    for (label iter = 0; iter < iters; iter++)
     {
         forAll(pointEdges, vertI)
         {
diff --git a/doc/codingStyleGuide.org b/doc/codingStyleGuide.org
index da50ffcd93a5ce855af1f393a03cb4597957a6fa..27725cf1cd0addeeba79b5e658b9d52d6f5c6551 100644
--- a/doc/codingStyleGuide.org
+++ b/doc/codingStyleGuide.org
@@ -10,11 +10,12 @@
 
 *** General
     + 80 character lines max
-    + The body of control statements (eg, if, else, while, etc).
-      always delineated with brace brackets
-    + Use spaces for indentation, not tab characters.
     + The normal indentation is 4 spaces per logical level.
+    + Use spaces for indentation, not tab characters.
     + Avoid trailing whitespace.
+    + The body of control statements (eg, if, else, while, etc).
+      always delineated with brace brackets. A possible exception can be
+      made with 'break' or 'continue' as part of a control structure.
 
     + stream output
       =<<= is always four characters after the start of the stream,
@@ -152,7 +153,7 @@
     :    code;
     :}
 
-*** =for= Loops
+*** =for= and =while= Loops
     :for (i = 0; i < maxI; i++)
     :{
     :    code;
@@ -180,7 +181,7 @@
     Note that when indexing through iterators, it is often slightly more
     efficient to use the pre-increment form. Eg, =++iter= instead of =iter++=
 
-*** =forAll= loops
+*** =forAll= , =forAllIter=, etc. loops
     like =for= loops, but
 
     :forAll(
diff --git a/src/OSspecific/POSIX/printStack.C b/src/OSspecific/POSIX/printStack.C
index a6c2743298b8d320cba12c569960776c28f5a028..134107637577b697577bd620fa817e33b0ff8df0 100644
--- a/src/OSspecific/POSIX/printStack.C
+++ b/src/OSspecific/POSIX/printStack.C
@@ -181,7 +181,7 @@ void error::printStack(Ostream& os)
     {
         IFstream is("/proc/" + name(pid()) + "/maps");
 
-        while(is.good())
+        while (is.good())
         {
             string line;
             is.getLine(line);
diff --git a/src/OpenFOAM/algorithms/MeshWave/FaceCellWave.C b/src/OpenFOAM/algorithms/MeshWave/FaceCellWave.C
index 5159644fbff9386867cd546fa728428a4efaa9e4..d7367856cc3bd7053286e10d3e5e5cd7fe44ef0a 100644
--- a/src/OpenFOAM/algorithms/MeshWave/FaceCellWave.C
+++ b/src/OpenFOAM/algorithms/MeshWave/FaceCellWave.C
@@ -57,11 +57,11 @@ Foam::Ostream& Foam::FaceCellWave<Type>::writeFaces
     {
         os << nFaces;
 
-        for(label i = 0; i < nFaces; i++)
+        for (label i = 0; i < nFaces; i++)
         {
             os << ' ' << faceLabels[i];
         }
-        for(label i = 0; i < nFaces; i++)
+        for (label i = 0; i < nFaces; i++)
         {
             os << ' ' << faceInfo[i];
         }
@@ -70,11 +70,11 @@ Foam::Ostream& Foam::FaceCellWave<Type>::writeFaces
     {
         os << nFaces;
 
-        for(label i = 0; i < nFaces; i++)
+        for (label i = 0; i < nFaces; i++)
         {
             os << faceLabels[i];
         }
-        for(label i = 0; i < nFaces; i++)
+        for (label i = 0; i < nFaces; i++)
         {
             os << faceInfo[i];
         }
@@ -95,11 +95,11 @@ Foam::Istream& Foam::FaceCellWave<Type>::readFaces
 {
     is >> nFaces;
 
-    for(label i = 0; i < nFaces; i++)
+    for (label i = 0; i < nFaces; i++)
     {
         is >> faceLabels[i];
     }
-    for(label i = 0; i < nFaces; i++)
+    for (label i = 0; i < nFaces; i++)
     {
         is >> faceInfo[i];
     }
@@ -254,7 +254,7 @@ void Foam::FaceCellWave<Type>::checkCyclic(const polyPatch& patch) const
 {
     label cycOffset = patch.size()/2;
 
-    for(label patchFaceI = 0; patchFaceI < cycOffset; patchFaceI++)
+    for (label patchFaceI = 0; patchFaceI < cycOffset; patchFaceI++)
     {
         label i1 = patch.start() + patchFaceI;
         label i2 = i1 + cycOffset;
@@ -339,7 +339,7 @@ void Foam::FaceCellWave<Type>::mergeFaceInfo
     const bool
 )
 {
-    for(label changedFaceI = 0; changedFaceI < nFaces; changedFaceI++)
+    for (label changedFaceI = 0; changedFaceI < nFaces; changedFaceI++)
     {
         const Type& neighbourWallInfo = changedFacesInfo[changedFaceI];
         label patchFaceI = changedFaces[changedFaceI];
@@ -377,7 +377,7 @@ Foam::label Foam::FaceCellWave<Type>::getChangedPatchFaces
 {
     label nChangedPatchFaces = 0;
 
-    for(label i = 0; i < nFaces; i++)
+    for (label i = 0; i < nFaces; i++)
     {
         label patchFaceI = i + startFaceI;
 
@@ -406,7 +406,7 @@ void Foam::FaceCellWave<Type>::leaveDomain
 {
     const vectorField& fc = mesh_.faceCentres();
     
-    for(label i = 0; i < nFaces; i++)
+    for (label i = 0; i < nFaces; i++)
     {
         label patchFaceI = faceLabels[i];
 
@@ -428,7 +428,7 @@ void Foam::FaceCellWave<Type>::enterDomain
 {
     const vectorField& fc = mesh_.faceCentres();
     
-    for(label i = 0; i < nFaces; i++)
+    for (label i = 0; i < nFaces; i++)
     {
         label patchFaceI = faceLabels[i];
 
@@ -451,14 +451,14 @@ void Foam::FaceCellWave<Type>::transform
     {
         const tensor& T = rotTensor[0];
 
-        for(label faceI = 0; faceI < nFaces; faceI++)
+        for (label faceI = 0; faceI < nFaces; faceI++)
         {
             faceInfo[faceI].transform(mesh_, T);
         }
     }
     else
     {
-        for(label faceI = 0; faceI < nFaces; faceI++)
+        for (label faceI = 0; faceI < nFaces; faceI++)
         {
             faceInfo[faceI].transform(mesh_, rotTensor[faceI]);
         }
@@ -510,7 +510,7 @@ void Foam::FaceCellWave<Type>::offset
     labelList& faces
 )
 {
-    for(label faceI = 0; faceI < nFaces; faceI++)
+    for (label faceI = 0; faceI < nFaces; faceI++)
     {
         faces[faceI] += cycOffset;
     }
@@ -1064,7 +1064,7 @@ Foam::label Foam::FaceCellWave<Type>::iterate(const label maxIter)
         handleProcPatches();
     }
 
-    while(iter_ < maxIter)
+    while (iter_ < maxIter)
     {
         if (debug)
         {
diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C
index c0600bd97c4afc124d10ddc6eeaafc3f674c4c51..a5418574f6ae5c8e3e1affa3e9b2f2df7adb1e2a 100644
--- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C
+++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C
@@ -412,7 +412,7 @@ template<template<class> class Field, class Type>
 Type max(const FieldField<Field, Type>& f)
 {
     label i = 0;
-    while(i < f.size() && !f[i].size()) i++;
+    while (i < f.size() && !f[i].size()) i++;
 
     if (i < f.size())
     {
@@ -440,12 +440,12 @@ template<template<class> class Field, class Type>
 Type min(const FieldField<Field, Type>& f)
 {
     label i = 0;
-    while(i < f.size() && !f[i].size()) i++;
+    while (i < f.size() && !f[i].size()) i++;
 
     if (i < f.size())
     {
         label i = 0;
-        while(!f[i].size()) i++;
+        while (!f[i].size()) i++;
 
         Type Min(min(f[i]));
 
diff --git a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C
index ad57b17b81c32a1f7198a7240c9df2af5eaf1b90..3576c701c5ed88c3d1b4963c8b99723e569abd5b 100644
--- a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C
+++ b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C
@@ -382,9 +382,9 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition)
     multiply(SVDA, U_, S_, transpose(V_));
     scalar maxDiff = 0;
     scalar diff = 0;
-    for(label i = 0; i < A.n(); i++)
+    for (label i = 0; i < A.n(); i++)
     {
-        for(label j = 0; j < A.m(); j++)
+        for (label j = 0; j < A.m(); j++)
         {
             diff = mag(A[i][j] - SVDA[i][j]);
             if (diff > maxDiff) maxDiff = diff;
diff --git a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVDI.H b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVDI.H
index 82d6c5a6c2545b4927bfaf0c017843db49d21d0f..9f406440cda09d51fcfbe4ed7eac30ec97b9cf7a 100644
--- a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVDI.H
+++ b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVDI.H
@@ -63,7 +63,7 @@ inline Foam::label Foam::SVD::nZeros() const
 inline Foam::scalar Foam::SVD::minNonZeroS() const
 {
     scalar minS = S_[0];
-    for(label i = 1; i < S_.size(); i++)
+    for (label i = 1; i < S_.size(); i++)
     {
         scalar s = S_[i];
         if (s > VSMALL && s < minS) minS = s;
diff --git a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C
index 53fdf6ecfe786eabe194d8d53e635cf1dc6d7480..56fe4f6742cf9ec79bacd29b2a516c906e6e651e 100644
--- a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C
+++ b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C
@@ -159,11 +159,11 @@ void Foam::multiply
 
     ans = scalarRectangularMatrix(A.n(), B.m(), scalar(0));
 
-    for(register label i = 0; i < A.n(); i++)
+    for (register label i = 0; i < A.n(); i++)
     {
-        for(register label j = 0; j < B.m(); j++)
+        for (register label j = 0; j < B.m(); j++)
         {
-            for(register label l = 0; l < B.n(); l++)
+            for (register label l = 0; l < B.n(); l++)
             {
                 ans[i][j] += A[i][l]*B[l][j];
             }
@@ -210,14 +210,14 @@ void Foam::multiply
 
     ans = scalarRectangularMatrix(A.n(), C.m(), scalar(0));
 
-    for(register label i = 0; i < A.n(); i++)
+    for (register label i = 0; i < A.n(); i++)
     {
-        for(register label g = 0; g < C.m(); g++)
+        for (register label g = 0; g < C.m(); g++)
         {
-            for(register label l = 0; l < C.n(); l++)
+            for (register label l = 0; l < C.n(); l++)
             {
                 scalar ab = 0;
-                for(register label j = 0; j < A.m(); j++)
+                for (register label j = 0; j < A.m(); j++)
                 {
                     ab += A[i][j]*B[j][l];
                 }
@@ -266,11 +266,11 @@ void Foam::multiply
 
     ans = scalarRectangularMatrix(A.n(), C.m(), scalar(0));
 
-    for(register label i = 0; i < A.n(); i++)
+    for (register label i = 0; i < A.n(); i++)
     {
-        for(register label g = 0; g < C.m(); g++)
+        for (register label g = 0; g < C.m(); g++)
         {
-            for(register label l = 0; l < C.n(); l++)
+            for (register label l = 0; l < C.n(); l++)
             {
                 ans[i][g] += C[l][g] * A[i][l]*B[l];
             }
diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C
index dffd5db8bb6b6b599bb8c50a1f56a5bd52b938f4..93046b330794c8c8ed6b984ee4699029b4c965f3 100644
--- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C
+++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/cellMatcher.C
@@ -284,7 +284,7 @@ void Foam::cellMatcher::write(Foam::Ostream& os) const
     {
         os  << "    ";
 
-        for(label fp = 0; fp < faceSize_[faceI]; fp++)
+        for (label fp = 0; fp < faceSize_[faceI]; fp++)
         {
             os  << ' ' << localFaces_[faceI][fp];
         }
diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C
index 00aacad3ad32cca4bea904603d550b3aca771ddd..af815d5873636a49a1b20202c602e361efc22a82 100644
--- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C
+++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/tetWedgeMatcher.C
@@ -116,7 +116,7 @@ bool Foam::tetWedgeMatcher::matchShape
     const face& face0 = localFaces_[face0I];
 
     // Try all rotations of this face
-    for(label face0vert0 = 0; face0vert0 < faceSize_[face0I]; face0vert0++)
+    for (label face0vert0 = 0; face0vert0 < faceSize_[face0I]; face0vert0++)
     {
         //
         // Try to follow prespecified path on faces of cell,
diff --git a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C
index 79af03bad80b00081f44df4b802f71e74d5cd049..97512ad427ebfe72cec5174558e1e72ec067e0e0 100644
--- a/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C
+++ b/src/OpenFOAM/meshes/meshShapes/cellMatcher/wedgeMatcher.C
@@ -108,7 +108,7 @@ bool Foam::wedgeMatcher::matchShape
     const face& face0 = localFaces_[face0I];
 
     // Try all rotations of this face
-    for(label face0vert0 = 0; face0vert0 < faceSize_[face0I]; face0vert0++)
+    for (label face0vert0 = 0; face0vert0 < faceSize_[face0I]; face0vert0++)
     {
         //
         // Try to follow prespecified path on faces of cell,
diff --git a/src/OpenFOAM/meshes/meshShapes/face/face.C b/src/OpenFOAM/meshes/meshShapes/face/face.C
index 55be336fa21d507fb467995251712a1a6e449ead..6e3d88979ee0f0852135aa2cfe3188998f1b91b0 100644
--- a/src/OpenFOAM/meshes/meshShapes/face/face.C
+++ b/src/OpenFOAM/meshes/meshShapes/face/face.C
@@ -216,7 +216,7 @@ Foam::label Foam::face::split
         label minIndex = index;
         scalar minDiff = constant::mathematical::pi;
 
-        for(label i = 0; i < size() - 3; i++)
+        for (label i = 0; i < size() - 3; i++)
         {
             vector splitEdge
             (
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C
index a6aaaf3b16918d7cffd1a39cb01ccec113b337fd..9ca9d2d416af2fff447fad1bdb7413283720d60e 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshCheck/primitiveMeshCheck.C
@@ -175,7 +175,7 @@ bool Foam::primitiveMesh::checkClosedCells
     {
         scalar maxOpenness = 0;
 
-        for(direction cmpt=0; cmpt<vector::nComponents; cmpt++)
+        for (direction cmpt=0; cmpt<vector::nComponents; cmpt++)
         {
             maxOpenness = max
             (
@@ -654,7 +654,7 @@ bool Foam::primitiveMesh::checkFaceSkewness
             nWarnSkew++;
         }
 
-        if(skewness > maxSkew)
+        if (skewness > maxSkew)
         {
             maxSkew = skewness;
         }
@@ -702,7 +702,7 @@ bool Foam::primitiveMesh::checkFaceSkewness
             nWarnSkew++;
         }
 
-        if(skewness > maxSkew)
+        if (skewness > maxSkew)
         {
             maxSkew = skewness;
         }
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C
index b7278ecf4900e0b871d667041dcf3fe18b2938cc..38f8597985e2c03b43d736180e1a7f07a9674795 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitiveMeshEdges.C
@@ -468,7 +468,7 @@ Foam::label Foam::primitiveMesh::findFirstCommonElementFromSortedLists
 
     while (iter1 != list1.end() && iter2 != list2.end())
     {
-        if( *iter1 < *iter2)
+        if (*iter1 < *iter2)
         {
             ++iter1;
         }
diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C
index ef48f93ba0e26528c578980a691907ac7e9e68c7..1fb91286e1003fa5dd5b507f6ccfaae3b2f485a9 100644
--- a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C
+++ b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/patchZones.C
@@ -114,7 +114,7 @@ void Foam::patchZones::markZone(label faceI)
     // Zones on all edges.
     labelList edgeZone(pp_.nEdges(), -1);
 
-    while(1)
+    while (true)
     {
         changedEdges = faceToEdge(changedFaces, edgeZone);
 
diff --git a/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C b/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C
index 7bf07845e2f87f1200bfb6c3b8380f03e945a2ef..db45597ba705b4b9dacf9890d2b0b24f8b68179e 100644
--- a/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C
+++ b/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C
@@ -223,7 +223,7 @@ Foam::SHA1::processBlock(const void *data, size_t len)
     {                                                                         \
         E += rol_uint32(A, 5) + F(B, C, D) + K + M;                           \
         B = rol_uint32(B, 30);                                                \
-    } while(0)
+    } while (0)
 
     while (words < endp)
     {
diff --git a/src/dynamicMesh/boundaryMesh/boundaryMesh.C b/src/dynamicMesh/boundaryMesh/boundaryMesh.C
index b71e0a569ed0fe75a3b85313dc22e2fbc4e6e829..2ca4973e7c13c29cc25d85f077608f5f5f5739e5 100644
--- a/src/dynamicMesh/boundaryMesh/boundaryMesh.C
+++ b/src/dynamicMesh/boundaryMesh/boundaryMesh.C
@@ -390,7 +390,7 @@ void Foam::boundaryMesh::markZone
     // Zones on all edges.
     labelList edgeZone(mesh().nEdges(), -1);
 
-    while(1)
+    while (true)
     {
         changedEdges = faceToEdge
         (
diff --git a/src/dynamicMesh/motionSmoother/motionSmoother.C b/src/dynamicMesh/motionSmoother/motionSmoother.C
index d780ec79dde3dc9d33c007b0a3ddc73271d72b69..b4288c200734e7e635f74c9b96949e37154c1b30 100644
--- a/src/dynamicMesh/motionSmoother/motionSmoother.C
+++ b/src/dynamicMesh/motionSmoother/motionSmoother.C
@@ -65,7 +65,7 @@ void Foam::motionSmoother::makePatchPatchAddressing()
 
     forAll(bm, patchi)
     {
-        if(!isA<emptyPolyPatch>(bm[patchi]))
+        if (!isA<emptyPolyPatch>(bm[patchi]))
         {
             nPatchPatchPoints += bm[patchi].boundaryPoints().size();
         }
@@ -83,7 +83,7 @@ void Foam::motionSmoother::makePatchPatchAddressing()
 
     forAll(bm, patchi)
     {
-        if(!isA<emptyPolyPatch>(bm[patchi]))
+        if (!isA<emptyPolyPatch>(bm[patchi]))
         {
             const labelList& bp = bm[patchi].boundaryPoints();
             const labelList& meshPoints = bm[patchi].meshPoints();
diff --git a/src/dynamicMesh/motionSmoother/motionSmootherTemplates.C b/src/dynamicMesh/motionSmoother/motionSmootherTemplates.C
index 232c19d6b5bcdcf8db5c2f9575835ef9cb2b0b69..4ea2fa926067f395da7be27f6e7f68dcca4283eb 100644
--- a/src/dynamicMesh/motionSmoother/motionSmootherTemplates.C
+++ b/src/dynamicMesh/motionSmoother/motionSmootherTemplates.C
@@ -51,7 +51,7 @@ void Foam::motionSmoother::checkConstraints
 
     forAll(bm, patchi)
     {
-        if(!isA<emptyPolyPatch>(bm[patchi]))
+        if (!isA<emptyPolyPatch>(bm[patchi]))
         {
             nPatchPatchPoints += bm[patchi].boundaryPoints().size();
         }
@@ -81,7 +81,7 @@ void Foam::motionSmoother::checkConstraints
 
     forAll(bm, patchi)
     {
-        if(!isA<emptyPolyPatch>(bm[patchi]))
+        if (!isA<emptyPolyPatch>(bm[patchi]))
         {
             const labelList& bp = bm[patchi].boundaryPoints();
             const labelList& meshPoints = bm[patchi].meshPoints();
@@ -93,7 +93,7 @@ void Foam::motionSmoother::checkConstraints
             }
         }
     }
-    
+
 
     // Forward evaluation
 
@@ -106,7 +106,7 @@ void Foam::motionSmoother::checkConstraints
 
     forAll(bm, patchi)
     {
-        if(!isA<emptyPolyPatch>(bm[patchi]))
+        if (!isA<emptyPolyPatch>(bm[patchi]))
         {
             const labelList& bp = bm[patchi].boundaryPoints();
             const labelList& meshPoints = bm[patchi].meshPoints();
@@ -246,7 +246,7 @@ Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> >
         else
         {
             res[pointI] /= sumWeight[pointI];
-        }        
+        }
     }
 
     res.correctBoundaryConditions();
diff --git a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C
index bfa9b2ca0c1df82ad0ec9a854c5293bc365e34ab..8261941be2b84101bb0d76a12e247f3449c5600c 100644
--- a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C
+++ b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C
@@ -1790,7 +1790,7 @@ void Foam::faceCoupleInfo::subDivisionMatch
 
             cutPointI = cutEdges[cutEdgeI].otherVertex(cutPointI);
 
-        } while(cutPointI != cutPoint1);
+        } while (cutPointI != cutPoint1);
     }
 
     if (debug)
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C
index 11b4178d3f0e243baa23696be44cac21fe4e80c1..5574abcb86d8022b6e0c102f0a3e31884bb8ea83 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C
@@ -262,7 +262,7 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString
             // - which hasn't been handled yet
             // - with same neighbour
             // - that needs extrusion
-            while(true)
+            while (true)
             {
                 label prevFp = fEdges.rcIndex(startFp);
 
@@ -286,7 +286,7 @@ Foam::labelPair Foam::addPatchCellLayer::getEdgeString
 
             // Search forward for end of string
             endFp = startFp;
-            while(true)
+            while (true)
             {
                 label nextFp = fEdges.fcIndex(endFp);
 
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C
index 7727e04c87fbf8f39e15600802388cbf1bdda76e..25a0414f830d370da14292f43d61b9723c985172 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/edgeCollapser.C
@@ -456,7 +456,7 @@ bool Foam::edgeCollapser::setRefinement(polyTopoChange& meshMod)
         {
             break;
         }
-    } while(true);
+    } while (true);
 
 
     // Keep track of faces that have been done already.
diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C
index be15413fab57194b3408893063ff00cfc93a39e1..6c7d321533aac5fbc1a68cca27e3db0d9f6242b9 100644
--- a/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C
+++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/hexRef8.C
@@ -2319,7 +2319,7 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement
         allCellInfo
     );
 
-    while(true)
+    while (true)
     {
         if (debug)
         {
diff --git a/src/dynamicMesh/slidingInterface/slidingInterface.C b/src/dynamicMesh/slidingInterface/slidingInterface.C
index 316dd389b6f7843a5edaddc6a8eafac253acfa89..12d99e8083eb25efd90c9b1b42d34b005b4434b7 100644
--- a/src/dynamicMesh/slidingInterface/slidingInterface.C
+++ b/src/dynamicMesh/slidingInterface/slidingInterface.C
@@ -420,7 +420,7 @@ void Foam::slidingInterface::setRefinement(polyTopoChange& ref) const
         }
 
         coupleInterface(ref);
-        
+
         trigger_ = false;
     }
 }
@@ -430,7 +430,7 @@ void Foam::slidingInterface::modifyMotionPoints(pointField& motionPoints) const
 {
     if (debug)
     {
-        Pout<< "void slidingInterface::modifyMotionPoints(" 
+        Pout<< "void slidingInterface::modifyMotionPoints("
             << "pointField& motionPoints) const for object " << name() << " : "
             << "Adjusting motion points." << endl;
     }
@@ -485,7 +485,7 @@ void Foam::slidingInterface::modifyMotionPoints(pointField& motionPoints) const
             else
             {
                 // A cut point is not a projected slave point.  Therefore, it
-                // must be an edge-to-edge intersection.  
+                // must be an edge-to-edge intersection.
 
                 Map<Pair<edge> >::const_iterator cpepmIter =
                     cpepm.find(cutPoints[pointI]);
@@ -499,7 +499,7 @@ void Foam::slidingInterface::modifyMotionPoints(pointField& motionPoints) const
                     // slidingInterface::coupleInterface.  This is done for
                     // efficiency reasons and avoids multiple creation of
                     // cutting planes.  Please update both simultaneously.
-                    // 
+                    //
                     const edge& globalMasterEdge = cpepmIter().first();
 
                     const label curMasterEdgeIndex =
@@ -582,7 +582,7 @@ void Foam::slidingInterface::modifyMotionPoints(pointField& motionPoints) const
                         if (slaveCut.hit())
                         {
                             // Strict checking of slave cut to avoid capturing
-                            // end points.  
+                            // end points.
                             scalar cutOnSlave =
                                 (
                                     (
@@ -615,7 +615,7 @@ void Foam::slidingInterface::modifyMotionPoints(pointField& motionPoints) const
                                 << cme.line(masterLocalPoints)
                                 << " slave edge: " << curSlaveLine
                                 << " point: " << masterCutPoint
-                                << " weight: " << 
+                                << " weight: " <<
                                 (
                                     (
                                         slaveCut.missPoint()
@@ -657,7 +657,7 @@ void Foam::slidingInterface::updateMesh(const mapPolyMesh& m)
 {
     if (debug)
     {
-        Pout<< "void slidingInterface::updateMesh(const mapPolyMesh& m)" 
+        Pout<< "void slidingInterface::updateMesh(const mapPolyMesh& m)"
             << " const for object " << name() << " : "
             << "Updating topology." << endl;
     }
@@ -771,7 +771,7 @@ void Foam::slidingInterface::write(Ostream& os) const
 
 // To write out all those tolerances
 #define WRITE_NON_DEFAULT(name) \
-    if( name ## _ != name ## Default_ )\
+    if ( name ## _ != name ## Default_ )\
     { \
         os << "    " #name " " <<  name ## _ << token::END_STATEMENT << nl; \
     }
diff --git a/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C b/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C
index dfaef4308e6c98824612a3b60a1e4e79a58ebc51..439d83e1786003f7b7686859521429ebf5918fcf 100644
--- a/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C
+++ b/src/finiteVolume/cfdTools/general/adjustPhi/adjustPhi.C
@@ -107,7 +107,7 @@ bool Foam::adjustPhi
         {
             massCorr = (massIn - fixedMassOut)/adjustableMassOut;
         }
-        else if(mag(fixedMassOut - massIn)/totalFlux > 1e-10)
+        else if (mag(fixedMassOut - massIn)/totalFlux > 1e-10)
         {
             FatalErrorIn
             (
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C
index ce005c5683eb2cf802aaf663bb2543162157f9c4..2ae16afc957fd0d17719289b5876c0ce96642897 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/fan/fanFvPatchFields.C
@@ -74,7 +74,7 @@ void Foam::fanFvPatchField<Foam::scalar>::updateCoeffs()
                 );
         }
 
-        for(label i=1; i<f_.size(); i++)
+        for (label i=1; i<f_.size(); i++)
         {
             jump_ += f_[i]*pow(Un, i);
         }
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrad.H b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrad.H
index 22083de571e94fcbe637c269bd91206e5c0d4715..5c4d711ab30be538e0701e9ab2552a1bcfce1625 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrad.H
+++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellLimitedGrad/cellLimitedGrad.H
@@ -162,7 +162,7 @@ inline void cellLimitedGrad<Type>::limitFace
     const Type& extrapolate
 )
 {
-    for(direction cmpt=0; cmpt<Type::nComponents; cmpt++)
+    for (direction cmpt=0; cmpt<Type::nComponents; cmpt++)
     {
         cellLimitedGrad<scalar>::limitFace
         (
diff --git a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellMDLimitedGrad/cellMDLimitedGrad.H b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellMDLimitedGrad/cellMDLimitedGrad.H
index d9b389d0f54147eb4fdd01d1821bd4ef58fe4ac3..f48ed450d9a2290b573115d1c61a9d2124deb845 100644
--- a/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellMDLimitedGrad/cellMDLimitedGrad.H
+++ b/src/finiteVolume/finiteVolume/gradSchemes/limitedGradSchemes/cellMDLimitedGrad/cellMDLimitedGrad.H
@@ -164,7 +164,7 @@ inline void cellMDLimitedGrad<Type>::limitFace
     const vector& dcf
 )
 {
-    for(direction cmpt=0; cmpt<Type::nComponents; cmpt++)
+    for (direction cmpt=0; cmpt<Type::nComponents; cmpt++)
     {
         vector gi(g[cmpt], g[cmpt+3], g[cmpt+6]);
         cellMDLimitedGrad<scalar>::limitFace
diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.C b/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.C
index 11e54fc5c153ff22608dfed03d6ba156e869f132..bd65a3fd375320e32b670145b8eb01cd949bcd38 100644
--- a/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.C
+++ b/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.C
@@ -108,7 +108,7 @@ Foam::quadraticFitSnGradData::quadraticFitSnGradData
 
     // find the fit coefficients for every face in the mesh
 
-    for(label faci = 0; faci < mesh.nInternalFaces(); faci++)
+    for (label faci = 0; faci < mesh.nInternalFaces(); faci++)
     {
         snGradPolySize[faci] = calcFit(stencilPoints[faci], faci);
     }
@@ -206,7 +206,7 @@ Foam::label Foam::quadraticFitSnGradData::calcFit
     // calculate the matrix of the polynomial components
     scalarRectangularMatrix B(C.size(), minSize_, scalar(0));
 
-    for(label ip = 0; ip < C.size(); ip++)
+    for (label ip = 0; ip < C.size(); ip++)
     {
         const point& p = C[ip];
 
@@ -254,7 +254,7 @@ Foam::label Foam::quadraticFitSnGradData::calcFit
     const scalar deltaCoeff = mesh().deltaCoeffs()[faci];
 
     bool goodFit = false;
-    for(int iIt = 0; iIt < 10 && !goodFit; iIt++)
+    for (int iIt = 0; iIt < 10 && !goodFit; iIt++)
     {
         SVD svd(B, SMALL);
 
@@ -270,7 +270,7 @@ Foam::label Foam::quadraticFitSnGradData::calcFit
         {
             fit_[faci][0] = fit0;
             fit_[faci][1] = fit1;
-            for(label i = 2; i < stencilSize; i++)
+            for (label i = 2; i < stencilSize; i++)
             {
                 fit_[faci][i] = wts[0]*wts[i]*svd.VSinvUt()[1][i]/scale;
             }
@@ -282,13 +282,13 @@ Foam::label Foam::quadraticFitSnGradData::calcFit
             wts[0] *= 10;
             wts[1] *= 10;
 
-            for(label i = 0; i < B.n(); i++)
+            for (label i = 0; i < B.n(); i++)
             {
                 B[i][0] *= 10;
                 B[i][1] *= 10;
             }
 
-            for(label j = 0; j < B.m(); j++)
+            for (label j = 0; j < B.m(); j++)
             {
                 B[0][j] *= 10;
                 B[1][j] *= 10;
diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C
index 5e85f505922c3118fb411fa2949f5e72e5a7ac6d..9ce8d888c4bfdedad90d8216809664424428d19f 100644
--- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C
+++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrix.C
@@ -725,7 +725,7 @@ Foam::fvMatrix<Type>::H() const
         )
     );
 
-    for(direction cmpt=0; cmpt<Type::nComponents; cmpt++)
+    for (direction cmpt=0; cmpt<Type::nComponents; cmpt++)
     {
         if (validComponents[cmpt] == -1)
         {
diff --git a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
index c56899bd62ea89da15aacae44c743e069135f452..a78d6be6cf28250d44475857594f8e0b46acb239 100644
--- a/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
+++ b/src/finiteVolume/fvMatrices/fvMatrix/fvMatrixSolve.C
@@ -90,7 +90,7 @@ Foam::lduMatrix::solverPerformance Foam::fvMatrix<Type>::solve
         )
     );
 
-    for(direction cmpt=0; cmpt<Type::nComponents; cmpt++)
+    for (direction cmpt=0; cmpt<Type::nComponents; cmpt++)
     {
         if (validComponents[cmpt] == -1) continue;
 
diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C
index 151de78a1ef28a735d488ba94c290a29e6c1a479..89e0260456a342ced62b8e3c1b3de0abf5586345 100644
--- a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C
+++ b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C
@@ -478,7 +478,7 @@ void Foam::MULES::limiter
     scalarField sumlPhip(psiIf.size());
     scalarField mSumlPhim(psiIf.size());
 
-    for(int j=0; j<nLimiterIter; j++)
+    for (int j=0; j<nLimiterIter; j++)
     {
         sumlPhip = 0.0;
         mSumlPhim = 0.0;
diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C
index 3ecbd0a19720075ef77ec93f6faa8b800d82e993..dc2aec8960d320fdf0ee8ed33cfe664fedb398ec 100644
--- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C
+++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubset.C
@@ -1341,7 +1341,7 @@ void Foam::fvMeshSubset::setLargeCellSubset
 {
     labelList region(baseMesh().nCells(), 0);
 
-    forAllConstIter (labelHashSet, globalCellMap, iter)
+    forAllConstIter(labelHashSet, globalCellMap, iter)
     {
         region[iter.key()] = 1;
     }
diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/findCellPointFaceTriangle.H b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/findCellPointFaceTriangle.H
index dc9e2baa00f9f97ebb92ba2339612828e2f7e032..490b20f182c398e30900ec63b0df0c19590b1b56 100644
--- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/findCellPointFaceTriangle.H
+++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointFace/findCellPointFaceTriangle.H
@@ -45,7 +45,7 @@ bool interpolationCellPointFace<Type>::findTriangle
         // calculate triangle edge vectors and triangle face normal
         // the 'i':th edge is opposite node i
         vector edge[3], normal[3];
-        for(label i=0; i<3; i++)
+        for (label i=0; i<3; i++)
         {
             label ip0 = (i+1) % 3;
             label ipp = (i+2) % 3;
@@ -55,7 +55,7 @@ bool interpolationCellPointFace<Type>::findTriangle
         vector triangleFaceNormal = edge[1] ^ edge[2];
         
         // calculate edge normal (pointing inwards)
-        for(label i=0; i<3; i++)
+        for (label i=0; i<3; i++)
         {
             normal[i] = triangleFaceNormal ^ edge[i];
             normal[i] /= mag(normal[i]) + VSMALL;
@@ -63,7 +63,7 @@ bool interpolationCellPointFace<Type>::findTriangle
 
         // check if position is inside triangle
         bool inside = true;
-        for(label i=0; i<3; i++)
+        for (label i=0; i<3; i++)
         {
             label ip = (i+1) % 3;
             inside = inside && (((newPos - tetPoints[ip]) & edge[i]) >= 0);
@@ -74,7 +74,7 @@ bool interpolationCellPointFace<Type>::findTriangle
             foundTriangle = true;
 
             // calculate phi-values
-            for(label i=0; i<3; i++)
+            for (label i=0; i<3; i++)
             {
                 label ip = (i+1) % 3;
                 scalar phiMax = max(VSMALL, normal[i] & edge[ip]);
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C
index fb9611e9c8aa06f8f70c56ccd847232b34b72ef5..4870127e51d3de130a78967e72e5b60f1fe62172 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C
@@ -86,7 +86,7 @@ void Foam::CentredFitData<Polynomial>::calcFit()
 
     const surfaceScalarField& w = mesh.surfaceInterpolation::weights();
 
-    for(label facei = 0; facei < mesh.nInternalFaces(); facei++)
+    for (label facei = 0; facei < mesh.nInternalFaces(); facei++)
     {
         FitData
         <
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C
index a48355872f4ab0248306cabea5a5f8ddb974e90e..62d464dcd6718f7d1c3658af521bdff886e32a4e 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C
@@ -165,7 +165,7 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit
     // Matrix of the polynomial components
     scalarRectangularMatrix B(C.size(), minSize_, scalar(0));
 
-    for(label ip = 0; ip < C.size(); ip++)
+    for (label ip = 0; ip < C.size(); ip++)
     {
         const point& p = C[ip];
 
@@ -195,7 +195,7 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit
     }
 
     // Additional weighting for constant and linear terms
-    for(label i = 0; i < B.n(); i++)
+    for (label i = 0; i < B.n(); i++)
     {
         B[i][0] *= wts[0];
         B[i][1] *= wts[0];
@@ -206,14 +206,14 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit
     coeffsi.setSize(stencilSize);
 
     bool goodFit = false;
-    for(int iIt = 0; iIt < 8 && !goodFit; iIt++)
+    for (int iIt = 0; iIt < 8 && !goodFit; iIt++)
     {
         SVD svd(B, SMALL);
 
         scalar maxCoeff = 0;
         label maxCoeffi = 0;
 
-        for(label i=0; i<stencilSize; i++)
+        for (label i=0; i<stencilSize; i++)
         {
             coeffsi[i] = wts[0]*wts[i]*svd.VSinvUt()[0][i];
             if (mag(coeffsi[i]) > maxCoeff)
@@ -271,13 +271,13 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit
                 wts[1] *= 10;
             }
 
-            for(label j = 0; j < B.m(); j++)
+            for (label j = 0; j < B.m(); j++)
             {
                 B[0][j] *= 10;
                 B[1][j] *= 10;
             }
 
-            for(label i = 0; i < B.n(); i++)
+            for (label i = 0; i < B.n(); i++)
             {
                 B[i][0] *= 10;
                 B[i][1] *= 10;
diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C
index cd7a206ba50048779468aaf50a9b350e0c4a910a..0841fe7d72a8a4f7eb356a80324e51570ce0fecf 100644
--- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C
+++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C
@@ -97,7 +97,7 @@ void Foam::UpwindFitData<Polynomial>::calcFit()
     // find the fit coefficients for every owner
 
     //Pout<< "-- Owner --" << endl;
-    for(label facei = 0; facei < mesh.nInternalFaces(); facei++)
+    for (label facei = 0; facei < mesh.nInternalFaces(); facei++)
     {
         FitData
         <
@@ -156,7 +156,7 @@ void Foam::UpwindFitData<Polynomial>::calcFit()
     // find the fit coefficients for every neighbour
 
     //Pout<< "-- Neighbour --" << endl;
-    for(label facei = 0; facei < mesh.nInternalFaces(); facei++)
+    for (label facei = 0; facei < mesh.nInternalFaces(); facei++)
     {
         FitData
         <
diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolation.C b/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolation.C
index 16cd028f726392e5723ec62abf75f2903f18ce50..6cebe3369bd95024213b75f113292a0dc5b9e5c2 100644
--- a/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolation.C
+++ b/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolation.C
@@ -63,7 +63,7 @@ void pointPatchInterpolation::makePatchPatchAddressing()
 
     forAll(bm, patchi)
     {
-        if(!isA<emptyFvPatch>(bm[patchi]) && !bm[patchi].coupled())
+        if (!isA<emptyFvPatch>(bm[patchi]) && !bm[patchi].coupled())
         {
             nPatchPatchPoints += bm[patchi].patch().boundaryPoints().size();
         }
@@ -81,7 +81,7 @@ void pointPatchInterpolation::makePatchPatchAddressing()
 
     forAll(bm, patchi)
     {
-        if(!isA<emptyFvPatch>(bm[patchi]) && !bm[patchi].coupled())
+        if (!isA<emptyFvPatch>(bm[patchi]) && !bm[patchi].coupled())
         {
             const labelList& bp = bm[patchi].patch().boundaryPoints();
             const labelList& meshPoints = bm[patchi].patch().meshPoints();
@@ -129,10 +129,10 @@ void pointPatchInterpolation::makePatchPatchAddressing()
     {
         if (patchPatchPointConstraints[i].first() != 0)
         {
-            patchPatchPointConstraintPoints_[nConstraints] = 
+            patchPatchPointConstraintPoints_[nConstraints] =
                 patchPatchPoints_[i];
 
-            patchPatchPointConstraintTensors_[nConstraints] = 
+            patchPatchPointConstraintTensors_[nConstraints] =
                 patchPatchPointConstraints[i].constraintTransformation();
 
             nConstraints++;
diff --git a/src/lagrangian/basic/Particle/Particle.C b/src/lagrangian/basic/Particle/Particle.C
index 4838da0ad1d1dc6bd56ee90ca0e79fdb8f24e86b..2b85924f8b3aed9f809cc3496010b2cc9b1dabb8 100644
--- a/src/lagrangian/basic/Particle/Particle.C
+++ b/src/lagrangian/basic/Particle/Particle.C
@@ -208,7 +208,7 @@ Foam::label Foam::Particle<ParticleType>::track
     facei_ = -1;
 
     // Tracks to endPosition or stop on boundary
-    while(!onBoundary() && stepFraction_ < 1.0 - SMALL)
+    while (!onBoundary() && stepFraction_ < 1.0 - SMALL)
     {
         stepFraction_ += trackToFace(endPosition, td)*(1.0 - stepFraction_);
     }
diff --git a/src/lagrangian/dieselSpray/parcel/parcel.C b/src/lagrangian/dieselSpray/parcel/parcel.C
index d2f2221db9ea014d2c0f54010c96eea62ace6a0d..c0913258454b21767a30404b33b1176fefd756ee 100644
--- a/src/lagrangian/dieselSpray/parcel/parcel.C
+++ b/src/lagrangian/dieselSpray/parcel/parcel.C
@@ -114,7 +114,7 @@ bool Foam::parcel::move(spray& sDB)
     scalarField Yfg(Nf, 0.0);
 
     scalar cpMixture = 0.0;
-    for(label i=0; i<Ns; i++)
+    for (label i=0; i<Ns; i++)
     {
         const volScalarField& Yi = sDB.composition().Y()[i];
         if (sDB.isLiquidFuel()[i])
@@ -341,7 +341,7 @@ void Foam::parcel::updateParcelProperties
 
     // calculate mean molecular weight
     scalar W = 0.0;
-    for(label i=0; i<Ns; i++)
+    for (label i=0; i<Ns; i++)
     {
         W += sDB.composition().Y()[i][celli]/sDB.gasProperties()[i].W();
 
@@ -357,7 +357,7 @@ void Foam::parcel::updateParcelProperties
 
     // correct the gaseous temperature for evaporated fuel
     scalar cpMix = 0.0;
-    for(label i=0; i<Ns; i++)
+    for (label i=0; i<Ns; i++)
     {
         cpMix += sDB.composition().Y()[i][celli]
                 *sDB.gasProperties()[i].Cp(T());
@@ -475,7 +475,7 @@ void Foam::parcel::updateParcelProperties
             newMass = m();
             newhg = 0.0;
             scalarField Ynew(fuels.Y(X()));
-            for(label i=0; i<Nf; i++)
+            for (label i=0; i<Nf; i++)
             {
                 label j = sDB.liquidToGasIndex()[i];
                 newhg += Ynew[i]*sDB.gasProperties()[j].H(Tnew);
@@ -523,7 +523,7 @@ void Foam::parcel::updateParcelProperties
         scalar liquidcL = sDB.fuels().cp(pg, TDroplet, X());
 
         cpMix = 0.0;
-        for(label i=0; i<Ns; i++)
+        for (label i=0; i<Ns; i++)
         {
             if (sDB.isLiquidFuel()[i])
             {
@@ -541,7 +541,7 @@ void Foam::parcel::updateParcelProperties
         scalar z = 0.0;
         scalar tauEvap = 0.0;
 
-        for(label i=0; i<Nf; i++)
+        for (label i=0; i<Nf; i++)
         {
             tauEvap += X()[i]*fuels.properties()[i].W()/tauEvaporation[i];
         }
@@ -628,7 +628,7 @@ void Foam::parcel::updateParcelProperties
         // if the droplet is NOT boiling use implicit scheme.
         if (sDB.evaporation().evaporation())
         {
-            for(label i=0; i<Nf; i++)
+            for (label i=0; i<Nf; i++)
             {
                 // immediately evaporate mass that has reached critical
                 // condition
diff --git a/src/lagrangian/dieselSpray/parcel/setRelaxationTimes.C b/src/lagrangian/dieselSpray/parcel/setRelaxationTimes.C
index 131e9f885f9877a9ba771d4650ffec322aaed6e5..94cc2df8f8a3832ec567a7468fdc3ab90c4449d5 100644
--- a/src/lagrangian/dieselSpray/parcel/setRelaxationTimes.C
+++ b/src/lagrangian/dieselSpray/parcel/setRelaxationTimes.C
@@ -74,7 +74,7 @@ void parcel::setRelaxationTimes
     scalar cpMixture = 0.0;
     scalar muf = 0.0;
 
-    for(label i=0; i<Ns; i++)
+    for (label i=0; i<Ns; i++)
     {
         scalar Y = sDB.composition().Y()[i][celli];
         W += Y/sDB.gasProperties()[i].W();
@@ -90,7 +90,7 @@ void parcel::setRelaxationTimes
     scalarField psat(Nf, 0.0);
     scalarField msat(Nf, 0.0);
 
-    for(label i=0; i<Nf; i++)
+    for (label i=0; i<Nf; i++)
     {
         label j = sDB.liquidToGasIndex()[i];
         scalar Y = sDB.composition().Y()[j][celli];
@@ -121,14 +121,14 @@ void parcel::setRelaxationTimes
     scalarField Ys(Nf, 0.0);
     scalar Wliq = 0.0;
 
-    for(label i=0; i<Nf; i++)
+    for (label i=0; i<Nf; i++)
     {
         label j = sDB.liquidToGasIndex()[i];
         scalar Wi = sDB.gasProperties()[j].W();
         Wliq += Xs[i]*Wi;
     }
 
-    for(label i=0; i<Nf; i++)
+    for (label i=0; i<Nf; i++)
     {
         label j = sDB.liquidToGasIndex()[i];
         scalar Wi = sDB.gasProperties()[j].W();
@@ -140,9 +140,9 @@ void parcel::setRelaxationTimes
 
     // calculate the characteritic times
 
-    if(liquidCore_> 0.5)
+    if (liquidCore_> 0.5)
     {
-//      no drag for parcels in the liquid core..
+        // no drag for parcels in the liquid core.
         tauMomentum = GREAT;
     }
     else
@@ -177,7 +177,7 @@ void parcel::setRelaxationTimes
     // this is mainly to put a limit on the evaporation time,
     // since tauEvaporation is very very small close to the boiling point.
 
-    for(label i=0; i<Nf; i++)
+    for (label i=0; i<Nf; i++)
     {
         scalar Td = min(T(), 0.999*fuels.properties()[i].Tc());
         bool boiling = fuels.properties()[i].pv(pressure, Td) >= 0.999*pressure;
@@ -187,7 +187,7 @@ void parcel::setRelaxationTimes
         scalar partialPressure = Xf[i]*pressure;
 
 //      saturated vapour
-        if(partialPressure > psat[i])
+        if (partialPressure > psat[i])
         {
             tauEvaporation[i] = GREAT;
         }
@@ -259,7 +259,7 @@ void parcel::setRelaxationTimes
                 scalar vapourSurfaceEnthalpy = 0.0;
                 scalar vapourFarEnthalpy = 0.0;
 
-                for(label k = 0; k < sDB.gasProperties().size(); k++)
+                for (label k = 0; k < sDB.gasProperties().size(); k++)
                 {
                     vapourSurfaceEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(tBoilingSurface);
                     vapourFarEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(temperature);
diff --git a/src/lagrangian/dieselSpray/spray/sprayFunctions.C b/src/lagrangian/dieselSpray/spray/sprayFunctions.C
index fb3e9541b15d0eb6f50acefa228ff1ecb2cee026..632d47411ad88223d2ac1812eafc40ff1118cbdf 100644
--- a/src/lagrangian/dieselSpray/spray/sprayFunctions.C
+++ b/src/lagrangian/dieselSpray/spray/sprayFunctions.C
@@ -77,7 +77,7 @@ scalar spray::injectedEnthalpy
         scalar Wl = fuels_->W(X);
         scalar hg = 0.0;
 
-        for(label j=0; j<Nf; j++)
+        for (label j=0; j<Nf; j++)
         {
             label k = liquidToGasIndex_[j];
             hg += gasProperties()[k].H(T)*gasProperties()[k].W()*X[j]/Wl;
@@ -133,7 +133,7 @@ scalar spray::liquidEnthalpy() const
         scalar hg = 0.0;
         scalar Wl = fuels().W(elmnt().X());
 
-        for(label j=0; j<Nf; j++)
+        for (label j=0; j<Nf; j++)
         {
             label k = liquidToGasIndex_[j];
 
@@ -177,7 +177,7 @@ scalar spray::liquidTotalEnthalpy() const
         scalar hg = 0.0;
         scalar Wl = fuels().W(elmnt().X());
 
-        for(label j=0; j<Nf; j++)
+        for (label j=0; j<Nf; j++)
         {
             label k = liquidToGasIndex_[j];
             hg +=
@@ -251,7 +251,7 @@ scalar spray::liquidPenetration
     vector ip(vector::zero);
     if (nHoles > 1)
     {
-        for(label i=0;i<nHoles;i++)
+        for (label i=0;i<nHoles;i++)
         {
             ip += injectors_[nozzlei].properties()->position(i);
         }
@@ -308,7 +308,7 @@ scalar spray::liquidPenetration
                 if (de < dist[i])
                 {
                     found = true;
-                    for(label j=n; j>i; j--)
+                    for (label j=n; j>i; j--)
                     {
                         m[j]    = m[j-1];
                         dist[j] = dist[j-1];
diff --git a/src/lagrangian/dieselSpray/spray/sprayInject.C b/src/lagrangian/dieselSpray/spray/sprayInject.C
index b0aea70def1878bccdd0eba33d70276936704ce2..f53ad1748363d13d6aa9358cb6f8b68aab2b989c 100644
--- a/src/lagrangian/dieselSpray/spray/sprayInject.C
+++ b/src/lagrangian/dieselSpray/spray/sprayInject.C
@@ -79,12 +79,12 @@ void spray::inject()
                 )
             );
 
-            for(label j=0; j<Np; j++)
+            for (label j=0; j<Np; j++)
             {
                 // calculate the time of injection for parcel 'j'
                 scalar toi = time0 + constT + deltaT*j/scalar(Np);
 
-                for(label n=0; n<nHoles; n++)
+                for (label n=0; n<nHoles; n++)
                 {
 
                     // calculate the velocity of the injected parcel
@@ -164,8 +164,8 @@ void spray::inject()
                             delete pPtr;
                         }
                     } // if (injectorCell....
-                } // for(label n=0...
-            } // for(label j=0....
+                } // for (label n=0...
+            } // for (label j=0....
         } // if (mass>0)...
     } // forAll(injectors)...
 
diff --git a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C
index 2478061ab1416b29378f6088a8039e5fb5261d9e..01525723f9b0a6236a46c7395553739a40b2e6ca 100644
--- a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C
+++ b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/LISA/LISA.C
@@ -183,7 +183,7 @@ void LISA::atomizeParcel
         scalar kOld = 0.0;
 
 
-        for(label i=0; i<40; i++)
+        for (label i=0; i<40; i++)
         {
 
             k = kPos
diff --git a/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/gradientDispersionRAS/gradientDispersionRAS.C b/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/gradientDispersionRAS/gradientDispersionRAS.C
index d381e9516f52ce9d5b96a0d05cc11b805dee2ac7..1db72fe0088d0e1b8cf2b965f007b3a9304d744d 100644
--- a/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/gradientDispersionRAS/gradientDispersionRAS.C
+++ b/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/gradientDispersionRAS/gradientDispersionRAS.C
@@ -109,7 +109,7 @@ void gradientDispersionRAS::disperseParcels() const
                 scalar x1 = 0.0;
                 scalar x2 = 0.0;
                 scalar rsq = 10.0;
-                while((rsq > 1.0) || (rsq == 0.0))
+                while ((rsq > 1.0) || (rsq == 0.0))
                 {
                     x1 = 2.0*spray_.rndGen().scalar01() - 1.0;
                     x2 = 2.0*spray_.rndGen().scalar01() - 1.0;
diff --git a/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/stochasticDispersionRAS/stochasticDispersionRAS.C b/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/stochasticDispersionRAS/stochasticDispersionRAS.C
index 36cf7b05885da131ed7937077c2944c6554d3734..5c8d8732f8b1164f18d5217bb832ab628e16b80e 100644
--- a/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/stochasticDispersionRAS/stochasticDispersionRAS.C
+++ b/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/stochasticDispersionRAS/stochasticDispersionRAS.C
@@ -111,7 +111,7 @@ void stochasticDispersionRAS::disperseParcels() const
                 // numerical recipes... Ch. 7. Random Numbers...
                 scalar x1,x2;
                 scalar rsq = 10.0;
-                while((rsq > 1.0) || (rsq == 0.0))
+                while ((rsq > 1.0) || (rsq == 0.0))
                 {
                     x1 = 2.0*spray_.rndGen().scalar01() - 1.0;
                     x2 = 2.0*spray_.rndGen().scalar01() - 1.0;
diff --git a/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/RutlandFlashBoil/RutlandFlashBoil.C b/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/RutlandFlashBoil/RutlandFlashBoil.C
index 83c0e17a7b9a7b709e874cba05492b1b67febccd..afb24110d8d9b9329a50c4ad4910b9b760622653 100644
--- a/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/RutlandFlashBoil/RutlandFlashBoil.C
+++ b/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/RutlandFlashBoil/RutlandFlashBoil.C
@@ -160,7 +160,7 @@ scalar RutlandFlashBoil::relaxationTime
     scalar logXratio = log(1.0 + Xratio);
     scalar Fb = 1.0;
 
-    if(logXratio > SMALL)
+    if (logXratio > SMALL)
     {
         Fb = pow((1.0 + Xratio), FbExp)*log(1.0 + Xratio)/Xratio;
     }
@@ -286,7 +286,7 @@ scalar RutlandFlashBoil::boilingTime
                     Gneg = Gneg/10.0;
                     Gneg = max(Gneg, VSMALL);
                     FgNeg = Gneg + Gf - B*log(1.0 + (1.0 + Gf/Gneg)*A);
-                    if(FgNeg < 0.0)
+                    if (FgNeg < 0.0)
                     {
                         break;
                     }
diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C
index f7aaaa724d2a9f4606d4785fc59e7b29fd089163..5c7819c709a141acbd42b5f77d77a2c1c4d8bb5c 100644
--- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C
+++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C
@@ -380,7 +380,7 @@ void Foam::DsmcCloud<ParcelType>::collisions()
                     {
                         candidateQ = subCellPs[rndGen_.integer(0, nSC - 1)];
 
-                    } while(candidateP == candidateQ);
+                    } while (candidateP == candidateQ);
                 }
                 else
                 {
@@ -392,7 +392,7 @@ void Foam::DsmcCloud<ParcelType>::collisions()
                     {
                         candidateQ = rndGen_.integer(0, nC - 1);
 
-                    } while(candidateP == candidateQ);
+                    } while (candidateP == candidateQ);
                 }
 
                 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -405,7 +405,7 @@ void Foam::DsmcCloud<ParcelType>::collisions()
                 // label candidateQ = rndGen_.integer(0, nC-1);
 
                 // // If the same candidate is chosen, choose again
-                // while(candidateP == candidateQ)
+                // while (candidateP == candidateQ)
                 // {
                 //     candidateQ = rndGen_.integer(0, nC-1);
                 // }
diff --git a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C
index c9e975e296afc9a6730cbc43ffe929594b0d3cf9..2dd3e9bf3fa45ecdf1c260edcda0053dc1628069 100644
--- a/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C
+++ b/src/lagrangian/molecularDynamics/molecularMeasurements/correlationFunction/correlationFunction.C
@@ -185,7 +185,7 @@ void Foam::correlationFunction<Type>::calculateCorrelationFunction
     const Type& currentValue
 )
 {
-    if( measurandFieldSize() != 1)
+    if (measurandFieldSize() != 1)
     {
         FatalErrorIn("correlationFunction<Type>::calculateCorrelationFunction")
             << "Trying to supply a single value to calculate the correlation "
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.C b/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.C
index f1036eaa0e937bd2121f80187ef61199cd3d75e4..1a587f3022b5e44b0605661ea7a759b421045888 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.C
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/interactionLists.C
@@ -667,7 +667,7 @@ const Foam::labelList Foam::interactionLists::referredCellsInRangeOfSegment
                     )
                 )
                 {
-                    if(findIndex(referredCellsFoundInRange, rIL) == -1)
+                    if (findIndex(referredCellsFoundInRange, rIL) == -1)
                     {
                         referredCellsFoundInRange.append(rIL);
                     }
diff --git a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCell/referredCell.C b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCell/referredCell.C
index 225ad5902a01ca024526ef4e8b43326f90e4f677..0059fad4b9431843f987c0287684b099e1b5255c 100644
--- a/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCell/referredCell.C
+++ b/src/lagrangian/molecularDynamics/molecule/interactionLists/referredCell/referredCell.C
@@ -277,7 +277,7 @@ referredCell::referredCell
     // Allow sourceCell = -1 to create a dummy referredCell
     // to obtain the transformation
 
-    if(sourceCell >= 0)
+    if (sourceCell >= 0)
     {
         setConstructionData(mesh, sourceCell);
     }
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H b/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H
index 9781c9d70f415b8c92d90d29d3b05ec015bcebcc..4e93070479e69dfaf71c485acf929e7ac8faab0a 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/averageMDFields.H
@@ -152,7 +152,7 @@ if (runTime.outputTime())
 
     forAll(totalTemperature.internalField(), tT)
     {
-        if(totalN_sum[tT] > 0)
+        if (totalN_sum[tT] > 0)
         {
             totalTemperature.internalField()[tT] =
                 totalTemperatureVTerms_sum[tT]
@@ -181,7 +181,7 @@ if (runTime.outputTime())
 
         forAll(singleSpeciesMeanKE, sSMKE)
         {
-            if(allSpeciesN_RU[mKE][sSMKE])
+            if (allSpeciesN_RU[mKE][sSMKE])
             {
                 singleSpeciesMeanKE[sSMKE] =
                     allSpeciesM_RU[mKE][sSMKE]
@@ -208,7 +208,7 @@ if (runTime.outputTime())
 
     forAll(totalMeanKE.internalField(), tMKE)
     {
-        if(totalN_sum[tMKE] > 0)
+        if (totalN_sum[tMKE] > 0)
         {
             totalMeanKE.internalField()[tMKE] =
                 totalKE_sum[tMKE]
diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H b/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H
index 4448b9e17832e48f19be76149a80b0ec5be7e0d1..446e58da05f6ba861cf026383238b088096a85da 100644
--- a/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H
+++ b/src/lagrangian/molecularDynamics/molecule/mdTools/meanMomentumEnergyAndNMols.H
@@ -73,7 +73,7 @@ label singleStepDOFs = 0;
         //singleStepCentreOfMass += mol().position()*molMass;
     }
 
-    // if(singleStepNMols)
+    // if (singleStepNMols)
     // {
     //     singleStepCentreOfMass /= singleStepTotalMass;
     // }
@@ -104,7 +104,7 @@ label singleStepDOFs = 0;
         singleStepTotalAngularMomentum += molPiGlobal;
         //+((mol().position() - singleStepCentreOfMass) ^ (molV * molMass));
 
-        if(mag(molV) > singleStepMaxVelocityMag)
+        if (mag(molV) > singleStepMaxVelocityMag)
         {
             singleStepMaxVelocityMag = mag(molV);
         }
diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H
index 447a04e4ea3e047f045ac56cf55af05aa2849cac..b13f5ea6a0219fdc36595f087a072fd531a575c4 100644
--- a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H
+++ b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeI.H
@@ -77,7 +77,7 @@ inline Foam::molecule::constantProperties::constantProperties
 
     siteReferencePositions_ -= centreOfMass;
 
-    if(siteIds_.size() == 1)
+    if (siteIds_.size() == 1)
     {
         // Single site molecule - no rotational motion.
 
@@ -85,7 +85,7 @@ inline Foam::molecule::constantProperties::constantProperties
 
         momentOfInertia_ = diagTensor(-1, -1, -1);
     }
-    else if(linearMoleculeTest())
+    else if (linearMoleculeTest())
     {
         // Linear molecule.
 
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
index f341267b846c696c5703118c70d57bd1916f8be5..a50159ee9333c15644fcc7b3262188b798fbfb06 100644
--- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
+++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C
@@ -509,7 +509,7 @@ void Foam::moleculeCloud::initialiseMolecules
                     zoneDict.lookup("latticePositions")
                 );
 
-                if(latticeIds.size() != latticePositions.size())
+                if (latticeIds.size() != latticePositions.size())
                 {
                     FatalErrorIn("Foam::moleculeCloud::initialiseMolecules")
                         << "latticeIds and latticePositions must be the same "
diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H
index fee67cfced40f59f4820a7ae232844502aad8d83..2a92af07cfe63b27bb2dcd2b4e8a99677792fcbc 100644
--- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H
+++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H
@@ -75,7 +75,7 @@ inline void Foam::moleculeCloud::evaluatePair
 
                 scalar rsIsJMagSq = magSqr(rsIsJ);
 
-                if(pairPot.rCutSqr(idsI, idsJ, rsIsJMagSq))
+                if (pairPot.rCutSqr(idsI, idsJ, rsIsJMagSq))
                 {
                     scalar rsIsJMag = mag(rsIsJ);
 
@@ -118,7 +118,7 @@ inline void Foam::moleculeCloud::evaluatePair
 
                 scalar rsIsJMagSq = magSqr(rsIsJ);
 
-                if(rsIsJMagSq <= electrostatic.rCutSqr())
+                if (rsIsJMagSq <= electrostatic.rCutSqr())
                 {
                     scalar rsIsJMag = mag(rsIsJ);
 
diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C
index 2d77c4ce59505c320590182f5eae168637f48cc4..26b99d7e3b88863d3ec71147e3bc2188aa04747a 100644
--- a/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C
+++ b/src/lagrangian/molecularDynamics/potential/pairPotential/pairPotentialList/pairPotentialList.C
@@ -158,7 +158,7 @@ void Foam::pairPotentialList::readPairPotentialDict
     {
         OFstream ppTabFile(mesh.time().path()/"electrostatic");
 
-        if(!electrostaticPotential_->writeEnergyAndForceTables(ppTabFile))
+        if (!electrostaticPotential_->writeEnergyAndForceTables(ppTabFile))
         {
             FatalErrorIn("pairPotentialList::readPairPotentialDict")
                 << "Failed writing to "
diff --git a/src/lagrangian/molecularDynamics/potential/potential/potential.C b/src/lagrangian/molecularDynamics/potential/potential/potential.C
index e3f6b501d1e7c5e5149b20622c02a02f94ae65f2..2fc95108dd5054ac394da6f8ecc8be88aa2ad2e6 100644
--- a/src/lagrangian/molecularDynamics/potential/potential/potential.C
+++ b/src/lagrangian/molecularDynamics/potential/potential/potential.C
@@ -53,7 +53,7 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict)
         {
             const word& siteId = siteIdNames[sI];
 
-            if(findIndex(siteIdList, siteId) == -1)
+            if (findIndex(siteIdList, siteId) == -1)
             {
                 siteIdList.append(siteId);
             }
@@ -65,14 +65,14 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict)
         {
             const word& siteId = pairPotSiteIds[sI];
 
-            if(findIndex(siteIdNames, siteId) == -1)
+            if (findIndex(siteIdNames, siteId) == -1)
             {
                 FatalErrorIn("potential.C") << nl
                     << siteId << " in pairPotentialSiteIds is not in siteIds: "
                     << siteIdNames << nl << abort(FatalError);
             }
 
-            if(findIndex(pairPotentialSiteIdList, siteId) == -1)
+            if (findIndex(pairPotentialSiteIdList, siteId) == -1)
             {
                 pairPotentialSiteIdList.append(siteId);
             }
@@ -85,7 +85,7 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict)
     {
         const word& siteId = siteIdList[aSIN];
 
-        if(findIndex(pairPotentialSiteIdList, siteId) == -1)
+        if (findIndex(pairPotentialSiteIdList, siteId) == -1)
         {
             pairPotentialSiteIdList.append(siteId);
         }
@@ -287,7 +287,7 @@ void Foam::potential::potential::readMdInitialiseDict
         {
             const word& id = latticeIds[i];
 
-            if(!moleculePropertiesDict.found(id))
+            if (!moleculePropertiesDict.found(id))
             {
                 FatalErrorIn("potential.C") << nl
                     << "Molecule type "
diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriverShrink.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriverShrink.C
index 78c2fabfc251afe00763aefc95c4dc2a9a771d27..bc2dcabf58ecfb269deec9b407cc2bfa0d2f25f6 100644
--- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriverShrink.C
+++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriverShrink.C
@@ -468,7 +468,7 @@ void Foam::autoLayerDriver::findIsolatedRegions
     // Keep count of number of points unextruded
     label nPointCounter = 0;
 
-    while(true)
+    while (true)
     {
         // Stop layer growth where mesh wraps around edge with a
         // large feature angle
diff --git a/src/mesh/autoMesh/autoHexMesh/trackedParticle/ExactParticle.C b/src/mesh/autoMesh/autoHexMesh/trackedParticle/ExactParticle.C
index 237e35276c33e528be26b13430bc078ea66baab4..0bda7cd1cc4dafb8c1c887ae09e72d400593cd61 100644
--- a/src/mesh/autoMesh/autoHexMesh/trackedParticle/ExactParticle.C
+++ b/src/mesh/autoMesh/autoHexMesh/trackedParticle/ExactParticle.C
@@ -39,7 +39,7 @@ Foam::label Foam::ExactParticle<ParticleType>::track
     this->facei_ = -1;
 
     // Tracks to endPosition or stop on boundary
-    while(!this->onBoundary() && this->stepFraction_ < 1.0 - SMALL)
+    while (!this->onBoundary() && this->stepFraction_ < 1.0 - SMALL)
     {
         this->stepFraction_ +=
             trackToFace(endPosition, td)
diff --git a/src/meshTools/PointEdgeWave/PointEdgeWave.C b/src/meshTools/PointEdgeWave/PointEdgeWave.C
index 81309490d5f31745c55629bd4dbf250c05a86f79..7dcaea3f85077b7b5237cbe304709414454d068c 100644
--- a/src/meshTools/PointEdgeWave/PointEdgeWave.C
+++ b/src/meshTools/PointEdgeWave/PointEdgeWave.C
@@ -994,7 +994,7 @@ Foam::label Foam::PointEdgeWave<Type>::iterate(const label maxIter)
 
     label iter = 0;
 
-    while(iter < maxIter)
+    while (iter < maxIter)
     {
         if (debug)
         {
diff --git a/src/meshTools/cellClassification/cellClassification.C b/src/meshTools/cellClassification/cellClassification.C
index 518fd5ae4a03e171ff1b85ab39a2bc935dabf7bd..58c1cfeb4670a2c0be316e365e103bb93134e2c5 100644
--- a/src/meshTools/cellClassification/cellClassification.C
+++ b/src/meshTools/cellClassification/cellClassification.C
@@ -683,7 +683,7 @@ Foam::label Foam::cellClassification::fillHangingCells
 {
     label nTotChanged = 0;
 
-    for(label iter = 0; iter < maxIter; iter++)
+    for (label iter = 0; iter < maxIter; iter++)
     {
         label nChanged = 0;
 
@@ -740,7 +740,7 @@ Foam::label Foam::cellClassification::fillRegionEdges
 {
     label nTotChanged = 0;
 
-    for(label iter = 0; iter < maxIter; iter++)
+    for (label iter = 0; iter < maxIter; iter++)
     {
         // Get interface between meshType cells and non-meshType cells as a list
         // of faces and for each face the cell which is the meshType.
@@ -809,7 +809,7 @@ Foam::label Foam::cellClassification::fillRegionPoints
 {
     label nTotChanged = 0;
 
-    for(label iter = 0; iter < maxIter; iter++)
+    for (label iter = 0; iter < maxIter; iter++)
     {
         // Get interface between meshType cells and non-meshType cells as a list
         // of faces and for each face the cell which is the meshType.
diff --git a/src/meshTools/cellDist/cellDistFuncs.C b/src/meshTools/cellDist/cellDistFuncs.C
index bca2841273c45d8782658aa9ef4526ac95dffbd8..76ec6eee355a5644a866ae445f173c9538de9a99 100644
--- a/src/meshTools/cellDist/cellDistFuncs.C
+++ b/src/meshTools/cellDist/cellDistFuncs.C
@@ -121,7 +121,7 @@ Foam::scalar Foam::cellDistFuncs::smallestDist
     scalar minDist = GREAT;
     minFaceI = -1;
 
-    for(label wallFaceI = 0; wallFaceI < nWallFaces; wallFaceI++)
+    for (label wallFaceI = 0; wallFaceI < nWallFaces; wallFaceI++)
     {
         label patchFaceI = wallFaces[wallFaceI];
 
diff --git a/src/meshTools/meshSearch/meshSearch.C b/src/meshTools/meshSearch/meshSearch.C
index 9b822b11516ad57114fa7b786b564afd93ac47a9..7448c7faa3df702b6abcab1495f15f2c8665da92 100644
--- a/src/meshTools/meshSearch/meshSearch.C
+++ b/src/meshTools/meshSearch/meshSearch.C
@@ -791,7 +791,7 @@ Foam::label Foam::meshSearch::findCell
                       + offset(curHit.hitPoint(), curHit.index(), edgeVec);
                 }
             }
-            while(true);
+            while (true);
         }
         else
         {
@@ -928,7 +928,7 @@ Foam::List<Foam::pointIndexHit> Foam::meshSearch::intersections
               + offset(bHit.hitPoint(), bHit.index(), edgeVec);
         }
 
-    } while(bHit.hit());
+    } while (bHit.hit());
 
 
     hits.shrink();
diff --git a/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C b/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C
index e3c2c2f4ecbeb22bddbe9ef68f530a52cea00c44..17a598626047230d32f8190bc3c719a5c79036ce 100644
--- a/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C
+++ b/src/meshTools/polyMeshZipUpCells/polyMeshZipUpCells.C
@@ -280,7 +280,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                                 blockHead = true;
                             }
                         }
-                        else if(cellPoints[pointI] == newEdgeEnd)
+                        else if (cellPoints[pointI] == newEdgeEnd)
                         {
                             if (pointUsage[pointI] > 2)
                             {
@@ -375,7 +375,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
                                             blockHead = true;
                                         }
                                     }
-                                    else if(cellPoints[pointI] == curEdgeEnd)
+                                    else if (cellPoints[pointI] == curEdgeEnd)
                                     {
                                         if (pointUsage[pointI] > 2)
                                         {
diff --git a/src/meshTools/regionSplit/regionSplit.C b/src/meshTools/regionSplit/regionSplit.C
index 667a2ddc5d102bfe7d8d8b1906d416f48f58f515..b415d66f02e0375de8d18604c900307919bd1280 100644
--- a/src/meshTools/regionSplit/regionSplit.C
+++ b/src/meshTools/regionSplit/regionSplit.C
@@ -342,7 +342,7 @@ Foam::label Foam::regionSplit::calcRegionSplit
         nRegions++;
         unsetCellI++;
     }
-    while(true);
+    while (true);
 
 
     if (debug)
diff --git a/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C b/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C
index 11e2eadd483d9db9bc7c9a6bcc38fd7c32e5c2f9..7f822733b8a5c96c0326e0e37f9e4556828dd0d6 100644
--- a/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C
+++ b/src/meshTools/sets/faceZoneSources/setsToFaceZone/setsToFaceZone.C
@@ -35,13 +35,9 @@ License
 
 namespace Foam
 {
-
-defineTypeNameAndDebug(setsToFaceZone, 0);
-
-addToRunTimeSelectionTable(topoSetSource, setsToFaceZone, word);
-
-addToRunTimeSelectionTable(topoSetSource, setsToFaceZone, istream);
-
+    defineTypeNameAndDebug(setsToFaceZone, 0);
+    addToRunTimeSelectionTable(topoSetSource, setsToFaceZone, word);
+    addToRunTimeSelectionTable(topoSetSource, setsToFaceZone, istream);
 }
 
 
@@ -155,7 +151,7 @@ void Foam::setsToFaceZone::applyToSet
                         {
                             flip = false;
                         }
-                        else if(!ownFound && neiFound)
+                        else if (!ownFound && neiFound)
                         {
                             flip = true;
                         }
diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C
index 2e7ba2f8819aa16cd937ca1ac628b807bd55c544..4721cb48ab489c1d53432fd1549487938c1ac14d 100644
--- a/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C
+++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/edgeSurface.C
@@ -330,7 +330,7 @@ Foam::edgeSurface::edgeSurface
         labelList edgeLabels(edges_.size() - nSurfaceEdges_);
 
         label i = 0;
-        for(label edgeI = nSurfaceEdges_; edgeI < edges_.size(); edgeI++)
+        for (label edgeI = nSurfaceEdges_; edgeI < edges_.size(); edgeI++)
         {
             edgeLabels[i++] = edgeI;
         }
diff --git a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C
index be758c07fdf0c6b4d9677b57629c066ee4d2fda1..201593990b21dfec7d12524bb0999fa43aeba247 100644
--- a/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C
+++ b/src/meshTools/triSurface/booleanOps/intersectedSurface/intersectedSurface.C
@@ -597,7 +597,7 @@ Foam::face Foam::intersectedSurface::walkFace
     label vertI = startVertI;
     label edgeI = startEdgeI;
 
-    while(true)
+    while (true)
     {
         const edge& e = edges[edgeI];
 
diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C
index fffcd6792d4cb573fb967cdc63ad130948f6d8d4..a25664a130db244aa91809279003702222d5c36c 100644
--- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C
+++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersection.C
@@ -705,7 +705,7 @@ void Foam::surfaceIntersection::doCutEdges
                 doTrack = false;
             }
         }
-        while(doTrack);
+        while (doTrack);
     }
     intersection::setPlanarTol(oldTol);
 }
diff --git a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C
index cdaf91b2e4207f94d5483deef15a8c1e5e83bad0..a710c98d44c560bfbda01f9f7ee039165e164ade 100644
--- a/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C
+++ b/src/meshTools/triSurface/booleanOps/surfaceIntersection/surfaceIntersectionFuncs.C
@@ -155,7 +155,7 @@ void Foam::surfaceIntersection::removeDuplicates
         // Insert first
         elems[elemI++] = map[oldElems[0]];
 
-        for(label vertI = 1; vertI < oldElems.size(); vertI++)
+        for (label vertI = 1; vertI < oldElems.size(); vertI++)
         {
             // Insert others only if they differ from one before
             label newVertI = map[oldElems[vertI]];
@@ -294,7 +294,7 @@ void Foam::surfaceIntersection::writeIntersectedEdges
             os  << "l " << e.start()+1 << ' '
                 << extraVerts[0] + surf.nPoints() + 1 << endl;
 
-            for(label i = 1; i < extraVerts.size(); i++)
+            for (label i = 1; i < extraVerts.size(); i++)
             {
                 os  << "l " << extraVerts[i-1] + surf.nPoints() + 1  << ' '
                     << extraVerts[i] + surf.nPoints() + 1 << endl;
diff --git a/src/meshTools/triSurface/orientedSurface/orientedSurface.C b/src/meshTools/triSurface/orientedSurface/orientedSurface.C
index 34a230744754b257802e9a2a47c39320ac5e75fb..045693caa8434dc9ebb76d22b373f8573dd91e69 100644
--- a/src/meshTools/triSurface/orientedSurface/orientedSurface.C
+++ b/src/meshTools/triSurface/orientedSurface/orientedSurface.C
@@ -185,7 +185,7 @@ void Foam::orientedSurface::walkSurface
     // List of edges that were changed in the last iteration.
     labelList changedEdges;
 
-    while(true)
+    while (true)
     {
         changedEdges = faceToEdge(s, changedFaces);
 
diff --git a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C
index 0e97a6331659fc31ba6bd78977e6e40a6cc66911..773c423419002942d5d7c29bd2d146d028b57eb3 100644
--- a/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C
+++ b/src/meshTools/triSurface/triSurfaceTools/triSurfaceTools.C
@@ -2702,7 +2702,7 @@ void Foam::triSurfaceTools::calcInterpolationWeights
 
     // calculate edge normal (pointing inwards)
     FixedList<vector, 3> normal;
-    for(label i=0; i<3; i++)
+    for (label i=0; i<3; i++)
     {
         normal[i] = triangleFaceNormal ^ edge[i];
         normal[i] /= mag(normal[i]) + VSMALL;
diff --git a/src/sampling/include/mapPatch.H b/src/sampling/include/mapPatch.H
index 4ed64b1f663a67c810cbd36dbbc8489f26aeecf2..371317a0ab2a5747a95817610ee5110e48de3556 100644
--- a/src/sampling/include/mapPatch.H
+++ b/src/sampling/include/mapPatch.H
@@ -1,4 +1,4 @@
-    if(planeMapping && targetPatchNamePresent && cut.cut())
+    if (planeMapping && targetPatchNamePresent && cut.cut())
     {
         //Map variables U, phi & k
         //Info<< typeInfo("isoLESmodel") << endl;
@@ -10,7 +10,7 @@
 
         forAll(cutCells, cCellsI)
         {
-            if(sgsModel.type() == "SpalartAllmaras")
+            if (sgsModel.type() == "SpalartAllmaras")
             {
                 planeNuTilda[cCellsI] = sgsModel.nuTilda()()[cutCells[cCellsI]];
             }
@@ -21,7 +21,7 @@
             planeU[cCellsI] = U[cutCells[cCellsI]];
         }
 
-        if(sgsModel.type() == "SpalartAllmaras")
+        if (sgsModel.type() == "SpalartAllmaras")
         {
             Info<< "Mapping NuTilda." << endl;
             sgsModel.nuTilda()().boundaryField()[targetPatchNumber] ==
diff --git a/src/sampling/sampledSet/curve/curveSet.C b/src/sampling/sampledSet/curve/curveSet.C
index 7b0a0b8e0350641344626e3cf5692ec0c5155c74..b294ab360008372043b6c3482198d4919d226e51 100644
--- a/src/sampling/sampledSet/curve/curveSet.C
+++ b/src/sampling/sampledSet/curve/curveSet.C
@@ -60,7 +60,7 @@ bool Foam::curveSet::trackToBoundary
     // Alias
     const point& trackPt = singleParticle.position();
 
-    while(true)
+    while (true)
     {
         // Local geometry info
         const vector offset = sampleCoords_[sampleI+1] - sampleCoords_[sampleI];
@@ -145,7 +145,7 @@ void Foam::curveSet::calcSamples
             << sampleCoords_ << exit(FatalError);
     }
     point oldPoint = sampleCoords_[0];
-    for(label sampleI = 1; sampleI < sampleCoords_.size(); sampleI++)
+    for (label sampleI = 1; sampleI < sampleCoords_.size(); sampleI++)
     {
         if (mag(sampleCoords_[sampleI] - oldPoint) < SMALL)
         {
@@ -169,7 +169,7 @@ void Foam::curveSet::calcSamples
     label sampleI = 0;
 
     point lastSample(GREAT, GREAT, GREAT);
-    while(true)
+    while (true)
     {
         // Get boundary intersection
         point trackPt;
@@ -243,7 +243,7 @@ void Foam::curveSet::calcSamples
                 // No intersection found. Go to next point
                 sampleI++;
             }
-        } while((trackCellI == -1) && (sampleI < sampleCoords_.size() - 1));
+        } while ((trackCellI == -1) && (sampleI < sampleCoords_.size() - 1));
 
         if (sampleI == sampleCoords_.size() - 1)
         {
@@ -278,7 +278,7 @@ void Foam::curveSet::calcSamples
         );
 
         // fill sampleSegments
-        for(label i = samplingPts.size() - 1; i >= startSegmentI; --i)
+        for (label i = samplingPts.size() - 1; i >= startSegmentI; --i)
         {
             samplingSegments.append(segmentI);
         }
diff --git a/src/sampling/sampledSet/face/faceOnlySet.C b/src/sampling/sampledSet/face/faceOnlySet.C
index fba774f802159abdb6eb7f326b5981fa9284420f..e66d05884b5ddc59809d7a4d74536eb11505bd40 100644
--- a/src/sampling/sampledSet/face/faceOnlySet.C
+++ b/src/sampling/sampledSet/face/faceOnlySet.C
@@ -65,7 +65,7 @@ bool Foam::faceOnlySet::trackToBoundary
     // Alias
     const point& trackPt = singleParticle.position();
 
-    while(true)
+    while (true)
     {
         point oldPoint = trackPt;
 
@@ -199,7 +199,7 @@ void Foam::faceOnlySet::calcSamples
     // index in bHits; current boundary intersection
     label bHitI = 1;
 
-    while(true)
+    while (true)
     {
         if (trackFaceI != -1)
         {
@@ -230,7 +230,7 @@ void Foam::faceOnlySet::calcSamples
         );
 
         // fill sampleSegments
-        for(label i = samplingPts.size() - 1; i >= startSegmentI; --i)
+        for (label i = samplingPts.size() - 1; i >= startSegmentI; --i)
         {
             samplingSegments.append(segmentI);
         }
diff --git a/src/sampling/sampledSet/midPoint/midPointSet.C b/src/sampling/sampledSet/midPoint/midPointSet.C
index 0ec01f6571bc5e614b298d4c74f9408ad6b4c1a7..ffe75103426d13902535d360f17298e7c512b985 100644
--- a/src/sampling/sampledSet/midPoint/midPointSet.C
+++ b/src/sampling/sampledSet/midPoint/midPointSet.C
@@ -54,7 +54,7 @@ void Foam::midPointSet::genSamples()
 
     label sampleI = 0;
 
-    while(true)
+    while (true)
     {
         // calculate midpoint between sampleI and sampleI+1 (if in same segment)
         while
diff --git a/src/sampling/sampledSet/midPointAndFace/midPointAndFaceSet.C b/src/sampling/sampledSet/midPointAndFace/midPointAndFaceSet.C
index 7e110ef9018ea74f28d8eca539965cd0533c40ff..e5a2a9caea21fcaeff78013fb01c99a502f437ca 100644
--- a/src/sampling/sampledSet/midPointAndFace/midPointAndFaceSet.C
+++ b/src/sampling/sampledSet/midPointAndFace/midPointAndFaceSet.C
@@ -56,7 +56,7 @@ void Foam::midPointAndFaceSet::genSamples()
 
     label sampleI = 0;
 
-    while(true)
+    while (true)
     {
         // sampleI is start of segment
 
diff --git a/src/sampling/sampledSet/uniform/uniformSet.C b/src/sampling/sampledSet/uniform/uniformSet.C
index 9b25ba42345fec8675b38487d194cf3d82286c00..ee293d6588ec8690993459ba0e4084bd5388973d 100644
--- a/src/sampling/sampledSet/uniform/uniformSet.C
+++ b/src/sampling/sampledSet/uniform/uniformSet.C
@@ -65,7 +65,7 @@ bool Foam::uniformSet::nextSample
     samplePt += offset;
     sampleI++;
 
-    for(; sampleI < nPoints_; sampleI++)
+    for (; sampleI < nPoints_; sampleI++)
     {
         scalar s = (samplePt - currentPt) & normOffset;
 
@@ -103,7 +103,7 @@ bool Foam::uniformSet::trackToBoundary
     // Alias
     const point& trackPt = singleParticle.position();
 
-    while(true)
+    while (true)
     {
         // Find next samplePt on/after trackPt. Update samplePt, sampleI
         if (!nextSample(trackPt, offset, smallDist, samplePt, sampleI))
@@ -305,7 +305,7 @@ void Foam::uniformSet::calcSamples
     // index in bHits; current boundary intersection
     label bHitI = 1;
 
-    while(true)
+    while (true)
     {
         // Initialize tracking starting from trackPt
         Cloud<passiveParticle> particles(mesh(), IDLList<passiveParticle>());
@@ -329,7 +329,7 @@ void Foam::uniformSet::calcSamples
         );
 
         // fill sampleSegments
-        for(label i = samplingPts.size() - 1; i >= startSegmentI; --i)
+        for (label i = samplingPts.size() - 1; i >= startSegmentI; --i)
         {
             samplingSegments.append(segmentI);
         }
diff --git a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C
index c916fe16c3c11d1892b805a9886be0840d0a4fe3..4ebdbb976b01bd122055e83671444190b666eede 100644
--- a/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C
+++ b/src/sampling/sampledSurface/writers/raw/rawSurfaceWriter.C
@@ -192,7 +192,7 @@ void Foam::rawSurfaceWriter<Type>::writeData
 {
     // header
     os  << "#  xx  xy  xz  yy  yz ";
-    for(int i=0; i<6; i++)
+    for (int i=0; i<6; i++)
     {
         os << fieldName << "_" << i << "  ";
     }
diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C
index 7153826609d66271404f693e633450c9cc2ca06c..3e204e65b1dea330e3840ebc99c12d172c9e1ddb 100644
--- a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C
+++ b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C
@@ -707,7 +707,7 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::solve
         // calculate the chemical source terms
         scalar cTot = 0.0;
 
-        while(timeLeft > SMALL)
+        while (timeLeft > SMALL)
         {
             tauC = solver().solve(c, Ti, pi, t, dt);
             t += dt;
diff --git a/src/thermophysicalModels/pdfs/RosinRammler/RosinRammler.C b/src/thermophysicalModels/pdfs/RosinRammler/RosinRammler.C
index f157c2645f6cda4aea9f2901e255ac3c9193078b..becfd94db21e0b202d4a937617f0457641dc2d11 100644
--- a/src/thermophysicalModels/pdfs/RosinRammler/RosinRammler.C
+++ b/src/thermophysicalModels/pdfs/RosinRammler/RosinRammler.C
@@ -118,7 +118,7 @@ Foam::scalar Foam::RosinRammler::sample() const
             scalar xx = pow(x/d_[i], n_[i]);
             p += ls_[i]*xx*exp(-xx);
         }
-    } while(y>p);
+    } while (y>p);
 
     return x;
 }
diff --git a/src/thermophysicalModels/pdfs/exponential/exponential.C b/src/thermophysicalModels/pdfs/exponential/exponential.C
index 6ebe918fe892ea464091365e82ee57bc57618952..8498c2c9e2a234475ffbdb318d98f12f79443818 100644
--- a/src/thermophysicalModels/pdfs/exponential/exponential.C
+++ b/src/thermophysicalModels/pdfs/exponential/exponential.C
@@ -105,7 +105,7 @@ Foam::scalar Foam::exponential::sample() const
         {
             p += ls_[i]*exp(-lambda_[i]*x);
         }
-    } while(p>y);
+    } while (p>y);
 
     return x;
 }
diff --git a/src/thermophysicalModels/pdfs/general/general.C b/src/thermophysicalModels/pdfs/general/general.C
index 59b1a75953f14b344856ea8ec2b27ae4ec931e34..33d3e3f57d4cd5a7708ecb8e9a8a397a08882c89 100644
--- a/src/thermophysicalModels/pdfs/general/general.C
+++ b/src/thermophysicalModels/pdfs/general/general.C
@@ -96,7 +96,7 @@ Foam::scalar Foam::general::sample() const
           + (x - xy_[i][0])
            *(xy_[i+1][1] - xy_[i][1])
            /(xy_[i+1][0] - xy_[i][0]);
-    } while(p>y);
+    } while (p>y);
 
     return x;
 }
diff --git a/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.C b/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.C
index f683d77bceab6c581dab5636d45b82d924ffd3c9..7821fb7d58034eaa6869694f05c72fe673600759 100644
--- a/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.C
+++ b/src/thermophysicalModels/radiation/radiationModel/fvDOM/fvDOM/fvDOM.C
@@ -309,7 +309,7 @@ void Foam::radiation::fvDOM::calculate()
 
         Info<< "Radiation solver iter: " << radIter << endl;
 
-    } while(maxResidual > convergence_ && radIter < maxIter_);
+    } while (maxResidual > convergence_ && radIter < maxIter_);
 
     updateG();
 }
diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C
index a6841241225ab9ced70ca0466d3c6fcb0d34347a..9302e1665947a3e8147f9649839e70232d671b49 100644
--- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C
+++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.C
@@ -813,7 +813,7 @@ void Foam::chemkinReader::read
         yy_buffer_state* bufferPtr(yy_create_buffer(&thermoStream, yyBufSize));
         yy_switch_to_buffer(bufferPtr);
 
-        while(lex() != 0)
+        while (lex() != 0)
         {}
 
         yy_delete_buffer(bufferPtr);
@@ -838,7 +838,7 @@ void Foam::chemkinReader::read
 
     initReactionKeywordTable();
 
-    while(lex() != 0)
+    while (lex() != 0)
     {}
 
     yy_delete_buffer(bufferPtr);
diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H
index de679103806b55e96a6a8a9faad1edd41bca973a..0afbc9a457d7fed92793fe1cd4d88db35c87b664 100644
--- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H
+++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinReader.H
@@ -234,7 +234,7 @@ private:
             {
                 elementName[1] = tolower(elementName[1]);
             }
-            else if(elementName[0] == 'E')
+            else if (elementName[0] == 'E')
             {
                 elementName = 'e';
             }
diff --git a/src/triSurface/triSurface/interfaces/OBJ/readOBJ.C b/src/triSurface/triSurface/interfaces/OBJ/readOBJ.C
index 20c3d9cc65d4ebda88b31578e000283efac832c0..d98a504bc4c2bd8e3ae3f467fb2c6946408a7bdb 100644
--- a/src/triSurface/triSurface/interfaces/OBJ/readOBJ.C
+++ b/src/triSurface/triSurface/interfaces/OBJ/readOBJ.C
@@ -107,7 +107,7 @@ bool triSurface::readOBJ(const fileName& OBJfileName)
             // Assume 'f' is followed by space.
             string::size_type endNum = 1;
 
-            while(true)
+            while (true)
             {
                 string::size_type startNum =
                     line.find_first_not_of(' ', endNum);
diff --git a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
index 208aa13d1619dc85175233845aa14dbd46a85eed..2d04d3640757359bd2514d7c93a6f475323ce17a 100644
--- a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
+++ b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
@@ -399,7 +399,7 @@ bool triSurface::readSTLASCII(const fileName& STLfileName)
     // Create the lexer obtaining the approximate number of vertices in the STL
     // from the file size
     STLLexer lexer(&STLstream.stdStream(), Foam::fileSize(STLfileName)/400);
-    while(lexer.lex() != 0)
+    while (lexer.lex() != 0)
     {}
 
     DynamicList<STLpoint>& STLpoints = lexer.STLpoints();
diff --git a/src/triSurface/triSurface/interfaces/TRI/readTRI.C b/src/triSurface/triSurface/interfaces/TRI/readTRI.C
index c0452e46aafe3e058e0f30f8dede8a28c3e1170f..d0dc0b3c314db2fab3277dee08bf46a15dd89d80 100644
--- a/src/triSurface/triSurface/interfaces/TRI/readTRI.C
+++ b/src/triSurface/triSurface/interfaces/TRI/readTRI.C
@@ -63,7 +63,7 @@ bool triSurface::readTRI(const fileName& TRIfileName)
     // Max region number so far
     label maxRegion = 0;
 
-    while(TRIfile)
+    while (TRIfile)
     {
         string line = getLineNoComment(TRIfile);
 
diff --git a/src/triSurface/triSurface/triSurface.C b/src/triSurface/triSurface/triSurface.C
index 83674b6b90bde4aeeafd3eb48f0af4550e6b5861..96ca3d78a363a59d1e18cc5aa600e9c929f17317 100644
--- a/src/triSurface/triSurface/triSurface.C
+++ b/src/triSurface/triSurface/triSurface.C
@@ -838,7 +838,7 @@ void Foam::triSurface::markZone
     // List of faces whose faceZone has been set.
     labelList changedFaces(1, faceI);
 
-    while(true)
+    while (true)
     {
         // Pick up neighbours of changedFaces
         DynamicList<label> newChangedFaces(2*changedFaces.size());
diff --git a/src/triSurface/triSurface/triSurfaceAddressing.C b/src/triSurface/triSurface/triSurfaceAddressing.C
index ce2e5608f47e413b4af1d82968af72769767b839..14a383c9fc3507d5226e6cb4b7dc728908667f3e 100644
--- a/src/triSurface/triSurface/triSurfaceAddressing.C
+++ b/src/triSurface/triSurface/triSurfaceAddressing.C
@@ -91,7 +91,7 @@ void triSurface::calcSortedEdgeFaces() const
             // e0 is reference so angle is 0
             faceAngles[0] = 0;
 
-            for(label nbI = 1; nbI < myFaceNbs.size(); nbI++)
+            for (label nbI = 1; nbI < myFaceNbs.size(); nbI++)
             {
                 // Get opposite vertex
                 const labelledTri& f = localFaces()[myFaceNbs[nbI]];
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
index c202ac479c8e3c71f3a9d2fb744cd853e6e4975e..a857b587e30ddcd462560efc8fa1bc9774e8ae41 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutURoughWallFunction/nutURoughWallFunctionFvPatchScalarField.C
@@ -186,7 +186,7 @@ tmp<scalarField> nutURoughWallFunctionFvPatchScalarField::calcYPlus
                 yPlusLast = yp;
                 yp = (kappaRe + yp)/(1.0 + log(E_*yp));
 
-            } while(mag(ryPlusLam*(yp - yPlusLast)) > 0.0001 && ++iter < 10);
+            } while (mag(ryPlusLam*(yp - yPlusLast)) > 0.0001 && ++iter < 10);
 
             yPlus[facei] = max(0.0, yp);
         }
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C
index bccc07672ff826a4f6d5a84e5748d2133e5a7e23..ba5f0e79c5a473e4b976ca5da1e6689afb848166 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutUWallFunction/nutUWallFunctionFvPatchScalarField.C
@@ -98,7 +98,7 @@ tmp<scalarField> nutUWallFunctionFvPatchScalarField::calcYPlus
             yPlusLast = yp;
             yp = (kappaRe + yp)/(1.0 + log(E_*yp));
 
-        } while(mag(ryPlusLam*(yp - yPlusLast)) > 0.01 && ++iter < 10 );
+        } while (mag(ryPlusLam*(yp - yPlusLast)) > 0.01 && ++iter < 10 );
 
         yPlus[facei] = max(0.0, yp);
     }
diff --git a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/datToFoam/datToFoam.C b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/datToFoam/datToFoam.C
index caa975f3376edf8378e527675ba6b204c968e646..c4f266376a9ce43f16b78d600347191223a0873b 100644
--- a/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/datToFoam/datToFoam.C
+++ b/tutorials/compressible/rhoCentralFoam/biconic25-55Run35/datToFoam/datToFoam.C
@@ -106,7 +106,7 @@ int main(int argc, char *argv[])
                 plot3dFile >> coord;
 
                 // if statement ignores the first layer in i and j
-                if(i>0 && j>0)
+                if (i>0 && j>0)
                 {
                     points[p++][comp] = coord;
                 }
@@ -117,7 +117,7 @@ int main(int argc, char *argv[])
     // correct error in biconic meshes
     forAll(points, i)
     {
-        if(points[i][1] < 1e-07)
+        if (points[i][1] < 1e-07)
         {
             points[i][1] = 0.0;
         }
diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/pEqn.H b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/pEqn.H
index 5a67dd0497b150c4a46f62f306afdf814cfe17aa..cab105511b203935eea4c905ecb1f175e8730e39 100644
--- a/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/pEqn.H
+++ b/tutorials/multiphase/interFoam/MRFInterFoam/MRFInterFoam/pEqn.H
@@ -19,7 +19,7 @@
         )*rUAf;
     adjustPhi(phi, U, p);
 
-    for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
+    for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
         fvScalarMatrix pEqn
         (